@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/instrument-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #f7f6fc;
  --surface: #ffffff;
  --sunken: #eeecf8;
  --ink: #15133b;
  --muted: #4b4a6e;
  --line: #d9d6ee;
  --link: #2323e8;
  --btn-bg: #15133b;
  --btn-fg: #f7f6fc;
  --people: #2323e8;
  --agent: #ff8a1f;
  --knowledge: #8b5cf6;
  --agent-ink: #8a3d00;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 62ch;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0a1f;
    --surface: #15143a;
    --sunken: #100f2c;
    --ink: #eeedff;
    --muted: #aaa8d2;
    --line: #2d2c62;
    --link: #9d9dff;
    --btn-bg: #eeedff;
    --btn-fg: #0b0a1f;
    --people: #6f6fff;
    --agent-ink: #ffb066;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--agent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--btn-bg); color: var(--btn-fg); padding: 0.6rem 1rem; border-radius: 6px; z-index: 10; }
.skip:focus { top: 0.75rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 0.92em; }

.wrap { width: min(100% - 2 * var(--gutter), 1180px); margin-inline: auto; }
.lede { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; color: var(--muted); max-width: 40ch; }
.prose { max-width: var(--measure); color: var(--muted); }

.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; flex-wrap: wrap; padding-block: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font: 800 1.45rem/1 var(--display); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand svg { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 46px; padding: 0.6rem 1.25rem; border-radius: 10px; font: 600 1rem/1.2 var(--text); text-decoration: none; border: 2px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); cursor: pointer; transition: transform 0.12s; }
.btn:hover { transform: translateY(-1px); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.small { min-height: 38px; padding: 0.35rem 0.9rem; font-size: 0.93rem; }
.btn.is-disabled { background: transparent; color: var(--muted); border: 2px dashed var(--line); cursor: not-allowed; transform: none; }
.btn.is-disabled:hover { transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: 1.5rem; }
.hero .lede { margin-bottom: 2rem; }
.status-note { margin-top: 1.25rem; font-size: 0.93rem; color: var(--muted); }

.session { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px color-mix(in srgb, var(--ink) 40%, transparent); overflow: hidden; }
.session-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--sunken); font-size: 0.88rem; color: var(--muted); }
.session-bar strong { color: var(--ink); font-weight: 600; }
.messages { list-style: none; margin: 0; padding: 1.1rem; display: grid; gap: 1.1rem; }
.message { display: grid; grid-template-columns: 34px 1fr; gap: 0.75rem; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; font: 700 0.9rem/1 var(--display); color: #fff; }
.avatar.person { border-radius: 50%; background: var(--people); }
.avatar.agent { border-radius: 9px; background: var(--agent); color: #1d1000; }
.who { font-weight: 600; font-size: 0.93rem; display: flex; gap: 0.5rem; align-items: baseline; }
.who small { font-weight: 500; font-size: 0.78rem; color: var(--agent-ink); }
.body { font-size: 0.98rem; line-height: 1.5; color: var(--ink); }
.mention { color: var(--link); font-weight: 600; }
.toolline { margin-top: 0.45rem; font: 400 0.8rem/1.4 var(--mono); color: var(--muted); background: var(--sunken); border-radius: 8px; padding: 0.45rem 0.65rem; }

.braid-band { padding-block: clamp(0.5rem, 2vw, 1.5rem); overflow: hidden; }
.braid-band svg { width: 100%; height: auto; min-height: 120px; }
.braid-halo { stroke: var(--bg); fill: none; stroke-linecap: round; }
.strand-a, .strand-b, .strand-c { fill: none; stroke-linecap: round; }
.strand-a { stroke: var(--people); }
.strand-b { stroke: var(--agent); }
.strand-c { stroke: var(--knowledge); }
.braid-key { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.92rem; color: var(--muted); padding-block: 0.5rem 0; }
.braid-key span::before { content: ""; display: inline-block; width: 22px; height: 6px; border-radius: 3px; margin-right: 0.5rem; vertical-align: middle; background: var(--c); }

section.block { padding-block: clamp(3.5rem, 8vw, 7rem); }
.block-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); counter-reset: step; }
.steps li { position: relative; padding-top: 3.2rem; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font: 700 1rem/1 var(--display); background: var(--c); color: #fff; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 1.1rem; left: 2.2rem; right: calc(-1 * clamp(1.25rem, 3vw, 2.5rem)); height: 3px; background: var(--c); opacity: 0.45; }
.steps li:last-child::after { display: none; }
.steps li:nth-child(1) { --c: var(--people); }
.steps li:nth-child(2) { --c: #c25f00; }
.steps li:nth-child(3) { --c: var(--knowledge); }
@media (prefers-color-scheme: dark) { .steps li:nth-child(2) { --c: var(--agent); } .steps li:nth-child(2)::before { color: #1d1000; } }
.steps h3 { margin-bottom: 0.6rem; }
.steps p { color: var(--muted); }

.features { margin: 0; display: grid; }
.feature { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(1rem, 4vw, 3rem); padding-block: 1.9rem; border-top: 1px solid var(--line); }
.feature:last-child { border-bottom: 1px solid var(--line); }
.feature dt { font: 700 clamp(1.3rem, 2.4vw, 1.7rem)/1.15 var(--display); letter-spacing: -0.02em; }
.feature dd { margin: 0; color: var(--muted); max-width: var(--measure); }
.feature dd .example { display: block; margin-top: 1rem; padding: 0.9rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--knowledge); border-radius: 8px; color: var(--ink); font: 400 0.9rem/1.55 var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.chip { padding: 0.2rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 0.9rem; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.split > div { padding: clamp(1.5rem, 4vw, 2.6rem); display: grid; gap: 1rem; align-content: start; }
.split > div + div { border-left: 1px solid var(--line); background: var(--sunken); }
.split ul { margin: 0; padding-left: 1.2rem; color: var(--muted); display: grid; gap: 0.4rem; }
.license-tag { display: inline-block; justify-self: start; padding: 0.15rem 0.7rem; border-radius: 6px; font: 400 0.82rem/1.5 var(--mono); border: 1px solid var(--ink); }

.cta-band { background: var(--ink); color: var(--bg); padding-block: clamp(3rem, 7vw, 5rem); }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.cta-band p { color: color-mix(in srgb, var(--bg) 78%, transparent); margin-top: 0.8rem; max-width: 44ch; }
.cta-band .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.cta-band .btn.secondary { background: transparent; color: var(--bg); border-color: var(--bg); }
.cta-band a:focus-visible { outline-color: var(--agent); }
@media (prefers-color-scheme: dark) { .cta-band { background: var(--surface); color: var(--ink); border-block: 1px solid var(--line); } .cta-band p { color: var(--muted); } .cta-band .btn { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); } .cta-band .btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); } }

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; }
.page-head h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); margin-bottom: 1rem; }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; padding-block: 1.5rem; }
.platform { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; display: grid; gap: 1rem; align-content: start; }
.platform.is-recommended { border: 2px solid var(--people); box-shadow: 0 0 0 4px color-mix(in srgb, var(--people) 18%, transparent); }
.platform h2 { font-size: 1.7rem; }
.platform .detected { display: none; justify-self: start; font-size: 0.82rem; font-weight: 600; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--people); color: #fff; }
.platform.is-recommended .detected { display: inline-block; }
.platform .buttons { display: grid; gap: 0.6rem; }
.platform .buttons .btn { justify-content: space-between; text-align: left; }
.platform .btn small { font-weight: 500; opacity: 0.8; }
.platform p { color: var(--muted); font-size: 0.97rem; }
.platform.later { opacity: 0.85; border-style: dashed; }
.notice { margin-block: 0.5rem 1rem; padding: 0.9rem 1.2rem; border-radius: 10px; background: var(--sunken); border: 1px dashed var(--line); color: var(--muted); }
.notice strong { color: var(--ink); }
pre { margin: 0; padding: 1rem 1.2rem; background: var(--ink); color: var(--bg); border-radius: 10px; overflow-x: auto; font-size: 0.9rem; line-height: 1.6; }
@media (max-width: 480px) { pre { font-size: 0.78rem; padding: 0.9rem 1rem; } }
@media (prefers-color-scheme: dark) { pre { background: var(--sunken); border: 1px solid var(--line); color: var(--ink); } }
.stack { display: grid; gap: 1.1rem; max-width: var(--measure); }
.stack h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.requirements { color: var(--muted); display: grid; gap: 0.4rem; margin: 0; padding-left: 1.2rem; max-width: var(--measure); }

.not-found { min-height: 60vh; display: grid; align-content: center; gap: 1.2rem; padding-block: 4rem; }

.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer a { color: var(--ink); }
.site-footer p + p { margin-top: 0.6rem; }

@media (max-width: 880px) {
  .hero .wrap, .cta-band .wrap, .site-footer .wrap { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 0 0 0 3.2rem; }
  .steps li::after { top: 2.2rem; bottom: -1.5rem; left: 1.05rem; right: auto; width: 3px; height: auto; }
  .feature { grid-template-columns: 1fr; gap: 0.6rem; }
  .split, .platforms { grid-template-columns: 1fr; }
  .split > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .nav { gap: 0.9rem; }
  .nav .hide-small { display: none; }
  .cta-row .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes weave-in { from { opacity: 0; transform: translateX(-3%); } to { opacity: 1; transform: none; } }
  .braid-band svg { animation: weave-in 1.1s cubic-bezier(.2,.7,.2,1) both; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
.mk-halo { stroke: #15133b; fill: none; stroke-linecap: round; }
.mk-a, .mk-b, .mk-c { fill: none; stroke-linecap: round; }
.mk-a { stroke: #6f6fff; } .mk-b { stroke: #ff8a1f; } .mk-c { stroke: #a98bff; }
