/* mhtirogla: the 10-20 card design (Raphael 10-21: "claude design was not so bad"), with every one-sided
   coloured strip on cards removed; borders are even 1px. */
:root {
  --bg: #fbfaf8; --bg2: #f3f1ec; --card: #ffffff; --ink: #16161a; --ink2: #4a4a55; --mute: #8a8a96;
  --line: #e6e3dc; --line2: #d9d5cc;
  --h: 220;
  --ok: #1f8a4c; --ok-soft: #eaf6ef; --no: #b4372f; --no-soft: #fbeceb;
  --code-bg: #f6f5f1;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 14px; --shadow: 0 1px 2px rgba(20,20,30,.04), 0 4px 16px rgba(20,20,30,.04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f12; --bg2: #15171c; --card: #16181d; --ink: #ecebe8; --ink2: #b4b3ba; --mute: #7d7d88;
    --line: #25272e; --line2: #30333b;
    --ok: #5fd08d; --ok-soft: #12241a; --no: #f07a70; --no-soft: #2a1514;
    --code-bg: #121419; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}
/* Accent tokens must be declared where --h is set: a custom property on :root resolves --h there. */
:root, [style*="--h"] { --acc: hsl(var(--h) 70% 42%); --acc-soft: hsl(var(--h) 80% 96%); --acc-line: hsl(var(--h) 60% 85%); }
@media (prefers-color-scheme: dark) {
  :root, [style*="--h"] { --acc: hsl(var(--h) 80% 68%); --acc-soft: hsl(var(--h) 40% 14%); --acc-line: hsl(var(--h) 40% 28%); }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre { font-family: var(--mono); font-size: .86em; }
:not(pre) > code { background: var(--bg2); border: 1px solid var(--line); padding: .08em .38em; border-radius: 6px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; gap: 20px; align-items: center; }
.logo { font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-size: 17px; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.glyph { color: hsl(var(--h) 70% 50%); font-size: 14px; }
.search { position: relative; flex: 1; max-width: 560px; }
#q { width: 100%; font: inherit; font-size: 14.5px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
#q:focus { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.14); max-height: 70vh; overflow: auto; padding: 6px; }
.results a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); }
.results a:hover, .results a.sel { background: var(--acc-soft); text-decoration: none; }
.results b { font-weight: 600; }
.results span { display: block; color: var(--mute); font-size: 13px; line-height: 1.4; }
.results em { font-style: normal; font-size: 11px; color: var(--acc); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-left: 8px; }
.toplinks { margin-left: auto; font-size: 13px; }
.toplinks a { color: var(--mute); font-family: var(--mono); }

/* home */
.home { max-width: 1240px; margin: 0 auto; padding: 0 24px 80px; }
.hero { padding: 72px 0 40px; max-width: 860px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 22px; font-weight: 800; }
.problem { font-size: 17px; color: var(--ink); margin: 0 0 12px; max-width: 70ch; line-height: 1.5; }
.problem b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); margin-right: 6px; }
.lead { font-size: 18.5px; color: var(--ink2); margin: 0 0 26px; max-width: 70ch; line-height: 1.55; }
.stats { display: flex; gap: 36px; margin: 6px 0 28px; }
.stats b { display: block; font-size: 30px; letter-spacing: -.03em; font-weight: 750; }
.stats span { color: var(--mute); font-size: 13px; }
.ai-box { border: 1px dashed var(--line2); border-radius: var(--r); padding: 14px 18px; color: var(--ink2); font-size: 14.5px; background: var(--card); }
.ai-tag { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; background: var(--ink); color: var(--bg); padding: 2px 8px; border-radius: 99px; margin-right: 8px; }
.dom-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 30px; position: sticky; top: 58px; z-index: 5; background: linear-gradient(var(--bg) 70%, transparent); }
.dom-nav a { font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink2); background: var(--card); }
.dom-nav a:hover { border-color: hsl(var(--h) 60% 60%); color: hsl(var(--h) 60% 45%); text-decoration: none; }
.map { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; align-items: start; margin-bottom: 20px; }
.dom { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 20px 14px; box-shadow: var(--shadow); }
.dom-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink); gap: 12px; }
.dom-head:hover { text-decoration: none; }
.dom-head:hover h3 { color: var(--acc); }
.dom h3 { margin: 0; font-size: 18.5px; letter-spacing: -.015em; font-weight: 700; }
.count { white-space: nowrap; font-family: var(--mono); font-size: 13px; color: var(--acc); font-weight: 500; }
.count small { color: var(--mute); }
.dom-sum { color: var(--mute); font-size: 13.5px; margin: 4px 0 12px; line-height: 1.45; }
.topic { padding: 9px 0; border-top: 1px solid var(--line); }
.topic h4 { margin: 0 0 7px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 13px; padding: 3px 9px; border-radius: 7px; background: var(--acc-soft); color: var(--ink); border: 1px solid var(--acc-line); line-height: 1.5; }
.chip:hover { border-color: var(--acc); text-decoration: none; }
.chip.planned { background: transparent; border: 1px dashed var(--line2); color: var(--mute); text-transform: capitalize; }

/* pages */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.crumbs { font-size: 13px; color: var(--mute); margin-bottom: 26px; }
.crumbs a { color: var(--mute); } .crumbs a:hover { color: var(--acc); }
.crumbs span { margin: 0 6px; opacity: .6; }
.page-head { max-width: 820px; margin-bottom: 30px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -.03em; line-height: 1.08; margin: 6px 0 14px; font-weight: 800; }
.kind { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--acc); display: flex; gap: 10px; align-items: center; }
.badge { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line2); color: var(--mute); font-weight: 500; white-space: nowrap; }
.badge.lv-medium { color: hsl(35 85% 45%); border-color: hsl(35 70% 75%); }
.cx { font-family: var(--mono); font-size: 12.5px; color: var(--ink2); margin-top: 10px; line-height: 1.5; }
.cx.big { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; display: inline-block; margin: 0 0 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { font-size: 12.5px; color: var(--ink2); background: var(--bg2); padding: 2px 9px; border-radius: 99px; }
.copy { margin-left: auto; font: 500 12.5px var(--sans); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); cursor: pointer; }
.copy:hover { border-color: var(--acc); color: var(--acc); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pills a { font-size: 13px; padding: 5px 12px; border-radius: 99px; background: var(--acc-soft); color: var(--ink); border: 1px solid var(--acc-line); }
.muted { color: var(--mute); } .small { font-size: 13px; }

.topic-sec { margin: 44px 0; }
.topic-sec h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 2px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 16px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.card:hover { border-color: var(--acc); transform: translateY(-2px); text-decoration: none; }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card h3 { margin: 0 0 6px; font-size: 16.5px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink2); font-size: 14px; line-height: 1.5; }
.card.planned { background: transparent; border-style: dashed; box-shadow: none; }
.card.planned h3 { color: var(--mute); text-transform: capitalize; }

/* entry */
.overview { max-width: 820px; background: var(--acc-soft); border: 1px solid var(--acc-line); border-radius: var(--r); padding: 22px 26px; font-size: 17px; position: relative; }
.overview p:first-of-type { margin-top: 0; }
.overview ul { margin-bottom: 0; padding-left: 20px; }
.overview li { margin: 3px 0; }
.ov-label, .toc-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--acc); font-weight: 600; margin-bottom: 10px; }
.when { max-width: 820px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 56px; }
.when .col { border-radius: var(--r); padding: 16px 20px; font-size: 15px; border: 1px solid var(--line); background: var(--card); }
.when h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.when .use h3 { color: var(--ok); } .when .avoid h3 { color: var(--no); }
.when .use h3 { color: var(--ok); } .when .avoid h3 { color: var(--no); }
.when ul { margin: 0; padding-left: 18px; } .when li { margin: 4px 0; }
.when .col:only-child { grid-column: 1 / -1; }

.deep-wrap { display: grid; grid-template-columns: 210px minmax(0, 820px); gap: 48px; }
.toc { order: 0; } .toc-in { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); padding-left: 14px; }
.toc a { font-size: 13.5px; color: var(--mute); padding: 3px 0; }
.toc a:hover, .toc a.on { color: var(--acc); text-decoration: none; }
.deep { min-width: 0; }
.deep-title { font-size: 30px; letter-spacing: -.025em; margin: 0 0 8px; }
.deep h3 { font-size: 21px; letter-spacing: -.015em; margin: 44px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.deep h3:first-of-type { border-top: 0; margin-top: 18px; }
.deep h4 { font-size: 16px; margin: 26px 0 6px; }
.deep p, .deep li { color: var(--ink); }
.deep li { margin: 5px 0; }
.deep pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; line-height: 1.55; font-size: 13.5px; }
.deep pre code { background: none !important; padding: 0 !important; font-size: inherit; }
.deep table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 14px 0; display: block; overflow-x: auto; }
.deep th, .deep td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.deep th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); font-weight: 600; border-bottom-color: var(--line2); }
.deep blockquote { margin: 16px 0; padding: 8px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); color: var(--ink2); }

.graph { max-width: 1078px; margin: 64px 0 0 258px; display: grid; gap: 28px; }
.graph h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 0 0 10px; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.mini { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--card); color: var(--ink); }
.mini:hover { border-color: hsl(var(--h) 65% 55%); text-decoration: none; }
.mini b { display: block; font-size: 14.5px; font-weight: 600; }
.mini span { display: block; color: var(--mute); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.mini i { font-style: normal; font-weight: 400; color: var(--mute); }
.mini.planned, .mini.loose { background: transparent; border-style: dashed; }
.vminis { margin: 14px 0 8px; }
.vminis .mini span code { font-size: 12px; }
.pager { max-width: 820px; margin: 48px 0 0 258px; display: flex; gap: 12px; }
.pager a { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; color: var(--ink); font-weight: 600; background: var(--card); }
.pager a:hover { border-color: var(--acc); text-decoration: none; }
.pager .next { text-align: right; margin-left: auto; }
.pager small { display: block; color: var(--mute); font-weight: 400; font-size: 12px; }

.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot div { max-width: 1240px; margin: 0 auto; padding: 26px 24px 40px; color: var(--mute); font-size: 13px; }

@media (max-width: 980px) {
  .deep-wrap { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .graph, .pager { margin-left: 0; }
}
@media (max-width: 640px) {
  .top-in, .home, .page { padding-left: 16px; padding-right: 16px; }
  .toplinks { display: none; }
  .hero { padding-top: 40px; }
  .when { grid-template-columns: 1fr; }
  .stats { gap: 22px; }
  .overview { padding: 18px; font-size: 16px; }
  .dom-nav { position: static; }
}

/* systems + system graph */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.toplinks { display: flex; gap: 16px; align-items: center; }
.toplinks .sys-link { font-family: var(--sans); font-weight: 600; color: var(--ink2); }
.sys-filter { width: 100%; max-width: 420px; font: inherit; font-size: 15px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); outline: none; }
.sys-filter:focus { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.sys-sec .chip { font-family: var(--mono); font-size: 12.5px; }
.chip[hidden], .sys-sec[hidden] { display: none; }
.stats b small { font-size: 16px; color: var(--mute); font-weight: 600; }

.sg-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 18px 10px; overflow-x: auto; overscroll-behavior-x: contain; margin: 4px 0 34px; }
.sg { display: block; width: 100%; min-width: 760px; height: auto; font-family: var(--sans); }
.sg .cols text { font-size: 11px; fill: var(--mute); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.sg .e { fill: none; stroke: var(--line2); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: sg-draw .7s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i) * 12ms);
  transition: opacity .18s ease, stroke .18s ease, stroke-width .18s ease; }
.sg .e-d { stroke-dasharray: 1; opacity: .55; }
.sg .e-t { opacity: .8; }
@keyframes sg-draw { to { stroke-dashoffset: 0; } }
.sg .n { cursor: default; animation: sg-in .4s ease-out both; }
.sg a.n { cursor: pointer; }
@keyframes sg-in { from { opacity: 0; } }
.sg .n rect { fill: hsl(var(--h, 220) 80% 97%); stroke: hsl(var(--h, 220) 55% 80%); stroke-width: 1; transition: fill .18s, stroke .18s, opacity .18s; }
.sg .n circle { fill: hsl(var(--h, 220) 65% 50%); }
.sg .n text { font-size: 13px; fill: var(--ink); font-weight: 500; pointer-events: none; }
.sg .n.planned rect { fill: var(--card); stroke-dasharray: 4 3; stroke: var(--line2); }
.sg .n.planned text { fill: var(--ink2); }
.sg .root rect { fill: var(--ink); stroke: none; }
.sg .root text { fill: var(--bg); font-weight: 700; font-size: 15px; font-family: var(--mono); }
.sg .n, .sg .e { will-change: opacity; }
.sg.focus .e { opacity: .07; }
.sg.focus .e.on { opacity: 1; stroke: hsl(var(--h, 220) 65% 50%); stroke-width: 2.2; }
.sg.focus .n:not(.on):not(.root) { opacity: .28; }
.sg .n.on rect { stroke: hsl(var(--h, 220) 65% 50%); stroke-width: 1.6; }
@media (prefers-color-scheme: dark) {
  .sg .n rect { fill: hsl(var(--h, 220) 35% 15%); stroke: hsl(var(--h, 220) 35% 32%); }
  .sg .n circle { fill: hsl(var(--h, 220) 75% 65%); }
  .sg.focus .e.on { stroke: hsl(var(--h, 220) 75% 65%); }
  .sg .n.on rect { stroke: hsl(var(--h, 220) 75% 65%); }
}
@media (prefers-reduced-motion: reduce) { .sg .e, .sg .n { animation: none; stroke-dashoffset: 0; } }

.sg-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.sg-lists h2, .sg-sim h2 { font-size: 20px; letter-spacing: -.01em; margin: 0 0 12px; display: flex; gap: 10px; align-items: center; }
.sg-lists ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.br { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; transition: border-color .18s, background .18s; }
.br.on { border-color: hsl(var(--h) 60% 60%); background: hsl(var(--h) 80% 97%); }
@media (prefers-color-scheme: dark) { .br.on { background: hsl(var(--h) 35% 13%); } }
.br > i { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: hsl(var(--h) 65% 50%); }
.br-t { font-weight: 600; font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.br-t a { color: var(--ink); } .br-t a:hover { color: var(--acc); }
.br-t em { font-style: normal; font-size: 11px; color: var(--mute); border: 1px dashed var(--line2); border-radius: 99px; padding: 0 7px; font-weight: 500; }
.br-t small { font-weight: 400; color: var(--mute); font-size: 12.5px; font-family: var(--mono); }
.br p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink2); line-height: 1.45; }
.sg-sim { margin-top: 40px; }
.sg-sim small { color: var(--mute); font-size: 11px; }
.sg-sim .minis { margin-top: 12px; }
.sg-sim span.chip { cursor: default; }
.more { margin-top: 8px; }
.more summary { cursor: pointer; font-size: 13px; color: var(--acc); margin-bottom: 8px; }
@media (max-width: 760px) { .sg-lists { grid-template-columns: 1fr; } .stats { gap: 22px; } }
.layer { margin-bottom: 26px; }
.layer-h { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); font-weight: 650; margin: 10px 0 14px; display: flex; align-items: center; gap: 12px; }
.layer-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.layer[hidden] { display: none; }
[class^="t-T"] { font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 5px; margin-right: 6px; vertical-align: 1px; }
.t-T1 { background: hsl(350 80% 92%); color: hsl(350 70% 38%); }
.t-T2 { background: hsl(30 90% 90%); color: hsl(30 80% 34%); }
.t-T3 { background: hsl(200 70% 92%); color: hsl(200 70% 34%); }
.t-T4 { background: var(--bg2); color: var(--mute); }
@media (prefers-color-scheme: dark) {
  .t-T1 { background: hsl(350 40% 20%); color: hsl(350 80% 75%); }
  .t-T2 { background: hsl(30 40% 18%); color: hsl(30 85% 70%); }
  .t-T3 { background: hsl(200 40% 18%); color: hsl(200 75% 72%); }
}

@media (max-width: 520px) {
  .toplinks { gap: 12px; }
  .toplinks a:not(.sys-link) { display: none; }
}

/* Totals overview on the home page (computed live, src/totals.rs) */
.totals { margin: 0 0 26px; }
.tt-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tt { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.tt-l { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); font-weight: 600; }
.tt b { display: block; font-size: 24px; letter-spacing: -.02em; font-weight: 750; margin: 2px 0; font-variant-numeric: tabular-nums; }
.tt-s { display: block; font-size: 12.5px; color: var(--ink2); line-height: 1.4; }
.tt-dom { margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px; }
.tt-dom summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.tt-wrap { overflow-x: auto; max-height: 60vh; overflow-y: auto; margin-top: 6px; }
.tt-dom table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tt-dom th, .tt-dom td { text-align: right; padding: 4px 8px; border-top: 1px solid var(--line); }
.tt-dom th:first-child, .tt-dom td:first-child { text-align: left; }
.tt-dom th { color: var(--mute); font-weight: 600; position: sticky; top: 0; background: var(--card); }
.tt-stamp { font-size: 12.5px; color: var(--mute); margin: 8px 2px 0; }
@media (max-width: 900px) { .tt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tt-grid { grid-template-columns: 1fr; } }

/* H-2 open requests page */
.req { width: 100%; border-collapse: collapse; font-size: 14px; }
.req th, .req td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.req th { color: var(--mute); font-weight: 600; font-size: 12.5px; }
.req td:nth-child(2), .req td:nth-child(3), .req th:nth-child(2), .req th:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.req .muted { font-size: 13px; margin-top: 2px; }
.req-wrap { max-height: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.req-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); display: grid; gap: 10px; max-width: 640px; }
.req-form h3 { margin: 0; font-size: 17px; }
.req-form p { margin: 0; font-size: 13.5px; }
.req-form label { display: grid; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.req-form input, .req-form textarea { font: inherit; font-size: 14.5px; font-weight: 400; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg); color: var(--ink); width: 100%; box-sizing: border-box; }
.req-form input:focus, .req-form textarea:focus { outline: 2px solid var(--acc-line); border-color: var(--acc); }
.req-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.req-form button, button.vote { font: 600 13.5px var(--sans); padding: 7px 16px; border-radius: 9px; border: 1px solid var(--acc); background: var(--acc); color: #fff; cursor: pointer; }
button.vote { padding: 2px 9px; font-size: 12px; background: transparent; color: var(--acc); margin-left: 6px; }
.req-form button:disabled, button.vote:disabled { opacity: .6; cursor: default; }
.req-msg { font-size: 13.5px; color: var(--ink2); }
.req-home { margin: 28px 0 8px; display: grid; gap: 8px; }
.req-h { margin-top: 28px; }
.results a.req-hit { border-top: 1px dashed var(--line2); }
@media (max-width: 520px) { .req td:nth-child(4), .req th:nth-child(4) { display: none; } }

/* ---- 10-21 additions (home structure, banner, accounts, legal pages) in the same card look ---- */
.top { display: block; }
.top-search { max-width: 1240px; margin: 0 auto; padding: 0 24px 10px; }
.top-search .search { max-width: 100%; }
.toplinks .login { color: var(--acc); font-weight: 600; }
.toplinks .internal { color: var(--no); }
.mono { font-family: var(--mono); }
.sec { font-family: var(--mono); font-size: .6em; font-weight: 500; color: var(--mute); margin-right: .45em; vertical-align: .2em; letter-spacing: 0; }
.banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 20px 0 0; padding: 14px 18px; background: var(--acc-soft); border: 1px solid var(--acc-line); border-radius: var(--r); font-size: 14.5px; }
.banner > div { flex: 1 1 420px; }
.banner .ai-tag { margin-right: 6px; }
.cta { margin: 26px 0 14px; }
.facts { font-size: 13px; color: var(--mute); margin: 0; }
.how { margin: 10px 0 30px; }
.how h2, .browse h2, .search-sec h2, .pricing-sec h2, .req-home h2 { font-size: 26px; letter-spacing: -.02em; margin: 40px 0 12px; }
.how ol { padding-left: 1.3em; max-width: 78ch; } .how li { margin: 6px 0; }
.how pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; overflow-x: auto; font-size: 13px; }
.gindex { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.gi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.gi h3 { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 0 0 6px; }
.gi ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px; line-height: 1.7; }
.gi a { color: var(--ink); } .gi a:hover { color: var(--acc); }
.group-h { font-size: 24px; letter-spacing: -.02em; margin: 44px 0 14px; }
.sep { display: none; }
.btn, .copy, .auth-form button { font: 600 14px var(--sans); padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); cursor: pointer; display: inline-block; line-height: 1.4; }
.btn:hover, .copy:hover { border-color: var(--acc); text-decoration: none; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { font-size: 16px; padding: 12px 24px; border-radius: 12px; }
.btn.small { font-size: 12px; padding: 3px 9px; border-radius: 7px; }
.btn.danger { border-color: var(--no); color: var(--no); }
button:disabled { opacity: .55; cursor: default; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 10px 0; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.plan-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.plan-h b { font-size: 19px; } .plan-h span { font: 13px var(--mono); color: var(--ink2); }
.plan p { margin: 0 0 12px; font-size: 14.5px; }
.page.narrow { max-width: 860px; }
.prose h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 16px; }
.prose h2 { font-size: 21px; letter-spacing: -.015em; margin: 32px 0 8px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 14px 0; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 11px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg2); font-weight: 600; }
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: 6px 1rem; margin: 12px 0 0; }
.kv dt { font: 600 11px/2 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.kv dd { margin: 0; }
.acct { margin: 18px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.acct h2 { font-size: 20px; letter-spacing: -.015em; margin: 2px 0 10px; }
.acct h3 { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 20px 0 6px; }
.acct.danger { border-color: var(--no-soft); } .acct.danger h2 { color: var(--no); }
.kv-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.kv-table th, .kv-table td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); }
.kv-table th { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); }
.num { text-align: right; }
.cfg { margin: 10px 0 14px; }
.cfg-h { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.cfg-h .copy { margin-left: auto; font-size: 12px; padding: 3px 10px; }
.cfg pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; overflow-x: auto; margin: 6px 0 0; font-size: 12.5px; }
.note { background: var(--acc-soft); border: 1px solid var(--acc-line); border-radius: 10px; padding: 8px 14px; }
.auth-form { display: grid; gap: 10px; max-width: 520px; }
.auth-form.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; max-width: none; }
.auth-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.auth-form input { font: inherit; font-size: 15px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); width: 100%; }
.auth-form input:focus { outline: 2px solid var(--acc-line); border-color: var(--acc); }
.rule-or { color: var(--mute); margin: 14px 0; }
ul.plain { list-style: none; padding: 0; } ul.plain li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0; font-size: 13.5px; }
.foot-links a { color: var(--ink2); }
kbd { font: 11px var(--mono); border: 1px solid var(--line2); border-radius: 5px; padding: 0 5px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .top-search { padding: 0 16px 10px; } .kv { grid-template-columns: 1fr; } .kv-table td:nth-child(3), .kv-table th:nth-child(3) { display: none; } }

/* ---- 10-21 polish pass (Raphael: "make the site beautiful"): one-row top bar, logo mark, hero with demo card,
   button states, sign-in card, footer. Same tokens; overrides the rules above. ---- */
::selection { background: var(--acc-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
.lead, .problem { text-wrap: pretty; }

/* top bar: logo · search · links in one row; search wraps below on small screens */
.top-in { padding: 10px 24px; gap: 22px; flex-wrap: wrap; }
.top-in .search { flex: 1 1 320px; max-width: 520px; }
#q { padding: 8px 40px 8px 14px; background: var(--bg2); border-color: var(--line); }
#q:focus { background: var(--card); }
.q-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--mute); background: var(--card); pointer-events: none; }
#q:focus + .q-kbd { display: none; }
.toplinks { gap: 4px; margin-left: auto; }
.toplinks a { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink2); padding: 6px 10px; border-radius: 8px; }
.toplinks a:hover { background: var(--bg2); color: var(--ink); text-decoration: none; }
.toplinks a[data-focus-search] { display: none; }
.toplinks .login { color: #fff; background: var(--acc); margin-left: 6px; padding: 6px 14px; }
.toplinks .login:hover { background: var(--acc); color: #fff; filter: brightness(1.08); }
.dom-nav { top: 56px; }
.mark { display: inline-block; width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: conic-gradient(from 210deg, hsl(220 75% 55%), hsl(265 70% 60%), hsl(190 75% 48%), hsl(220 75% 55%));
  box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--bg) 0%, transparent), 0 1px 3px rgba(30,40,90,.25);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 4px, #000 4.5px); mask: radial-gradient(circle at 50% 50%, transparent 4px, #000 4.5px); }
.logo { font-size: 17.5px; gap: 9px; }

/* buttons */
.btn, .copy, .auth-form button { transition: transform .12s, box-shadow .15s, border-color .15s, background .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn.primary { box-shadow: 0 1px 2px rgba(20,30,80,.18), 0 4px 14px -4px color-mix(in srgb, var(--acc) 55%, transparent); }
.btn.primary:hover { box-shadow: 0 2px 4px rgba(20,30,80,.2), 0 8px 22px -6px color-mix(in srgb, var(--acc) 65%, transparent); }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; text-align: center; padding: 11px 16px; }

/* hero: text + demo card on a soft glow */
.hero { position: relative; max-width: none; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; padding: 76px 0 56px; isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: -40px -10vw 0; pointer-events: none;
  background: radial-gradient(40% 55% at 78% 40%, hsl(var(--h) 90% 60% / .13), transparent 70%),
              radial-gradient(35% 45% at 12% 20%, hsl(265 90% 65% / .08), transparent 70%); }
.hero h1 { font-size: clamp(36px, 5vw, 60px); }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; }
.facts b { color: var(--ink); font-weight: 600; }
.hero-demo { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,20,30,.05), 0 24px 60px -24px rgba(30,40,90,.28); transform: rotate(.4deg); }
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.demo-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.demo-bar span { margin-left: 8px; font-size: 11.5px; color: var(--mute); }
.hero-demo pre { margin: 0; padding: 18px 20px 20px; font-size: 12.8px; line-height: 1.75; overflow-x: auto; color: var(--ink); background: var(--card); }
.hero-demo b { color: var(--acc); font-weight: 500; }
.d-you { color: hsl(265 55% 55%); font-weight: 500; } .d-ai { color: var(--acc); font-weight: 500; }
.d-hit { color: var(--ok); } .d-dim { color: var(--mute); }
.banner { box-shadow: var(--shadow); }

/* section rhythm + cards */
.how h2, .browse h2, .search-sec h2, .pricing-sec h2, .req-home h2 { margin-top: 64px; }
.gi { box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.gi:hover { border-color: var(--acc-line); transform: translateY(-1px); }
.dom { transition: border-color .15s; } .dom:hover { border-color: var(--line2); }
.plan { transition: border-color .15s, transform .15s; } .plan:hover { border-color: var(--acc-line); }

/* sign-in: centred card */
.page.auth { max-width: 560px; padding-top: 56px; }
.page.auth .page-head { text-align: center; margin-bottom: 24px; }
.page.auth .kind { justify-content: center; }
.page.auth .lead { font-size: 16.5px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 20px; box-shadow: 0 1px 2px rgba(20,20,30,.04), 0 18px 50px -20px rgba(30,40,90,.22); }
.auth-card .auth-form { max-width: none; }
.auth-card .req-row { flex-direction: column; align-items: stretch; }
.auth-card .req-msg:empty { display: none; }
.auth-card p { margin: 0; }
.auth-form input { padding: 11px 13px; background: var(--bg); }
.auth-form input:focus { outline: none; box-shadow: 0 0 0 4px var(--acc-soft); background: var(--card); }
.rule-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.rule-or::before, .rule-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-note { margin-top: 18px !important; text-align: center; line-height: 1.5; }

/* footer */
.foot { background: var(--bg2); margin-top: 72px; }
.foot div { display: grid; grid-template-columns: 1fr auto; gap: 10px 28px; align-items: center; padding: 30px 24px 34px; }
.foot-brand { margin: 0; display: flex; align-items: center; gap: 9px; color: var(--ink2); font-size: 14px; flex-wrap: wrap; }
.foot-brand b { color: var(--ink); font-weight: 750; letter-spacing: -.01em; }
.foot-brand .mark { width: 18px; height: 18px; border-radius: 6px; }
.foot-links { margin: 0; justify-content: flex-end; }
.foot-links a { color: var(--ink2); font-size: 13.5px; }
.foot div > p.muted { grid-column: 1 / -1; margin: 0; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; }
  .hero-demo { transform: none; max-width: 620px; }
}
@media (max-width: 760px) {
  .top-in { gap: 10px 14px; }
  .top-in .search { order: 3; flex-basis: 100%; max-width: none; }
  .toplinks { display: flex; }
  .toplinks a:not(.login):not(.sys-link) { display: none; }
  .dom-nav { position: static; }
  .foot div { grid-template-columns: 1fr; }
  .foot-links { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .top-in { padding: 10px 16px; }
  .hero { padding-top: 32px; }
  .hero-demo pre { font-size: 11.5px; padding: 14px; }
  .page.auth { padding-top: 32px; }
  .auth-card { padding: 20px 18px 16px; border-radius: 16px; }
}
@media (prefers-color-scheme: dark) {
  .hero::before { background: radial-gradient(40% 55% at 78% 40%, hsl(var(--h) 90% 60% / .16), transparent 70%), radial-gradient(35% 45% at 12% 20%, hsl(265 90% 65% / .1), transparent 70%); }
  .hero-demo, .auth-card { box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px -24px rgba(0,0,0,.7); }
  .toplinks .login, .btn.primary { color: #0b1020; }
  .d-you { color: hsl(265 70% 75%); }
}
@media (prefers-reduced-motion: reduce) { .btn, .gi, .card { transition: none; } .btn:hover, .gi:hover { transform: none; } }
/* polish pass, round 2 */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1 0 auto; width: 100%; }
@media (min-width: 981px) { .hero { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr); gap: 48px; } }
.hero h1 { font-size: clamp(34px, 4.3vw, 54px); }
.hero::before { inset: -120px -40vw -40px;
  background: radial-gradient(560px 400px at 72% 48%, hsl(var(--h) 90% 60% / .12), transparent 70%),
              radial-gradient(480px 340px at 30% 22%, hsl(265 90% 65% / .07), transparent 70%); }
.auth-card .rule-or { margin: 16px 0; }
.rule-or::before, .rule-or::after { background: var(--line2); }
.auth-card .req-row { gap: 8px; margin-top: 4px; }
@media (prefers-color-scheme: dark) {
  .hero::before { background: radial-gradient(560px 400px at 72% 48%, hsl(var(--h) 90% 60% / .15), transparent 70%), radial-gradient(480px 340px at 30% 22%, hsl(265 90% 65% / .09), transparent 70%); }
}
@media (max-width: 520px) { .toplinks a.login { display: inline-block; } }
/* How it works: Step 1/2/3 cards (Raphael 10-21); the example call is its own API section */
.how ol.steps { list-style: none; padding: 0; margin: 0; max-width: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.how ol.steps > li { counter-increment: step; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 20px; box-shadow: var(--shadow); font-size: 15px; line-height: 1.55; color: var(--ink2); min-width: 0; overflow-wrap: anywhere; }
.how ol.steps > li::before { content: "Step " counter(step); display: inline-block; font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--acc); background: var(--acc-soft); border: 1px solid var(--acc-line); border-radius: 99px; padding: 2px 10px; margin-bottom: 12px; }
.how ol.steps > li > strong:first-child, .how ol.steps > li > b:first-child { display: block; font-size: 18px; letter-spacing: -.015em; color: var(--ink); margin-bottom: 6px; }
.how ol.steps code { font-size: 12.5px; }
.api-sec h2 { font-size: 26px; letter-spacing: -.02em; margin: 64px 0 12px; }
.api-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; }
.api-card > p { margin: 10px 0; }
.api-card > p:first-of-type { margin-top: 6px; }
.api-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 600; }
pre.api-out { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 10px 0; }
pre.api-out code { background: none; border: 0; padding: 0; color: var(--ink); }
@media (max-width: 860px) { .how ol.steps { grid-template-columns: 1fr; } }
.how ol.steps > li > code { display: block; margin: 4px 0 8px; padding: 8px 10px; border-radius: 8px; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }

/* 10-21: hero component graph (replaces the tool-call demo), API subpage */
.hero-graph { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 60px -24px rgba(30,40,90,.25); }
.hero-graph figcaption { padding: 0 20px 16px; font-size: 12.5px; color: var(--mute); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { padding: 16px 20px 12px; font-size: 14px; line-height: 1.35; }
.tree ul { margin-left: 9px; padding-left: 16px; border-left: 1px solid var(--line2); }
.tree li { position: relative; padding: 4px 0; }
.tree ul > li::before { content: ""; position: absolute; left: -16px; top: 14px; width: 12px; border-top: 1px solid var(--line2); }
.tree ul > li:last-child::after { content: ""; position: absolute; left: -17px; top: 15px; bottom: 0; width: 2px; background: var(--card); }
.tree a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted transparent; }
.tree a:hover { color: var(--acc); border-bottom-color: currentColor; }
.tree > li > ul > li > a { font-weight: 600; }
.tree ul ul a { color: var(--mute); font-size: 13.5px; }
.tree a.t-root { display: inline-block; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); }
.how-more { margin-top: 18px; }
.api-page pre.api-out { margin: 12px 0 20px; }
.api-page table { width: 100%; border-collapse: collapse; font-size: 14px; }
.api-page th, .api-page td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 980px) { .hero-graph { max-width: 620px; } }
@media (prefers-color-scheme: dark) { .hero-graph { box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px -24px rgba(0,0,0,.7); } }
.tier-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; font-size: 14px; }
.tier-legend b { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; font: 600 12px/1.5 var(--mono, ui-monospace, monospace); }
.tier-legend > span:first-child { width: 100%; }
.pick { margin: 8px auto 40px; padding: 22px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 60px -24px rgba(30,40,90,.2); transition: opacity .15s; }
.pick.loading { opacity: .55; }
.pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pick-bar label { color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.pick-bar select { font: inherit; font-family: var(--mono, ui-monospace, monospace); font-size: 14px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--bg); color: var(--ink); min-width: 240px; max-width: 100%; }
.pick-open { margin-left: auto; }
.pick-head h2 { margin: 18px 0 4px; font-size: 26px; }
.pick-head .lead { margin: 0 0 10px; }
.pick .sg-wrap { margin-top: 12px; }
@media (max-width: 640px) { .pick { padding: 16px; } .pick-open { margin-left: 0; } .pick-bar select { flex: 1; min-width: 0; } }
@media (prefers-color-scheme: dark) { .pick { box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px -24px rgba(0,0,0,.7); } }
.pick .sg-wrap { border: 0; box-shadow: none; padding: 0; background: none; }
.pick { overflow: hidden; } .pick .sg-wrap { overflow-x: auto; }

/* 10-21 pricing: plan cards first, comparison table, Pro highlighted */
.pricing { max-width: 980px; }
.pricing h1 { margin-bottom: 8px; }
.plans { gap: 20px; margin: 28px 0 8px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 0; padding: 26px 26px 24px; border-radius: 18px; }
.plan-name { font-size: 15px; font-weight: 600; color: var(--ink2); letter-spacing: .01em; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 2px; }
.plan-price b { font-size: 46px; line-height: 1.05; letter-spacing: -.03em; font-weight: 750; }
.plan-price span { color: var(--mute); font-size: 15px; }
.plan .plan-sub { color: var(--mute); font-size: 14px; margin: 0 0 18px; min-height: 1.4em; }
.plan .btn { margin: 0 0 8px; }
.plan .btn + .btn { margin-top: 0; }
.plan-plus { margin: 14px 0 4px !important; font-size: 13.5px !important; font-weight: 600; color: var(--ink2); }
.plan-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; font-size: 14.5px; }
.plan-plus + .plan-list { margin-top: 6px; }
.plan-list li { position: relative; padding-left: 26px; margin: 0; line-height: 1.45; }
.plan-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--acc-soft, hsl(220 80% 95%)); color: var(--acc); }
.plan.pro { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 24px 60px -24px hsl(222 80% 45% / .35); }
.plan-badge { position: absolute; top: -11px; left: 24px; padding: 3px 10px; border-radius: 999px; font-size: 11px;
  background: var(--acc); color: #fff; letter-spacing: .02em; }
.plans-note { margin-top: 10px; }
.cmp-h { margin-top: 48px; }
.cmp { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.pricing .cmp table { width: 100%; border-collapse: collapse; margin: 0; border: 0; font-size: 14.5px; }
.pricing .cmp th, .pricing .cmp td { border: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; background: none; vertical-align: top; }
.pricing .cmp tr:last-child td { border-bottom: 0; }
.pricing .cmp thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); background: var(--bg2); }
.pricing .cmp th:nth-child(n+2), .pricing .cmp td:nth-child(n+2) { width: 22%; text-align: center; }
.pricing .cmp td:nth-child(3), .pricing .cmp th:nth-child(3) { background: hsl(222 80% 50% / .045); }
.pricing .cmp thead th:nth-child(3) { color: var(--acc); }
.pricing .cmp tbody tr:hover td { background: hsl(222 80% 50% / .03); }
.cmp .yes { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700;
  background: var(--acc-soft, hsl(220 80% 95%)); color: var(--acc); }
.cmp .no { color: var(--line2); }
@media (max-width: 640px) { .plan-price b { font-size: 38px; } .pricing .cmp th, .pricing .cmp td { padding: 10px; font-size: 13.5px; } }
@media (prefers-color-scheme: dark) { .plan-list li::before, .cmp .yes { background: hsl(222 50% 22%); } .plan.pro { box-shadow: 0 0 0 1px var(--acc), 0 24px 60px -24px rgba(0,0,0,.7); } }
.tree .t-group { font-weight: 600; color: var(--ink); }
/* 10-21: the MCP URL in the hero subline stands out and copies on click (assets/app.js) */
.hero .lead code { font-size: .92em; font-weight: 600; color: var(--acc); background: var(--acc-soft); border: 1px solid var(--acc-line);
  padding: 2px 9px; border-radius: 8px; cursor: copy; white-space: nowrap; transition: background .15s; }
.hero .lead code:hover { background: var(--acc-line); }
.hero .lead code.copied::after { content: " ✓ copied"; font-weight: 500; font-family: var(--sans, inherit); font-size: .85em; }
/* 10-21: early access is the highlighted card now; Pro shows what it costs later */
.plan.early { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 24px 60px -24px hsl(222 80% 45% / .35); }
.plan.pro { border-color: var(--line); box-shadow: var(--shadow); }
.plan-after { margin: auto 0 0 !important; padding-top: 16px; }
@media (prefers-color-scheme: dark) { .plan.early { box-shadow: 0 0 0 1px var(--acc), 0 24px 60px -24px rgba(0,0,0,.7); } }

/* 10-21 About: a list whose items start with a bold year range is drawn as a vita timeline */
.page-about ul:has(> li > strong:first-child) { list-style: none; margin: 22px 0 26px; padding: 0 0 0 4px; position: relative; }
.page-about ul:has(> li > strong:first-child)::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(var(--acc-line), var(--acc)); border-radius: 2px; }
.page-about ul:has(> li > strong:first-child) > li { position: relative; margin: 0; padding: 4px 0 18px 40px; }
.page-about ul:has(> li > strong:first-child) > li:last-child { padding-bottom: 0; }
.page-about ul:has(> li > strong:first-child) > li::before { content: ""; position: absolute; left: 1px; top: 9px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--card); border: 3px solid var(--acc); box-sizing: border-box; }
.page-about ul:has(> li > strong:first-child) > li:last-child::before { background: var(--acc); box-shadow: 0 0 0 5px var(--acc-soft); }
.page-about ul:has(> li > strong:first-child) > li > strong:first-child { display: block; font: 600 12.5px/1.6 var(--mono); letter-spacing: .04em;
  color: var(--acc); text-transform: uppercase; }
.page-about ul:has(> li > strong:first-child) > li:last-child::after { content: ""; position: absolute; left: 8px; top: 24px; bottom: -12px; width: 4px; background: var(--bg); }
.ab-me-card ul:has(> li > strong:first-child) > li:last-child::after { background: var(--card); }
/* 10-21: three plans side by side; struck regular price + €0 during early access */
.pricing { max-width: 1120px; }
.plans.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan.early { border-color: var(--line); box-shadow: var(--shadow); }
.plan.pro.hl { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 24px 60px -24px hsl(222 80% 45% / .35); }
.plan-price s { font-size: 22px; color: var(--mute); text-decoration-thickness: 2px; margin-right: 4px; align-self: center; }
.plan-incl { margin: 4px 0 10px !important; color: var(--acc); }
@media (max-width: 900px) { .plans.three { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) { .plan.pro.hl { box-shadow: 0 0 0 1px var(--acc), 0 24px 60px -24px rgba(0,0,0,.7); } }

/* Domain cards: same top line, capped height, "Show all" expands (Raphael 10-21). */
.dom-body { max-height: 430px; overflow: hidden; position: relative; }
.dom.clip .dom-body::after { content: ""; position: absolute; inset: auto 0 0; height: 64px; background: linear-gradient(transparent, var(--card)); pointer-events: none; }
.dom.open .dom-body { max-height: none; }
.dom.open .dom-body::after { display: none; }
.dom-more { display: block; width: 100%; margin: 6px 0 2px; padding: 7px 0; font: 500 13px var(--sans, inherit); color: var(--acc); background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.dom-more:hover { text-decoration: underline; }
.home-pick { margin: 8px 0 64px; }
.sg-v[hidden] { display: none; }
.sg a.more rect { fill: var(--card); stroke: var(--acc); stroke-dasharray: 4 3; }
.sg a.more text { fill: var(--acc); font-weight: 600; }
.sg a.more:hover rect { fill: var(--acc-soft); }
/* Step badge on the same line as the step title (Raphael 10-21). */
.how ol.steps > li::before { float: left; margin: 3px 10px 0 0; }
/* Pricing (Raphael 10-21): broader cards, rows aligned across the three plans. */
.page.pricing { max-width: 1180px; }
.pricing .plans.three { gap: 20px; }
.pricing .plan .plan-sub { min-height: 3em; line-height: 1.5; }
.plans.three .plan > .btn, .plans.three .plan > button { margin-top: 0; }
/* About (Raphael 10-21: bigger, very graphical). Sections from web::about_html. */
.page.ab { max-width: 1120px; font-size: 18px; line-height: 1.65; }
.ab section { margin: 0 0 72px; }
.ab h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; margin: 0 0 18px; }
.ab-sig { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-weight: 600; color: var(--ink); }
.ab-sig a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 99px; background: var(--acc); color: #fff; font-weight: 600; font-size: 15.5px; box-shadow: 0 6px 18px hsl(222 80% 45% / .25); }
.ab-sig a::before { content: "in"; font: 700 13px/1 var(--sans, inherit); background: #fff; color: var(--acc); border-radius: 4px; padding: 3px 4px 2px; }
.ab-sig a:hover { text-decoration: none; filter: brightness(1.08); }
ol.ab-flow { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px; counter-reset: f; max-width: none; }
ol.ab-flow > li { counter-increment: f; position: relative; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px 18px; font-size: 14.5px; line-height: 1.5; color: var(--ink2); box-shadow: var(--shadow); }
ol.ab-flow > li::before { content: counter(f); display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); border: 1px solid var(--acc-line); font: 600 13px var(--mono); margin-bottom: 10px; }
ol.ab-flow > li:last-child { background: var(--ink); color: var(--bg); border-color: var(--ink); }
ol.ab-flow > li:last-child::before { background: var(--acc); color: #fff; border-color: var(--acc); }
ol.ab-flow > li:last-child strong { color: var(--bg); }
ol.ab-flow > li strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
ol.ab-flow > li:not(:last-child)::after { content: "→"; position: absolute; right: -24px; top: 50%; transform: translateY(-50%); color: var(--acc); font-size: 18px; font-weight: 600; }
.ab-time { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px 34px 26px; box-shadow: var(--shadow); }
.ab-time ul { margin-bottom: 0 !important; }
.ab-vision > p { font-size: 19px; color: var(--ink2); max-width: 760px; }
.ab-hub { margin: 18px 0 0; }
.ab-hub svg { width: 100%; height: auto; display: block; max-width: 900px; margin: 0 auto; }
.ab-hub .hl { stroke: var(--line2); stroke-width: 1.5; stroke-dasharray: 5 5; }
.ab-hub .hl.live { stroke: var(--acc); stroke-width: 2.5; stroke-dasharray: none; }
.ab-hub .hn rect { fill: var(--card); stroke: var(--line2); stroke-dasharray: 4 3; }
.ab-hub .hn text { fill: var(--ink2); font: 500 14px var(--sans, system-ui); text-anchor: middle; }
.ab-hub .hn.live rect { fill: var(--acc-soft); stroke: var(--acc); stroke-dasharray: none; stroke-width: 1.5; }
.ab-hub .hn.live text { fill: var(--acc); font-weight: 700; }
.ab-hub .hn .hn-tag { fill: var(--acc); font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.ab-hub .hc { fill: var(--ink); }
.ab-hub .hc-t { fill: var(--bg); font: 700 13px var(--sans, system-ui); text-anchor: middle; }
.ab-company { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px !important; font-size: 14px; }
@media (max-width: 900px) {
  ol.ab-flow { grid-template-columns: 1fr; gap: 26px; }
  ol.ab-flow > li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -24px; transform: translateX(-50%); }
  .ab-time { padding: 24px; }
}
/* Hero: the three steps replace the example tree, top to bottom (Raphael 10-21). */
.hero-steps h2 { margin: 0 0 12px !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 600; }
.hero-steps ol.steps { grid-template-columns: 1fr; gap: 12px; }
.hero-steps ol.steps > li { padding: 16px 20px; }
.hero-steps .how-more { margin: 12px 0 0; font-size: 14px; }
/* Step 3 is the result (Raphael 10-21). */
.how ol.steps > li:last-child { background: var(--acc-soft); border-color: var(--acc-line); }
.how ol.steps > li:last-child::before { content: "Result"; background: var(--acc); color: #fff; border-color: var(--acc); }
.pick-lead { color: var(--ink2); font-size: 16px; max-width: 760px; margin: -4px 0 18px; }
.pick-bar { justify-content: flex-end; }
/* Same row heights in every three-plan block (pricing page and home). */
.plans.three .plan .plan-sub { min-height: 3em; line-height: 1.5; }
/* Vision hub v2 (Raphael 10-21: "better graph"). */
.ab-hub { margin: 26px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px 14px; box-shadow: var(--shadow); }
.ab-hub svg { max-width: none; }
.ab-hub .hx { fill: none; stroke: var(--line2); stroke-width: 1.2; stroke-dasharray: 2 6; }
.ab-hub .hs { fill: none; stroke: var(--line2); stroke-width: 1.6; stroke-dasharray: 6 6; }
.ab-hub .hs.live { stroke: var(--acc); stroke-width: 3; stroke-dasharray: 10 8; animation: hubflow 1.6s linear infinite; }
@keyframes hubflow { to { stroke-dashoffset: -36; } }
@media (prefers-reduced-motion: reduce) { .ab-hub .hs.live { animation: none; stroke-dasharray: none; } }
.ab-hub .sl { stroke: var(--line2); stroke-width: 1; stroke-dasharray: 3 4; }
.ab-hub .sl.live { stroke: var(--acc-line); stroke-width: 1.4; stroke-dasharray: none; }
.ab-hub .sd { fill: var(--card); stroke: var(--line2); stroke-width: 1.2; stroke-dasharray: 2 2; }
.ab-hub .sd.live { fill: var(--acc); stroke: var(--card); stroke-width: 2; stroke-dasharray: none; }
.ab-hub .hn rect { fill: var(--card); stroke: var(--line2); stroke-width: 1.2; stroke-dasharray: 5 4; }
.ab-hub .hn text { fill: var(--ink2); font: 500 16px var(--sans, system-ui); text-anchor: middle; }
.ab-hub .hn.live > rect { fill: var(--acc); stroke: var(--acc); stroke-dasharray: none; }
.ab-hub .hn.live > text { fill: #fff; font-weight: 700; }
.ab-hub .hn-tag rect { fill: var(--acc-soft); stroke: var(--acc-line); stroke-dasharray: none; }
.ab-hub .hn-tag text { fill: var(--acc) !important; font: 700 11px var(--mono) !important; letter-spacing: .08em; }
.ab-hub .hc { fill: var(--ink); }
.ab-hub .hc-glow { fill: var(--acc-soft); stroke: var(--acc-line); }
.ab-hub .hc-t { fill: var(--bg); font: 700 15px var(--sans, system-ui); text-anchor: middle; }
.ab-hub figcaption { display: flex; gap: 18px; justify-content: center; font-size: 13px; color: var(--mute); margin-top: 6px; }
.ab-hub .lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1.5px dashed var(--line2); }
.ab-hub .lg.live::before { background: var(--acc); border: 0; }
.ab-hub-list { display: none; }
@media (max-width: 640px) {
  .ab-hub svg { display: none; }
  .ab-hub-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 4px 0 8px; }
  .ab-hub-list li { margin: 0; padding: 7px 14px; border-radius: 99px; border: 1.5px dashed var(--line2); font-size: 15px; color: var(--ink2); }
  .ab-hub-list li.live { background: var(--acc); border: 0; color: #fff; font-weight: 600; }
}
/* Vision as the page's big band (Raphael 10-21: "make this bigger"). */
.ab-vision { margin-left: calc(50% - 50vw + 12px); margin-right: calc(50% - 50vw + 12px); padding: 72px max(24px, calc(50vw - 560px)) 64px; border-radius: 32px;
  background: radial-gradient(1200px 500px at 50% 0%, hsl(222 80% 55% / .10), transparent 70%), var(--bg2); border: 1px solid var(--line); }
.ab-vision > h2 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -.035em; margin-bottom: 18px; }
.ab-vision > p { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.5; color: var(--ink); max-width: 900px; }
.ab-vision > p strong { color: var(--acc); }
.ab-vision .ab-hub { margin-top: 36px; padding: 28px; }
@media (max-width: 640px) { .ab-vision { margin-left: 0; margin-right: 0; padding: 36px 20px; border-radius: 22px; } }
.ab-vision { margin-left: 0; margin-right: 0; padding: 64px 56px 56px; }
.ab-vision .ab-hub { padding: 20px 12px 14px; }
@media (max-width: 640px) { .ab-vision { padding: 36px 20px; } }

/* Systems index: shorter cards with "Show all", growth note, request box above the layers. */
.sys-sec .dom-body { max-height: 296px; }
.filtering .sys-sec .dom-body { max-height: none; }
.filtering .sys-sec .dom-body::after, .filtering .sys-sec .dom-more { display: none; }
.stats { align-items: flex-end; flex-wrap: wrap; }
.stats .grow { margin: 0 0 2px; color: var(--acc); font-size: 14px; font-weight: 600; align-self: flex-end; }
.req-sys { margin: 8px 0 32px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.req-sys h2 { margin: 0 0 4px !important; font-size: 20px; }
.req-sys p { margin: 0; }
/* "Copy for AI" sits top left inside the graph box. */
.pick-bar { justify-content: space-between; }
.sg-bar { display: flex; margin: 10px 0 0; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px; padding: 6px 12px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.back:hover { border-color: var(--acc); color: var(--acc); }
.sg-bar .copy, .pick-bar .copy { margin: 0 auto 0 0; }
.pick-bar .pick-open { margin-left: auto; }

/* No header search: nav sits right. */
.top-in .toplinks { margin-left: auto; }

/* Split view: page shifts left and shrinks a little; the block page opens in its own scrolling panel. */
main, .top-in, footer { transition: transform .28s ease, margin .28s ease; transform-origin: left top; }
.side-view { position: fixed; top: 0; right: 0; bottom: 0; width: max(25vw, 380px); z-index: 30; background: var(--bg); border-left: 1px solid var(--line); box-shadow: -18px 0 48px rgba(0,0,0,.10); display: flex; flex-direction: column; animation: sv-in .28s ease; }
.side-view[hidden] { display: none; }
@keyframes sv-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sv-bar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.sv-full { font-size: 14px; color: var(--acc); text-decoration: none; }
.sv-x { margin-left: auto; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font-size: 14px; }
.sv-x:hover { border-color: var(--acc); color: var(--acc); }
.sv-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px 28px 48px; }
.sv-body .page-head h1 { font-size: 34px; }
.sv-body .deep-wrap { display: block; }
.sv-body .toc { display: none; }
/* Side panel (laptop): the related cards sit under the text at full width, not at the page's 258px offset (Raphael 10-21). */
.sv-body .graph { margin: 48px 0 0; max-width: none; }
.sv-body .minis { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  body.split { margin-right: var(--svw, 0px); }
}
@media (max-width: 899px) { .side-view { width: 100vw; } }

/* Home example: pulled up under the hero and framed so it reads as the live demo. */
main.home > .hero { padding-bottom: 8px; }
.home-pick { margin-top: 8px; }
.home-pick h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.02em; margin: 6px 0 8px; }
.home-pick .pick-lead { margin: 0 0 14px; max-width: 820px; }
.ex-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--acc); color: #fff; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.home-pick .pick { border: 2px solid color-mix(in srgb, var(--acc) 55%, var(--line)); box-shadow: 0 18px 50px color-mix(in srgb, var(--acc) 18%, transparent); }
main.home > .hero { padding-top: 36px; }
.pick .sg-bar { justify-content: space-between; align-items: center; }
.pick .sg-bar .pick-open { margin-left: auto; }

/* Compact hero: tighter title, lead and step cards. */
main.home > .hero { padding: 24px 0 4px; gap: 40px; }
main.home > .hero h1 { font-size: clamp(30px, 3.6vw, 46px); margin-bottom: 14px; }
main.home > .hero .lead { font-size: 16px; line-height: 1.55; margin: 0; }
.hero-steps h2 { margin-bottom: 8px !important; }
.hero-steps ol.steps { gap: 8px; }
.hero-steps ol.steps > li { padding: 11px 16px 12px; font-size: 14px; line-height: 1.45; }
.hero-steps ol.steps > li > strong:first-child, .hero-steps ol.steps > li > b:first-child { font-size: 16px; margin-bottom: 4px; }
.hero-steps ol.steps > li > code { margin: 4px 0 2px; padding: 6px 10px; }
.hero-steps ol.steps > li::before { margin-top: 1px; }
.hero-steps .how-more { margin-top: 8px; font-size: 13.5px; }
.home-pick h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.home-pick h2 .ex-tag { font-size: 12px; font-weight: 500; letter-spacing: .06em; }

/* Example header in one line: tag inline with the heading, short lead, tight gaps. */
main.home > .hero { padding-bottom: 0; }
.home-pick { margin-top: 0; }
.home-pick h2 { display: block; font-size: clamp(22px, 2.2vw, 28px); margin: 0 0 4px; line-height: 1.25; }
.home-pick h2 .ex-tag { vertical-align: 4px; margin-right: 10px; }
.home-pick .pick-lead { font-size: 15px; margin: 0 0 10px; max-width: none; }
.scroll-cue { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--acc) 10%, var(--card)); color: var(--acc); font-size: 14px; font-weight: 500; text-decoration: none; }
.scroll-cue span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--acc); color: #fff; font-size: 12px; }
.scroll-cue b { animation: cue-bob 1.6s ease-in-out infinite; }
@keyframes cue-bob { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue b { animation: none; } }
.scroll-cue { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border-radius: 14px; padding: 10px 14px; }
.scroll-cue i { font-style: normal; display: flex; align-items: center; gap: 8px; }
/* Rule: text right above or below rounded cards sits 8px in from the card edge, not flush with it. */
/* Site-wide: headings and leads that sit directly above a card start 5px in, in line with the card's rounded corner (Writer 4, 10-21). */
.hero-steps > h2, .pricing-sec > h2, .pricing-sec > p, .plans-note, .cmp-h, .home-pick > h2, .home-pick > .pick-lead, .req-home > h2, .sys-sec > h2, .browse > h2, .ab-sec > h2, .ab-vision > p, .layer-h { padding-left: 5px; }
.hero-steps .cmd { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.hero-steps .cmd code { flex: 1; margin: 0 !important; }
.cmd-copy { flex: none; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 500 13px var(--sans); cursor: pointer; }
.cmd-copy:hover { border-color: var(--acc); color: var(--acc); }
/* Graph boxes invite a click: arrow on every linked box, lift on hover, no underline; the home example pulses one box. */
.sg a.n, .sg a.n:hover { text-decoration: none; }
.sg a.n text { text-decoration: none; }
.sg .n text.go { font-size: 18px; font-weight: 600; fill: var(--acc); opacity: .45; transition: opacity .18s, transform .18s; }
.sg a.n:hover text.go { opacity: 1; transform: translateX(3px); }
.sg a.n:hover rect { fill: hsl(var(--h, 220) 85% 93%); stroke: hsl(var(--h, 220) 65% 50%); stroke-width: 1.6; }
.sg a.n.hint rect { animation: n-hint 1.8s ease-in-out infinite; }
@keyframes n-hint { 50% { stroke: var(--acc); stroke-width: 2.4; } }
.pick-hint { position: absolute; z-index: 2; padding: 4px 10px; border-radius: 999px; background: var(--acc); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; white-space: nowrap; transform: translate(-100%, -50%); animation: hint-bob 1.8s ease-in-out infinite; }
@keyframes hint-bob { 50% { margin-left: -4px; } }
@media (prefers-reduced-motion: reduce) { .sg a.n.hint rect, .pick-hint { animation: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sg a.n:hover rect { fill: hsl(var(--h, 220) 35% 22%); } }
:root[data-theme="dark"] .sg a.n:hover rect { fill: hsl(var(--h, 220) 35% 22%); }
.sg-wrap .sg-v, .sg-wrap > .sg { overflow-x: auto; }
.sg-v { overflow-x: auto; }
/* Home hint, more prominent: filled box, glow ring, bigger bubble. */
.sg a.n.hint rect { fill: var(--acc-soft); stroke: var(--acc); stroke-width: 2.4; animation: n-hint2 1.4s ease-in-out infinite; }
@keyframes n-hint2 { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--acc) 70%, transparent)); } }
.sg a.n.hint text.go { opacity: 1; }
.pick-hint { padding: 7px 14px; font-size: 14px; font-weight: 700; box-shadow: 0 6px 20px color-mix(in srgb, var(--acc) 45%, transparent); }
.pick-hint::after { content: ""; position: absolute; right: -6px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-right: 0; border-left-color: var(--acc); }
.pick-hint { transform: translate(0, -50%); }
.pick-hint::after { right: auto; left: -6px; border: 6px solid transparent; border-left: 0; border-right-color: var(--acc); }
@keyframes hint-bob { 50% { margin-left: 4px; } }
.sg .n text.go { font-size: 26px; font-weight: 700; opacity: .6; }
/* Home hint floats above its box: centred bubble, arrow down onto the box, bounce + shadow. */
/* Anchored at the box's right end, so it sits over the column gap and not over the labels above. */
.pick-hint { transform: translate(0, -100%); padding: 9px 18px; font-size: 16px; font-weight: 700; z-index: 3; box-shadow: 0 10px 28px rgb(0 0 0 / .22), 0 4px 14px color-mix(in srgb, var(--acc) 50%, transparent); animation: hint-float 1.6s ease-in-out infinite; }
.pick-hint::after { left: 22px; right: auto; top: 100%; margin: 0; border: 8px solid transparent; border-bottom: 0; border-top-color: var(--acc); }
@keyframes hint-float { 0%, 100% { margin-top: 0; } 50% { margin-top: -6px; } }
@media (prefers-reduced-motion: reduce) { .pick-hint { animation: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pick-hint { box-shadow: 0 10px 28px rgb(0 0 0 / .6), 0 0 18px color-mix(in srgb, var(--acc) 55%, transparent); } }
:root[data-theme="dark"] .pick-hint { box-shadow: 0 10px 28px rgb(0 0 0 / .6), 0 0 18px color-mix(in srgb, var(--acc) 55%, transparent); }
/* Split view: the page eases to its new width while the panel slides in; the panel sits outside body, so it sets its own font. */
body { transition: margin-right .35s cubic-bezier(.2,.7,.2,1); }
.side-view { font: 16px/1.65 var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; animation: sv-slide .35s cubic-bezier(.2,.7,.2,1); }
@keyframes sv-slide { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { body { transition: none; } .side-view { animation: none; } }

/* Signed-in header: "Account" with a small menu (assets/app.js). */
.acct-menu { position: relative; margin-left: 6px; }
.acct-menu > summary { list-style: none; cursor: pointer; border-radius: 8px; font: 600 14px var(--sans); }
.acct-menu > summary::-webkit-details-marker { display: none; }
.acct-menu > div { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.35); display: flex; flex-direction: column; z-index: 30; }
.acct-menu > div a, .acct-menu > div button, .nav-menu .nav-out { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--ink); font: inherit; font-size: 14px; background: none; border: 0; text-align: left; cursor: pointer; text-decoration: none; }
.acct-menu > div a:hover, .acct-menu > div button:hover, .nav-menu .nav-out:hover { background: var(--acc-soft); }
.nav-menu .nav-out { min-height: 44px; padding: 0 14px; font-size: 16px; width: 100%; }

/* Phones and tablets (Product 10-21): no sideways page scroll, 16px gutter, text ≥ 16px, tap targets ≥ 44px. */
html, body { overflow-x: clip; }
.nav-menu { display: none; }
@media (max-width: 820px) {
  .toplinks { display: none !important; }
  .nav-menu { display: block; margin-left: auto; position: relative; }
  .nav-menu > summary { list-style: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; }
  .nav-menu > summary::-webkit-details-marker { display: none; }
  .nav-menu > summary span, .nav-menu > summary span::before, .nav-menu > summary span::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; content: ""; }
  .nav-menu > summary span::before { position: absolute; top: -6px; } .nav-menu > summary span::after { position: absolute; top: 6px; }
  .nav-menu[open] > summary { background: var(--card); }
  .nav-menu > nav { position: absolute; right: 0; top: 50px; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.35); display: flex; flex-direction: column; }
  .nav-menu > nav a { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 9px; color: var(--ink); font-size: 16px; text-decoration: none; }
  .nav-menu > nav a:hover { background: var(--acc-soft); }
  .top-in, .home, .page { padding-left: 16px; padding-right: 16px; }
  .foot div { padding-left: 16px; padding-right: 16px; font-size: 16px; }
  body { font-size: 16px; }
  .btn, button, .chip, .cmd-copy, .copy, .login, select, input[type=search] { min-height: 44px; }
  .btn, .chip { display: inline-flex; align-items: center; }
  .cmd-copy, .copy { min-width: 44px; }
  :is(p, li, td, th, dd, dt, label, a, span, b, strong, i, em, small, code, button, select, input, textarea, .cx, .kind, .crumbs, .count, .plan-name):not(h1 *, h2 *, h3 *, .lead, .lead *, .plan-price *, .stats *, pre *, svg *, .plan-badge, [class^="t-T"]) { font-size: 16px !important; }
  .hero-steps h2, .when h3, .graph h3, .ov-label, .toc-label, .stats span, .stats .grow { font-size: 16px !important; }
  .btn { justify-content: center; }
  .plan-price span { font-size: 16px !important; }
  .pills a { min-height: 44px; display: inline-flex; align-items: center; }
  pre, pre code { font-size: 14px; }
  .foot-links { display: flex; flex-wrap: wrap; gap: 0 10px; }
  .foot-links a, .crumbs a, a.back, a.tag { min-width: 44px; justify-content: center; }
  a.tag, a.back, .crumbs a, .req input, .page input:not([type=checkbox]):not([type=radio]) { min-height: 44px; display: inline-flex; align-items: center; }
  .page input:not([type=checkbox]):not([type=radio]) { display: block; }
  .foot-links a, .pager a, .crumbs a, .dom-more, .sg-bar a { min-height: 44px; display: inline-flex; align-items: center; }
  .logo { min-height: 44px; display: inline-flex; align-items: center; }
  table { display: block; overflow-x: auto; max-width: 100%; }
  pre { max-width: 100%; overflow-x: auto; }
  .sg-v, .sg-wrap { max-width: 100%; }
}
/* About: plain header, then the About me card, compact (Raphael 10-21): big photo left, as tall as the card's text. */
.ab-head { padding: 36px 0 8px; }
.ab-head h1 { font-size: clamp(40px, 6vw, 68px); letter-spacing: -.035em; margin: 0 0 28px; }
.ab-me-card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.ab-me-t { padding: 6px 8px 4px 0; }
.ab-me-card .ab-sig { margin: 0; }
.ab-photo { width: 100%; height: 100%; min-height: 320px; object-fit: cover; object-position: 50% 25%; border-radius: 16px; border: 1px solid var(--line); display: block; }
.ab-tl-h { margin: 22px 0 0 !important; font-weight: 700; color: var(--ink); }
.ab-me-card ul { margin: 10px 0 0 !important; }
/* One line box for date, dot and text, so all three sit on the same line; wrapped text stays in its column. */
.ab-me-card ul:has(> li > strong:first-child) > li { padding: 0 0 12px 136px; line-height: 28px; }
.ab-me-card ul:has(> li > strong:first-child) > li::before { top: 7px; }
.ab-me-card ul:has(> li > strong:first-child) > li > strong:first-child { position: absolute; left: 34px; top: 0; line-height: 28px; }
.ab-me-card ul:has(> li > strong:first-child) > li:last-child::after { top: 24px; }
@media (max-width: 820px) {
  .ab-me-card { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .ab-photo { height: auto; min-height: 0; aspect-ratio: 4 / 5; max-width: 240px; }
  .ab-me-card ul:has(> li > strong:first-child) > li { padding-left: 34px; line-height: 1.5; }
  .ab-me-card ul:has(> li > strong:first-child) > li > strong:first-child { position: static; display: block; }
}
/* Systems page: one big number (Raphael 10-21). */
.stats-big { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.stats-big b { font-size: clamp(56px, 8vw, 88px); line-height: 1; letter-spacing: -.04em; font-weight: 800; color: var(--ink); }
.stats-big span { color: var(--acc) !important; font-size: 18px !important; font-weight: 600; }

/* Redeem code under the plans (Raphael 10-21: a thin line where "Compare plans" was) */

/* 5px text inset, everywhere (Raphael 10-21: "basically everywhere", "remember it well"):
   text that stands next to cards (outside them) starts 5px right of the card edge, so letters line up optically
   with the card's border. Inside a card, heading, text and buttons share one left edge; text next to chips or
   other inner cards is again inset 5px. New page-level text gets this rule too. */
.hero h1, .hero > .lead, .hero p.lead, .hero-text > h1, .hero-text > .lead, .hero-text > p,
.stats-big, .tier-legend > .mono, .page-head > h1, .page-head > .lead, .page-head > p, .page-head > .kind,
.sg-sim > h2, .sg-sim > p, .graph h3, .deep-title, .layer > h2, .browse > p, .home-pick > p { padding-left: 5px; }
.req-sys > h2, .req-sys > p { padding-left: 0; }
.dom-head { padding-left: 5px; }
.sg a.n.root:hover rect { fill: var(--acc); stroke: none; }

/* Code field above the plans (Raphael 10-21: "make code redemption big at the top"). A card, so its text sits on the
   card padding; the cards below swap to the code's prices once it is applied. */
.redeem-big { margin: 20px 0 6px; padding: 22px 24px; border: 1px solid var(--acc-line); border-radius: var(--r); background: var(--acc-soft); display: grid; gap: 10px; }
.redeem-big label { font-size: 18px; font-weight: 600; color: var(--ink); }
.rb-row { display: flex; gap: 10px; flex-wrap: wrap; }
.rb-row input { flex: 1 1 260px; max-width: 460px; font: inherit; font-size: 18px; padding: 12px 16px; min-height: 52px; border: 1px solid var(--line2); border-radius: 12px; background: var(--card); color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.rb-row input::placeholder { text-transform: none; letter-spacing: 0; color: var(--mute); }
.rb-row input:focus { outline: 2px solid var(--acc); outline-offset: 1px; }
.rb-row .btn { min-height: 52px; padding: 0 28px; font-size: 17px; }
.rb-msg { margin: 0; min-height: 1.4em; color: var(--mute); }
.rb-msg:empty { display: none; }
.rb-msg.ok, .rb-ok { color: var(--ok); margin: 0; font-size: 17px; }
.rb-msg.err { color: var(--no); }
.redeem-big.on { border-color: var(--ok); background: var(--ok-soft); }
.redeem-big.on .rb-row { display: none; }
.redeem-big.on label { display: none; }
@media (max-width: 640px) { .redeem-big { padding: 18px 16px; } .rb-row input, .rb-row .btn { flex: 1 1 100%; max-width: none; } }
.api-intro > p:first-child { font-size: 18.5px; color: var(--ink2); line-height: 1.55; max-width: 70ch; }
.api-intro ul { margin: 14px 0 18px; }

/* Click me is a button now (Raphael 10-21): a pill inside its box's empty right half, responds to hover and tap. */
.pick-hint { transform: translate(0, -50%); pointer-events: auto; cursor: pointer; border: 0; font: inherit; font-size: 13px; font-weight: 700; line-height: 1; color: #fff; background: var(--acc); padding: 5px 12px; border-radius: 999px; box-shadow: 0 4px 14px color-mix(in srgb, var(--acc) 45%, transparent); animation: hint-pulse 1.6s ease-in-out infinite; transition: background .15s, box-shadow .15s, scale .15s; }
.pick-hint::after { content: none; }
@keyframes hint-pulse { 0%, 100% { scale: 1; } 50% { scale: 1.07; } }
.pick-hint:hover, .pick-hint:focus-visible { animation: none; scale: 1.1; background: color-mix(in srgb, var(--acc) 78%, var(--ink)); box-shadow: 0 8px 22px rgb(0 0 0 / .28), 0 0 0 3px var(--card); outline: none; }
.pick-hint:active { scale: .96; }
.sg a.n.hint.hint-hover rect { fill: var(--acc); stroke: var(--acc); animation: none; }
.sg a.n.hint.hint-hover text, .sg a.n.hint.hint-hover text.go { fill: #fff; }
.sg a.n.hint.hint-hover circle { fill: #fff; }
@media (prefers-reduced-motion: reduce) { .pick-hint { animation: none; transition: none; } }
