/* Undra site, landing page: hero with the diagram, live demo, numbers, how it works (code collapsed), receipts,
   why Undra, what is still open, start. The design reasoning is .10x/specs/2026-10-03-launch-site-design.md. */
.section { padding: clamp(64px, 9vw, 112px) 0 0; position: relative; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 .74rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); margin: 14px 0 0; max-width: 26ch; letter-spacing: -.03em; line-height: 1.08; }
.h2 em, .hero h1 em { font-style: normal; color: var(--accent); }
.section .lede { font-size: clamp(1.02rem, 1.4vw, 1.15rem); max-width: 58ch; margin: 16px 0 0; }
.fine { margin: 22px 0 0; font-size: .85rem; line-height: 1.6; color: var(--text-3); }
.fine a { color: var(--text-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.tlink { display: inline-block; font-size: .9rem; color: var(--accent); text-decoration: none; }
.tlink:hover { text-decoration: underline; }
.more-row { margin: 22px 0 0; }

/* hero */
.hero { padding-top: clamp(44px, 7vw, 88px); overflow: clip; position: relative; }
.hero::before { content: ""; position: absolute; inset: -140px 0 auto 0; height: 720px; pointer-events: none; background: radial-gradient(60% 55% at 78% 8%, var(--glow), transparent 70%), radial-gradient(40% 40% at 8% 30%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%); }
.hero > .wrap { position: relative; }
.hero h1 { font-size: clamp(2.7rem, 8.4vw, 6.6rem); margin-top: 0; letter-spacing: -.035em; line-height: 1.02; }
.hero h1 span, .hero h1 em { display: block; }
@media (min-width: 440px) { .hero h1 span, .hero h1 em { white-space: nowrap; } }
.hero-grid { display: grid; gap: 28px; margin-top: clamp(26px, 4vw, 44px); grid-template-columns: minmax(0, 1fr); align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; } }
.hero-sub { margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text-2); max-width: 36ch; text-wrap: balance; }
.hero-lead { display: block; margin-bottom: .4em; color: var(--text); font-weight: 500; }
.hero-grid .cta-row { margin-top: 22px; }
.install { text-align: left; }
.install .tabs-head { display: flex; margin-bottom: 10px; }
.install .tab { font: 500 .8rem/1.3 var(--font-mono); }
.install .tab-label { margin: 14px 0 6px; }
.cmd { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--code-bg); box-shadow: var(--shadow); }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: none; border: 0; padding: 0; font-size: .9rem; color: var(--text); scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd code::before { content: "$ "; color: var(--accent); user-select: none; }
.cmd .copy { height: 32px; padding: 0 10px; border-color: var(--line); background: var(--surface); }

/* the stage (hero diagram, driven by hero.js) */
.stage-wrap { margin-top: clamp(40px, 6vw, 72px); }
.stage { position: relative; border: 1px solid var(--line-strong); border-radius: 22px; padding: clamp(12px, 2.4vw, 28px); background: radial-gradient(70% 60% at 50% 100%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px, var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 35%, var(--surface) 100%); opacity: .94; }
.stage > * { position: relative; }
.stage-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; font: 400 .72rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.stage-head b { color: var(--text-2); font-weight: 500; }
.dg-toggle { display: none; align-items: center; gap: 8px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text-2); font: 400 .72rem/1 var(--font-mono); letter-spacing: .04em; text-transform: none; }
.js .dg-toggle { display: inline-flex; }
.dg-toggle:hover { color: var(--text); border-color: var(--text-3); }
.dg-toggle svg { width: 11px; height: 11px; fill: currentColor; }
.dg-toggle .i-play, .dg-toggle[aria-pressed="true"] .i-pause { display: none; }
.dg-toggle[aria-pressed="true"] .i-play { display: block; }
.dg { width: 100%; height: auto; overflow: visible; user-select: none; }
.dg-narrow { display: none; }
@media (max-width: 999px) { .dg-wide { display: none; } .dg-narrow { display: block; max-width: 520px; margin-inline: auto; } }
.dg text { font-family: var(--font-body); }
.dg .mono { font-family: var(--font-mono); }
.dg .frame { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.2; }
.dg .frame-hot { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: 0; }
.dg .halo { opacity: 0; }
.dg .mirror { fill: var(--bg); stroke: var(--line); }
.dg .sep { stroke: var(--line); }
.dg .t-title { fill: var(--text); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.dg .t-tag { fill: var(--text-3); font-size: 10.5px; }
.dg .t-row { fill: var(--text-2); font-size: 14px; }
.dg .t-dim { fill: var(--text-3); font-size: 12.5px; }
.dg .t-badge { fill: var(--text-2); font-size: 13px; font-weight: 600; }
.dg .bar { fill: var(--line-strong); }
.dg .check { fill: none; stroke: var(--line-strong); stroke-width: 1.4; }
.dg .check-on { fill: var(--accent); stroke: var(--accent); }
.dg .row-new .t-row { fill: var(--text); }
.dg .row-new .bar { fill: var(--accent); }
.dg .hl { fill: var(--accent); opacity: 0; }
.dg .call-bg { fill: var(--accent-soft); stroke: var(--accent-line); }
.dg .call-tx { fill: var(--accent); font-size: 12.5px; }
.dg .band { fill: color-mix(in srgb, var(--accent) 4%, transparent); }
.dg .bline { stroke: var(--text-3); stroke-dasharray: 5 6; opacity: .7; }
.dg .chip-bg { fill: var(--surface); stroke: var(--line-strong); }
.dg .chip-tx { fill: var(--text-2); font-size: 12px; }
.dg .bnum { fill: var(--accent); }
.dg .bnum-tx { fill: var(--accent-ink); font-size: 11px; font-weight: 700; }
.dg .beam { fill: none; stroke: var(--text-3); stroke-width: 1.4; stroke-dasharray: 1.5 5; stroke-linecap: round; opacity: .6; }
.dg .dot { fill: var(--surface); stroke: var(--text-3); stroke-width: 1.3; }
.dg .ring { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: 0; }
.dg.is-static .beam { stroke: var(--accent); stroke-dasharray: none; opacity: .55; }
.dg.is-static .pulse { display: none; }
.dg .core { fill: var(--surface-2); stroke: var(--accent-line); stroke-width: 1.4; }
.dg .core-line { stroke: var(--line); }
.dg .t-core { fill: var(--text); font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.dg .chip { fill: var(--surface); stroke: var(--line-strong); }
.dg .chip-on { fill: var(--accent-soft); stroke: var(--accent); opacity: 0; }
.dg .chip-t { fill: var(--text-2); font-size: 12.5px; }
.dg .cell { fill: var(--bg); stroke: var(--line-strong); stroke-dasharray: 3 3; }
.dg .cell-on { fill: var(--accent); opacity: 0; }
.dg .cell-t { fill: var(--text-3); font-size: 12px; }
.dg .commit-bg { fill: var(--surface); stroke: var(--accent-line); stroke-width: 1.2; }
.dg .commit-on { fill: var(--accent); opacity: 0; }
.dg .commit-t { fill: var(--accent); font-size: 12.5px; font-weight: 600; }
.dg .commit-t-on { fill: var(--accent-ink); font-size: 12.5px; font-weight: 600; opacity: 0; }
.dg .h-lbl { fill: var(--text-3); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.dg .pulse path { fill: none; stroke: var(--accent); stroke-linecap: round; }
.dg .pulse .g1 { fill: var(--accent); }
.dg .pulse .g3 { fill: #fff; }
.dg.is-static .chip-on.dirty, .dg.is-static .commit-on, .dg.is-static .commit-t-on { opacity: 1; }
.dg.is-static .cell-on { opacity: .9; }
.dg.is-static .cell-t { fill: var(--accent-ink); }
.dg.is-static .dot { stroke: var(--accent); }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 82%, transparent); font-size: .9rem; color: var(--text-3); transition: border-color .3s, color .3s, background .3s; }
.steps li::before { counter-increment: s; content: counter(s); grid-row: span 2; align-self: start; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font: 500 .72rem/1 var(--font-mono); }
.steps b { color: var(--text-2); font-weight: 600; }
.steps span { grid-column: 2; font-size: .86rem; }
.steps li.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text-2); }
.steps li.on b { color: var(--text); }
.steps li.on::before { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.legend { list-style: none; margin: 14px 0 0; padding: 0; display: none; gap: 6px; font-size: .86rem; color: var(--text-2); }
@media (max-width: 999px) { .legend { display: grid; max-width: 520px; margin-inline: auto; } }
.legend li { display: flex; gap: 10px; align-items: baseline; }
.legend { counter-reset: l; }
.legend i::before { counter-increment: l; content: counter(l); }
.legend i { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 .7rem/1 var(--font-body); display: grid; place-items: center; transform: translateY(-1px); }


/* live demo */
.live { display: grid; gap: 20px; margin-top: 36px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .live { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 28px; align-items: start; } }
.live-frame { border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.frame-bar { display: flex; align-items: center; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); font: 400 .75rem/1 var(--font-mono); color: var(--text-3); }
.frame-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-body { position: relative; height: 470px; background: var(--bg); }
.frame-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-fallback { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 24px; display: grid; place-content: center; text-align: center; font-size: .95rem; color: var(--text-2); background: var(--bg); }
html:not(.js) .live-fallback > span { display: none; }
.counters { display: grid; gap: 10px; margin: 0; }
.counters > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.counters dt { font: 500 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.counters dd { margin: 10px 0 0; font: 500 2rem/1 var(--font-mono); color: var(--text); letter-spacing: -.02em; }
.counters small { font-size: .9rem; color: var(--accent); margin-left: 6px; letter-spacing: 0; }
.counters > div[hidden] { display: none; }
.counters small.sub { display: block; margin: 8px 0 0; font: 400 .72rem/1.3 var(--font-mono); color: var(--text-3); }
.counters small.sub:empty { display: none; }
.clock-note { margin: 12px 2px 0; font-size: .8rem; line-height: 1.5; color: var(--text-3); text-wrap: pretty; }
.measured { margin: 18px 2px 0; font-size: .85rem; color: var(--text-3); }
.measured summary { cursor: pointer; width: max-content; color: var(--text-2); }
.measured summary:hover { color: var(--text); }
.measured p { margin: 10px 0 0; line-height: 1.6; }

/* numbers: big number, one-line label, budget in mono (cards are written by site/scripts/build-numbers.mjs) */
.stats { display: grid; gap: 14px; margin-top: 40px; grid-template-columns: repeat(12, 1fr); }
.stats-h { margin-top: 34px; font-size: 1.1rem; }
.stat { grid-column: span 12; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
@media (min-width: 620px) { .stat { grid-column: span 6; } }
@media (min-width: 1000px) { .stat { grid-column: span 3; } .stat.w4 { grid-column: span 4; } }
.stat::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; background: radial-gradient(closest-side, var(--glow), transparent); opacity: 0; transition: opacity .4s; pointer-events: none; }
.stat:hover::after { opacity: 1; }
.stat:hover { border-color: var(--line-strong); }
.stat .lbl { font-size: .9rem; line-height: 1.4; color: var(--text-2); text-decoration: none; }
.stat .lbl:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); }
.stat .val { font: 600 clamp(2.8rem, 4.6vw, 3.9rem)/1 var(--font-body); color: var(--text); letter-spacing: -.04em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .val small { font: 500 .42em var(--font-mono); color: var(--accent); letter-spacing: 0; margin-left: 6px; }
.meter { margin-top: 14px; }
.meter-track { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }
.reveal-ready .meter-fill { width: 0; }
.reveal-ready .in .meter-fill { width: var(--w); transition: width 1.1s cubic-bezier(.2,.8,.2,1) .15s; }
@media (prefers-reduced-motion: reduce) { .reveal-ready .in .meter-fill { transition: none; } }
.meter-cap { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font: 400 .72rem/1.3 var(--font-mono); color: var(--text-3); }
.meter-cap b { color: var(--text-2); font-weight: 500; }

/* how it works: a three-step strip, the generated code collapsed behind a disclosure */
.how { counter-reset: h; display: grid; gap: 14px; margin-top: 36px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how-card { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; align-items: baseline; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.how-card .n::before { counter-increment: h; content: counter(h); }
.how-card .n { grid-row: span 2; font: 600 2.4rem/1 var(--font-body); letter-spacing: -.04em; color: var(--accent); }
.how-card h3 { font-size: 1.1rem; }
.how-card p { margin: 0; font-size: .92rem; color: var(--text-2); }
.panel { margin-top: 16px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.panel .tabs-head { display: flex; padding: 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.panel .code { margin: 0; border: 0; border-radius: 0; }
.panel .code pre { font-size: clamp(.76rem, 1.2vw, .86rem); padding: 20px 22px; }


/* receipts */
.trust { display: grid; gap: 14px; margin-top: 36px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .trust { grid-template-columns: repeat(12, 1fr); } .t-tests, .t-app { grid-column: span 5; } .t-cells, .t-rev { grid-column: span 7; } }
.tcard { padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.tcard h3 { font-size: 1.05rem; }
.tcard h3 a { text-decoration-color: var(--accent-line); }
.tcard .big { font: 600 clamp(2.6rem, 4.6vw, 3.6rem)/1 var(--font-body); color: var(--text); margin-top: 10px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tcard .big small { font: 500 .9rem/1 var(--font-mono); color: var(--accent); margin-left: 10px; letter-spacing: 0; }
.tcard p { margin: 10px 0 0; font-size: .93rem; color: var(--text-2); }
.seg { display: flex; height: 10px; margin-top: 20px; border-radius: 6px; overflow: hidden; gap: 2px; }
.seg i { display: block; height: 100%; background: var(--accent); width: var(--w); }
.seg i:nth-child(2) { opacity: .75; } .seg i:nth-child(3) { opacity: .55; } .seg i:nth-child(4) { opacity: .38; } .seg i:nth-child(5) { opacity: .25; }
.reveal-ready .seg i { width: 0; }
.reveal-ready .in .seg i { width: var(--w); transition: width 1.1s cubic-bezier(.2,.8,.2,1) .1s; }
.seg-key { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font: 400 .74rem/1.4 var(--font-mono); color: var(--text-3); }
.seg-key b { color: var(--text); font-weight: 500; margin-left: 5px; }
.gridcells { display: grid; grid-template-columns: auto repeat(var(--cols, 19), 1fr); gap: 3px; margin-top: 18px; align-items: center; font: 400 .66rem/1 var(--font-mono); color: var(--text-3); }
.gridcells .r { padding-right: 6px; text-align: right; }
@media (max-width: 599px) { .gridcells { gap: 2px; } }
.gridcells i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--accent); opacity: .85; }
.gridcells i.na { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .gridcells i:not(.na) { opacity: .12; transition: opacity .5s ease; }
  .reveal-ready .in .gridcells i:not(.na) { opacity: .85; transition-delay: calc(var(--i) * 18ms); }
}
.rev-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.rev-list li::after { content: "✓"; grid-column: 2; grid-row: 1; justify-self: end; color: var(--accent); font: 600 .8rem/1 var(--font-mono); }
.rev-list li span { grid-column: 2; grid-row: 1; margin-right: 22px; }
.rev-list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: .9rem; color: var(--text); }
.rev-list li span { color: var(--text-3); font: 400 .72rem/1 var(--font-mono); text-align: right; }


/* compared, roadmap */
.cards4 { display: grid; gap: 12px; margin-top: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .cards4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: border-color .2s, background .2s; }
.card:hover { border-color: var(--accent-line); background: var(--surface-2); }
.card h3 { font-size: 1.05rem; flex: 1; }
.card .go { font-size: .95rem; color: var(--accent); }
.card .go i { font-style: normal; display: inline-block; transition: transform .2s; }
.card:hover .go i { transform: translateX(3px); }
.now3 { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .now3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.now3 a { display: flex; align-items: center; gap: 14px; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: .97rem; text-decoration: none; transition: border-color .2s, background .2s; }
.now3 a:hover { border-color: var(--accent-line); background: var(--surface-2); }

/* final call to action */
.final { padding-top: clamp(72px, 10vw, 128px); }
.final-card { position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 26px; padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px); text-align: center; background: radial-gradient(70% 120% at 50% 0%, var(--glow), transparent 60%), var(--surface); }
.final-card h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); max-width: 16ch; margin-inline: auto; }
.final-card .install { max-width: 620px; margin: 28px auto 0; }
.final-card .install .tabs-head { justify-content: center; }
.final-card .adopt-note { max-width: 620px; margin: 14px auto 0; font-size: .9rem; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.final-card .cta-row { justify-content: center; }
.final-card .then { max-width: 620px; margin: 14px auto 0; }
.final-card .then pre { font-size: .84rem; }

/* the comparison block: three cards on wide screens */
@media (min-width: 1040px) { .cards3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.harsh { margin-top: 28px; }
.harsh > .stats { margin-top: 18px; }

/* the diagram answers a tap: each screen is a button once hero.js runs (it says so in the stage head) */
html:not(.js) .tap-hint { display: none; }
.tap-hint { color: var(--text-3); }
.tap-hint::before { content: " · "; }
.dg-toggle { flex: none; white-space: nowrap; }
@media (max-width: 479px) { .tap-hint { display: block; margin-top: 6px; } .tap-hint::before { content: none; } }
.dg-live [data-node] { cursor: pointer; outline: none; }
.dg-live [data-node]:hover .frame { stroke: var(--accent-line); }
.dg-live [data-node]:focus-visible .frame { stroke: var(--accent); stroke-width: 2.4; }
.dg .t-meas { fill: var(--text-2); }
.dg a:hover .t-meas { text-decoration: underline; }
.dg .t-meas .on { fill: var(--accent); }
.dg.is-static .t-meas tspan { fill: var(--accent); }
