:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #11161e;
  --panel-2: #151c26;
  --line: #293341;
  --ink: #f2f6f8;
  --muted: #91a0ad;
  --cyan: #55e6d4;
  --amber: #ffbd59;
  --red: #ff6f6f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, rgba(85,230,212,.10), transparent 30rem),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 32px 32px, 32px 32px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 54px 0 30px; }
.hero { position: relative; padding: 20px 0 42px; }
.eyebrow { color: var(--cyan); font: 700 12px/1.2 ui-monospace, monospace; letter-spacing: .18em; }
.pulse { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
h1 { max-width: 850px; margin: 18px 0 14px; font-size: clamp(46px, 7.2vw, 88px); line-height: .94; letter-spacing: -.055em; }
h1 span { color: var(--cyan); }
.lede { max-width: 720px; margin: 0; color: #aeb9c2; font-size: 18px; line-height: 1.6; }
.identity { position: absolute; right: 0; bottom: 45px; width: 335px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(8,11,16,.7); }
.identity span, .result-card span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.identity code { display: block; overflow-wrap: anywhere; color: var(--cyan); font-size: 10px; line-height: 1.45; white-space: normal; }

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-right: 0; }
.status-grid article { min-height: 118px; padding: 20px; border-right: 1px solid var(--line); background: rgba(17,22,30,.82); }
.status-grid b, .status-grid span, .status-grid i { display: block; }
.status-grid b { font-size: 14px; }
.status-grid span { margin: 8px 0 15px; color: var(--muted); font-size: 12px; }
.status-grid i { font: normal 700 10px/1 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.ok { color: var(--cyan); } .warn { color: var(--amber); }

.workspace { display: grid; grid-template-columns: .94fr 1.06fr; gap: 18px; margin-top: 18px; }
.panel { padding: 28px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(21,28,38,.96), rgba(13,18,25,.98)); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.panel-title small { color: var(--cyan); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .18em; }
h2 { margin: 7px 0 0; font-size: 24px; letter-spacing: -.025em; }

label { display: block; margin: 16px 0; color: #dce4e9; font-size: 13px; font-weight: 700; }
label > span { float: right; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
input, textarea, select {
  display: block; width: 100%; margin-top: 8px; border: 1px solid #313c4a; border-radius: 2px; outline: 0; background: #0b1016; color: var(--ink); font: 13px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}
input, select { height: 43px; padding: 0 12px; }
select { appearance: none; padding: 0 34px 0 12px; }
textarea { min-height: 172px; padding: 12px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(85,230,212,.08); }
.triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

button { min-height: 43px; border: 1px solid transparent; border-radius: 2px; padding: 0 17px; cursor: pointer; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: .18s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
button:disabled { cursor: not-allowed; opacity: .34; }
.primary { width: 100%; margin-top: 7px; background: var(--cyan); color: #06100f; }
.secondary { width: 100%; border-color: var(--cyan); background: transparent; color: var(--cyan); }
.danger { width: 100%; margin: 8px 0 7px; border-color: var(--red); background: rgba(255,111,111,.08); color: var(--red); }
.ghost { border-color: var(--line); background: transparent; color: #aeb9c2; font-size: 10px; }
.result-card { min-height: 75px; margin-top: 18px; padding: 15px; border-left: 2px solid var(--cyan); background: #0b1016; }
.result-card span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.result-card span small { display: block; margin-top: 4px; color: #667583; font-size: 9px; }
.result-card textarea { min-height: 64px; color: var(--cyan); font-size: 11px; line-height: 1.6; }
.wasm-badge { padding: 7px 10px; border: 1px solid var(--line); color: var(--amber); font: 700 10px/1 ui-monospace, monospace; text-transform: uppercase; }
.wasm-badge.ready { border-color: rgba(85,230,212,.35); color: var(--cyan); }

.preflight { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 17px; background: var(--line); border: 1px solid var(--line); }
.preflight div { padding: 15px 13px; background: #0d131a; }
.preflight span, .preflight b { display: block; }
.preflight span { min-height: 28px; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.preflight b { margin-top: 8px; color: var(--amber); font: 700 14px/1 ui-monospace, monospace; }
.notice { padding: 16px; border: 1px solid rgba(255,189,89,.30); background: rgba(255,189,89,.055); }
.notice strong { color: var(--amber); font-size: 12px; }
.notice p { margin: 8px 0 0; color: #c2c9ce; font-size: 12px; line-height: 1.58; }
.challenge-note, .algorithm-note { margin: 12px 0; padding: 12px 14px; border-left: 2px solid var(--cyan); background: rgba(85,230,212,.045); color: #aeb9c2; font-size: 11px; line-height: 1.55; }
.challenge-note strong { color: var(--cyan); }
.hidden { display: none !important; }
.native-box { margin: 15px 0; padding: 15px; border: 1px solid var(--line); background: #0b1016; }
.native-box strong { color: var(--cyan); font-size: 12px; }
.native-box p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.native-box > code { display: block; margin: 10px 0; padding: 10px; overflow-wrap: anywhere; border: 1px solid #27313d; color: #c9d4da; font-size: 10px; line-height: 1.5; }
.native-box .ghost { width: 100%; }
.download { display: inline-block; color: var(--cyan); font-size: 11px; font-weight: 750; text-underline-offset: 3px; }
.consent { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
.consent input { flex: 0 0 auto; width: 15px; height: 15px; margin: 0; }
.proof-label { margin-top: 17px; }
.file-picker { display: flex; align-items: center; gap: 10px; width: fit-content; color: var(--cyan); cursor: pointer; }
.file-picker input { width: auto; height: auto; margin: 0; padding: 5px; }
pre { min-height: 45px; margin: 14px 0 0; padding: 13px; overflow: auto; border: 1px solid var(--line); background: #080c11; color: #a9b8c4; font: 11px/1.55 ui-monospace, monospace; white-space: pre-wrap; }
footer { display: flex; justify-content: space-between; padding: 22px 2px; color: #65727e; font: 10px/1.3 ui-monospace, monospace; letter-spacing: .08em; }

@media (max-width: 900px) {
  .identity { position: static; width: 100%; margin-top: 24px; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 1180px); padding-top: 25px; }
  .status-grid, .triple, .preflight { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  footer { display: block; } footer span { display: block; margin: 7px 0; }
}
