:root {
  --bg: #151619; --bg-2: #17181b; --bg-3: #111214; --surface: #1b1c20; --surface-2: #202126; --code: #141518;
  --line: #2c2e34; --line-2: #3a3d45; --line-soft: #26282d;
  --ink: #f2ede4; --ink-2: #d9d3c9; --muted: #bdb7ad; --muted-2: #a8a297; --faint: #8a857c;
  --accent: #ff570a; --accent-hover: #ff6d2a; --accent-ink: #140c07; --accent-soft: rgba(255, 87, 10, .12); --accent-line: rgba(255, 87, 10, .55); --accent-text: #ffb38f;
  --add: #7fd19b; --add-bg: rgba(95, 191, 134, .12); --del: #f09a9a; --del-bg: rgba(224, 122, 122, .13); --str: #d9c08c; --kw: #a39d93;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 12px; --r-lg: 16px; --pad: clamp(20px, 5vw, 48px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: #ff8a4c; }
button { font: inherit; color: inherit; cursor: pointer; }
code, pre, .mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid #ff8a4c; outline-offset: 3px; }
::selection { background: rgba(255, 87, 10, .35); color: #fff; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; }
.skip:focus { left: 16px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.muted { color: var(--muted); } .muted-2 { color: var(--muted-2); }
.kicker { display: block; font: 400 12px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.badge-demo { display: inline-block; font: 500 10.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px dashed #4f525a; border-radius: 6px; padding: 3px 7px; white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; line-height: 1.4; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag--beta { border-color: rgba(217, 192, 140, .5); color: var(--str); }
.tag--plan { border-color: var(--line-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 11px; border: 1px solid transparent; font-size: 15px; font-weight: 500; text-decoration: none; background: transparent; color: var(--ink); transition: background .2s, border-color .2s; }
.btn--primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: 0 10px 30px -12px rgba(255, 87, 10, .7); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn--outline { border-color: var(--accent-line); color: var(--accent-text); }
.btn--outline:hover { background: var(--accent-soft); color: #ffd0b8; }
.btn--ghost { border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--faint); background: #1f2024; color: var(--ink); }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn--sim { border: 1px dashed var(--faint); background: var(--surface-2); }
.btn[disabled] { cursor: default; opacity: .8; }
.explore { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); background: transparent; }
.explore:hover { border-color: var(--faint); background: #1f2024; color: var(--ink); }

/* Top bars */
.disclosure { background: var(--bg-3); border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.disclosure .wrap { padding-top: 9px; padding-bottom: 9px; }
.header { position: sticky; top: 0; z-index: 40; background: rgba(21, 22, 25, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.header .wrap { min-height: 64px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand__mark { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.brand__mark::after { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--ink); }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { padding: 10px 11px; border-radius: 8px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.nav a:hover { background: #1f2024; color: var(--ink); }
.header .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
@media (max-width: 1020px) { .nav { display: none; } .header .btn { margin-left: auto; } }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: clamp(40px, 6vw, 72px); align-items: center; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; list-style: none; padding: 0; margin: -12px 0 0; font: 400 12px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: '/'; color: #4f525a; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.hero h1 { margin-top: 8px; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.04; letter-spacing: -.032em; }
.hero__lead { margin-top: 20px; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: #cfc9bf; max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-row .btn { min-height: 52px; padding: 0 24px; font-size: 16px; }
.trial-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.map { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.map a { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; min-height: 64px; background: rgba(27, 28, 32, .6); }
.map a:hover { border-color: var(--faint); color: var(--ink); }
.map__n { grid-row: span 2; font: 600 12px/1 var(--mono); color: var(--muted); padding-top: 4px; }
.map__t { font-weight: 600; font-size: 15px; }
.map__d { font-size: 13px; color: var(--muted-2); line-height: 1.4; }

/* Layered hero demo */
.stack { position: relative; perspective: 1600px; margin: 0; }
.stack__inner { position: relative; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.layer { position: relative; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); padding: 13px 15px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .85); }
.layer + .layer { margin-top: -10px; }
.layer--code { padding: 0; background: var(--surface); border-color: #2f3137; border-radius: 14px; padding-bottom: 26px; }
.layer--comment { margin-left: 9%; }
.layer--context { margin: -10px 6% 0 2%; background: #1d1e23; }
.layer--fix { margin-left: 14%; }
.layer__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 400 11px/1.5 var(--mono); color: var(--muted); }
.layer__head .num { letter-spacing: .06em; text-transform: uppercase; }
.layer__link { margin-left: auto; padding: 2px 7px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.layer .layer__title { margin-top: 8px; font-size: 14.5px; line-height: 1.4; }
.layer p { margin-top: 5px; font-size: 13.5px; line-height: 1.55; color: #cfc9bf; }
.layer code { font-size: 12.5px; }
.stack__caption { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 20px; font-size: 13px; color: var(--muted); }
.hero .stack .window__bar { border-radius: 14px 14px 0 0; }

/* Windows, code, diffs */
.window { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.window__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.window__bar .path { font: 400 12px/1.5 var(--mono); color: var(--muted); }
.window__bar .badge-demo { margin-left: auto; }
.window__foot { padding: 11px 14px; border-top: 1px solid var(--line-soft); font-size: 12.5px; line-height: 1.55; color: var(--muted-2); }
.diff { margin: 0; white-space: normal; padding: 8px 0; overflow-x: auto; background: var(--code); font: 400 12.5px/1.8 var(--mono); }
.diff__l { display: grid; grid-template-columns: 20px 36px 16px max-content; align-items: center; padding-right: 18px; transition: background .25s; }
.diff__l > .g { display: grid; place-items: center; }
.diff__l > .g::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: transparent; }
.diff__l[data-open] > .g::before { background: var(--faint); }
.diff__l > .n { text-align: right; padding-right: 10px; color: var(--faint); user-select: none; }
.diff__l > .s { color: var(--faint); user-select: none; }
.diff__l > code { white-space: pre; color: #ece6db; }
.diff__l--add { background: rgba(95, 191, 134, .06); }
.diff__l--add > .s { color: var(--add); }
.diff__l.is-sel { background: rgba(255, 87, 10, .16); box-shadow: inset 3px 0 0 var(--accent); }
.diff__l.is-sel > .n, .diff__l.is-sel > .s { color: var(--accent-text); }
.diff__l.is-sel > .g::before { background: var(--accent); }
.diff__l.is-fixed { background: rgba(95, 191, 134, .18); box-shadow: inset 3px 0 0 var(--add); }
.k { color: var(--kw); } .str { color: var(--str); }
.fixbox { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; font: 400 12.5px/1.65 var(--mono); }
.fixbox code { display: block; padding: 3px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fixbox .del { background: var(--del-bg); color: #f3d6d6; }
.fixbox .ins { background: var(--add-bg); color: #d8f1e1; }
pre.term { margin: 0; padding: 16px; overflow-x: auto; background: #0f1012; color: #ece6db; font: 400 13px/1.75 var(--mono); }

/* Sections */
.section { padding: clamp(72px, 10vw, 120px) 0; border-top: 1px solid var(--line-soft); scroll-margin-top: 64px; }
.section--alt { background: var(--bg-2); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 24px; }
.section__head > div { max-width: 720px; }
.section h2 .t { display: block; margin-top: 14px; font-size: clamp(30px, 4vw, 48px); line-height: 1.06; letter-spacing: -.028em; }
.section h2 .kicker { font-weight: 400; }
.lead { margin-top: 18px; font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 64ch; }
.h3 { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -.02em; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 44px; } .mt-xl { margin-top: 72px; }
.card { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.card--plain { background: transparent; }
.card h3 { font-size: 16.5px; line-height: 1.35; }
.card p, .card li { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.card p { margin-top: 8px; }
.card ul { margin-top: 8px; padding-left: 18px; display: grid; gap: 6px; }
.card .kicker { margin-bottom: 8px; }
.note { margin-top: 14px; font-size: 13.5px; line-height: 1.6; color: var(--muted-2); max-width: 80ch; }
.parts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.parts li { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); }
.parts strong { display: block; font-size: 15px; font-weight: 600; }
.parts span { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted-2); }

/* Feature facts (accordion fallback + drawer source) */
.facts { margin-top: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(27, 28, 32, .5); }
.facts > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 18px; font-size: 15px; font-weight: 500; }
.facts > summary::-webkit-details-marker { display: none; }
.facts > summary::after { content: '+'; color: var(--muted); font-size: 20px; line-height: 1; }
.facts[open] > summary::after { content: '\2212'; }
.facts__body { padding: 0 18px 18px; }
.qa { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 10px 20px; margin: 0; }
.qa dt { font: 400 11px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.qa dd { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.qa dd ul { padding-left: 18px; display: grid; gap: 4px; }
.qa a { display: inline-flex; align-items: center; min-height: 32px; }
@media (max-width: 640px) { .qa { grid-template-columns: 1fr; gap: 2px; } .qa dd { margin-bottom: 10px; } }

/* Tabs (progressive: without JS every panel shows) */
.tabs [role="tablist"] { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 8px; }
[role="tab"] { min-height: 58px; padding: 10px 16px; text-align: left; border-radius: 11px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
[role="tab"][aria-selected="true"] { border-color: var(--accent); background: var(--surface-2); color: var(--ink); }
[role="tab"] strong { display: block; font-size: 16px; } [role="tab"] span { display: block; font-size: 12.5px; color: var(--muted-2); }
.tabpanel { margin-top: 14px; }
.no-js .tabpanel + .tabpanel { margin-top: 40px; }
.panel-title { font-size: 13px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

/* PR demo */
.chain { list-style: none; padding: 0; margin: 36px 0 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.chain li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 11px; border: 1px solid var(--line); font-size: 14.5px; font-weight: 500; transition: border-color .2s, background .2s; }
.chain .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 11px/1 var(--mono); background: var(--line); color: var(--ink-2); }
.chain li.is-active { border-color: var(--accent-line); background: rgba(255, 87, 10, .08); }
.chain li.is-active .dot { background: var(--accent); color: var(--accent-ink); }
.chain li.is-done .dot { background: var(--ink); color: var(--bg); }
.pr { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.pr__code { min-width: 0; border-right: 1px solid var(--line); }
.pr__side { min-width: 0; padding: 16px; }
.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.finding { border: 1px solid var(--line); border-radius: 11px; background: #18191d; transition: border-color .2s, background .2s; }
.finding.is-active { border-color: var(--accent-line); background: rgba(255, 87, 10, .05); }
.finding__btn { width: 100%; display: flex; align-items: flex-start; gap: 10px; min-height: 52px; padding: 12px 14px; text-align: left; background: none; border: 0; }
.finding__line { flex: none; margin-top: 2px; padding: 2px 7px; border-radius: 5px; font: 600 11px/1.4 var(--mono); background: #2a2c31; color: var(--ink-2); }
.finding.is-active .finding__line { background: var(--accent); color: var(--accent-ink); }
.finding__meta { display: block; font-size: 12px; color: var(--muted-2); }
.finding__title { display: block; margin-top: 2px; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.finding__state { flex: none; font-size: 12px; color: var(--add); }
.finding__body { padding: 0 14px 14px; }
.finding__body p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.finding__body .why { margin-top: 10px; font-size: 13px; color: var(--muted); }
.js .finding:not(.is-active) .finding__body { display: none; }
.sim { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.sim small { font-size: 12.5px; color: var(--muted-2); }

/* Context graph */
.graph { position: relative; aspect-ratio: 4 / 3; max-width: 640px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); overflow: hidden; }
.graph__edge { position: absolute; height: 1px; background: var(--line-2); transform-origin: 0 50%; transition: background .2s; }
.graph__edge.is-on { background: var(--accent); height: 2px; }
.node { position: absolute; transform: translate(-50%, -50%); width: min(31%, 190px); min-height: 48px; padding: 7px 9px; text-align: left; border-radius: 10px; border: 1px solid var(--line); background: #1d1e22; transition: opacity .2s, border-color .2s; }
.node .f { display: block; font: 400 11px/1.4 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node .s { display: block; margin-top: 2px; font: 400 11.5px/1.4 var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node[aria-pressed="true"] { border-color: var(--accent); background: #2a1a12; }
.node[aria-pressed="true"] .f { color: var(--accent-text); }
.graph.has-sel .node.is-far { opacity: .5; }
.ctx-map { width: 100%; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.table caption { caption-side: bottom; text-align: left; padding: 12px 16px; font-size: 12.5px; color: var(--muted-2); }
.table th, .table td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line-soft); vertical-align: top; }
.table thead th { border-top: 0; background: var(--surface); font-weight: 500; color: var(--ink-2); }
.table tbody th { font-weight: 400; color: var(--ink-2); }
.table td.is-none { color: var(--faint); }
.table code { font-size: 12.5px; color: #ece6db; }

/* Copy commands */
.cmds { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cmd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 11px; background: #18191d; }
.cmd span { font-size: 12.5px; color: var(--muted-2); }
.cmd code { font-size: 13px; color: #ece6db; overflow-wrap: anywhere; }
.cmd .btn { grid-row: span 2; min-width: 76px; }
.no-js .cmd .btn { display: none; }

/* Chat */
.thread { list-style: none; padding: 16px; margin: 0; display: grid; gap: 16px; }
.msg { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 8px; background: #2a2c31; display: grid; place-items: center; font: 500 11px/1 var(--mono); }
.avatar--user { border-radius: 50%; background: var(--line-2); font-family: var(--sans); font-weight: 600; }
.msg p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.msg .who { font-size: 13px; color: var(--muted-2); }
.msg .who strong { color: var(--ink); font-weight: 600; }
.learned { margin-top: 10px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: #18191d; }
.yaml { margin: 0; padding: 14px; overflow-x: auto; background: var(--code); font: 400 13px/1.75 var(--mono); color: #ece6db; }
.yaml .y-k { color: #ece6db; } .yaml .y-v { color: var(--str); } .yaml .y-c { color: var(--faint); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg button { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 400 13px/1 var(--mono); }
.seg button[aria-pressed="true"] { border-color: var(--faint); background: #2a2c31; color: var(--ink); }
.no-js #yaml-demo .seg { display: none; }

/* Plan flow */
.flow { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; counter-reset: step; }
.flow li { position: relative; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); counter-increment: step; }
.flow li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 600 12px/1 var(--mono); margin-bottom: 10px; }
.flow strong { display: block; font-size: 15.5px; }
.flow span { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* Triage */
.queue { list-style: none; padding: 10px; margin: 0; display: grid; gap: 6px; }
.pr-item { border: 1px solid var(--line); border-radius: 11px; transition: background .2s, border-color .2s; }
.pr-item.is-active { background: #1f2024; border-color: #4f525a; }
.pr-item__btn { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; text-align: left; background: none; border: 0; }
.prio { font: 600 12px/1 var(--mono); padding: 5px 6px; border-radius: 6px; text-align: center; background: #2a2c31; color: var(--ink-2); }
.prio--p0 { background: var(--accent); color: var(--accent-ink); } .prio--p1 { background: rgba(255, 87, 10, .25); color: var(--accent-text); }
.pr-item__t { display: block; font-size: 14.5px; font-weight: 500; }
.pr-item__m { display: block; margin-top: 2px; font: 400 11.5px/1.4 var(--mono); color: var(--muted-2); }
.pr-item__d { padding: 0 12px 12px 56px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.pr-item__d ul { padding-left: 16px; display: grid; gap: 3px; }
.pr-item__d .next { margin-top: 8px; color: var(--muted); }
.js .pr-item:not(.is-active) .pr-item__d { display: none; }

/* Change Stack */
.cs-views { display: flex; gap: 6px; padding: 12px 16px 0; }
.cs-views button { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.cs-views button[aria-pressed="true"] { border-color: var(--faint); background: #2a2c31; color: var(--ink); }
.no-js .cs-views { display: none; }
.cs-body { padding: 12px 16px 16px; }
.files { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.files li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line-soft); font: 400 12px/1.5 var(--mono); }
.files li:first-child { border-top: 0; }
.layers { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lay { border: 1px solid var(--line); border-radius: 10px; }
.lay.is-active { border-color: var(--accent); background: var(--surface-2); }
.lay__btn { width: 100%; display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; min-height: 52px; padding: 8px 10px; text-align: left; background: none; border: 0; }
.lay__btn .n { font: 400 12px/1 var(--mono); color: var(--muted); }
.lay__btn strong { display: block; font-size: 13.5px; font-weight: 500; }
.lay__btn small { display: block; font-size: 11.5px; color: var(--muted-2); }
.lay__btn small.has { color: var(--accent-text); }
.lay__d { padding: 0 12px 12px 42px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.lay__d .ff { margin-top: 6px; font: 400 11.5px/1.5 var(--mono); color: var(--muted); }
.lay__d .fd { margin-top: 8px; padding: 7px 9px; border-radius: 8px; background: rgba(255, 87, 10, .08); border: 1px solid rgba(255, 87, 10, .3); color: #f6e3d9; font-size: 13px; }
.js .lay:not(.is-active) .lay__d { display: none; }
.js [data-cs-view][hidden] { display: none; }

/* Figures */
.shot { margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px 28px; align-items: center; }
.shot__img { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-3); }
.shot figcaption { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.shot figcaption strong { display: block; margin: 8px 0 6px; font-size: 17px; color: var(--ink); }

/* Pricing */
.billing { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 28px; }
.billing [role="group"] { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; gap: 4px; }
.billing button { min-height: 40px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.billing button[aria-pressed="true"] { background: #2a2c31; color: var(--ink); }
.no-js .billing [role="group"] { display: none; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; margin-top: 18px; }
.plan { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.plan__name { font-size: 19px; }
.plan__former { font-size: 12.5px; font-weight: 400; color: var(--muted-2); }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 16px; }
.plan__amount { font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.plan__unit { font-size: 13px; color: var(--muted); }
.plan__cycle { margin-top: 4px; font-size: 13px; color: var(--muted-2); }
.plan__for { margin-top: 14px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.plan__list { margin-top: 12px; padding-left: 18px; display: grid; gap: 6px; align-content: start; flex: 1; font-size: 14px; line-height: 1.5; color: var(--muted); }
.plan .btn { margin-top: 20px; }
.free-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 28px; }

/* FAQ */
.faq { margin-top: 32px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; font-size: 17px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); }
.faq details[open] summary::after { content: '\2212'; }
.faq p { margin: 0 0 20px; font-size: 15.5px; line-height: 1.7; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--line-soft); padding: 48px 0 64px; background: var(--bg-3); font-size: 14px; color: var(--muted); }
.footer .grid-3 { gap: 28px 48px; }
.footer h2 { font-size: 14px; color: var(--ink); }
.footer p { margin-top: 8px; line-height: 1.65; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* Dialogs: drawer, 3D, mobile sheet */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(8, 8, 10, .62); }
.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(600px, 100%); padding: 0; border: 0; border-left: 1px solid var(--line); background: #1a1b1f; }
.drawer__in { padding: 20px clamp(20px, 4vw, 34px) 36px; }
.drawer__top { display: flex; align-items: center; gap: 12px; }
.icon-btn { margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; font-size: 20px; line-height: 1; }
.drawer h2 { margin-top: 14px; font-size: clamp(24px, 3vw, 32px); line-height: 1.12; letter-spacing: -.02em; }
.drawer .qa { margin-top: 22px; }
.drawer__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal3d { width: min(980px, calc(100% - 24px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.modal3d iframe { display: block; width: 100%; height: min(62vh, 560px); border: 0; }
.modal3d__bar { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line-soft); }
.modal3d p { padding: 12px 18px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); }

/* Popup */
.popup { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(360px, calc(100vw - 40px)); padding: 16px 16px 16px 18px; border: 1px solid var(--line-2); border-radius: 16px; background: #1c1d21; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); overflow: hidden; }
.popup__glow { position: absolute; left: 0; top: 0; width: 45%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; pointer-events: none; }
.popup__top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.popup__top img { width: 26px; height: 26px; }
.popup__top .icon-btn { border: 0; }
.popup .popup__title, .sheet .popup__title { margin-top: 6px; font-size: 19px; line-height: 1.25; }
.popup p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.popup .btn { width: 100%; margin-top: 12px; }
.popup__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.popup__row a, .popup__row button { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.popup__row button { padding: 0 10px; border: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.popup small { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.5; color: var(--muted-2); }
.invite { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: #1c1d21; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9); }
.invite p { flex: 1; font-size: 14px; line-height: 1.35; }
.invite img { width: 24px; height: 24px; }
.sheet { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 85vh; padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line-2); border-radius: 18px 18px 0 0; background: #1c1d21; }
.invite-spacer { height: 88px; }
[hidden] { display: none !important; }

/* Motion (only when JS adds .motion and the user allows it) */
.motion .reveal { opacity: 0; transform: translateY(20px); transition: opacity .52s cubic-bezier(.2, .7, .2, 1), transform .52s cubic-bezier(.2, .7, .2, 1); }
.motion .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .motion .reveal { opacity: 1; transform: none; }
}
@media print { .header, .popup, .invite, .explore, .cs-views, #yaml-demo .seg, .billing [role="group"] { display: none !important; } .motion .reveal { opacity: 1; transform: none; } }

/* Enhancement states */
.ctx-info + .ctx-info { margin-top: 10px; }
.ctx-ready .ctx-info:not(.is-active) { display: none; }
.no-js .tabs [role="tablist"] { display: none; }
.no-js .js-3d { display: none; }
.no-js .sim { display: none; }
[id] { scroll-margin-top: 80px; }
.layer__title { font-weight: 600; color: var(--ink); }
.popup__title { font-weight: 600; color: var(--ink); text-wrap: balance; }
.footer__brand { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
