/* NotesQL landing page. Notebook paper, ink, and one teal for "safe to act on". Amber marks a draft that
   still needs a person. Dark is a deep green-black slate. */

:root {
  --bg: #F5F4EF; --bg2: #EDEBE4;
  --surface: #FFFFFF; --surface2: #FAF9F6; --code: #F4F2EC;
  --line: rgba(20, 32, 29, .09); --line2: rgba(20, 32, 29, .15);
  --ink: #14201D; --ink2: #3E4C48; --ink3: #5F6C68;
  --accent: #0B7564; --accent-hi: #0A8A75; --on-accent: #FFFFFF;
  --accent-soft: rgba(11, 117, 100, .10);
  --amber: #9A5B00; --amber-soft: rgba(214, 140, 20, .16);
  --up: #0B7A4B; --down: #B4343B;
  --k: #0B6E8C; --f: #8A4B00; --s: #A0306A;
  --bar-a: #B9C4C0; --bar-b: #0B7564;
  --pg: #3C6FB4; --my: #D9822B; --duck: #E1B100;
  --dotgrid: rgba(20, 32, 29, .07);
  --shadow: 0 1px 1px rgba(20,32,29,.04), 0 6px 16px -6px rgba(20,32,29,.10);
  --shadow-lg: 0 1px 2px rgba(20,32,29,.05), 0 20px 40px -18px rgba(20,32,29,.22), 0 60px 100px -40px rgba(20,32,29,.25);
  --radius: 14px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1211; --bg2: #101817;
    --surface: #141D1B; --surface2: #182321; --code: #101917;
    --line: rgba(220, 240, 234, .08); --line2: rgba(220, 240, 234, .14);
    --ink: #E6EEEB; --ink2: #B2C0BC; --ink3: #8C9B97;
    --accent: #4FD1B3; --accent-hi: #6FE0C5; --on-accent: #04241E;
    --accent-soft: rgba(79, 209, 179, .12);
    --amber: #F2B65A; --amber-soft: rgba(242, 182, 90, .14);
    --up: #5BD69A; --down: #F28A8F;
    --k: #6CC6E8; --f: #F0B36A; --s: #F08DBE;
    --bar-a: #3A4A46; --bar-b: #4FD1B3;
    --pg: #7EA6E0; --my: #F0A35A; --duck: #F2D04B;
    --dotgrid: rgba(220, 240, 234, .06);
    --shadow: 0 1px 1px rgba(0,0,0,.25), 0 6px 16px -6px rgba(0,0,0,.5);
    --shadow-lg: 0 1px 2px rgba(0,0,0,.3), 0 20px 40px -18px rgba(0,0,0,.6), 0 60px 100px -40px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1211; --bg2: #101817;
  --surface: #141D1B; --surface2: #182321; --code: #101917;
  --line: rgba(220, 240, 234, .08); --line2: rgba(220, 240, 234, .14);
  --ink: #E6EEEB; --ink2: #B2C0BC; --ink3: #8C9B97;
  --accent: #4FD1B3; --accent-hi: #6FE0C5; --on-accent: #04241E;
  --accent-soft: rgba(79, 209, 179, .12);
  --amber: #F2B65A; --amber-soft: rgba(242, 182, 90, .14);
  --up: #5BD69A; --down: #F28A8F;
  --k: #6CC6E8; --f: #F0B36A; --s: #F08DBE;
  --bar-a: #3A4A46; --bar-b: #4FD1B3;
  --pg: #7EA6E0; --my: #F0A35A; --duck: #F2D04B;
  --dotgrid: rgba(220, 240, 234, .06);
  --shadow: 0 1px 1px rgba(0,0,0,.25), 0 6px 16px -6px rgba(0,0,0,.5);
  --shadow-lg: 0 1px 2px rgba(0,0,0,.3), 0 20px 40px -18px rgba(0,0,0,.6), 0 60px 100px -40px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
code, pre, .mono { font-family: var(--mono); font-variant-ligatures: none; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.c-mute { color: var(--ink3); }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- buttons, tags, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 600; font-size: 15.5px; text-decoration: none;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 18px -8px var(--accent); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14.5px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16.5px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font: 600 11.5px/1 var(--sans); letter-spacing: .01em; white-space: nowrap;
}
.tag-draft { color: var(--amber); background: var(--amber-soft); }
.tag-draft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-ok { color: var(--accent); background: var(--accent-soft); }
.tag-ok::before { content: ""; width: 7px; height: 4px; border: solid currentColor; border-width: 0 0 1.6px 1.6px; transform: translateY(-1px) rotate(-45deg); }
.chip {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font: 500 12px/1.6 var(--mono);
  color: var(--ink2); background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line);
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-pg { background: var(--pg); } .dot-my { background: var(--my); } .dot-duck { background: var(--duck); }

.who {
  display: inline-grid; place-items: center; flex: none; height: 22px; padding: 0 8px; border-radius: 6px;
  font: 600 11.5px/1 var(--sans);
}
.who-you { background: var(--ink); color: var(--bg); }
.who-claude { background: var(--accent-soft); color: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.m-bg { fill: var(--accent); } .m-fg { fill: var(--on-accent); } .m-st { fill: none; stroke: var(--on-accent); stroke-width: 2.4; }
.brand-name { font: 700 20px/1 var(--display); letter-spacing: -.03em; }
.brand-name span { font-family: var(--mono); font-weight: 600; font-size: .86em; letter-spacing: -.02em; color: var(--accent); margin-left: 1px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { font-size: 14.5px; color: var(--ink2); text-decoration: none; padding: 6px 10px; border-radius: 8px; transition: background .2s, color .2s; }
.nav-links a:hover { color: var(--ink); background: var(--line); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.theme-toggle { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--ink2); }
.theme-toggle:hover { background: var(--line); color: var(--ink); }
.theme-toggle svg { grid-area: 1 / 1; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease), opacity .25s; }
.i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-theme="dark"] .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="dark"] .i-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
  :root:not([data-theme="light"]) .i-moon { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 8vw, 112px);
  background-image: radial-gradient(var(--dotgrid) 1.1px, transparent 1.2px);
  background-size: 22px 22px; background-position: -11px -11px;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 160px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.hero-copy { padding-top: clamp(0px, 4vw, 56px); }
.hero-grid > * { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 10px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--ink2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line2);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 var(--amber-soft); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--amber-soft); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { margin-top: 22px; font-size: clamp(40px, 5.6vw, 68px); font-weight: 750; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 22px; font-size: clamp(17px, 1.5vw, 19.5px); color: var(--ink2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 28px 0 0; font-size: 14px; color: var(--ink3); }
.sources li { display: inline-flex; align-items: center; gap: 8px; }

.hero-figure { margin: 0; }
.fig-note { margin-top: 12px; font-size: 13px; color: var(--ink3); text-align: right; }
.replay { margin-left: 6px; font-size: 13px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* the notebook illustration */
.nb {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
  overflow: hidden; font-size: 14px; line-height: 1.5;
}
.nb-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface2); font-size: 12.5px; color: var(--ink3); min-width: 0;
}
.nb-dots { display: flex; gap: 6px; flex: none; }
.nb-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.nb-crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nb-conn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; font-family: var(--mono); font-size: 11.5px; padding: 3px 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.nb-doc { padding: 22px 24px 24px; display: grid; gap: 12px; }
.nb-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.nb-text { color: var(--ink2); margin-top: -4px; }

.cell { border-radius: 12px; min-width: 0; }
.cell-ask { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); }
.ask-text { font-weight: 550; color: var(--ink); min-width: 0; }
.caret { display: none; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.18em; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nb[data-stage="0"] .caret { display: inline-block; }

.cell-sql { padding: 12px 12px 10px; box-shadow: inset 0 0 0 1px var(--line2); background: var(--surface); position: relative; }
.cell-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.sql {
  margin: 0; padding: 12px 14px; border-radius: 9px; background: var(--code); color: var(--ink);
  font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre; tab-size: 2;
}
.sql .k { color: var(--k); font-weight: 600; } .sql .f { color: var(--f); } .sql .s { color: var(--s); }
.cell-actions { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.run-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 13px;
  transition: transform .15s, box-shadow .3s;
}
.run-btn svg { width: 11px; height: 11px; fill: currentColor; }
.ghost-btn { height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--ink2); box-shadow: inset 0 0 0 1px var(--line2); }
.cursor { position: absolute; left: 34px; top: 16px; width: 16px; height: 20px; opacity: 0; pointer-events: none; }
.cursor svg { width: 16px; height: 20px; fill: var(--ink); stroke: var(--surface); stroke-width: 1.2; stroke-linejoin: round; }

.result-meta { display: flex; gap: 14px; font: 500 11.5px/1 var(--mono); color: var(--ink3); padding: 0 2px 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font: 600 11.5px/1 var(--mono); color: var(--ink3); padding: 8px 10px; border-bottom: 1px solid var(--line2); background: var(--surface2); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:not(:first-child), .tbl td:not(:first-child) { text-align: right; }
.tbl tr:last-child td { border-bottom: 0; }
.cell-result { box-shadow: inset 0 0 0 1px var(--line); padding: 10px 0 0; overflow: hidden; }
.cell-result .result-meta { padding: 0 12px 8px; }
.up { color: var(--up); font-weight: 600; } .down { color: var(--down); font-weight: 600; }

.cell-chart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 6px 18px; align-items: end; padding: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.chart { grid-row: span 2; display: flex; align-items: flex-end; justify-content: space-around; gap: 10px; height: 118px; padding-bottom: 20px; border-bottom: 1px solid var(--line2); position: relative; }
.grp { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.grp em { position: absolute; left: 50%; bottom: -19px; transform: translateX(-50%); font: normal 500 10.5px/1 var(--mono); color: var(--ink3); white-space: nowrap; }
.bar { width: 14px; border-radius: 4px 4px 1px 1px; transform-origin: bottom; transition: transform .7s var(--ease); }
.b-aug { background: var(--bar-a); } .b-sep { background: var(--bar-b); }
.h100 { height: 100%; } .h87 { height: 87%; } .h68 { height: 68%; } .h66 { height: 66%; } .h26 { height: 26%; } .h24 { height: 24%; }
.legend { display: flex; gap: 14px; font: 500 11.5px/1 var(--mono); color: var(--ink3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; }
.narrative { font-size: 13.5px; color: var(--ink); grid-column: 2; }
.cell-chart .legend { grid-column: 2; grid-row: 1; align-self: start; }
.cell-chart .cite { grid-column: 1 / -1; margin-top: 8px; }
.cite { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink3); }
.cite b { font-family: var(--mono); font-weight: 600; color: var(--accent); font-size: 11.5px; }
.cite svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; flex: none; }

/* staged reveal: data-stage 0 typing, 1 draft, 2 run click, 3 results, 4 chart and narrative */
.nb .s1, .nb .s3, .nb .s4 { transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s; }
.nb[data-stage="0"] .s1, .nb[data-stage="0"] .s3, .nb[data-stage="1"] .s3, .nb[data-stage="2"] .s3,
.nb[data-stage="0"] .s4, .nb[data-stage="1"] .s4, .nb[data-stage="2"] .s4, .nb[data-stage="3"] .s4 {
  opacity: 0; transform: translateY(8px); filter: blur(2px);
}
.nb[data-stage="0"] .bar, .nb[data-stage="1"] .bar, .nb[data-stage="2"] .bar, .nb[data-stage="3"] .bar { transform: scaleY(0); }
.nb .grp:nth-child(2) .bar { transition-delay: .08s; } .nb .grp:nth-child(3) .bar { transition-delay: .16s; }
.cell-sql .tag-ok { display: none; }
.nb[data-stage="3"] .cell-sql .tag-ok, .nb[data-stage="4"] .cell-sql .tag-ok { display: inline-flex; }
.nb[data-stage="3"] .cell-sql .tag-draft, .nb[data-stage="4"] .cell-sql .tag-draft { display: none; }
.nb[data-stage="1"] .cell-sql, .nb[data-stage="2"] .cell-sql { box-shadow: inset 0 0 0 1.5px var(--amber), 0 0 0 4px var(--amber-soft); }
.nb[data-stage="1"] .run-btn { animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }
.nb[data-stage="2"] .cursor { animation: cursor-in 1s var(--ease) forwards; }
.nb[data-stage="2"] .run-btn { animation: press 1s forwards; }
@keyframes cursor-in { 0% { opacity: 0; transform: translate(70px, 26px); } 55% { opacity: 1; transform: none; } 100% { opacity: 1; transform: none; } }
@keyframes press { 0%, 62% { transform: none; } 72% { transform: scale(.94); } 100% { transform: none; } }
.nb[data-stage="3"] .cursor { opacity: 0; transition: opacity .4s .4s; }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-alt { background: var(--bg2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.kicker { font: 600 13px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.section h2 { font-size: clamp(32px, 4.2vw, 50px); }
.section-lede { margin-top: 18px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink2); max-width: 40em; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.step { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 24px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow), 0 0 0 1px var(--line); min-width: 0; }
.step-n { font: 600 13px/1 var(--mono); color: var(--ink3); }
.step h3 { font-size: 26px; }
.step p { color: var(--ink2); font-size: 15.5px; }
.mini { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; min-width: 0; }
.mini-ask { font-weight: 550; }
.mini-review code { font-size: 12.5px; padding: 6px 10px; border-radius: 8px; background: var(--code); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mini-review .k { color: var(--k); font-weight: 600; } .mini-review .f { color: var(--f); }
.mini-meta { font: 500 12px/1 var(--mono); color: var(--ink3); }

.does { margin-top: 28px; padding: 28px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line2); display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 20px 40px; }
.does-title { font-size: 22px; }
.does-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }
.does-list li { position: relative; padding-left: 22px; color: var(--ink2); font-size: 15.5px; }
.does-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.does-list b { color: var(--ink); font-weight: 600; }

/* governed context */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.split > * { min-width: 0; }
.split-copy h2 { margin-bottom: 22px; }
.split-copy p { color: var(--ink2); margin-top: 14px; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink2); }
.ticks li::before { content: ""; position: absolute; left: 3px; top: .45em; width: 10px; height: 5px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ticks b { color: var(--ink); font-weight: 600; }

.layer { display: grid; gap: 12px; }
.layer-card { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow), 0 0 0 1px var(--line); min-width: 0; }
.layer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.layer-type { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); padding: 5px 7px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line2); }
.layer-name { font: 600 15px/1.2 var(--mono); color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.layer-head .tag { margin-left: auto; }
.layer-dl { margin: 0 0 14px; display: grid; gap: 10px; font-size: 14.5px; }
.layer-dl div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.layer-dl dt { color: var(--ink3); }
.layer-dl dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sql-sm { font-size: 12.5px; }
.layer-join { margin-left: clamp(0px, 4vw, 40px); }
.layer-join .layer-head { margin-bottom: 8px; }
.layer-p { font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; }
.layer-answer { margin-left: clamp(0px, 8vw, 80px); padding: 16px 20px; border-radius: var(--radius); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.layer-answer > p:first-child { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }

/* safety */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { padding: 26px 22px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow), 0 0 0 1px var(--line); min-width: 0; }
.card-ic { width: 30px; height: 30px; margin-bottom: 20px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--ink2); font-size: 15.5px; }

/* who */
.who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.who-card { padding: 28px 26px; border-top: 2px solid var(--accent); background: var(--surface); border-radius: 4px 4px var(--radius) var(--radius); box-shadow: var(--shadow), 0 0 0 1px var(--line); min-width: 0; }
.who-card h3 { font-size: 22px; margin-bottom: 12px; }
.who-card p { color: var(--ink2); font-size: 15.5px; }

/* status */
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.status-col { padding: 26px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line2); min-width: 0; }
.status-col ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.status-col li { position: relative; padding-left: 20px; color: var(--ink2); }
.status-col li::before { content: ""; position: absolute; left: 2px; top: .66em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); }
.badge { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font: 600 13px/1 var(--sans); letter-spacing: 0; }
.badge-built { color: var(--accent); background: var(--accent-soft); }
.badge-dev { color: var(--amber); background: var(--amber-soft); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* cta */
.cta { padding: 0 0 clamp(72px, 10vw, 120px); }
.cta-card {
  text-align: center; padding: clamp(44px, 7vw, 80px) clamp(20px, 5vw, 64px); border-radius: 24px;
  background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
  background-image: radial-gradient(var(--dotgrid) 1.1px, transparent 1.2px); background-size: 22px 22px;
}
.cta-card h2 { font-size: clamp(34px, 4.6vw, 54px); }
.cta-card p { margin: 18px auto 30px; max-width: 34em; color: var(--ink2); font-size: 18px; }
.cta-card .fine { margin: 26px auto 0; font-size: 13.5px; color: var(--ink3); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .brand-mark { width: 24px; height: 24px; }
.footer .brand-name { font-size: 17px; }
.footer-note { font-size: 14px; color: var(--ink3); }
.footer-note a { color: var(--ink2); text-underline-offset: 3px; }

/* scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .does { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 940px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 640px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .steps, .who-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-inner { gap: 12px; height: 58px; }
  .brand-name { font-size: 18px; }
  .btn-sm { padding: 0 12px; font-size: 14px; }
  .cta-row .btn { flex: 1 1 auto; }
  .nb-doc { padding: 16px 14px 16px; }
  .nb-title { font-size: 20px; }
  .nb-dots { display: none; }
  .sql { font-size: 11px; padding: 10px; }
  .tbl td, .tbl th { padding: 7px 8px; }
  .cell-chart { grid-template-columns: minmax(0, 1fr); }
  .chart { grid-row: auto; }
  .cell-chart .legend, .narrative { grid-column: 1; grid-row: auto; }
  .legend { margin-top: 16px; }
  .cards, .status-grid, .does-list { grid-template-columns: minmax(0, 1fr); }
  .does { padding: 22px 20px; }
  .layer-dl div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .layer-join, .layer-answer { margin-left: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .nav-actions .btn-sm { padding: 0 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
