/* Layout: dark, committed single look. Full-bleed hero with a live knowledge-graph canvas,
   then one lead service + two smaller, proof ledger, approach, how a project starts. */
:root {
  --bg: #141311;
  --panel: #1c1b18;
  --panel-2: #23221e;
  --fg: #f2efe8;
  --muted: #a29d92;
  --line: #2d2b26;
  --accent: #4d8dff;
  --accent-dim: rgba(77,141,255,.14);
  --warn: #ff9a62;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.6; }
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
@media (min-width: 760px) { .wrap { padding-left: max(48px, env(safe-area-inset-left, 0px)); padding-right: max(48px, env(safe-area-inset-right, 0px)); } }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; max-width: 62ch; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Nav */
nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(20,19,17,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; padding: 10px 0; transition: color .15s ease-out; }
.nav-links a:hover { color: var(--fg); }
@media (max-width: 600px) { .nav-links a:not(.keep) { display: none; } }
.nav-links { align-items: center; }
.brand, .nav-links a { white-space: nowrap; }
@media (max-width: 600px) { .brand { font-size: 15px; } .nav-links { gap: 14px; } .nav-links a { font-size: 14px; } .nav-links a.nav-cta { padding: 7px 12px; } }
@media (max-width: 400px) { .brand { font-size: 14px; } .nav-links { gap: 10px; } .nav-links a { font-size: 13px; } .nav-links a.nav-cta { padding: 6px 10px; } }
.nav-links a.nav-cta { color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }
.nav-links a.nav-cta:hover { border-color: var(--muted); }
.contact { display: grid; gap: 24px; justify-items: start; }
.contact p { color: var(--muted); font-size: 18px; }

/* Hero */
.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(190,180,160,.18) 1px, transparent 1.5px); background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(100deg, transparent 25%, #000 75%); mask-image: linear-gradient(100deg, transparent 25%, #000 75%); }
.hero-in { position: relative; z-index: 2; padding-block: 104px 96px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 760px; }
@media (max-width: 820px) { .hero-in { padding-block: 72px 64px; } }
.pill { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(28,27,24,.8); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
h1 { font-size: clamp(42px, 7.4vw, 96px); font-weight: 900; font-stretch: 118%; line-height: .94; letter-spacing: -.035em; text-transform: uppercase; }
h1 .line { display: block; }
@media (max-width: 600px) { h1 { font-size: clamp(30px, 10vw, 48px); font-stretch: 100%; } .lede { font-size: 17px; } }
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 19px; color: #cbc6bb; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .18s cubic-bezier(.2,.8,.2,1), background .18s ease-out, border-color .18s ease-out; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--fg); background: rgba(28,27,24,.6); }
.btn-ghost:hover { border-color: var(--muted); }
.btn svg { width: 16px; height: 16px; }
button.btn { border: 0; cursor: pointer; font-family: inherit; }
.dd { position: relative; }
.dd-chev { transition: transform .2s ease-out; }
.dd-btn-open .dd-chev, [aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
.dd-menu { position: absolute; z-index: 30; top: calc(100% + 10px); left: 0; width: min(340px, calc(100vw - 40px)); padding: 6px; display: grid; gap: 2px;
  background: #0f1522; border: 1px solid #38352e; border-radius: 16px; box-shadow: 0 24px 50px rgba(0,0,0,.5); transform-origin: top left; }
@media (prefers-reduced-motion: no-preference) { .dd-menu:not([hidden]) { animation: ddin .18s cubic-bezier(.2,.8,.2,1); } @keyframes ddin { from { opacity: 0; transform: translateY(-6px) scale(.98); } } }
.dd-menu[hidden] { display: none; }
.dd-menu.up { top: auto; bottom: calc(100% + 10px); transform-origin: bottom left; }
.dd-menu a { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 10px; text-decoration: none; transition: background .15s ease-out; }
.dd-menu a:hover, .dd-menu a:focus-visible { background: var(--panel-2); }
.dd-n { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.dd-menu b { display: block; font-weight: 600; font-size: 16px; }
.dd-menu small { display: block; color: var(--muted); font-size: 14px; }

/* Ben's preferred motion: staggered fade-up, hero headline only */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .rise:nth-child(2) { animation-delay: .08s; }
  .rise:nth-child(3) { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
}

section { padding-block: 96px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { section { padding-block: 64px; } }
.sec-head { display: grid; gap: 14px; margin-bottom: 48px; }
h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 800; font-stretch: 110%; line-height: 1; letter-spacing: -.03em; }
.sec-head p { color: var(--muted); font-size: 18px; }

/* Services */
.services { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .services { grid-template-columns: 1.35fr 1fr; }
  /* 03 spans the full width: text left, checklist, score and button right */
  .svc.wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; align-items: start; }
}
.svc { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: grid; gap: 18px; align-content: start; min-width: 0; transition: border-color .2s ease-out; }
.svc:hover { border-color: #3a372f; }
.wide-l, .wide-r { display: grid; gap: 18px; align-content: start; min-width: 0; }
.svc.lead { background: linear-gradient(160deg, #10203f 0%, var(--panel) 55%); border-color: #22355a; padding: 40px; }
.svc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.svc h3 { font-size: 28px; font-weight: 800; font-stretch: 108%; letter-spacing: -.02em; line-height: 1.05; }
.svc.lead h3 { font-size: clamp(32px, 3.4vw, 44px); }
.svc p { color: #cbc6bb; }
.svc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.svc li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15.5px; }
.svc li svg { width: 16px; height: 16px; margin-top: 4px; color: var(--accent); }
.proof { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 4px; }
.proof b { font-family: var(--display); font-stretch: 115%; font-weight: 800; font-size: 34px; line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.svc.lead .proof b { font-size: 48px; }
.proof span { font-size: 14px; color: var(--muted); }

/* Proof: test score + ledger */
.evidence { display: grid; gap: 28px; }
@media (min-width: 900px) { .evidence { grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; } }
.scorecard { display: grid; gap: 24px; min-width: 0; }
.bars { display: grid; gap: 16px; }
.bar { display: grid; gap: 8px; }
.bar-head { display: flex; justify-content: space-between; font-size: 15px; }
.bar-head b { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.track { height: 12px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.fill { height: 100%; border-radius: 999px; background: #4a463e; }
.fill.after { background: var(--accent); }
.note { font-size: 15px; color: var(--muted); }

.ledger { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-width: 0; }
.ledger-top { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row { padding: 18px 22px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.claim { font-size: 16px; }
.src { font-family: var(--mono); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.tag { justify-self: start; font-family: var(--mono); font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.tag.bad { background: rgba(255,154,98,.12); color: var(--warn); }
.tag.ok { background: var(--accent-dim); color: #8fb6ff; }

/* Approach */
.principles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
@media (min-width: 760px) { .principles { grid-template-columns: 1fr 1fr; } }
.principles div { background: var(--bg); padding: 28px; display: grid; gap: 8px; }
.principles h3 { font-size: 20px; font-weight: 700; font-stretch: 105%; }
.principles p { color: var(--muted); font-size: 16px; }
.svc.soon { background: transparent; border-style: dashed; }
.svc.soon h3, .svc.soon > div > p { color: var(--muted); }
.svc-price.soon-tag { color: var(--accent); border-color: rgba(77,141,255,.45); }
.soon-note { color: var(--muted); font-size: 15px; }
@media (min-width: 900px) { .principles.three { grid-template-columns: repeat(3, 1fr); } }

/* Steps + about */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; display: grid; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.steps li::before { content: "0" counter(s); font-family: var(--mono); font-size: 13px; color: var(--accent); }
.steps h3 { font-size: 20px; font-weight: 700; }
.steps p { color: var(--muted); font-size: 16px; }

.about { display: grid; gap: 32px; }
@media (min-width: 900px) { .about { grid-template-columns: 1.2fr 1fr; gap: 64px; } }
.about-text { display: grid; gap: 16px; min-width: 0; }
.about-text p { color: #cbc6bb; }
.creds { list-style: none; margin: 0; padding: 0; display: grid; }
.creds li { display: grid; gap: 2px; padding-block: 14px; border-top: 1px solid var(--line); }
.creds li:last-child { border-bottom: 1px solid var(--line); }
.creds strong { font-weight: 600; }
.creds span { color: var(--muted); font-size: 15px; }
.faq-group { margin-top: 40px; }
.faq-group:first-of-type { margin-top: 0; }
.faq-group > .label { display: block; margin-bottom: 12px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 20px; gap: 16px; align-items: center; padding: 20px 0; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: #fff; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.faq summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .2s ease-out; }
.faq details[open] summary svg { transform: rotate(45deg); color: var(--accent); }
.faq .ans { color: var(--muted); font-size: 16px; max-width: 65ch; padding: 0 0 22px; display: grid; gap: 10px; }
.faq .ans ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.faq .ans a { color: var(--fg); }
@media (max-width: 600px) { .faq summary { font-size: 16px; padding: 16px 0; } }

/* Score bars: undo the laptop animation's .bar (window title bar) styles, which share the class name */
.scorecard .bar { display: grid; gap: 8px; padding: 0; background: none; border: 0; font: inherit; color: inherit; }
.scorecard .bar span { margin-left: 0; overflow: visible; white-space: normal; }

/* Who, packages, calculator (v8) */
.who { display: grid; gap: 20px; }
@media (min-width: 760px) { .who { grid-template-columns: 1fr 1fr; } }
.who-card { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 10px; }
.who-card h3 { font-size: 26px; font-weight: 800; font-stretch: 108%; letter-spacing: -.02em; }
.who-card p { color: #cbc6bb; }
.pkgs { display: grid; gap: 20px; }
@media (min-width: 900px) { .pkgs { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.pkg { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: grid; gap: 18px; min-width: 0; }
.pkg.lead { border-color: #22355a; background: linear-gradient(160deg, #10203f 0%, var(--panel) 55%); padding: 40px; }
.pkg h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; font-stretch: 108%; letter-spacing: -.02em; line-height: 1.05; }
.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.price b { font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); font-size: 15px; }
.pkg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pkg li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15.5px; }
.pkg li svg { width: 16px; height: 16px; margin-top: 4px; color: var(--accent); }
.pkg-time { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.founding { margin-top: 20px; padding: 20px 24px; border: 1px dashed #3a372f; border-radius: 18px; display: grid; gap: 6px; }
.founding p { color: #cbc6bb; }
.founding b { color: var(--fg); font-weight: 600; }
.founding-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spots { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 6px 14px; border-radius: 999px; background: var(--accent-dim); border: 1px solid rgba(77,141,255,.4); color: var(--fg); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; transition: border-color .15s ease-out; }
.spots:hover { border-color: var(--accent); }
.spots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.support-row { margin-top: 40px; display: grid; gap: 24px; }
@media (min-width: 900px) { .support-row { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.support-row h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.support-row p { color: var(--muted); font-size: 15.5px; }
.calc { display: grid; gap: 40px; }
@media (min-width: 900px) { .calc { grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; } }
.calc-text { display: grid; gap: 16px; }
.calc-text p { color: #cbc6bb; font-size: 18px; }
.calc-box { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: grid; gap: 14px; }
.calc-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; color: var(--muted); }
.calc-label output { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--fg); font-variant-numeric: tabular-nums; }
#rate { width: 100%; accent-color: var(--accent); height: 28px; cursor: pointer; }
.calc-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.calc-result { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 6px; }
.calc-result b { font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: clamp(36px, 5vw, 56px); line-height: 1; font-variant-numeric: tabular-nums; }
.calc-result span { color: var(--muted); font-size: 15px; }
.calc-compare { font-size: 15px; color: #cbc6bb; }
.calc-compare b { color: var(--fg); }
@media (min-width: 900px) { .steps.five { grid-template-columns: repeat(5, 1fr); } }

.contact-mail { font-size: 15px; color: var(--muted); }
.contact-mail a, .foot a { color: var(--fg); text-underline-offset: 3px; }
.pk-cta { margin-top: 32px; }
.page-cta .ctas { justify-content: flex-start; }
.privacy h2 { margin-bottom: 32px; }
.privacy[hidden] { display: none; }
.privacy .pv-close { color: var(--fg); margin-left: 12px; text-underline-offset: 3px; }
.foot { align-items: center; }
.foot a.pv-btn { color: var(--fg); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; transition: border-color .15s ease-out; }
.foot a.pv-btn:hover { border-color: var(--muted); }
.pv-grid { display: grid; gap: 24px; margin-bottom: 24px; }
@media (min-width: 760px) { .pv-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.pv-grid h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.pv-grid p { color: var(--muted); font-size: 15px; }
.pv-grid a { color: var(--fg); }

.book { width: 100%; max-width: 1060px; }
.book-card { background: var(--panel); border: 1px solid #22355a; border-radius: 18px; padding: 32px; display: grid; gap: 32px; }
@media (min-width: 900px) { .book-card { grid-template-columns: 1.3fr 1fr; gap: 56px; padding: 40px; } }
.book-main { display: grid; gap: 16px; justify-items: start; }
.book-main h3 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; font-stretch: 108%; letter-spacing: -.02em; line-height: 1.05; }
.book-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: #cbc6bb; }
.book-times { display: grid; gap: 12px; align-content: start; border-top: 1px solid var(--line); padding-top: 20px; }
@media (min-width: 900px) { .book-times { border-top: 0; border-left: 1px solid var(--line); padding: 0 0 0 40px; } }
.book-times dl { margin: 0; display: grid; gap: 8px; }
.book-times dl div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; font-size: 15.5px; }
.book-times dt { color: var(--muted); }
.book-times dd { margin: 0; font-variant-numeric: tabular-nums; }
.book-note { font-size: 13.5px; color: var(--muted); }
.cal-embed { margin-top: 24px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-height: 640px; background: var(--panel); }
.cal-embed[hidden] { display: none; }
#book { scroll-margin-top: 80px; }

.svc-price { font-family: var(--mono); font-size: 13px; color: var(--fg); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.price-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.pl-row { background: var(--panel); padding: 28px; display: grid; gap: 18px; }
.pl-row.lead { background: linear-gradient(160deg, #10203f 0%, var(--panel) 60%); }
@media (min-width: 900px) { .pl-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: center; padding: 32px 36px; } }
.pl-name { display: grid; gap: 6px; }
.pl-name h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; font-stretch: 108%; letter-spacing: -.02em; line-height: 1.05; }
.pl-name p { color: var(--muted); font-size: 15.5px; }
.pl-prices { display: grid; gap: 16px; }
@media (min-width: 600px) { .pl-prices { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.pl-prices div { display: grid; gap: 4px; }
.pl-prices b { font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: clamp(34px, 4vw, 44px); line-height: 1; font-variant-numeric: tabular-nums; }
.pl-prices span { color: var(--muted); font-size: 14.5px; }

.bank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bank-list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15.5px; }
.bank-list li svg { width: 16px; height: 16px; margin-top: 4px; color: var(--accent); }

footer { padding-block: 40px 56px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* Second Brain view: the real vault graph (281 pages, 1,954 links), coloured by index section.
   Scroll steps fly the camera to a page and animate one part of the process; any dot or [[link]] opens that page. */
#view-brain { position: relative; }
#brain { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; touch-action: pan-y; }
#view-brain::before { content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(20,19,17,.92) 0%, rgba(20,19,17,.72) 30%, rgba(20,19,17,0) 48%); }
@media (max-width: 899px) { #view-brain::before { background: none; } }
.brain-content { position: relative; z-index: 2; pointer-events: none; }
.brain-content a, .brain-content button, .bstep-text, .page-card, .b-intro > * { pointer-events: auto; }
.bstep { min-height: 100vh; min-height: 100dvh; display: grid; align-content: center; padding-block: 96px; }
.bstep-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .bstep-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 120px; } }
.bstep-text { display: grid; gap: 16px; align-content: start; min-width: 0; }
.bstep-text h2 { font-size: clamp(30px, 4vw, 50px); }
.bstep-text p { color: #cbc6bb; font-size: 18px; }
.b-intro { display: grid; gap: 24px; max-width: 640px; }
.b-intro h1 { font-size: clamp(40px, 6.4vw, 88px); }
.b-stats { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 8px; }
.b-stats div { display: grid; gap: 2px; }
.b-stats b { font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.b-stats span { font-size: 14px; color: var(--muted); }
.hint { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.hint svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: no-preference) { .hint svg { animation: nudge 1.8s ease-in-out infinite; } @keyframes nudge { 50% { transform: translateY(4px); } } }
.back { justify-self: start; color: var(--muted); text-decoration: none; font-size: 15px; padding-block: 8px; }
.back:hover { color: var(--fg); }

/* Topic legend */
.legend { display: flex; flex-wrap: wrap; gap: 6px; max-width: 600px; }
.legend button { display: inline-flex; align-items: center; gap: 7px; font: 500 12px var(--mono); color: #b4aea2; background: rgba(28,27,24,.85); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; cursor: pointer; transition: border-color .15s ease-out, color .15s ease-out; }
.legend button:hover, .legend button[aria-pressed="true"] { color: var(--fg); border-color: #4d483f; }
.legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.legend small { color: var(--muted); font-size: 11px; }

/* Page cards */
.page-card { background: rgba(28,27,24,.93); border: 1px solid #22355a; border-radius: 16px; overflow: hidden; min-width: 0;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .4s ease-out, border-color .3s ease-out; }
.pc-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pc-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.pc-link { font-family: var(--mono); font-size: 14px; color: #8fb6ff; overflow-wrap: anywhere; }
.pc-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .55s cubic-bezier(.2,.8,.2,1); }
.pc-body { overflow: hidden; min-height: 0; }
.pc-inner { padding: 20px; display: grid; gap: 16px; }
.pc-inner h3 { font-size: 24px; font-weight: 800; font-stretch: 106%; letter-spacing: -.01em; line-height: 1.1; }
.pc-inner p { color: #d0cbc1; font-size: 16px; }
.pc-sub { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 400 12px var(--mono); padding: 5px 9px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: #b4aea2; cursor: pointer; text-align: left; overflow-wrap: anywhere; transition: border-color .15s ease-out, color .15s ease-out; }
.chip:hover { color: #cfe0ff; border-color: #3d5a8f; }
.chip::before { content: "[["; color: #4d6a9c; } .chip::after { content: "]]"; color: #4d6a9c; }
.pc-src { font-family: var(--mono); font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

/* Process pieces */
.pipe { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; gap: 8px; font: 400 11.5px var(--mono); }
.pipe .file { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: #b4aea2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipe .file b { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.pipe .file.out { border-color: #2c4a80; color: #cfe0ff; }
.pipe .wire { position: relative; height: 2px; background: #22355a; border-radius: 2px; }
.pipe .wire::after { content: ""; position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.qbox { border: 1px solid #2c4a80; background: rgba(77,141,255,.08); border-radius: 12px; padding: 12px 14px; font-size: 15px; color: #dbe7ff; }
.qbox .label { display: block; margin-bottom: 4px; }
.used { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.used li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: center; font: 400 12.5px var(--mono); color: #b4aea2; }
.used li .tick { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #4a463e; display: grid; place-items: center; }
.used li .tick svg { width: 10px; height: 10px; color: var(--bg); opacity: 0; }
.ledger-mini { display: grid; gap: 10px; }
.lm-claim { font-size: 15px; color: #dbe7ff; font-style: italic; }
.lm-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; font: 400 12px var(--mono); color: var(--muted); }
.scan { height: 6px; border-radius: 6px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.scan i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, transparent, #4d8dff, transparent); transform: translateX(-100%); }
.verdict { justify-self: start; font: 500 12px var(--mono); padding: 3px 10px; border-radius: 999px; }
.verdict.bad { background: rgba(255,154,98,.12); color: var(--warn); }
.verdict.ok { background: var(--accent-dim); color: #8fb6ff; }
.qdots { display: grid; grid-template-columns: repeat(7, 22px); gap: 8px; }
.qdots span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #4a463e; background: transparent; transition: background .3s ease-out, border-color .3s ease-out; }
.qdots span.p { background: #4a463e; border-color: #4a463e; }
.score-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.score-line b { font-family: var(--display); font-stretch: 115%; font-weight: 800; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.score-line span { font-size: 14px; color: var(--muted); }

/* Collapsed until its step is in view (only once the script runs) */
html.js .page-card:not(.open) { opacity: .45; transform: translateX(-16px) scale(.97); border-color: var(--line); }
html.js .page-card:not(.open) .pc-wrap { grid-template-rows: 0fr; }
html.js .page-card:not(.open) .pc-head { border-bottom-color: transparent; }

@media (prefers-reduced-motion: no-preference) {
  html.js .page-card.open .stg { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
  html.js .page-card.open .pipe .wire::after { animation: travel 1.2s cubic-bezier(.5,0,.3,1) .3s both; }
  html.js .page-card.open .pipe .file.out { animation: arrive .4s ease-out 1.4s both; }
  html.js .page-card.open .used li { animation: rise .45s ease-out both; animation-delay: calc(var(--i) * 650ms + 500ms); }
  html.js .page-card.open .used li .tick { animation: tickbg .3s ease-out both; animation-delay: calc(var(--i) * 650ms + 800ms); }
  html.js .page-card.open .used li .tick svg { animation: tickon .3s ease-out both; animation-delay: calc(var(--i) * 650ms + 800ms); }
  html.js .page-card.open .scan i { animation: scan 1.1s ease-in-out .5s 2 both; }
  html.js .page-card.open .verdict { animation: pop .35s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: var(--d, 2.8s); }
  html.js .page-card.open .qdots span.late { animation: pass .35s ease-out both; animation-delay: calc(var(--i) * 220ms + 1.4s); }
  html.js .page-card.open .score-line .after { animation: swap .4s ease-out 2.4s both; }
  html.js .page-card.open .score-line .before { animation: swapout .3s ease-in 2.2s both; }
  @keyframes travel { from { left: 0; } to { left: calc(100% - 8px); } }
  @keyframes arrive { from { border-color: var(--line); color: var(--muted); } }
  @keyframes tickbg { from { background: transparent; border-color: #4a463e; } to { background: #4d8dff; border-color: #4d8dff; } }
  @keyframes tickon { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
  @keyframes scan { to { transform: translateX(100%); } }
  @keyframes pop { from { opacity: 0; transform: scale(.85); } }
  @keyframes pass { from { background: transparent; border-color: #4a463e; } to { background: #4d8dff; border-color: #4d8dff; } }
  @keyframes swap { from { opacity: 0; transform: translateY(8px); } }
  @keyframes swapout { to { opacity: 0; transform: translateY(-8px); } }
}
/* end states (also the reduced-motion and no-script view) */
.used li .tick { background: #4d8dff; border-color: #4d8dff; }
.used li .tick svg { opacity: 1; }
.qdots span.late { background: #4d8dff; border-color: #4d8dff; }
.qdots span.p { background: #4d8dff; border-color: #4d8dff; }
.score-line .before { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html.js .score-line .before { display: inline; position: absolute; }
  html.js .score-line { position: relative; }
  html.js .page-card:not(.open) .score-line .after { opacity: 0; }
}

/* Explore panel (opens when a dot or [[link]] is clicked) */
.explore { position: fixed; z-index: 15; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(76px + env(safe-area-inset-top, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100vw - 32px));
  background: rgba(24,23,20,.97); border: 1px solid #2c4a80; border-radius: 18px; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.45); transform: translateX(24px); opacity: 0; visibility: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease-out, visibility 0s .35s; }
.explore.on { transform: none; opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease-out; }
@media (max-width: 899px) {
  .explore { left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); width: auto; top: auto; max-height: 62vh; transform: translateY(24px); }
}
.ex-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line); }
.ex-head .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ex-head .pc-link { flex: 1; min-width: 0; }
.ex-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); cursor: pointer; display: grid; place-items: center; flex: none; }
.ex-close:hover { border-color: var(--muted); }
.ex-close svg { width: 14px; height: 14px; }
.ex-body { overflow-y: auto; padding: 20px; display: grid; gap: 18px; align-content: start; overscroll-behavior: contain; }
.ex-body h3 { font-size: 22px; font-weight: 800; font-stretch: 106%; line-height: 1.15; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-meta span { font: 400 12px var(--mono); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: #b4aea2; }
.ex-src { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-src li { font: 400 12px var(--mono); color: var(--muted); overflow-wrap: anywhere; padding-left: 14px; position: relative; }
.ex-src li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 2px; background: #4a463e; }
.ex-note { font-size: 13px; color: var(--muted); }

@media (max-width: 899px) {
  .bstep { align-content: end; padding-block: 34vh 64px; }
  .bstep.b-first, .bstep.b-last { padding-block: 96px; align-content: center; }
  .bstep.b-first { align-content: end; padding-block: 40vh 64px; }
  .bstep-text { background: rgba(20,19,17,.84); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
  .bstep-in { gap: 16px; }
  .page-card { order: -1; }
  .b-intro { background: rgba(20,19,17,.84); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .page-card, .pc-wrap, .explore { transition: none; } }
.b-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Step 1 stage: laptop, folders and a PDF that travels between them. Phases 0-5 set by script. */
.stage { position: relative; display: grid; gap: 14px; }
.lap { display: grid; justify-items: center; }
.lap-screen { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px 12px 4px 4px; border: 6px solid #1b2333; background: #f4f6fa; overflow: hidden; box-shadow: 0 0 0 1px #38352e; }
.lap-base { width: 112%; max-width: calc(100% + 40px); height: 12px; border-radius: 0 0 14px 14px; background: linear-gradient(#2a3447, #1a2130); box-shadow: 0 1px 0 #4a463e inset; }
.scr { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; transition: opacity .4s ease-out, transform .4s ease-out; opacity: 0; transform: translateY(6px); }
.bar { display: flex; align-items: center; gap: 5px; padding: 6px 10px; background: #e3e8f0; border-bottom: 1px solid #d2d9e4; font: 500 10px var(--mono); color: #6f6a60; }
.bar i { width: 7px; height: 7px; border-radius: 50%; background: #c3cad6; }
.bar span { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art { padding: 12px 14px; display: grid; gap: 6px; align-content: start; position: relative; }
.art-tag { font: 500 9px var(--mono); color: #1f6b4f; letter-spacing: .06em; text-transform: uppercase; }
.art-title { font: 700 clamp(11px, 1.35vw, 14px)/1.25 var(--display); color: #101828; }
.art-auth { font-size: 10px; color: #6f6a60; }
.art .ln { height: 5px; border-radius: 3px; background: #dbe1ea; }
.dl { justify-self: start; margin-top: 4px; font: 600 10px var(--body); color: #fff; background: #1f5fd6; padding: 6px 10px; border-radius: 6px; transition: transform .15s ease-out, background .15s ease-out; }
.cursor { position: absolute; width: 16px; height: 16px; left: 70%; top: 85%; transition: left .8s cubic-bezier(.4,0,.2,1), top .8s cubic-bezier(.4,0,.2,1); }
.chat { padding: 12px 14px; display: grid; gap: 8px; align-content: start; background: #faf9f5; }
.msg { font-size: 11.5px; line-height: 1.45; padding: 7px 10px; border-radius: 10px; max-width: 85%; opacity: 0; transform: translateY(6px); transition: opacity .35s ease-out, transform .35s ease-out; }
.msg.me { justify-self: end; background: #e7e3d8; color: #222; font-family: var(--mono); }
.msg.ai { justify-self: start; background: #fff; border: 1px solid #e5e1d6; color: #333; }
.doc { padding: 12px 14px; display: grid; gap: 6px; align-content: start; background: #1e1e24; }
.scr-wiki .bar { background: #2a2a31; border-color: #34343c; color: #a8a8b3; }
.scr-wiki .bar i { background: #44444d; }
.doc-h { font: 700 clamp(12px, 1.4vw, 15px) var(--display); color: #e8e8ee; }
.wl { font-size: 10.5px; line-height: 1.45; color: #c9c9d3; opacity: 0; transform: translateY(4px); transition: opacity .35s ease-out, transform .35s ease-out; transition-delay: calc(var(--i) * 260ms); }
.wl em { font-style: normal; color: #a78bfa; }
.wl.src { font-family: var(--mono); font-size: 9.5px; color: #8a8a96; }
.folders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.folder { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed #3a372f; border-radius: 10px; font: 500 12px var(--mono); color: var(--muted); transition: border-color .3s ease-out, color .3s ease-out, background .3s ease-out; }
.folder svg { width: 18px; height: 18px; flex: none; }
.folder.lit { border-style: solid; border-color: #4d8dff; color: #dbe7ff; background: rgba(77,141,255,.08); }
.pdf { position: absolute; left: 0; top: 0; z-index: 3; font: 700 10px var(--mono); color: #fff; background: #e5484d; padding: 6px 8px; border-radius: 5px; box-shadow: 0 6px 16px rgba(0,0,0,.35); opacity: 0;
  transform: translate(var(--px, 0px), var(--py, 0px)); transition: transform .9s cubic-bezier(.45,0,.2,1), opacity .25s ease-out; pointer-events: none; }
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: ph; }
.phases li { counter-increment: ph; font-size: 12.5px; line-height: 1.3; color: var(--muted); padding-top: 8px; border-top: 2px solid var(--line); transition: color .3s ease-out, border-color .3s ease-out; }
.phases li::before { content: counter(ph) " "; font-family: var(--mono); color: inherit; }
.phases li.on { color: var(--fg); border-color: var(--accent); }

.stage[data-phase="0"] .scr-web, .stage[data-phase="1"] .scr-web, .stage[data-phase="2"] .scr-web { opacity: 1; transform: none; }
.stage[data-phase="1"] .cursor, .stage[data-phase="2"] .cursor { left: 22%; top: 84%; }
.stage[data-phase="2"] .dl { transform: scale(.94); background: #174aa8; }
.stage[data-phase="3"] .scr-chat { opacity: 1; transform: none; }
.stage[data-phase="3"] .msg.me { opacity: 1; transform: none; transition-delay: .2s; }
.stage[data-phase="3"] .msg.ai { opacity: 1; transform: none; transition-delay: .9s; }
.stage[data-phase="4"] .scr-wiki, .stage[data-phase="5"] .scr-wiki { opacity: 1; transform: none; }
.stage[data-phase="4"] .wl, .stage[data-phase="5"] .wl { opacity: 1; transform: none; }
.stage[data-phase="2"] .pdf, .stage[data-phase="3"] .pdf, .stage[data-phase="4"] .pdf, .stage[data-phase="5"] .pdf { opacity: 1; }
.stage-card .pc-inner { gap: 14px; }
@media (prefers-reduced-motion: reduce) { .stage *, .stage { transition: none !important; } }
.pc-open { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.pc-open:hover { color: #cfe0ff; text-decoration: underline; }
.chip-static { cursor: default; }
.chip-static:hover { color: #b4aea2; border-color: var(--line); }
.ex-excerpt { border-left: 2px solid #4d483f; padding-left: 14px; display: grid; gap: 10px; }
.ex-excerpt p { color: #d0cbc1; font-size: 15px; line-height: 1.6; }
.ex-excerpt ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: #d0cbc1; font-size: 14.5px; line-height: 1.55; }
.ex-excerpt b { color: var(--fg); font-weight: 600; }
.ex-excerpt .wlink { background: none; border: 0; padding: 0; font: inherit; color: #a78bfa; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(167,139,250,.4); text-underline-offset: 3px; }
.ex-excerpt .wlink:hover { color: #c4b5fd; }

/* Tour v2: one reading column on the left, the graph live on the right. */
#view-brain::before { background: linear-gradient(90deg, rgba(20,19,17,.94) 0%, rgba(20,19,17,.86) 38%, rgba(20,19,17,0) 60%); }
@media (max-width: 899px) { #view-brain::before { background: none; } }
.bcol { display: grid; gap: 28px; min-width: 0; justify-items: start; }
.bcol > * { width: 100%; max-width: 580px; }
/* pin the tour text to the left edge so the graph has the rest of the screen */
#view-brain .wrap { max-width: none; margin: 0; }
#view-brain .b-intro { max-width: 580px; }
@media (min-width: 900px) { #view-brain .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); } }
/* top bar lines up with the pinned text while the Second Brain page is open */
body.brain-on nav .wrap { max-width: none; margin: 0; }
@media (min-width: 900px) { body.brain-on nav .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); } }
@media (min-width: 900px) { #view-brain::before { background: linear-gradient(90deg, rgba(20,19,17,.95) 0, rgba(20,19,17,.88) 560px, rgba(20,19,17,0) 760px); } }
.bcol > .next-pop, .bcol > .replay, .stage-wrap > .next-pop, .stage-wrap > .replay { width: auto; }
.bcol .page-card { order: 0; }
html.js .bcol .page-card:not(.open) .pc-wrap { grid-template-rows: 1fr; }
html.js .bcol .page-card:not(.open) { opacity: .2; transform: translateY(32px) scale(.98); }
html.js .bcol .page-card { transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .5s ease-out, border-color .3s ease-out; }
.bcol .bstep-text { gap: 14px; }
.tour-btn { min-height: 62px; padding: 0 30px; font-size: 18px; justify-self: start; }
.tour-btn svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: no-preference) { .tour-btn svg { animation: nudge 1.6s ease-in-out infinite; } }
.next-pop { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 1px solid #3d5a8f; background: rgba(77,141,255,.14); color: #dbe7ff; font: 600 16px var(--body); cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .4s ease-out, transform .4s cubic-bezier(.2,.8,.2,1); }
.next-pop svg { width: 18px; height: 18px; }
.stage-wrap.done .next-pop { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) { .stage-wrap.done .next-pop svg { animation: nudge 1.6s ease-in-out infinite; } }
.replay { background: none; border: 0; color: var(--muted); font: 500 13px var(--mono); cursor: pointer; padding: 8px 0; justify-self: start; }
.replay:hover { color: var(--fg); }
.stage-wrap { display: grid; gap: 14px; max-width: 560px; }
.wiki-card .pc-inner { gap: 18px; padding: 24px; }
.wiki-card .pc-inner h3 { font-size: clamp(24px, 2.6vw, 32px); }
.wiki-card .ex-excerpt p { font-size: 16px; }
.wiki-card .ex-excerpt ul { font-size: 15px; }
.graph-hint { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.graph-hint i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; flex: none; }
.ledger2 { display: grid; }
.lg-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 128px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.lg-row:last-child { border-bottom: 0; }
.lg-row.head { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.lg-row .f { font: 400 12px var(--mono); color: #b4aea2; overflow-wrap: anywhere; }
.lg-res { position: relative; height: 26px; }
.lg-res .scan { position: absolute; inset: 9px 0; }
.lg-res .verdict { position: absolute; left: 0; top: 2px; white-space: nowrap; }
@media (max-width: 560px) { .lg-row { grid-template-columns: minmax(0, 1fr) 118px; } .lg-row .f { grid-column: 1; grid-row: 2; } .lg-row .lg-res { grid-column: 2; grid-row: 1 / span 2; } .lg-row.head span:nth-child(2) { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  html.js .page-card.open .lg-row:not(.head) { animation: rise .45s ease-out both; animation-delay: calc(var(--i) * 900ms + 200ms); }
  html.js .page-card.open .lg-res .scan i { animation: scan .8s ease-in-out both; animation-delay: calc(var(--i) * 900ms + 450ms); }
  html.js .page-card.open .lg-res .scan { animation: fadeout .2s ease-out both; animation-delay: calc(var(--i) * 900ms + 1250ms); }
  html.js .page-card.open .lg-res .verdict { animation: pop .35s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 900ms + 1300ms); }
  @keyframes fadeout { to { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .lg-res .scan { display: none; } }
html:not(.js) .lg-res .scan { display: none; }
.mini-test { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 4px; }
.mini-test .qdots { grid-template-columns: repeat(14, 14px); gap: 5px; }
.mini-test .qdots span { width: 14px; height: 14px; }
.tree { font: 400 13px/1.25 var(--mono); display: grid; gap: 2px; overflow-x: auto; }
.tree div { display: grid; grid-template-columns: minmax(170px, auto) minmax(0, 1fr); gap: 14px; padding: 6px 0; align-items: baseline; }
.tree b { font-weight: 500; color: #dbe7ff; white-space: pre; }
.tree span { color: var(--muted); font-family: var(--body); font-size: 14px; line-height: 1.4; }
.tree .dir b { color: #8fb6ff; }
@media (max-width: 560px) { .tree div { grid-template-columns: 1fr; gap: 2px; } }
@media (prefers-reduced-motion: no-preference) { html.js .page-card.open .tree div { animation: rise .4s ease-out both; animation-delay: calc(var(--i) * 120ms + 150ms); } }
.skills-mini { display: grid; gap: 10px; }
@media (min-width: 560px) { .skills-mini { grid-template-columns: 1fr 1fr; } }
.skills-mini div { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 4px; background: rgba(20,19,17,.5); }
.skills-mini b { font-weight: 600; font-size: 15px; }
.skills-mini span { font-size: 14px; color: var(--muted); line-height: 1.45; }
.locked { position: relative; display: grid; padding: 0 !important; border: 0; }
.skills-mini .locked { grid-column: 1 / -1; }
.locked .blur { display: grid; gap: 2px; filter: blur(5px); opacity: .55; user-select: none; pointer-events: none; }
.skills-mini .locked .blur { gap: 10px; }
@media (min-width: 560px) { .skills-mini .locked .blur { grid-template-columns: 1fr 1fr; } }
.tree .locked .blur { grid-template-columns: minmax(0, 1fr); padding: 0; animation: none !important; }
.skills-mini .locked .blur { border: 0; padding: 0; background: none; border-radius: 0; }
.lock-note { position: absolute; inset: 0; margin: auto; height: max-content; width: max-content; max-width: 90%; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(77,141,255,.45); background: rgba(20,19,17,.85); color: var(--fg); font: 500 13px var(--body); text-align: center; }
.lock-note svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.uses { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.uses li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15.5px; }
.uses li svg { width: 16px; height: 16px; margin-top: 4px; color: var(--accent); }
@media (max-width: 899px) {
  .bstep { padding-block: 30vh 64px; align-content: start; }
  .bstep.b-first { padding-block: 34vh 64px; }
  .bcol > .bstep-text { background: rgba(20,19,17,.86); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
}

/* Service pages 02 and 03: same dark system, one interactive demo each */
.svc-page .hero-in { padding-block: 88px 72px; }
.svc-page .hero::before { -webkit-mask-image: linear-gradient(160deg, transparent 35%, #000 90%); mask-image: linear-gradient(160deg, transparent 35%, #000 90%); }
.demo { background: var(--panel); border: 1px solid #22355a; border-radius: 18px; overflow: hidden; }
.demo-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.demo-body { padding: 24px; display: grid; gap: 24px; }
@media (min-width: 900px) { .demo-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; } }
.pickers { display: grid; gap: 14px; align-content: start; }
.pick { display: grid; gap: 6px; }
.pick label { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pick select { appearance: none; -webkit-appearance: none; min-height: 48px; padding: 0 40px 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238d99ae' stroke-width='1.8'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center / 14px; color: var(--fg); font: 500 16px var(--body); cursor: pointer; }
.pick select:hover { border-color: #4d483f; }
.result { display: grid; gap: 18px; align-content: start; min-width: 0; }
.nm { font: 500 clamp(18px, 2.2vw, 24px) var(--mono); color: #dbe7ff; overflow-wrap: anywhere; line-height: 1.35; }
.nm span { color: var(--accent); }
.slots { display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 15px; padding-block: 6px; border-bottom: 1px solid var(--line); }
.slot span:first-child { font: 400 12px var(--mono); color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 15px; align-items: center; }
.checks li i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--mono); font-style: normal; }
.checks li.ok i { background: var(--accent-dim); color: #8fb6ff; }
.checks li.no i { background: rgba(255,154,98,.14); color: var(--warn); }
.checks li.no { color: #ffd3bd; }
@media (prefers-reduced-motion: no-preference) { .flash { animation: flash .45s ease-out; } @keyframes flash { from { opacity: .3; transform: translateY(4px); } } }
.demo-note { font-size: 13px; color: var(--muted); }

.skills { display: grid; gap: 20px; }
@media (min-width: 900px) { .skills { grid-template-columns: 1.3fr 1fr 1fr; } .skills .lead { grid-row: span 2; } }
.skill { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.skill.lead { background: linear-gradient(160deg, #10203f 0%, var(--panel) 55%); border-color: #22355a; }
.skill h3 { font-size: 22px; font-weight: 800; font-stretch: 106%; line-height: 1.1; }
.skill.lead h3 { font-size: 30px; }
.skill p { color: #cbc6bb; font-size: 16px; }
.intake { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: q; }
.intake li { counter-increment: q; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(20,19,17,.5); border: 1px solid var(--line); font-size: 15px; }
.intake li::before { content: counter(q); font: 500 12px var(--mono); color: var(--accent); padding-top: 2px; }

.bars2 { display: grid; gap: 18px; }
.b2 { display: grid; gap: 8px; }
.b2-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.b2-head b { font: 500 15px var(--mono); font-variant-numeric: tabular-nums; }
.b2 .track { height: 14px; }
.b2 .fill { transform-origin: left; }
html.js .go .b2 .fill { animation: grow 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 160ms + 150ms); }
@keyframes grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { html.js .go .b2 .fill { animation: none; } }
.brain-after { position: relative; z-index: 3; background: var(--bg); border-top: 1px solid var(--line); }
.brain-after .b-intro { max-width: none; }
.errs { display: grid; gap: 16px; }
@media (min-width: 760px) { .errs { grid-template-columns: 1fr 1fr; } }
.err { border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 10px; background: var(--bg); align-content: start; }
.err h3 { font-size: 19px; font-weight: 700; }
.err p { color: var(--muted); font-size: 15.5px; }
.err .src { font-family: var(--mono); font-size: 12.5px; color: #8fb6ff; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: f; }
@media (min-width: 900px) { .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.flow li { counter-increment: f; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--panel); display: grid; gap: 8px; align-content: start; }
.flow li::before { content: "0" counter(f); font: 500 13px var(--mono); color: var(--accent); }
.flow h3 { font-size: 18px; font-weight: 700; }
.flow p { color: var(--muted); font-size: 15px; }
.page-cta { display: grid; gap: 20px; justify-items: start; }
.page-cta p { color: var(--muted); font-size: 18px; }
