/* tillwire.dev: one stylesheet for every page. Tokens, base, then parts.
   The header, hero and closing band are dark in both themes; the theme
   switch changes the page sections between them. */

:root {
  --ground: #F4F5F8;
  --ground-2: #EBEEF3;
  --surface: #FFFFFF;
  --ink: #10131A;
  --ink-weak: #4A5160;
  --stroke: #D7DBE2;
  --stroke-weak: #E6E9EE;
  --control: #7D8696;
  --action: #2D46E0;
  --action-hover: #1F33B0;
  --on-action: #FFFFFF;
  --tag-main-bg: #E3E7FF; --tag-main-fg: #1F33B0;
  --tag-off-bg: #E9ECF0; --tag-off-fg: #4A5160;
  --tag-soon-bg: #FFF0DC; --tag-soon-fg: #7A4A00;
  --shadow: 0 1px 2px rgba(16, 19, 26, 0.06), 0 8px 24px rgba(16, 19, 26, 0.06);
  --shadow-lift: 0 2px 4px rgba(16, 19, 26, 0.08), 0 24px 48px rgba(16, 19, 26, 0.12);

  /* The dark stage: header, hero, bands. Same in both themes. */
  --stage: #0A0C12;
  --stage-2: #11151E;
  --stage-3: #181D28;
  --stage-stroke: #262D3B;
  --stage-ink: #ECEFF5;
  --stage-weak: #A3ABB8;
  --volt: #C8F560;       /* the wire: decoration and highlights on the stage only */
  --volt-ink: #0A0C12;
  --sky: #8C9BFF;        /* links and actions on the stage */

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
  --r-l: 24px; --r: 16px; --r-s: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0D1017; --ground-2: #121620; --surface: #151A24;
    --ink: #ECEFF5; --ink-weak: #A3ABB8; --stroke: #283040; --stroke-weak: #1F2532; --control: #6B7590;
    --action: #8C9BFF; --action-hover: #B3BDFF; --on-action: #0A0C12;
    --tag-main-bg: #222B55; --tag-main-fg: #C9D0FF;
    --tag-off-bg: #232933; --tag-off-fg: #C4CAD4;
    --tag-soon-bg: #3A2A12; --tag-soon-fg: #FFC27A;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lift: 0 24px 48px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0D1017; --ground-2: #121620; --surface: #151A24;
  --ink: #ECEFF5; --ink-weak: #A3ABB8; --stroke: #283040; --stroke-weak: #1F2532; --control: #6B7590;
  --action: #8C9BFF; --action-hover: #B3BDFF; --on-action: #0A0C12;
  --tag-main-bg: #222B55; --tag-main-fg: #C9D0FF;
  --tag-off-bg: #232933; --tag-off-fg: #C4CAD4;
  --tag-soon-bg: #3A2A12; --tag-soon-fg: #FFC27A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lift: 0 24px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s5); }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; overflow-wrap: break-word; }
a { color: var(--action); text-underline-offset: 3px; }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; border-radius: 6px; }
.stage :focus-visible, .site-head :focus-visible { outline-color: var(--volt); }
h1, h2, h3, h4, p, figure, pre, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
code, kbd { font-family: var(--font-code); font-size: 0.9em; }
img, svg { display: block; }

.skip { position: absolute; left: var(--s2); top: -100px; background: var(--volt); color: var(--volt-ink); padding: var(--s1) var(--s2); border-radius: var(--r-s); font-weight: 600; z-index: 20; }
.skip:focus { top: var(--s2); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--s2); }
@media (min-width: 768px) { .wrap { padding: 0 var(--s4); } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header (always on the stage) ---------- */
.site-head { background: var(--stage); color: var(--stage-ink); border-bottom: 1px solid var(--stage-stroke); position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; gap: var(--s2); min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--stage-ink); text-decoration: none; margin-right: auto; min-height: 48px; }
.brand:hover { color: var(--stage-ink); }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand span { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.mark-ground { fill: var(--stage-ink); }
.mark-line { stroke: var(--stage); }
.mark-dot { fill: #2D46E0; }
.icon-btn { width: 48px; height: 48px; border-radius: var(--r-s); border: 1px solid #4A5366; background: transparent; color: var(--stage-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--stage-3); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-btn .sun { display: none; }
:root[data-shown="dark"] .theme-btn .sun { display: block; }
:root[data-shown="dark"] .theme-btn .moon { display: none; }
/* Without script the nav stays open and the two buttons stay hidden. */
.theme-btn, .menu-btn { display: none; }
.js .theme-btn, .js .menu-btn { display: inline-flex; }
.site-nav { display: block; flex-basis: 100%; padding-bottom: var(--s2); }
.js .site-nav:not(.open) { display: none; }
.site-nav ul { display: flex; flex-direction: column; }
.site-nav a { display: flex; align-items: center; min-height: 48px; color: var(--stage-ink); text-decoration: none; font-weight: 600; font-size: 16px; border-top: 1px solid var(--stage-stroke); }
.site-nav a:hover { color: var(--volt); }
.site-nav a[aria-current="page"] { color: var(--volt); }
.site-head .head-cta { display: none; }
/* Source order is brand, theme, menu, call to action, nav: the nav wraps
   under the bar on a phone, and a wide screen puts it in line. */
@media (min-width: 960px) {
  .site-head .wrap { flex-wrap: nowrap; }
  .js .menu-btn { display: none; }
  .brand { margin-right: 0; }
  .site-nav, .js .site-nav:not(.open) { display: block; flex-basis: auto; padding: 0; order: 1; margin: 0 auto 0 var(--s5); }
  .theme-btn { order: 2; }
  .site-head .head-cta { display: inline-flex; order: 3; }
  .site-nav ul { flex-direction: row; gap: var(--s4); }
  .site-nav a { border: 0; font-size: 15px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 var(--s3); border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn-secondary { border-color: var(--action); color: var(--action); background: transparent; }
.btn-secondary:hover { border-color: var(--action-hover); color: var(--action-hover); }
.stage .btn-primary, .site-head .btn-primary { background: var(--volt); color: var(--volt-ink); }
.stage .btn-primary:hover, .site-head .btn-primary:hover { background: #DBFF85; color: var(--volt-ink); }
.stage .btn-secondary { border-color: #5A6478; color: var(--stage-ink); }
.stage .btn-secondary:hover { border-color: var(--stage-ink); color: var(--stage-ink); }
.site-head .head-cta.btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 599px) { .btn-row .btn { flex: 1 1 100%; } }
.more { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 600; text-decoration: none; }
.more::after { content: "→"; transition: transform 150ms; }
.more:hover::after { transform: translateX(4px); }
.stage .more { color: var(--volt); }

/* ---------- Type ---------- */
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--action); }
.stage .kicker { color: var(--volt); }
.kicker::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--stage-stroke); background: var(--stage-2); color: var(--stage-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.pill b { background: var(--volt); color: var(--volt-ink); border-radius: 999px; padding: 2px 8px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.mega { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.045em; line-height: 0.98; font-size: clamp(46px, 9vw, 104px); }
.mega em { font-style: normal; color: var(--volt); }
.h1 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(42px, 7vw, 80px); }
.h1 em { font-style: normal; color: var(--action); }
.stage .h1 em { color: var(--volt); }
.h2 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.03em; line-height: 1.06; font-size: clamp(34px, 5vw, 60px); }
.h2 em { font-style: normal; color: var(--action); }
.stage .h2 em { color: var(--volt); }
.h3 { font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.6; color: var(--ink-weak); max-width: 36em; }
.stage .lead, .stage .weak, .stage .note { color: var(--stage-weak); }
.weak { color: var(--ink-weak); font-size: 15px; line-height: 1.6; }
.note { font-size: 13px; line-height: 1.5; color: var(--ink-weak); }

/* ---------- Sections ---------- */
.stage { background: var(--stage); color: var(--stage-ink); position: relative; overflow: hidden; }
.section { padding: var(--s7) 0; }
@media (min-width: 900px) { .section { padding: var(--s8) 0; } }
.section > .wrap { display: flex; flex-direction: column; gap: var(--s5); }
.intro { display: flex; flex-direction: column; gap: var(--s2); max-width: 820px; }
.intro.center { align-items: center; text-align: center; margin: 0 auto; }
.alt { background: var(--ground-2); }

/* Dot grid on the stage */
.grid-bg::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(236, 239, 245, 0.09) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); pointer-events: none; }
.glow::after { content: ""; position: absolute; width: 900px; height: 900px; right: -300px; top: -380px; border-radius: 50%; background: radial-gradient(circle, rgba(140, 155, 255, 0.22), transparent 62%); pointer-events: none; }
.stage > .wrap { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero { padding: var(--s6) 0 var(--s7); }
@media (min-width: 900px) { .hero { padding: var(--s7) 0 var(--s8); } }
.hero .wrap { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 1080px) { .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.hero-text { display: flex; flex-direction: column; gap: var(--s3); align-items: flex-start; }
.hero-facts { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); padding-top: var(--s1); color: var(--stage-weak); font-size: 15px; }
.hero-facts b { color: var(--stage-ink); font-family: var(--font-head); font-size: 20px; margin-right: 6px; }

/* The shop illustration */
.scene { position: relative; min-height: 520px; }
.scene-cap { position: absolute; bottom: -36px; left: 0; font-size: 12px; color: var(--stage-weak); }
.win { position: absolute; z-index: 1; background: #FFFFFF; color: #10131A; border-radius: var(--r); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F0F2F6; border-bottom: 1px solid #E1E4EA; font-size: 12px; color: #4A5160; }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #D3D7DF; }
.win-bar span { margin-left: 8px; font-family: var(--font-code); }
.shopwin { left: 0; top: 24px; width: min(84%, 400px); }
.shop-body { display: grid; grid-template-columns: 120px 1fr; gap: var(--s2); padding: var(--s2); }
.bag { height: 150px; border-radius: 12px; background: linear-gradient(160deg, #2D46E0, #7C8CFF); position: relative; }
.bag::after { content: "250 g"; position: absolute; left: 12px; bottom: 12px; color: #fff; font-weight: 600; font-size: 13px; font-family: var(--font-code); }
.shop-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shop-info h4 { font-family: var(--font-head); font-size: 18px; line-height: 1.2; }
.price { font-weight: 600; font-size: 16px; }
.price s { color: #6A7180; font-weight: 400; margin-left: 6px; font-size: 13px; }
.boxes { display: flex; gap: 6px; flex-wrap: wrap; }
.boxes span { border: 1px solid #C9CED8; border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.boxes .on { border: 2px solid #10131A; font-weight: 600; }
.boxes .off { color: #8A909C; text-decoration: line-through; }
.add { background: #10131A; color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; text-align: center; }
.adminwin { right: 0; top: 0; width: min(62%, 300px); background: #151A24; color: #ECEFF5; }
.adminwin .win-bar { background: #1C2230; border-color: #283040; color: #A3ABB8; }
.adminwin .win-bar i { background: #3A4356; }
.admin-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; background: #1C2230; border-radius: 8px; }
.chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #222B55; color: #C9D0FF; white-space: nowrap; }
.chip.paid { background: var(--volt); color: var(--volt-ink); }
.codewin { right: 4%; bottom: 0; width: min(78%, 380px); background: #0F131B; color: #ECEFF5; }
.codewin .win-bar { background: #161B25; border-color: #262D3B; color: #A3ABB8; }
.codewin .win-bar i { background: #343C4D; }
.codewin pre { padding: 14px 16px; font-family: var(--font-code); font-size: 12.5px; line-height: 1.7; overflow: hidden; white-space: pre; }
.k { color: #8C9BFF; } .s { color: var(--volt); } .c { color: #7D8696; }
.toast { position: absolute; left: 6%; bottom: 150px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: var(--volt); color: var(--volt-ink); font-weight: 600; font-size: 13px; box-shadow: 0 12px 30px rgba(200, 245, 96, 0.25); z-index: 3; }
.toast svg { width: 16px; height: 16px; }
.wire-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.wire-svg path { stroke: var(--volt); stroke-width: 2; fill: none; stroke-dasharray: 6 10; opacity: 0.8; }
@media (max-width: 719px) {
  .scene { min-height: 0; display: flex; flex-direction: column; gap: 14px; padding-bottom: 32px; }
  .scene .win, .scene .toast { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: 100%; }
  .scene .adminwin { width: 88%; align-self: flex-end; margin-top: -40px; }
  .scene .toast { align-self: flex-start; width: auto; }
  .scene .codewin { width: 94%; align-self: flex-end; }
  .wire-svg { display: none; }
  .scene-cap { bottom: 0; }
  .shop-body { grid-template-columns: 100px 1fr; }
}

/* ---------- Event wire ticker ---------- */
.wire { border-top: 1px solid var(--stage-stroke); border-bottom: 1px solid var(--stage-stroke); background: var(--stage-2); color: var(--stage-ink); overflow: hidden; }
.wire-in { display: flex; align-items: center; gap: var(--s3); padding: 18px 0; }
.wire-label { flex: none; padding-left: var(--s2); font-size: 13px; font-weight: 600; color: var(--stage-weak); letter-spacing: 0.06em; text-transform: uppercase; }
@media (min-width: 768px) { .wire-label { padding-left: var(--s4); } }
.wire-track { flex: 1 1 auto; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.wire-list { display: flex; gap: 12px; width: max-content; }
.wire-list li { font-family: var(--font-code); font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--stage-stroke); white-space: nowrap; }
.wire-list li::before { content: "●"; color: var(--volt); margin-right: 8px; font-size: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .wire-list { animation: run 60s linear infinite; }
  .wire-svg path { animation: dash 1.6s linear infinite; }
  .toast { animation: bob 4s ease-in-out infinite; }
}
@keyframes run { to { transform: translateX(-50%); } }
@keyframes dash { to { stroke-dashoffset: -32; } }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- Big numbers ---------- */
.numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--stroke); border: 1px solid var(--stroke); border-radius: var(--r-l); overflow: hidden; }
@media (min-width: 900px) { .numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.num { background: var(--surface); padding: var(--s4) var(--s3); display: flex; flex-direction: column; gap: var(--s1); }
.num b { font-family: var(--font-head); font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -0.04em; }
.num b small { font-size: 0.45em; letter-spacing: 0; color: var(--action); margin-left: 4px; }

/* ---------- Bento ---------- */
.bento { display: grid; gap: var(--s2); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tile.wide { grid-column: span 2; } .tile.tall { grid-row: span 2; } }
.tile { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); transition: transform 180ms, box-shadow 180ms; min-width: 0; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tile .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--tag-main-bg); color: var(--tag-main-fg); display: flex; align-items: center; justify-content: center; }
.tile .ico svg { width: 22px; height: 22px; }
.tile h3 { font-family: var(--font-head); font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; }
.viz { margin-top: auto; padding-top: var(--s2); }
.viz-box { background: var(--ground); border: 1px solid var(--stroke-weak); border-radius: 14px; padding: 14px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.viz-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.viz-row .m { font-family: var(--font-code); font-size: 12px; color: var(--ink-weak); }
.steps-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 600; }
.steps-line span { padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--stroke); }
.steps-line span.on { background: var(--action); color: var(--on-action); border-color: var(--action); }
.steps-line i { width: 10px; height: 2px; background: var(--stroke); }
.paychips { display: flex; flex-wrap: wrap; gap: 6px; }
.paychips span { padding: 6px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--stroke); font-size: 12px; font-weight: 600; }
.bar { height: 8px; border-radius: 999px; background: var(--stroke-weak); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--action); border-radius: 999px; }
.flow { display: flex; flex-direction: column; gap: 6px; }
.flow span { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.flow span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--action); flex: none; }
.flow span.w::before { border-style: dashed; border-color: var(--control); }
.searchbox { border: 2px solid var(--action); border-radius: 10px; padding: 6px 10px; font-size: 13px; background: var(--surface); }
.sugg { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-weak); padding-left: 10px; }
.rights { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 12px; }
.rights b { font-weight: 600; justify-self: end; }

/* ---------- Showcase of themes ---------- */
.themes-show { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .themes-show { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tcard { border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--stroke); box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.tcard figcaption { padding: 12px var(--s2); font-size: 13px; color: var(--ink-weak); background: var(--surface); border-top: 1px solid var(--stroke); }
.tshop { padding: var(--s3); display: flex; flex-direction: column; gap: 12px; min-height: 300px; }
.tshop .ph { height: 120px; border-radius: 12px; }
.tshop .nm { font-size: 20px; line-height: 1.15; }
.tshop .pr { font-size: 15px; }
.tshop .bt { align-self: flex-start; padding: 10px 18px; font-size: 14px; font-weight: 600; }
.t-mono { background: #FAFAF7; color: #111; font-family: var(--font-code); }
.t-mono .ph { background: repeating-linear-gradient(45deg, #111 0 2px, transparent 2px 10px); border: 2px solid #111; border-radius: 0; }
.t-mono .nm { text-transform: uppercase; letter-spacing: 0.04em; font-size: 16px; }
.t-mono .bt { background: #111; color: #FAFAF7; border-radius: 0; }
.t-warm { background: #2B1B12; color: #FBEFE4; font-family: Georgia, "Times New Roman", serif; }
.t-warm .ph { background: radial-gradient(circle at 30% 30%, #E9A86B, #8A4B24); }
.t-warm .nm { font-style: italic; font-size: 24px; }
.t-warm .bt { background: #E9A86B; color: #2B1B12; border-radius: 4px; font-family: var(--font-body); }
.t-pop { background: #FFE15A; color: #101010; font-family: var(--font-head); }
.t-pop .ph { background: #FF4F8B; border-radius: 60px 12px 60px 12px; }
.t-pop .nm { font-size: 26px; letter-spacing: -0.03em; }
.t-pop .bt { background: #101010; color: #FFE15A; border-radius: 999px; }

/* ---------- Code tabs ---------- */
.tabs { background: var(--stage-2); border: 1px solid var(--stage-stroke); border-radius: var(--r-l); overflow: hidden; min-width: 0; }
.tab-list { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--stage-stroke); overflow-x: auto; }
.tab-list button { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 0; background: transparent; color: var(--stage-weak); font: 600 14px var(--font-body); cursor: pointer; white-space: nowrap; }
.tab-list button:hover { color: var(--stage-ink); }
.tab-list button[aria-selected="true"] { background: var(--stage-3); color: var(--volt); }
.tab-list { display: none; }
.js .tab-list { display: flex; }
.panel { padding: var(--s3); }
.panel + .panel { border-top: 1px solid var(--stage-stroke); }
.js .panel + .panel { border-top: 0; }
.js .panel[hidden] { display: none; }
.panel h3 { font-size: 13px; color: var(--stage-weak); font-weight: 600; margin-bottom: 12px; font-family: var(--font-body); }
.js .panel h3 { display: none; }
.panel pre { font-family: var(--font-code); font-size: 14px; line-height: 1.75; overflow-x: auto; color: var(--stage-ink); }
.panel p { margin-top: var(--s2); font-size: 14px; color: var(--stage-weak); }

/* Doors */
.doors { display: grid; gap: var(--s2); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.door { background: var(--stage-2); border: 1px solid var(--stage-stroke); border-radius: var(--r); padding: var(--s3); display: flex; flex-direction: column; gap: 8px; }
.door code { color: var(--volt); font-size: 13px; }
.door h3 { font-family: var(--font-head); font-size: 20px; }
.door p { color: var(--stage-weak); font-size: 15px; }
.split { display: grid; gap: var(--s5); }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }
.split > * { min-width: 0; }

/* ---------- Architecture diagram ---------- */
.arch { display: grid; gap: var(--s2); grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 900px) { .arch { grid-template-columns: 1fr 48px 1.2fr 48px 1fr; } }
.arch-node { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.arch-node.core { border: 2px solid var(--action); }
.arch-node code { font-size: 13px; color: var(--action); }
.arch-node ul { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-weak); }
.arch-node li::before { content: "— "; color: var(--action); }
.arch-arrow { display: flex; align-items: center; justify-content: center; color: var(--action); font-size: 28px; font-weight: 700; }
@media (max-width: 899px) { .arch-arrow { transform: rotate(90deg); height: 32px; } }

/* ---------- Checklist ---------- */
.checks { display: grid; gap: 12px var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.checks li svg { width: 22px; height: 22px; flex: none; margin-top: 3px; color: var(--action); }

/* ---------- Closing band ---------- */
.closing .wrap { align-items: center; text-align: center; }
.closing .btn-row { justify-content: center; }

/* ---------- Page heads ---------- */
.page-head { padding: var(--s6) 0 var(--s7); }
@media (min-width: 900px) { .page-head { padding: var(--s7) 0 var(--s8); } }
.page-head .wrap { display: flex; flex-direction: column; gap: var(--s3); align-items: flex-start; }

/* ---------- Tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.tag svg { width: 12px; height: 12px; flex: none; }
.tag-main { background: var(--tag-main-bg); color: var(--tag-main-fg); }
.tag-off { background: var(--tag-off-bg); color: var(--tag-off-fg); }
.tag-soon { background: var(--tag-soon-bg); color: var(--tag-soon-fg); }

/* ---------- Features page ---------- */
.counts { display: flex; flex-wrap: wrap; gap: 12px; }
.count { display: flex; align-items: baseline; gap: 10px; padding: 12px 18px; border-radius: var(--r); background: var(--stage-2); border: 1px solid var(--stage-stroke); }
.count b { font-family: var(--font-head); font-size: 32px; line-height: 1; }
.count span { font-size: 14px; color: var(--stage-weak); }
.count.main b { color: var(--volt); }
.count.off b { color: #C4CAD4; }
.count.soon b { color: #FFC27A; }
.filter { position: sticky; top: 0; z-index: 4; background: var(--ground); border-bottom: 1px solid var(--stroke); }
.filter .wrap { display: flex; gap: 8px; align-items: center; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; }
.filter-label { font-size: 14px; font-weight: 600; color: var(--ink-weak); margin-right: 4px; white-space: nowrap; }
.filter button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--control); background: var(--surface); color: var(--ink); font: 600 14px var(--font-body); cursor: pointer; white-space: nowrap; }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.filter { display: none; }
.js .filter { display: block; }
.areas { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.area { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s4) var(--s3); display: flex; flex-direction: column; gap: var(--s3); box-shadow: var(--shadow); min-width: 0; }
@media (min-width: 768px) { .area { padding: var(--s4); } }
.area-head { display: flex; align-items: center; gap: var(--s2); }
.area-head .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--action); color: var(--on-action); display: flex; align-items: center; justify-content: center; flex: none; }
.area-head .ico svg { width: 26px; height: 26px; }
.area-head h2 { font-family: var(--font-head); font-size: 28px; letter-spacing: -0.02em; line-height: 1.1; }
.area-head p { font-size: 14px; color: var(--ink-weak); }
.items { display: flex; flex-direction: column; gap: 14px; }
.items li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.items li > svg { width: 22px; height: 22px; margin-top: 2px; }
.items li[data-state="main"] > svg { color: var(--action); }
.items li[data-state="off"] > svg { color: var(--control); }
.items li[data-state="soon"] > svg { color: #B26B00; }
:root[data-shown="dark"] .items li[data-state="soon"] > svg { color: #FFC27A; }
.items li p { font-size: 16px; line-height: 1.55; }
.items li .tag { grid-column: 2; justify-self: start; }
.items li[data-state="main"] .tag { display: none; }
.items li.hide { display: none; }
.area.hide { display: none; }

/* ---------- Generic cards and lists (inner pages) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s2); }
.card { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.card .key { font-family: var(--font-code); font-size: 13px; color: var(--action); }
.card h3 { font-family: var(--font-head); font-size: 21px; letter-spacing: -0.015em; line-height: 1.2; }
.stage .card { background: var(--stage-2); border-color: var(--stage-stroke); box-shadow: none; }
.stage .card .key { color: var(--volt); }
.stage .card p { color: var(--stage-weak); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s2); counter-reset: st; }
.steps li { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: var(--shadow); }
.steps li::before { counter-increment: st; content: counter(st, decimal-leading-zero); font-family: var(--font-head); font-weight: 700; font-size: 40px; line-height: 1; color: var(--action); }
.term { background: #0F131B; color: #ECEFF5; border-radius: 12px; padding: 14px 16px; font-family: var(--font-code); font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre; }
.table-box { overflow-x: auto; border: 1px solid var(--stage-stroke); border-radius: var(--r-l); background: var(--stage-2); }
.table-box table { width: 100%; border-collapse: collapse; min-width: 540px; font-size: 16px; }
.table-box caption { text-align: left; padding: var(--s2) var(--s3); font-size: 13px; color: var(--stage-weak); }
.table-box th, .table-box td { text-align: left; vertical-align: top; padding: 18px var(--s3); border-top: 1px solid var(--stage-stroke); }
.table-box th { font-weight: 600; width: 28%; color: var(--stage-ink); }
.table-box td { color: var(--stage-weak); }
.table-box td code { color: var(--volt); }
.fn-list { display: flex; flex-direction: column; }
.fn-list > div { border-top: 1px solid var(--stroke); padding: 14px 0; display: flex; gap: 4px var(--s2); flex-wrap: wrap; }
.fn-list code { flex: 0 1 240px; color: var(--action); }
.fn-list span { flex: 1 1 220px; color: var(--ink-weak); font-size: 15px; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s3); }
.rules p { border-top: 3px solid var(--action); padding-top: var(--s2); font-size: 17px; }
.stage .rules p { border-color: var(--volt); }

/* ---------- Footer ---------- */
.site-foot { background: var(--stage); color: var(--stage-weak); border-top: 1px solid var(--stage-stroke); }
.foot-grid { display: grid; gap: var(--s4); padding-top: var(--s6); padding-bottom: var(--s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot-grid h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--stage-ink); margin-bottom: 12px; }
.foot-grid a { color: var(--stage-weak); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.foot-grid a:hover { color: var(--volt); }
.foot-brand { display: flex; flex-direction: column; gap: 12px; max-width: 30em; font-size: 15px; }
.foot-brand .brand { margin: 0; }
.foot-base { border-top: 1px solid var(--stage-stroke); padding-top: var(--s3); padding-bottom: var(--s4); font-size: 13px; }

@media (prefers-reduced-motion: reduce) { .tile, .tile:hover { transition: none; transform: none; } .more::after { transition: none; } }

/* ---------- Inner page parts ---------- */
.stack { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.key-line { font-family: var(--font-code); font-size: 14px; color: var(--action); }
.stage .key-line { color: var(--volt); }
.rule-list { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.rule-list > div { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.stage .rule-list > div { background: var(--stage-2); border-color: var(--stage-stroke); box-shadow: none; }
.stage .rule-list p { color: var(--stage-weak); }
.stage .term { background: var(--stage-2); border: 1px solid var(--stage-stroke); }

/* ---------- Motion and play ---------- */
.bag span { position: absolute; left: 12px; bottom: 12px; color: #fff; font-weight: 600; font-size: 13px; font-family: var(--font-code); }
.bag::after { content: none; }
.boxes button { border: 1px solid #C9CED8; border-radius: 8px; padding: 6px 10px; font: 600 12px var(--font-body); background: #fff; color: #10131A; cursor: pointer; min-height: 32px; }
.boxes button.on { border: 2px solid #10131A; }
.boxes button.off { color: #8A909C; text-decoration: line-through; cursor: not-allowed; }
button.add { border: 0; cursor: pointer; font: 600 13px var(--font-body); min-height: 40px; }
button.add:hover { background: #2D46E0; }
.shop-msg { font-size: 12px; color: #2D46E0; font-weight: 600; min-height: 18px; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--volt-ink); }
.tile { position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(45, 70, 224, 0.10), transparent 45%); pointer-events: none; }
:root[data-shown="dark"] .tile::before { background: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(200, 245, 96, 0.10), transparent 45%); }
.tile > * { position: relative; }
.shopwin { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(200, 245, 96, 0.35), 0 0 60px rgba(200, 245, 96, 0.12); }
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(28px); transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1); }
  .js .rv.in { opacity: 1; transform: none; }
  .mega { animation: rise 900ms cubic-bezier(.2,.7,.2,1) both; }
  .hero-text > :not(.mega) { animation: rise 900ms 120ms cubic-bezier(.2,.7,.2,1) both; }
  .scene { animation: rise 1100ms 220ms cubic-bezier(.2,.7,.2,1) both; }
  .toast::before { animation: pulse 1.6s ease-in-out infinite; }
  .mega em { background: linear-gradient(90deg, var(--volt), #E9FFB0, var(--volt)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 5s linear infinite; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: 0.25; } }
@keyframes shine { to { background-position: -200% 0; } }

/* ---------- Developers page ---------- */
.split-head { display: grid; gap: var(--s5); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .split-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.typed-box { background: #0F131B; border: 1px solid var(--stage-stroke); border-radius: var(--r-l); overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(200, 245, 96, 0.25); min-width: 0; }
.typed-box figcaption { padding: 0 var(--s3) var(--s3); color: var(--stage-weak); }
.win-bar.dark { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #161B25; border-bottom: 1px solid #262D3B; font-size: 12px; color: #A3ABB8; }
.win-bar.dark i { width: 9px; height: 9px; border-radius: 50%; background: #343C4D; }
.win-bar.dark span { margin-left: 8px; font-family: var(--font-code); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typed { padding: var(--s3); font-family: var(--font-code); font-size: 14px; line-height: 1.9; color: var(--stage-ink); overflow-x: auto; white-space: pre; display: flex; flex-direction: column; min-height: 230px; }
.typed .ok { color: var(--volt); }
.typed .cursor::after { content: "\258B"; color: var(--volt); margin-left: 2px; }
@media (prefers-reduced-motion: no-preference) { .typed .cursor::after { animation: pulse 1s steps(1) infinite; } }
.scope-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.scope-cloud li { font-family: var(--font-code); font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--stage-stroke); color: var(--stage-ink); }
.scope-cloud .sc-w { border-color: rgba(200, 245, 96, 0.45); color: var(--volt); }
.ev-groups { display: grid; gap: var(--s2); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ev-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ev-group:nth-child(3) { grid-row: span 3; } }
.ev-group { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.ev-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.ev-head code { font-size: 12px; color: var(--ink-weak); }
.ev-list { display: flex; flex-direction: column; gap: 10px; }
.ev-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid var(--action); }
.ev-list code { color: var(--action); font-size: 13px; }
.ev-list span { font-size: 14px; color: var(--ink-weak); line-height: 1.5; }
.build-steps { display: flex; flex-direction: column; gap: var(--s4); }
.build-step { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 960px) { .build-step { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.bs-text { display: flex; flex-direction: column; gap: 10px; }
.bs-n { font-family: var(--font-head); font-size: 56px; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--volt); }
.bs-code { background: #0F131B; border: 1px solid var(--stage-stroke); border-radius: var(--r); overflow: hidden; min-width: 0; }
.bs-code pre { padding: var(--s2) var(--s3); font-family: var(--font-code); font-size: 13.5px; line-height: 1.75; overflow-x: auto; color: var(--stage-ink); }
.result { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); align-items: center; padding: var(--s4) var(--s3); border-radius: var(--r-l); background: linear-gradient(135deg, rgba(200, 245, 96, 0.10), rgba(140, 155, 255, 0.10)); border: 1px solid var(--stage-stroke); }
@media (min-width: 960px) { .result { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); padding: var(--s4); } .result .note { grid-column: 1 / -1; } }
.result-text { display: flex; flex-direction: column; gap: 10px; }
.mini-admin { display: grid; grid-template-columns: 150px 1fr; background: #FFFFFF; color: #10131A; border-radius: var(--r); overflow: hidden; min-height: 220px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
.ma-side { background: #F0F2F6; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ma-side span { padding: 6px 10px; border-radius: 8px; color: #4A5160; }
.ma-side .ma-on { background: #2D46E0; color: #fff; font-weight: 600; }
.ma-main { padding: var(--s3); display: flex; flex-direction: column; gap: 12px; font-size: 14px; min-width: 0; }
.ma-main b { font-family: var(--font-head); font-size: 20px; }
.ma-row { height: 14px; border-radius: 6px; background: #E6E9EE; }
.ma-row.short { width: 60%; }
@media (max-width: 499px) { .mini-admin { grid-template-columns: 112px 1fr; } .ma-main { padding: var(--s2); } }
.ext-grid { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ext-card { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.ext-card code { margin-top: auto; font-size: 12px; color: var(--ink-weak); }
.ext-state { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.ext-yes .ext-state { background: var(--tag-main-bg); color: var(--tag-main-fg); }
.ext-part .ext-state { background: var(--tag-off-bg); color: var(--tag-off-fg); }
.ext-no .ext-state { background: var(--tag-soon-bg); color: var(--tag-soon-fg); }
.ext-yes { border-top: 3px solid var(--action); }
.tree { font-family: var(--font-code); font-size: 13.5px; line-height: 1.8; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r); padding: var(--s2) var(--s3); overflow-x: auto; white-space: pre; }
.tree .c { color: var(--ink-weak); }
.tree .s { color: var(--action); font-weight: 600; }
.checks.one { grid-template-columns: minmax(0, 1fr); }

/* ---------- Themes page ---------- */
.switcher { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 960px) { .switcher { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.sw-buttons { display: none; flex-wrap: wrap; gap: 8px; }
.js .sw-buttons { display: flex; }
.sw-buttons button { min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid #5A6478; background: transparent; color: var(--stage-ink); font: 600 15px var(--font-body); cursor: pointer; }
.sw-buttons button[aria-pressed="true"] { background: var(--volt); color: var(--volt-ink); border-color: var(--volt); }
.sw-stage { display: none; }
.js .sw-stage { display: block; }
.sw-stage .tshop { min-height: 400px; border-radius: var(--r-l); }
.sw-stage .tshop .ph { height: 190px; }
@media (prefers-reduced-motion: no-preference) { .sw-stage .tshop, .sw-stage .tshop * { transition: background 450ms, color 450ms, border-radius 450ms, font-size 300ms; } }
.sw-all { display: grid; gap: var(--s2); }
.js .sw-all { display: none; }
.anatomy { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .anatomy { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
.page-map { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); display: grid; gap: 12px; box-shadow: var(--shadow); }
.pm { border-radius: 12px; padding: 14px 16px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.pm small { font-weight: 400; font-size: 12px; }
.pm-theme { border: 2px dashed var(--action); color: var(--action); }
.pm-engine { background: var(--ink); color: var(--ground); }
.pm-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.legend-a { display: flex; flex-direction: column; gap: var(--s2); }
.legend-a div { display: flex; gap: 12px; align-items: flex-start; }
.legend-a i { width: 28px; height: 20px; border-radius: 6px; flex: none; margin-top: 4px; }
.legend-a .lt { border: 2px dashed var(--action); }
.legend-a .le { background: var(--ink); }

/* ---------- Run page ---------- */
.yaml { font-family: var(--font-code); font-size: 14px; line-height: 1.8; background: #0F131B; color: var(--stage-ink); border: 1px solid var(--stage-stroke); border-radius: var(--r); padding: var(--s3); overflow-x: auto; white-space: pre; }
.yaml .c { color: #7D8696; } .yaml .k { color: #8C9BFF; } .yaml .s { color: var(--volt); }
.timeline { display: flex; flex-direction: column; border-left: 2px solid var(--stroke); margin-left: 10px; }
.timeline li { position: relative; padding: 0 0 var(--s4) var(--s4); display: flex; flex-direction: column; gap: 4px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--ground); border: 3px solid var(--action); }
.timeline li b { font-family: var(--font-head); font-size: 20px; }
.timeline li span { color: var(--ink-weak); font-size: 15px; }
.pulse-path { position: relative; height: 4px; border-radius: 4px; background: var(--stroke); overflow: hidden; }
.pulse-path i { position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; background: linear-gradient(90deg, transparent, var(--action), transparent); }
@media (prefers-reduced-motion: no-preference) { .pulse-path i { animation: travel 2.4s linear infinite; } }
@keyframes travel { from { left: -30%; } to { left: 100%; } }
.page-head .wrap.split-head { display: grid; align-items: center; }
.page-head .wrap.split-head > * { min-width: 0; }

/* ---------- Performance ---------- */
.perf-grid { display: grid; gap: var(--s2); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .perf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .perf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.perf { background: var(--stage-2); border: 1px solid var(--stage-stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 6px; }
.perf b { font-family: var(--font-head); font-size: clamp(48px, 6vw, 68px); line-height: 1; letter-spacing: -0.04em; color: var(--volt); }
.perf b small { font-size: 0.42em; margin-left: 4px; letter-spacing: 0; }
.perf-u { font-weight: 600; color: var(--stage-ink); }
.perf p { font-size: 14px; color: var(--stage-weak); line-height: 1.55; }
.perf-honest { display: grid; gap: var(--s2); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .perf-honest { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.perf-honest > div { border: 1px solid var(--stage-stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 8px; }
.perf-honest p { color: var(--stage-weak); font-size: 15px; }
.perf-honest .tag { vertical-align: middle; margin-left: 8px; }
.table-box.light { background: var(--surface); border-color: var(--stroke); }
.table-box.light caption, .table-box.light td { color: var(--ink-weak); }
.table-box.light th { color: var(--ink); }
.table-box.light th, .table-box.light td { border-color: var(--stroke); }
.table-box.light thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-weak); }
.table-box.light td code { color: var(--action); }
.scale-path { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); counter-reset: sp; }
.scale-path li { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-l); padding: var(--s3); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); position: relative; }
.scale-path li::before { counter-increment: sp; content: counter(sp); font-family: var(--font-head); font-weight: 700; font-size: 44px; line-height: 1; color: var(--action); }
.scale-path .tag { align-self: flex-start; }
