@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500&display=swap');

:root {
  color-scheme: light;
  --ink: #13202f;
  --muted: #59697b;
  --quiet: #7d8b9b;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --line: #d9e1df;
  --blackboard: #111923;
  --cyan: #00a6b8;
  --green: #6fa223;
  --coral: #eb5b4f;
  --amber: #d5951f;
  --blue: #3858c7;
  --shadow: 0 16px 44px rgba(20, 32, 47, 0.1);
  --mono: "DM Mono", "SFMono-Regular", consolas, monospace;
  --sans: "DM Sans", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Syne", "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(19, 32, 47, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(19, 32, 47, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, #f8fbfa 0%, #eef8fa 46%, #fff8f0 100%);
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.layout {
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(220px, 320px) minmax(0, 1fr) 46px;
  grid-template-areas: "brand search nav language";
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  overflow: visible;
  min-height: 76px;
  padding: 12px clamp(16px, 3vw, 40px);
  color: #edf7f9;
  background:
    linear-gradient(90deg, rgba(0, 166, 184, 0.18), transparent 38%),
    linear-gradient(270deg, rgba(235, 91, 79, 0.13), transparent 42%),
    var(--blackboard);
  box-shadow: 0 18px 40px rgba(17, 25, 35, 0.14);
}

.brand {
  grid-area: brand;
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #ffffff;
}

.brand-overline {
  margin: 0 0 4px;
  color: #9fb2c4;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.15;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 132px;
}

.language-control {
  grid-area: language;
}

.language-menu {
  --language-pill-width: 48px;
  --language-button-size: 40px;
  position: relative;
  justify-self: end;
  align-self: center;
  display: grid;
  place-items: center;
  width: var(--language-pill-width);
  height: var(--language-pill-width);
  min-width: 0;
}

.language-native {
  display: none;
}

.language-trigger,
.language-options button {
  display: grid;
  place-items: center;
  width: var(--language-button-size);
  height: var(--language-button-size);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  line-height: inherit;
  font-size: 1.15rem;
  cursor: pointer;
}

.language-trigger {
  position: relative;
  z-index: 32;
}

.language-trigger:hover,
.language-options button:hover,
.language-menu.is-open .language-trigger {
  border-color: rgba(0, 166, 184, 0.64);
  background: rgba(0, 166, 184, 0.16);
}

.language-options {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 30;
  display: grid;
  justify-items: center;
  width: var(--language-pill-width);
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: var(--language-pill-width) 3px 4px;
  background: rgba(17, 25, 35, 0.98);
  box-shadow: 0 14px 32px rgba(17, 25, 35, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scaleY(0.96);
  transform-origin: top center;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.language-options button {
  border-color: transparent;
  background: transparent;
}

.language-menu:hover .language-options,
.language-menu:focus-within .language-options,
.language-menu.is-open .language-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scaleY(1);
}

.search-control {
  grid-area: search;
}

.control-group label {
  color: #b8c7d5;
  font-size: 0.78rem;
}

select,
input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

select:focus,
input:focus {
  outline: 2px solid rgba(0, 166, 184, 0.58);
  outline-offset: 2px;
}

input::placeholder {
  color: #8ea2b5;
}

#doc-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.nav-item {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  color: #edf7f9;
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.nav-item span {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-item small {
  display: none;
  color: #9fb2c4;
  line-height: 1.35;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(0, 166, 184, 0.5);
  background: rgba(0, 166, 184, 0.12);
}

.nav-item.active {
  box-shadow: inset 0 -3px 0 var(--cyan);
}

.content {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 1460px;
  min-width: 0;
  margin: 22px auto 36px;
  padding: 0 clamp(16px, 2vw, 20px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 0;
  min-height: 520px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 250, 250, 0.94)),
    linear-gradient(120deg, rgba(0, 166, 184, 0.2), rgba(235, 91, 79, 0.13));
  box-shadow: var(--shadow);
}

.hero-text {
  padding: clamp(30px, 5vw, 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.eyebrow::before {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(111,162,35,0.2);
  animation: eyebrow-pulse 2.4s ease-in-out infinite;
}

@keyframes eyebrow-pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(111,162,35,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(111,162,35,0.06); }
}

.hero h2 {
  margin: 0;
  max-width: 980px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.hero h2 em {
  font-style: normal;
  color: var(--blue);
}

.hero-lead {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  max-width: 100%;
}

.hero-action,
.link-grid a,
.doc-link-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.hero-action:hover,
.link-grid a:hover,
.doc-link-button:hover {
  border-color: var(--cyan);
  color: #006e7d;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.hero-action:first-child {
  color: #ffffff;
  border-color: var(--blackboard);
  background: var(--blackboard);
  padding: 10px 20px;
  font-size: 0.95rem;
}

.hero-action:first-child:hover {
  background: #1e2e3f;
  border-color: #1e2e3f;
  color: #ffffff;
}

.hero-proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  width: 100%;
}

.proof-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 20px 0 0;
}

.proof-stat strong {
  font-family: var(--mono);
  font-size: 1.12rem;
  color: var(--ink);
  line-height: 1;
}

.proof-stat small {
  font-size: 0.72rem;
  color: var(--quiet);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proof-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  margin: 0 20px 0 0;
  flex-shrink: 0;
}

.product-signal {
  display: grid;
  align-content: stretch;
  gap: 14px;
  min-width: 0;
  padding: clamp(22px, 4vw, 44px);
  background:
    linear-gradient(180deg, rgba(17, 25, 35, 0.98), rgba(20, 34, 48, 0.99)),
    var(--blackboard);
  color: #edf7f9;
}

.signal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.86rem;
  min-width: 0;
}

.signal-header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.signal-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(111, 162, 35, 0.18);
  animation: signal-pulse 2.4s ease-in-out infinite;
}

@keyframes signal-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(111, 162, 35, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(111, 162, 35, 0.08); }
}

.signal-rows {
  display: grid;
  gap: 10px;
}

.signal-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  animation: row-in 0.35s ease both;
}

.signal-rows .signal-row:nth-child(1) { animation-delay: 0.05s; }
.signal-rows .signal-row:nth-child(2) { animation-delay: 0.15s; }
.signal-rows .signal-row:nth-child(3) { animation-delay: 0.25s; }
.signal-rows .signal-row:nth-child(4) { animation-delay: 0.35s; }

@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.signal-step-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
}

.signal-step-icon--spec  { background: rgba(56, 88, 199, 0.22); color: #8ba6f5; border: 1px solid rgba(56, 88, 199, 0.3); }
.signal-step-icon--plan  { background: rgba(111, 162, 35, 0.22); color: #a8d45a; border: 1px solid rgba(111, 162, 35, 0.3); }
.signal-step-icon--build { background: rgba(213, 149, 31, 0.22); color: #f0b84a; border: 1px solid rgba(213, 149, 31, 0.3); }
.signal-step-icon--qa    { background: rgba(235, 91, 79, 0.22); color: #f5907f; border: 1px solid rgba(235, 91, 79, 0.3); }

.signal-row-body { min-width: 0; }

.signal-row span {
  color: #98dce5;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.signal-row p {
  margin: 4px 0 0;
  color: #dce9f4;
  line-height: 1.4;
}

.app-map,
.doc-block,
.page-head,
.notice-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.app-map {
  padding: 20px;
}

.section-heading,
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h3,
.section-heading h4,
.page-head h3,
.doc-block h4 {
  margin: 0;
}

.section-heading p,
.page-head p,
.page-head span {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.page-head {
  display: grid;
  gap: 5px;
  padding: 20px;
}

.page-head p {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.page-head h3 {
  font-size: 1.38rem;
}

.app-map-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.surface-card,
.info-card,
.workflow-step,
.command-card,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.surface-card {
  min-height: 245px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.surface-card span {
  align-self: start;
  border-radius: 999px;
  padding: 5px 8px;
  color: #0c6673;
  background: rgba(0, 166, 184, 0.12);
  font-size: 0.74rem;
  font-weight: 800;
}

.surface-card h4,
.info-card h5,
.workflow-step h5,
.timeline-item h5 {
  margin: 0;
}

.surface-card p,
.info-card p,
.workflow-step p,
.timeline-item p,
.notice-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

code {
  font-family: var(--mono);
}

.surface-card code,
.info-card code {
  margin-top: auto;
  color: #0b6674;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.doc-content {
  display: grid;
  gap: 14px;
}

.notice-block {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.notice-block > span {
  border-radius: 999px;
  background: linear-gradient(180deg, var(--coral), var(--amber));
}

.notice-block h4 {
  margin: 0 0 8px;
}

.doc-block {
  padding: 18px;
}

.doc-block h4 {
  margin-bottom: 12px;
  font-size: 1.03rem;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workflow-step {
  min-height: 178px;
  padding: 14px;
}

.workflow-step b {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  margin-bottom: 16px;
  color: white;
  background: var(--blackboard);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.workflow-step h5 {
  margin-bottom: 7px;
}

.info-card {
  min-height: 174px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: white;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #173140;
  background: #eaf7f8;
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-size: 0.9rem;
}

.command-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.command-card {
  padding: 12px;
}

.command-card span {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.command-card pre {
  margin: 0;
  overflow-x: auto;
  border-radius: 8px;
  padding: 12px;
  color: #e8f6ff;
  background: var(--blackboard);
}

.command-card code {
  font-size: 0.82rem;
  line-height: 1.5;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.link-grid a,
.doc-link-button {
  display: grid;
  gap: 4px;
  min-height: 70px;
  text-align: left;
}

.link-grid span,
.doc-link-button span {
  font-weight: 800;
}

.link-grid small,
.doc-link-button small {
  color: var(--quiet);
  overflow-wrap: anywhere;
}

.doc-link-button em {
  color: var(--coral);
  font-size: 0.72rem;
  font-style: normal;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.timeline-item {
  min-height: 160px;
  padding: 14px;
}

.timeline-item span {
  display: inline-block;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-item.done span {
  color: #2b5b0d;
  background: rgba(111, 162, 35, 0.18);
}

.timeline-item.next span {
  color: #8a4b00;
  background: rgba(213, 149, 31, 0.18);
}

.timeline-item h5 {
  margin-bottom: 7px;
}

.showcase-band,
.principles-band,
.examples-band,
.architecture-map-band,
.surface-gallery-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.showcase-band {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: 0;
  min-width: 0;
  overflow: hidden;
}

.showcase-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
  padding: clamp(22px, 4vw, 44px);
}

.showcase-copy > p {
  margin: 0;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.showcase-copy h4 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.06;
}

.showcase-copy > span {
  color: var(--muted);
  line-height: 1.68;
}

.showcase-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.showcase-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfa;
}

.showcase-metrics strong {
  display: block;
  font-size: 1.15rem;
}

.showcase-metrics small {
  color: var(--quiet);
  line-height: 1.3;
}

.showcase-console {
  display: grid;
  align-content: start;
  min-height: 480px;
  min-width: 0;
  padding: 18px;
  color: #e8f6ff;
  background:
    linear-gradient(135deg, rgba(0, 166, 184, 0.13), transparent 36%),
    var(--blackboard);
}

.console-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px 8px 0 0;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
}

.console-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--coral);
}

.console-topbar span:nth-child(2) {
  background: var(--amber);
}

.console-topbar span:nth-child(3) {
  background: var(--green);
}

.console-topbar strong {
  margin-left: 6px;
  color: #b8c7d5;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.console-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.console-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.console-step b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #10202c;
  background: #98dce5;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.console-step strong {
  display: block;
  margin-bottom: 3px;
}

.console-step p {
  margin: 0;
  color: #b8c7d5;
  line-height: 1.45;
}

.showcase-console pre {
  margin: 0;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 0 8px 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.24);
}

.showcase-console code {
  color: #d8f8ff;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
}

.principles-band,
.examples-band,
.architecture-map-band,
.surface-gallery-band {
  padding: 22px;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.principle-card {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.principle-card span,
.example-card span {
  display: inline-block;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 5px 8px;
  color: #0c6673;
  background: rgba(0, 166, 184, 0.12);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.principle-card h5,
.example-card h5 {
  margin: 0 0 9px;
  font-size: 1.03rem;
}

.principle-card p,
.example-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.example-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}

.example-card pre {
  margin: auto 0 0;
  overflow-x: auto;
  border-radius: 8px;
  padding: 13px;
  color: #e8f6ff;
  background: var(--blackboard);
}

.example-card code {
  color: inherit;
  font-size: 0.82rem;
  line-height: 1.55;
}

.example-card button {
  width: fit-content;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #f8fbfa;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: 800;
  cursor: pointer;
}

.example-card button:hover {
  border-color: var(--cyan);
  color: #006e7d;
}

.architecture-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.architecture-node {
  position: relative;
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 250px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(0, 166, 184, 0.08), transparent 42%),
    #ffffff;
}

.architecture-node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px;
  right: -9px;
  z-index: 2;
  width: 16px;
  height: 2px;
  background: var(--coral);
}

.architecture-node b {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blackboard);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.architecture-node span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 7px;
  color: #0c6673;
  background: rgba(0, 166, 184, 0.12);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.architecture-node h5 {
  margin: 0;
  line-height: 1.18;
}

.architecture-node p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.architecture-node code {
  align-self: end;
  margin-top: auto;
  color: #0b6674;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.architecture-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.architecture-evidence span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: #f8fbfa;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.surface-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.product-screen {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 25, 35, 0.16);
  border-radius: 8px;
  background: var(--blackboard);
  box-shadow: 0 16px 34px rgba(17, 25, 35, 0.16);
}

.screen-topbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 11px;
  color: #dbe8f2;
  background: rgba(255, 255, 255, 0.05);
}

.screen-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--coral);
}

.screen-topbar span:nth-child(2) {
  background: var(--amber);
}

.screen-topbar span:nth-child(3) {
  background: var(--green);
}

.screen-topbar strong {
  margin-left: 5px;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.screen-stage {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 360px;
}

.screen-stage aside {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 12px 10px;
  color: #a9bccd;
  background: rgba(255, 255, 255, 0.04);
}

.screen-stage aside span {
  min-height: 28px;
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.screen-stage aside span:first-child {
  color: #10202c;
  background: #98dce5;
}

.screen-main {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(0, 166, 184, 0.14), transparent 34%),
    #172534;
}

.screen-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.screen-title-row h5 {
  margin: 0 0 6px;
  color: #f4fbff;
  font-size: 0.98rem;
  line-height: 1.2;
}

.screen-title-row p {
  margin: 0;
  color: #b8c7d5;
  font-size: 0.78rem;
  line-height: 1.45;
}

.screen-title-row em {
  border-radius: 999px;
  padding: 5px 8px;
  color: #10202c;
  background: var(--amber);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.screen-card-list {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.screen-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.07);
}

.screen-card span {
  color: #98dce5;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.screen-card strong {
  color: #f2f8fb;
  font-size: 0.82rem;
  line-height: 1.25;
}

.screen-card small {
  color: #b8c7d5;
  line-height: 1.35;
}

.screen-main code {
  align-self: end;
  color: #98dce5;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.related-docs .section-heading {
  margin-bottom: 12px;
}

.related-doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.related-doc {
  display: grid;
  gap: 8px;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.related-doc:hover {
  border-color: var(--cyan);
}

.related-doc span {
  align-self: start;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 7px;
  color: #0c6673;
  background: rgba(0, 166, 184, 0.11);
  font-size: 0.7rem;
  font-weight: 800;
}

.related-doc strong {
  line-height: 1.28;
}

.related-doc small {
  margin-top: auto;
  color: var(--quiet);
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.docs-workbench {
  display: grid;
  gap: 14px;
}

.reader-hero,
.reader-toolbar,
.reader-layout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.reader-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 18px;
  padding: 22px;
}

.reader-kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reader-hero h4 {
  margin: 0;
  font-size: 1.45rem;
}

.reader-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.reader-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: stretch;
}

.reader-stats div {
  display: grid;
  align-content: center;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(0, 166, 184, 0.08), transparent 58%),
    #ffffff;
}

.reader-stats strong {
  color: var(--blackboard);
  font-size: 1.35rem;
  line-height: 1.1;
}

.reader-stats span {
  margin-top: 6px;
  color: var(--quiet);
  font-size: 0.78rem;
}

.reader-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px);
  gap: 12px;
  padding: 14px;
}

.reader-toolbar label {
  display: grid;
  gap: 7px;
}

.reader-toolbar label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.reader-toolbar input,
.reader-toolbar select {
  border-color: var(--line);
  color: var(--ink);
  background: var(--panel);
}

.reader-toolbar input::placeholder {
  color: var(--quiet);
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.72fr) minmax(190px, 0.56fr);
  align-items: start;
  overflow: hidden;
}

.doc-index,
.doc-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.doc-index {
  border-right: 1px solid var(--line);
  background: #f7faf9;
}

.doc-index-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
}

.doc-index-heading span {
  color: var(--quiet);
  font-size: 0.78rem;
}

.doc-list {
  display: grid;
}

.doc-list-item {
  display: grid;
  gap: 5px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.doc-list-item:hover,
.doc-list-item.active {
  background: rgba(0, 166, 184, 0.09);
}

.doc-list-item.active {
  box-shadow: inset 4px 0 0 var(--cyan);
}

.doc-list-item span {
  color: var(--coral);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.doc-list-item strong {
  line-height: 1.28;
}

.doc-list-item small {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.empty-docs {
  margin: 0;
  padding: 14px;
  color: var(--muted);
}

.markdown-panel {
  min-width: 0;
  background: var(--panel);
}

.reader-titlebar {
  display: grid;
  gap: 8px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(235, 91, 79, 0.06), transparent 54%),
    #ffffff;
}

.reader-titlebar p,
.reader-titlebar span {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.reader-titlebar p {
  color: var(--coral);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reader-titlebar h4 {
  margin: 0;
  font-size: 1.42rem;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.doc-actions code {
  border-radius: 8px;
  padding: 8px 10px;
  color: #0b6674;
  background: rgba(0, 166, 184, 0.1);
  overflow-wrap: anywhere;
}

.doc-actions a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
  font-weight: 800;
}

.markdown-body {
  max-width: 920px;
  padding: 24px 28px 34px;
  line-height: 1.72;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  scroll-margin-top: 24px;
  margin: 1.35em 0 0.55em;
  color: var(--blackboard);
  line-height: 1.2;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body h1 {
  font-size: 1.8rem;
}

.markdown-body h2 {
  font-size: 1.38rem;
}

.markdown-body h3 {
  font-size: 1.12rem;
}

.markdown-body p,
.markdown-body li,
.markdown-body blockquote {
  color: #35475a;
}

.markdown-body p {
  margin: 0 0 1em;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.3rem;
}

.markdown-body li + li {
  margin-top: 0.42em;
}

.markdown-body blockquote {
  margin: 18px 0;
  border-left: 4px solid var(--cyan);
  padding: 12px 16px;
  background: rgba(0, 166, 184, 0.08);
}

.markdown-body pre {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  padding: 14px;
  color: #e8f6ff;
  background: var(--blackboard);
}

.markdown-body code {
  border-radius: 6px;
  padding: 2px 5px;
  color: #0b6674;
  background: rgba(0, 166, 184, 0.1);
  font-size: 0.88em;
}

.markdown-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.markdown-body a,
.inline-doc-link {
  color: #006e7d;
  font-weight: 800;
}

.markdown-image {
  max-width: 100%;
  height: auto;
  margin: 8px 6px 8px 0;
  vertical-align: middle;
}

.inline-doc-link {
  display: inline;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.markdown-table {
  max-width: 100%;
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.markdown-table table {
  min-width: 620px;
}

.doc-toc {
  display: grid;
  gap: 4px;
  border-left: 1px solid var(--line);
  padding: 14px;
  background: #fbfcf8;
}

.doc-toc strong {
  margin-bottom: 8px;
}

.doc-toc p {
  margin: 0;
  color: var(--quiet);
  line-height: 1.5;
}

.toc-item {
  border: 0;
  border-radius: 8px;
  padding: 8px;
  color: var(--muted);
  background: transparent;
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.toc-item:hover {
  color: var(--ink);
  background: rgba(0, 166, 184, 0.09);
}

.toc-item.level-3 {
  padding-left: 18px;
}

.toc-item.level-4 {
  padding-left: 28px;
}

.empty-reader {
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
}

.empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: #b8c7d5;
}

@media (max-width: 1500px) {
  .sidebar {
    grid-template-columns: minmax(200px, auto) minmax(220px, 1fr) 46px;
    grid-template-areas:
      "brand search language"
      "nav nav nav";
  }

  #doc-nav {
    justify-content: flex-start;
    overflow: visible;
  }
}

@media (max-width: 1240px) {

  .app-map-grid,
  .card-grid,
  .principles-grid,
  .example-grid,
  .surface-preview-grid,
  .related-doc-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .architecture-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .architecture-node:nth-child(3)::after {
    display: none;
  }

  .showcase-band,
  .hero,
  .reader-hero,
  .reader-layout {
    grid-template-columns: 1fr;
  }

  .showcase-console {
    min-height: auto;
  }

  .doc-index,
  .doc-toc {
    position: static;
    max-height: none;
    border-right: 0;
    border-left: 0;
  }

  .doc-toc {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .content {
    width: 100%;
    margin-top: 10px;
    padding: 0 10px;
  }

  .sidebar {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 46px;
    grid-template-areas:
      "brand language"
      "search search"
      "nav nav";
    align-items: stretch;
    padding: 12px;
  }

  .brand {
    width: 100%;
  }

  .control-group {
    min-width: 0;
  }

  #doc-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-text,
  .product-signal,
  .app-map,
  .doc-block,
  .page-head,
  .notice-block,
  .principles-band,
  .architecture-map-band,
  .surface-gallery-band,
  .examples-band,
  .showcase-copy,
  .showcase-console {
    padding: 16px;
  }

  .hero,
  .hero-text,
  .product-signal,
  .showcase-band,
  .showcase-console,
  .principles-band,
  .architecture-map-band,
  .surface-gallery-band,
  .examples-band {
    max-width: calc(100vw - 20px);
  }

  .hero-text > *,
  .product-signal > *,
  .showcase-console > * {
    max-width: calc(100vw - 52px);
  }

  .hero h2 {
    font-size: 1.45rem;
    line-height: 1.08;
  }

  .hero-lead {
    font-size: 0.92rem;
    line-height: 1.58;
  }

  #doc-nav,
  .app-map-grid,
  .card-grid,
  .principles-grid,
  .example-grid,
  .surface-preview-grid,
  .showcase-metrics,
  .architecture-flow,
  .workflow,
  .command-list,
  .link-grid,
  .related-doc-grid,
  .reader-stats,
  .reader-toolbar,
  .timeline {
    grid-template-columns: 1fr;
  }

  .architecture-node::after {
    display: none;
  }

  .screen-stage {
    grid-template-columns: 1fr;
  }

  .screen-stage aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .reader-hero,
  .reader-toolbar,
  .reader-titlebar,
  .markdown-body {
    padding: 16px;
  }

  .console-step {
    grid-template-columns: 34px minmax(0, 1fr);
  }
}
