/* Layout: plain bands on a quiet ground; the hero splits pitch | live terminal; diagrams carry the two planes. Cobalt, light and dark. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("fonts/bricolage-grotesque.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/ibm-plex-sans.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("fonts/jetbrains-mono.woff2") format("woff2"); }
*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:root { --bg: #f5f7fb; --bg-2: #ffffff; --line: #dbe1ec; --fg: #0f172a; --muted: #51607a; --accent: #2457e6; --accent-2: #c4620a; --on-accent: #ffffff; --term-bg: #0b0f1a; --term-fg: #dfe6f3; --term-dim: #6c7890; --term-line: #1e2636; --term-a: #7fa6ff; --term-b: #f2b45a; color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0b0d12; --bg-2: #12161f; --line: #232a38; --fg: #eef2f8; --muted: #9aa6ba; --accent: #6b97ff; --accent-2: #f2a33a; --on-accent: #0b0d12; --term-bg: #070a12; --term-fg: #dfe6f3; --term-dim: #6c7890; --term-line: #1e2636; --term-a: #7fa6ff; --term-b: #f2b45a; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0b0d12; --bg-2: #12161f; --line: #232a38; --fg: #eef2f8; --muted: #9aa6ba; --accent: #6b97ff; --accent-2: #f2a33a; --on-accent: #0b0d12; --term-bg: #070a12; --term-fg: #dfe6f3; --term-dim: #6c7890; --term-line: #1e2636; --term-a: #7fa6ff; --term-b: #f2b45a; color-scheme: dark; }
:root {
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.4rem, 5.5vw, 4rem);
}

body { background: var(--bg); color: var(--fg); font: 400 var(--step-0)/1.6 var(--font-body); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, pre, kbd { font-family: var(--font-mono); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.1; }
h2 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
p code, li code, td code { font-size: 0.86em; padding: 0.1em 0.35em; border-radius: 5px; background: var(--bg-2); border: 1px solid var(--line); }

.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { border-top: 1px solid var(--line); }
.band > .wrap { padding-block: 3rem; display: grid; gap: 1.6rem; }
.eyebrow { font: 500 0.78rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--muted); font-size: 1.06rem; }
.lede a, .prose a, .more a, .note a { color: var(--accent); }
.section-head { display: grid; gap: 0.75rem; }

/* nav */
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font: 800 1.2rem/1 var(--font-display); }
.brand img { width: 34px; height: 34px; flex: none; }
.navlinks { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.95rem; }
.navlinks a { text-decoration: none; color: var(--muted); }
.navlinks a:hover, .navlinks a[aria-current="page"] { color: var(--fg); }

/* buttons */
.cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.15rem; border-radius: 10px;
  font: 600 0.98rem/1 var(--font-body); text-decoration: none; border: 1px solid var(--line); color: var(--fg);
}
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost:hover { border-color: var(--muted); }

/* hero */
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; padding-block: 2.5rem 3.5rem; }
.hero-copy { display: grid; gap: 1.4rem; min-width: 0; }
.hero h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.025em; }
.hero h1 .nc { color: var(--accent); }
.hero .lede { font-size: 1.12rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font: 400 0.85rem/1.4 var(--font-mono); color: var(--muted); }
.facts span::before { content: "▸ "; color: var(--accent-2); }

/* terminal */
.term { background: var(--term-bg); color: var(--term-fg); border: 1px solid var(--term-line); border-radius: 14px; box-shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.5); min-width: 0; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--term-line); font: 400 0.78rem/1 var(--font-mono); color: var(--term-dim); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--term-line); display: block; }
.term-bar b { margin-left: auto; font-weight: 400; }
.term pre { margin: 0; padding: 1.1rem 1.2rem 1.3rem; overflow-x: auto; font-size: 0.86rem; line-height: 1.75; }
.term .host { color: var(--term-a); }
.term .host.b { color: var(--term-b); }
.term .out { color: var(--term-a); }
.term .cm { color: var(--term-dim); }
.term .sep { display: block; border-top: 1px dashed var(--term-line); margin: 0.55rem 0; height: 0; }
.cursor { display: inline-block; width: 0.55em; height: 1.05em; vertical-align: -0.18em; background: var(--term-a); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* comparison */
.but { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.but div { display: grid; gap: 0.45rem; align-content: start; padding-top: 1rem; border-top: 2px solid var(--line); min-width: 0; }
.but div:first-child { border-top-color: var(--accent); }
.but h3 { font-size: 1.08rem; }
.but p { color: var(--muted); font-size: 0.95rem; }

/* diagrams */
.seg { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); flex-wrap: wrap; justify-self: start; }
.seg button { font: 500 0.92rem/1 var(--font-body); color: var(--muted); background: none; border: 0; border-radius: 8px; padding: 0.65rem 0.95rem; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.planes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.diagram { min-width: 0; overflow-x: auto; }
.diagram svg { width: 100%; height: auto; min-width: 520px; display: block; }
.diagram text { font-family: var(--font-mono); font-size: 13px; fill: var(--fg); }
.diagram .sub { fill: var(--muted); font-size: 11.5px; }
.diagram .ghost { fill: var(--muted); }
.legend { display: grid; gap: 1.5rem; min-width: 0; align-content: start; }
.legend > div { display: grid; grid-template-columns: 34px 1fr; gap: 0.25rem 0.9rem; }
.legend svg { grid-row: span 2; margin-top: 0.35rem; }
.legend h3 { font-size: 1.05rem; }
.legend p { color: var(--muted); font-size: 0.95rem; grid-column: 2; }
.legend .more { grid-column: 1 / -1; }
.data-line { stroke-dasharray: 2 12; stroke-linecap: round; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }

/* verbs */
.verbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.verb { background: var(--bg-2); padding: 1.5rem; display: grid; gap: 0.6rem; grid-template-rows: auto 1fr auto; min-width: 0; }
.verb p { color: var(--muted); font-size: 0.95rem; }
.verb > code { display: block; font-size: 0.8rem; color: var(--accent); overflow-x: auto; white-space: nowrap; padding-top: 0.6rem; border-top: 1px dashed var(--line); }

/* install tabs and snippets */
.install { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.tabs { display: flex; gap: 0.25rem; padding: 0.5rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { font: 500 0.9rem/1 var(--font-body); color: var(--muted); background: none; border: 0; border-radius: 8px; padding: 0.6rem 0.85rem; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); background: var(--bg); box-shadow: inset 0 -2px 0 var(--accent); }
.panel { padding: 1.4rem 1.5rem 1.6rem; display: grid; gap: 0.9rem; }
.panel p { color: var(--muted); font-size: 0.93rem; }
.snippet { display: flex; align-items: stretch; background: var(--term-bg); border: 1px solid var(--term-line); border-radius: 10px; min-width: 0; }
.snippet pre { margin: 0; padding: 0.9rem 1rem; overflow-x: auto; color: var(--term-fg); font-size: 0.86rem; line-height: 1.7; flex: 1; min-width: 0; }
.snippet pre .cm { color: var(--term-dim); }
.snippet button { flex: none; border: 0; border-left: 1px solid var(--term-line); background: none; color: var(--term-dim); font: 500 0.78rem/1 var(--font-mono); padding: 0 1rem; cursor: pointer; border-radius: 0 10px 10px 0; }
.snippet button:hover { color: var(--term-a); }
mark.ph { background: none; color: var(--term-b); border-bottom: 1px dotted var(--term-b); }
code mark.ph { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.more { font-size: 0.95rem; color: var(--muted); }

/* apps */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.app { border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; display: grid; gap: 0.7rem; grid-template-rows: auto auto 1fr auto; background: var(--bg-2); min-width: 0; }
.app .kind { font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); }
.app p { color: var(--muted); font-size: 0.95rem; }
.app a { color: var(--accent); font-weight: 500; font-size: 0.95rem; text-decoration: none; }
.app a:hover { text-decoration: underline; }
.note { color: var(--muted); font-size: 0.92rem; }

.proto { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.proto .cta { justify-content: flex-end; }
footer .wrap { padding-block: 2rem 2.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; border-top: 1px solid var(--line); }
footer a { color: var(--muted); }

/* guide page */
.guide-hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; padding-block: 2.5rem 3rem; }
.guide-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
.yours { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); padding: 1.4rem; display: grid; gap: 1rem; min-width: 0; }
.yours h2 { font-size: 1.15rem; }
.yours p { color: var(--muted); font-size: 0.9rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font: 500 0.8rem/1.2 var(--font-mono); color: var(--muted); }
.field input { font: 400 0.95rem/1.2 var(--font-mono); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.8rem; width: 100%; box-sizing: border-box; }
.field input::placeholder { color: var(--muted); opacity: 0.7; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.trio > div { display: grid; gap: 0.45rem; align-content: start; padding-top: 1rem; border-top: 2px solid var(--accent); min-width: 0; }
.trio p, .edges li { color: var(--muted); font-size: 0.95rem; }
.edges { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.6rem; }
.guide { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 1.5rem); display: grid; gap: 0.2rem; font-size: 0.9rem; }
.toc a { text-decoration: none; color: var(--muted); padding: 0.35rem 0.6rem; border-radius: 6px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--fg); border-left-color: var(--accent); }
.steps { display: grid; gap: 2.5rem; min-width: 0; }
.step { display: grid; gap: 1rem; min-width: 0; scroll-margin-top: 1.5rem; }
.step-head { display: flex; align-items: baseline; gap: 0.9rem; }
.step-num { font: 500 0.85rem/1 var(--font-mono); color: var(--on-accent); background: var(--accent); border-radius: 6px; padding: 0.35rem 0.5rem; flex: none; }
.prose { display: grid; gap: 0.9rem; }
.prose p, .prose li { color: var(--fg); }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.prose .muted { color: var(--muted); }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: 8px; padding: 0.9rem 1rem; background: var(--bg-2); color: var(--fg); font-size: 0.95rem; }
.tablebox { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 0.78rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
.sub-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.sub-steps > div { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; background: var(--bg-2); display: grid; gap: 0.6rem; align-content: start; min-width: 0; }
.sub-steps h3 { font-size: 1rem; }
.sub-steps ol { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; font-size: 0.92rem; color: var(--muted); }


@media (max-width: 900px) {
  .hero .wrap, .planes, .proto, .guide-hero .wrap, .guide { grid-template-columns: 1fr; }
  .but { grid-template-columns: repeat(2, 1fr); }
  .verbs, .apps { grid-template-columns: 1fr 1fr; }
  .trio, .sub-steps { grid-template-columns: 1fr; }
  .proto .cta { justify-content: flex-start; }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 600px) {
  .but, .verbs, .apps { grid-template-columns: 1fr; }
  .navlinks { gap: 1rem; font-size: 0.9rem; }
  .band > .wrap { padding-block: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .data-line, .cursor { animation: none; }
}
