:root {
  color-scheme: dark;
  --bg: #120e07; --bg2: #1a150c; --card: #1e1810; --field: #15110a; --line: #43361b;
  --ink: #f8f0dc; --soft: #cdbf9d; --gold: #ecc766; --gold2: #b9821f;
  --metal: linear-gradient(105deg, #fbe8a6 0%, #e3b84f 30%, #b98322 58%, #f2d27a 100%);
  --good: #86e0ab; --good-bg: #12301f; --bad: #ffab9a; --bad-bg: #3b1813; --warn: #ffd88a; --warn-bg: #3a2a0c; --info-bg: #2a2314;
}
* { box-sizing: border-box; min-width: 0; }
*::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 18px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; overflow-x: clip; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
h1, h2, h3, .brand { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; }

.hero { position: relative; padding-bottom: 34px; border-bottom: 1px solid var(--line);
  background: radial-gradient(760px 460px at 82% 30%, rgba(236, 190, 84, .30), transparent 70%), radial-gradient(620px 420px at 0% 100%, rgba(150, 94, 18, .42), transparent 70%), linear-gradient(120deg, #0d0a05 0%, #241a0a 60%, #120d06 100%); }
nav.wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; padding-top: 22px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 700; letter-spacing: -.01em; }
.brand img { border-radius: 12px; } .brand span { color: var(--gold); font-weight: 400; margin-left: -11px; }
.links { display: flex; gap: 26px; flex: 1; }
.links a { color: var(--soft); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.links a:hover { color: var(--gold); border-color: var(--gold); }
#link { margin: 0; padding: 7px 15px; border-radius: 99px; font-size: 14px; font-weight: 600; border: 1px solid; }
#link.on { color: var(--good); background: var(--good-bg); border-color: #2c6a45; } #link.off { color: var(--warn); background: var(--warn-bg); border-color: #7a5a1a; }
.lead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 44px; align-items: center; }
h1 { margin: 0; padding-bottom: .12em; font-size: clamp(34px, 4.8vw, 60px); line-height: 1.05; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; background: linear-gradient(100deg, #fff6dc 10%, #f0cf78 55%, #cf9a35 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead p { margin: 20px 0 0; font-size: 19px; max-width: 31em; color: #e6dabd; }
.scene { width: 100%; height: auto; display: block; }
.acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 30px 0 0; border: 1px solid var(--line); border-radius: 18px; background: rgba(18, 14, 7, .72); }
.stats div { padding: 16px 22px; } .stats div + div { border-left: 1px solid var(--line); }
.stats dt { color: var(--soft); font-size: 14px; } .stats dd { margin: 2px 0 0; font: 700 30px/1.1 "Segoe UI Variable Display", "Segoe UI", sans-serif; color: var(--gold); font-variant-numeric: tabular-nums; }

button, .btn { font: 650 16px/1.3 "Segoe UI", system-ui, sans-serif; padding: 14px 26px; border: 0; border-radius: 13px; color: #231700; background: var(--metal); background-size: 180% 100%; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 24px rgba(212, 160, 52, .25); transition: background-position .4s, box-shadow .2s; }
button:hover, .btn:hover { background-position: 100% 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 30px rgba(230, 180, 70, .42); }
button:disabled { color: #a89a7a; background: #352b18; box-shadow: none; cursor: default; }
button.ghost { color: var(--gold); background: rgba(236, 199, 102, .07); border: 1px solid #8f6f2c; box-shadow: none; }
button.ghost:hover { background: rgba(236, 199, 102, .17); box-shadow: none; } button.ghost:disabled { color: #8c7e5f; border-color: #4a3c20; background: none; }
button.small { padding: 9px 18px; font-size: 15px; margin-top: 14px; }
button.quiet { background: none; box-shadow: none; color: var(--soft); padding: 6px 0; font-weight: 400; font-size: 15px; text-decoration: underline; }
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #ffe19a; outline-offset: 2px; }

.panel { position: relative; margin-bottom: 24px; padding: 28px 30px 30px; border-radius: 22px; background: linear-gradient(160deg, #241d12, #1a150d 60%); border: 1px solid var(--line); }
.panel::before { content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, #f0cf78 30%, #b98322 70%, transparent); }
h2 { margin: 0 0 18px; font-size: 25px; letter-spacing: -.015em; } h3 { margin: 0 0 14px; font-size: 18px; color: var(--gold); }
#go label, #reviewBox label { display: block; font-weight: 600; margin-bottom: 8px; }
.row { display: flex; gap: 12px; }
input[type=text], textarea { width: 100%; color: var(--ink); background: var(--field); border: 2px solid #4f4020; border-radius: 13px; padding: 14px 16px; font: 16px/1.4 "Segoe UI", system-ui, sans-serif; }
#bcId { flex: 1; font: 18px/1.3 "Cascadia Mono", Consolas, monospace; } #bcId::placeholder { font: 16px "Segoe UI", sans-serif; }
input::placeholder, textarea::placeholder { color: #a39677; }
input[type=text]:focus, textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(236, 199, 102, .18); }
textarea { min-height: 190px; resize: vertical; line-height: 1.55; }
summary { cursor: pointer; font-weight: 600; } .more { margin-top: 18px; color: var(--soft); } .more label { margin-top: 14px; color: var(--ink); }
#demoNote { margin-top: 20px; padding: 12px 18px; border-radius: 13px; font-weight: 600; color: var(--warn); background: var(--warn-bg); }
#status, #replyMsg { margin-top: 20px; padding: 15px 19px; border-radius: 14px; background: var(--info-bg); color: #f3dfae; font-weight: 600; white-space: pre-line; }
#status { display: flex; gap: 14px; align-items: center; }
#status::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--gold); border-top-color: transparent; animation: spin .9s linear infinite; }
#status.ok, #replyMsg.ok { background: var(--good-bg); color: var(--good); } #status.bad, #replyMsg.bad { background: var(--bad-bg); color: var(--bad); }
#status.ok::before, #status.bad::before { animation: none; border: 0; width: 26px; height: 26px; font: 700 15px/26px "Segoe UI", sans-serif; text-align: center; color: #120e07; }
#status.ok::before { content: "\2713"; background: var(--good); } #status.bad::before { content: "!"; background: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
.grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 34px; margin-top: 26px; }
#steps { list-style: none; margin: 0; padding: 0; }
#steps li { position: relative; display: flex; gap: 14px; padding-bottom: 20px; color: var(--soft); }
#steps li::before { content: ""; flex: none; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 2px solid #6b5628; font: 700 14px/22px "Segoe UI", sans-serif; text-align: center; }
#steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 24px; bottom: 0; width: 2px; background: #4a3b1d; }
#steps li.done { color: var(--ink); } #steps li.done::before { content: "\2713"; border: 0; line-height: 26px; color: #231700; background: var(--metal); } #steps li.done:not(:last-child)::after { background: #c9962b; }
#steps li.active { color: var(--ink); font-weight: 600; } #steps li.active::before { border: 3px solid var(--gold); border-top-color: transparent; animation: spin .9s linear infinite; }
#steps li.failed { color: var(--bad); font-weight: 600; } #steps li.failed::before { content: "!"; border: 0; line-height: 26px; color: #120e07; background: var(--bad); }
#found { margin: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: dense; gap: 12px; }
#found div { padding: 12px 16px; border-radius: 13px; background: #16110a; border: 1px solid #392e18; } #found div.wide { grid-column: 1 / -1; }
#found div.bad { background: var(--bad-bg); border-color: #6e2c22; } #found div.ok { background: var(--good-bg); border-color: #2c6a45; }
#found dt { color: var(--soft); font-size: 14px; } #found dd { margin: 1px 0 0; font-weight: 600; overflow-wrap: anywhere; } #found .wide dd { font-weight: 400; } #found .bad dd { color: var(--bad); } #found .ok dd { color: var(--good); }
#reviewBox, #sentCard { margin-top: 24px; } #reviewBox textarea { min-height: 320px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 0; padding: 18px; border-radius: 13px; background: var(--field); font: 15px/1.6 "Segoe UI", system-ui, sans-serif; }

.rhead { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; } .rhead h2 { margin: 0; flex: 1 1 220px; } .rhead input { width: 190px; padding: 11px 14px; } .rhead button { padding: 12px 20px; font-size: 15px; } #addTicket { display: flex; gap: 10px; }
#ticketNone { color: var(--soft); margin: 18px 0 0; }
.ticket { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.thead { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; } .thead b { font-size: 18px; } .bc, .note { color: var(--soft); } .note { margin: 10px 0 0; }
.pill { padding: 3px 13px; border-radius: 9px; font-weight: 600; font-size: 14px; background: #33291a; color: #e9dab4; } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.ok { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.said { margin-top: 12px; padding: 15px 18px; border-radius: 13px; background: var(--field); } .said small { color: var(--gold); font-size: 14px; } .said p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.ticket textarea { margin: 14px 0 12px; } .ticket .quiet { display: block; margin-top: 8px; }

.sets { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 44px; } fieldset { border: 0; margin: 0; padding: 0; } legend { padding: 0; margin-bottom: 6px; font-weight: 650; color: var(--gold); font-size: 18px; }
.sw { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; cursor: pointer; } .sw + .sw { border-top: 1px solid #382d17; } .sw small { display: block; color: var(--soft); font-size: 14px; }
.sw input { appearance: none; flex: none; width: 46px; height: 26px; margin: 1px 0 0; border-radius: 99px; background: #3b301b; border: 1px solid #6b5628; position: relative; cursor: pointer; transition: background .2s; }
.sw input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #cdbf9d; transition: transform .2s; }
.sw input:checked { background: var(--metal); border-color: #f0cf78; } .sw input:checked::after { transform: translateX(20px); background: #231700; } .sw input:disabled { opacity: .5; cursor: default; }
.scroll { overflow-x: auto; margin-top: 16px; } table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; } th { text-align: left; color: var(--soft); font-weight: 600; font-size: 14px; } th, td { padding: 12px 12px 12px 0; border-bottom: 1px solid #382d17; } td:nth-child(2) { color: var(--gold); font-weight: 600; }

.band { padding: 66px 0; } .band.dark { background: linear-gradient(115deg, #2c2009, #1a130a 55%, #33240b); border-block: 1px solid var(--line); }
h2.big { font-size: clamp(27px, 3vw, 36px); margin-bottom: 28px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } .flow li { position: relative; padding-top: 34px; }
.flow li::before { content: ""; position: absolute; top: 9px; left: 0; right: -28px; height: 3px; background: linear-gradient(90deg, #f0cf78, #b98322); } .flow li:last-child::before { right: 0; }
.flow li::after { content: ""; position: absolute; top: 0; left: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--bg); border: 5px solid #ecc766; }
.flow b { font-size: 18px; } .flow p { margin: 6px 0 0; color: var(--soft); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; } .ticks, .crosses { list-style: none; margin: 0; padding: 0; font-size: 17px; } .ticks li, .crosses li { position: relative; padding: 9px 0 9px 42px; }
.ticks li::before, .crosses li::before { position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 50%; font: 700 14px/26px "Segoe UI", sans-serif; text-align: center; color: #231700; } .ticks li::before { content: "\2713"; background: var(--metal); } .crosses li::before { content: "\2715"; background: var(--bad); }
#faq details { border-top: 1px solid var(--line); padding: 18px 0; } #faq details:last-child { border-bottom: 1px solid var(--line); } #faq summary { font-size: 18px; } #faq p { margin: 10px 0 0; max-width: 46em; color: var(--soft); }
footer { padding: 34px 0; background: #0c0904; border-top: 1px solid var(--line); } footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; justify-content: space-between; } footer p { margin: 0; color: var(--soft); }

@media (max-width: 900px) { .grid, .sets { grid-template-columns: minmax(0, 1fr); } .flow { grid-template-columns: 1fr 1fr; } .flow li:nth-child(2)::before { right: 0; } .stats div { padding: 14px 14px; } }
@media (max-width: 640px) {
  .wrap { padding-left: 18px; padding-right: 18px; } .links { display: none; } .lead, .two, .flow { grid-template-columns: minmax(0, 1fr); } .lead { gap: 22px; } .scene { max-width: 310px; margin: 0 auto; }
  .stats { grid-template-columns: 1fr 1fr; } .stats div + div { border-left: 0; } .stats div:last-child { grid-column: 1 / -1; }
  .panel { padding: 22px 18px 24px; } .row { flex-direction: column; } #found { grid-template-columns: minmax(0, 1fr); } .flow li::before { right: 0; } .band { padding: 46px 0; } #addTicket { flex: 1 1 100%; } .rhead input { flex: 1; width: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* App shell: menu on the left, one page at a time */
body { background: radial-gradient(900px 620px at 100% 0%, rgba(236, 190, 84, .17), transparent 70%), radial-gradient(700px 520px at 20% 100%, rgba(150, 94, 18, .22), transparent 70%), var(--bg); background-attachment: fixed; }
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
aside { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; padding: 26px 18px 22px; border-right: 1px solid var(--line); background: linear-gradient(175deg, #221a0c, #100c06 70%); }
aside .brand { padding: 0 8px; }
#menuBtn { display: none; }
#menu { display: flex; flex-direction: column; gap: 5px; flex: 1; overflow-y: auto; }
#menu a { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 13px; color: #dccfae; text-decoration: none; font-weight: 600; border: 1px solid transparent; }
#menu a:hover { background: rgba(236, 199, 102, .09); color: var(--ink); }
#menu a[aria-current] { color: #231700; background: var(--metal); box-shadow: 0 8px 24px rgba(212, 160, 52, .25); }
#menu svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#badge { margin-left: auto; min-width: 24px; padding: 1px 8px; border-radius: 99px; text-align: center; font-size: 14px; color: #2b0d07; background: #ffab9a; }
#link { border-radius: 13px; padding: 11px 14px; }
main { padding: 34px clamp(18px, 3.4vw, 52px) 24px; display: flex; flex-direction: column; }
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; }
.page h2 { font-size: 30px; }
footer { border: 0; background: none; padding: 30px 0 0; max-width: 1180px; width: 100%; margin: 0 auto; color: var(--soft); font-size: 14px; }

.welcome { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.welcome h1 { font-size: clamp(32px, 3.7vw, 50px); }
.welcome p { margin: 18px 0 0; font-size: 18px; color: #e6dabd; max-width: 33em; }
.page .stats { margin: 26px 0 46px; }

.case { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.stage, .side { position: relative; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(160deg, #241d12, #1a150d 60%); padding: 28px 30px 30px; }
.stage { min-height: 480px; }
.side { position: sticky; top: 34px; border-color: #8f6f2c; background: linear-gradient(170deg, #37290f, #1d160a 62%); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.side::before { content: ""; position: absolute; left: 24px; top: -12px; width: 108px; height: 24px; border-radius: 9px 9px 0 0; background: var(--metal); z-index: -1; }
.side h3 { font-size: 21px; }
.side label { display: block; font-weight: 600; margin: 0 0 8px; }
.side .more { margin: 16px 0 0; } .side .more label { margin-top: 14px; }
.side #bcId { width: 100%; font-size: 17px; }
.side button { width: 100%; margin-top: 20px; }
#needLink { margin: 14px 0 0; color: var(--warn); } #needLink a, .lede a { color: var(--gold); }
#empty { display: grid; place-items: center; text-align: center; gap: 14px; padding: 46px 10px; color: var(--soft); } #empty svg { width: 220px; max-width: 70%; } #empty p { margin: 0; max-width: 30em; }
.stage .grid { grid-template-columns: 240px minmax(0, 1fr); gap: 26px; }

.lede { margin: 12px 0 18px; color: var(--soft); max-width: 46em; }
#linkBig { padding: 15px 19px; border-radius: 14px; font-weight: 600; } #linkBig.on { background: var(--good-bg); color: var(--good); } #linkBig.off { background: var(--warn-bg); color: var(--warn); }
.setup { list-style: none; counter-reset: s; margin: 28px 0 0; padding: 0; }
.setup li { counter-increment: s; position: relative; padding: 0 0 24px 58px; } .setup li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--metal); color: #231700; font: 700 17px/38px "Segoe UI", sans-serif; text-align: center; z-index: 1; }
.setup li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 38px; bottom: 0; width: 2px; background: #6b5628; }
.setup b { font-size: 18px; } .setup p { margin: 2px 0 0; color: var(--soft); } .copies { display: flex; flex-wrap: wrap; gap: 10px; } code { font-family: "Cascadia Mono", Consolas, monospace; color: var(--gold); }
#historyNone { color: var(--soft); }

@media (max-width: 1120px) { .case { grid-template-columns: minmax(0, 1fr) 290px; } .stage .grid { grid-template-columns: minmax(0, 1fr); } .page .flow { grid-template-columns: 1fr 1fr; } .page .flow li:nth-child(2)::before { right: 0; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  aside { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  #menuBtn { display: block; margin-left: auto; padding: 10px 20px; }
  #menu { display: none; flex: 1 1 100%; } #menu.open { display: flex; }
  #link { flex: 1 1 100%; }
  .case, .welcome { grid-template-columns: minmax(0, 1fr); } .side { position: relative; top: 0; order: -1; margin-top: 12px; } .stage { min-height: 0; }
  .welcome .scene { max-width: 320px; margin: 0 auto; }
}
@media (max-width: 640px) { .page .flow { grid-template-columns: minmax(0, 1fr); } .stage { padding: 22px 18px 24px; } }

.sprite { position: absolute; }
