/* Open BrAIn documentation — shared styles. Monochrome like the console, with four
   semantic colours used the same way in every diagram:
   green = published, living knowledge · blue = AI and models · amber = human decision · red = secret. */

@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/manrope-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/manrope-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/manrope-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/manrope-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 800; src: url(../fonts/manrope-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/manrope-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/manrope-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/manrope-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/manrope-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 800; src: url(../fonts/manrope-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #141414;
  --muted: #5c5c5c;
  --faint: #8a8a8a;
  --paper: #ffffff;
  --canvas: #f4f4f1;
  --surface: #eaeae6;
  --line: #dcdcd7;
  --line-strong: #b9b9b2;
  --life: #1d6a45;
  --ai: #2b54a6;
  --human: #8a5800;
  --secret: #a23b3b;
  --life-soft: #e3f1e8;
  --ai-soft: #e5ecf9;
  --human-soft: #f7ecd6;
  --secret-soft: #f6e3e3;
  --shadow: 0 1px 2px #0000000d, 0 12px 32px -12px #00000026;
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ececea;
    --muted: #a9a9a4;
    --faint: #7d7d78;
    --paper: #181818;
    --canvas: #0f0f0f;
    --surface: #242424;
    --line: #313131;
    --line-strong: #4a4a4a;
    --life: #84d2a5;
    --ai: #9dbcf2;
    --human: #e8c27a;
    --secret: #eba3a3;
    --life-soft: #15291e;
    --ai-soft: #17213a;
    --human-soft: #2c2312;
    --secret-soft: #2e1818;
    --shadow: 0 1px 2px #00000066, 0 16px 40px -16px #000000aa;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ececea;
  --muted: #a9a9a4;
  --faint: #7d7d78;
  --paper: #181818;
  --canvas: #0f0f0f;
  --surface: #242424;
  --line: #313131;
  --line-strong: #4a4a4a;
  --life: #84d2a5;
  --ai: #9dbcf2;
  --human: #e8c27a;
  --secret: #eba3a3;
  --life-soft: #15291e;
  --ai-soft: #17213a;
  --human-soft: #2c2312;
  --secret-soft: #2e1818;
  --shadow: 0 1px 2px #00000066, 0 16px 40px -16px #000000aa;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.65 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01";
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
strong { font-weight: 700; }
::selection { background: var(--life-soft); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; letter-spacing: -0.3px; white-space: nowrap; }
.logo b { font-weight: 800; }
.logo svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: nowrap; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 1240px) {
  .menu-btn { display: grid; margin-left: auto; }
  .nav { display: none; position: absolute; top: 62px; left: 12px; right: 12px; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { font-size: 16px; padding: 11px 14px; }
}

/* Layout */
main { display: block; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 760px; }
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
.band { background: var(--paper); }
.dark-band { background: #0d0f0e; color: #ececea; --muted: #a9a9a4; --line: #2b2b2b; --paper: #171717; --surface: #222; --life: #84d2a5; --ai: #9dbcf2; --human: #e8c27a; --secret: #eba3a3; --life-soft: #15291e; --ai-soft: #17213a; --human-soft: #2c2312; --secret-soft: #2e1818; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(38px, 6vw, 72px); letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 18px; }
h3 { font-size: 21px; margin-bottom: 8px; letter-spacing: -0.01em; }
h4 { font-size: 16px; margin-bottom: 6px; }
p { margin: 0 0 16px; }
.lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: var(--muted); max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 12px; } .mt2 { margin-top: 28px; } .mt3 { margin-top: 48px; }
ul.clean { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--life-soft); box-shadow: inset 0 0 0 1.5px var(--life); }
.checks li::after { content: ""; position: absolute; left: 5px; top: 11px; width: 6px; height: 3px; border-left: 2px solid var(--life); border-bottom: 2px solid var(--life); transform: rotate(-45deg); }

/* Hero */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 .hl { background: linear-gradient(100deg, var(--life), var(--ai)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 22px; }
.hero-art { position: absolute; inset: 0; z-index: 0; opacity: .9; pointer-events: none; }
.hero-art svg { position: absolute; right: -120px; top: -40px; width: 820px; height: auto; }
@media (max-width: 1240px) { .hero-art { opacity: .35; } }
@media (max-width: 900px) { .hero-art svg { right: -380px; } }
.page-hero { padding: 80px 0 56px; }
.page-hero h1 { font-size: clamp(36px, 5vw, 60px); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line); background: var(--paper); }
.btn.primary { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.btn:hover { transform: translateY(-1px); }

/* Grids and cards */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.rev > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.rev { grid-template-columns: 1fr; gap: 28px; } .split.rev > :first-child { order: 0; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p:last-child { margin-bottom: 0; }
.card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; background: var(--surface); }
.card .ico svg { width: 24px; height: 24px; }
.card.life { border-color: color-mix(in srgb, var(--life) 30%, var(--line)); }
.card.life .ico { background: var(--life-soft); color: var(--life); }
.card.ai .ico { background: var(--ai-soft); color: var(--ai); }
.card.human .ico { background: var(--human-soft); color: var(--human); }
.card.secret .ico { background: var(--secret-soft); color: var(--secret); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.tag.life { background: var(--life-soft); color: var(--life); }
.tag.ai { background: var(--ai-soft); color: var(--ai); }
.tag.human { background: var(--human-soft); color: var(--human); }
.tag.secret { background: var(--secret-soft); color: var(--secret); }

/* Status badges: what exists, what is being qualified, what is designed. */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 4px 11px 4px 9px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.st.ok { background: var(--life-soft); color: var(--life); }
.st.ok::before { background: var(--life); }
.st.part { background: var(--ai-soft); color: var(--ai); }
.st.part::before { background: transparent; box-shadow: inset 0 0 0 2px var(--ai); }
.st.plan { background: var(--surface); color: var(--muted); }
.st.plan::before { background: transparent; box-shadow: inset 0 0 0 2px var(--faint); border: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 14px; color: var(--muted); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.stats > div { padding: 26px 24px; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.stats span { display: block; font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats > div:nth-child(2) { border-right: 0; } .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Screenshots */
.shot { margin: 0; }
.shot .frame { border-radius: 14px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; }
.shot .chrome { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.shot .chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); display: block; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.shot figcaption b { color: var(--ink); font-weight: 600; }
.shot.phone { max-width: 300px; margin: 0 auto; }
.shot.phone .frame { border-radius: 34px; border: 8px solid #1b1b1b; }
.shots-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .shots-row { grid-template-columns: 1fr; } }
.note-demo { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* Diagrams */
.diagram { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; overflow-x: auto; }
.diagram svg { display: block; width: 100%; height: auto; min-width: 640px; }
.diagram.free svg { min-width: 0; }
.diagram text { font-family: Manrope, system-ui, sans-serif; }
.d-ink { fill: var(--ink); } .d-muted { fill: var(--muted); } .d-paper { fill: var(--paper); } .d-surface { fill: var(--surface); } .d-canvas { fill: var(--canvas); }
.s-line { stroke: var(--line-strong); } .s-ink { stroke: var(--ink); }
.d-life { fill: var(--life); } .d-ai { fill: var(--ai); } .d-human { fill: var(--human); } .d-secret { fill: var(--secret); }
.d-life-soft { fill: var(--life-soft); } .d-ai-soft { fill: var(--ai-soft); } .d-human-soft { fill: var(--human-soft); } .d-secret-soft { fill: var(--secret-soft); }
.s-life { stroke: var(--life); } .s-ai { stroke: var(--ai); } .s-human { stroke: var(--human); } .s-secret { stroke: var(--secret); }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .pulse.d1 { animation-delay: .6s; } .pulse.d2 { animation-delay: 1.2s; } .pulse.d3 { animation-delay: 1.8s; } .pulse.d4 { animation-delay: 2.4s; }
  .flowline { stroke-dasharray: 5 7; animation: flow 1.8s linear infinite; }
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.35); opacity: .45; } }
@keyframes flow { to { stroke-dashoffset: -24; } }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { position: relative; padding: 22px 24px 22px 76px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 22px; top: 20px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--ink); color: var(--canvas); font-size: 15px; }
.step h3 { font-size: 19px; }
.step p { margin: 0; color: var(--muted); }

/* Comparison table */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table-wrap .table { min-width: 680px; }

/* Callouts and quotes */
.callout { border-left: 3px solid var(--life); background: var(--life-soft); padding: 18px 22px; border-radius: 0 14px 14px 0; }
.callout.ai { border-color: var(--ai); background: var(--ai-soft); }
.callout.human { border-color: var(--human); background: var(--human-soft); }
.callout.plain { border-color: var(--line-strong); background: var(--surface); }
.callout p:last-child { margin: 0; }
.big-quote { font-size: clamp(24px, 3vw, 36px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; max-width: 980px; }
.big-quote em { font-style: normal; color: var(--life); }

/* Analogy rows (vivant page) */
.analogy { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; padding: 28px 0; border-top: 1px solid var(--line); }
.analogy:first-of-type { border-top: 0; }
.analogy .art { width: 120px; height: 120px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; }
.analogy .art svg { width: 84px; height: 84px; }
.analogy h3 { margin-top: 2px; }
.analogy .bio { color: var(--muted); }
.analogy .label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: block; }
@media (max-width: 860px) { .analogy { grid-template-columns: 1fr; } }

/* Pager and footer */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager a { display: block; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-decoration: none; }
.pager a:hover { border-color: var(--line-strong); }
.pager small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.pager b { font-size: 19px; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; } }
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgb(8 10 9 / 82%); }
dialog.lightbox img { display: block; max-width: 96vw; max-height: 90vh; width: auto; height: auto; border-radius: 10px; }
dialog.lightbox p { color: #ddd; font-size: 14px; text-align: center; margin: 10px 0 0; }
dialog.lightbox button { position: fixed; top: 16px; right: 16px; }

:focus-visible { outline: 2px solid var(--ai); outline-offset: 2px; border-radius: 6px; }

/* Narrow captures of a single console panel. */
.shot.panel-shot { max-width: 500px; margin-left: auto; margin-right: auto; }
.real-badge { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; color: var(--life); }
