/* GCADHZN checker: "numeric science" theme. No external fonts or requests. */
:root {
  --bg: #070b16; --bg2: #0d1426; --panel: rgba(13, 21, 40, .86);
  --grid: rgba(90, 160, 255, .07); --grid-major: rgba(90, 160, 255, .13);
  --ink: #d7e3ff; --muted: #7f8db0; --line: rgba(120, 170, 255, .22);
  --phos: #4cf2a6; --cyan: #5fd3ff; --amber: #ffcc66; --red: #ff6b7d;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--mono); line-height: 1.5;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(95, 211, 255, .10), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, rgba(76, 242, 166, .08), transparent 60%),
    linear-gradient(var(--grid-major) 1px, transparent 1px) 0 0 / 100px 100px,
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px) 0 0 / 100px 100px,
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(180deg, var(--bg), var(--bg2));
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 24px 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

/* drifting symbols in the background */
.symbols { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.symbols span {
  position: absolute; color: rgba(140, 190, 255, .16); font-size: clamp(18px, 3.2vw, 44px);
  animation: drift 26s linear infinite; white-space: nowrap; user-select: none;
}
@keyframes drift { from { transform: translateY(12vh) rotate(-4deg); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { transform: translateY(-112vh) rotate(4deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .symbols span { animation: none; top: var(--y); }
  .hist rect, .emblem .point { animation: none; }
  .emblem .curve { animation: none; stroke-dashoffset: 0; }
}

/* the instrument panel */
.panel {
  position: relative; z-index: 1; width: min(640px, 100%);
  background: var(--panel); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(95, 211, 255, .08), transparent);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.panel-head b { color: var(--cyan); letter-spacing: .2em; }
.leds { display: flex; gap: 6px; }
.leds i { width: 8px; height: 8px; border-radius: 50%; background: #233; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.leds i.on { background: var(--phos); box-shadow: 0 0 10px var(--phos); }
.leds i.warn { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.leds i.err { background: var(--red); box-shadow: 0 0 10px var(--red); }
.panel-body { padding: 26px 22px 24px; }

/* emblem: a bell curve with a measured point */
.emblem { display: flex; align-items: center; gap: 16px; margin: 0 0 10px; }
.emblem svg { width: clamp(96px, 26vw, 132px); height: auto; flex: none; overflow: visible; }
.emblem .axes line { stroke: rgba(127, 141, 176, .55); stroke-width: 1.2; }
.emblem .curve { fill: none; stroke-width: 2.6; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(76, 242, 166, .6));
                 stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 1.6s ease-out .2s forwards; }
.emblem .mark { stroke: var(--amber); stroke-width: 1.2; stroke-dasharray: 2 3; }
.emblem .point { fill: var(--amber); filter: drop-shadow(0 0 6px rgba(255, 204, 102, .9)); animation: blip 2.4s ease-in-out infinite; transform-origin: 82px 20.5px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blip { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.title { margin: 0; font-size: clamp(26px, 6.5vw, 38px); letter-spacing: .02em; }
.subtitle { color: var(--cyan); font-size: 13px; letter-spacing: .32em; opacity: .8; }
.lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; }

/* input */
.entry { display: grid; gap: 10px; }
.entry label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.entry label.answer-label { font-size: 14px; letter-spacing: .04em; text-transform: none; color: var(--ink); }
.entry input[type=text] {
  width: 100%; padding: 16px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(3, 7, 15, .75); color: var(--phos);
  font: 600 clamp(22px, 6vw, 32px)/1.2 var(--mono); letter-spacing: .12em; font-variant-numeric: tabular-nums;
  caret-color: var(--phos); outline: none; text-shadow: 0 0 12px rgba(76, 242, 166, .35);
}
.entry input[type=text]::placeholder { color: rgba(127, 141, 176, .35); }
.entry input[type=text]:focus { border-color: var(--phos); box-shadow: 0 0 0 3px rgba(76, 242, 166, .18); }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 14px 20px; border-radius: 10px; border: 1px solid rgba(76, 242, 166, .6);
  background: linear-gradient(180deg, rgba(76, 242, 166, .25), rgba(76, 242, 166, .10));
  color: #eafff5; font: 600 16px var(--mono); letter-spacing: .08em; cursor: pointer; text-decoration: none;
  min-height: 44px;   /* touch target */
}
.btn:hover { background: linear-gradient(180deg, rgba(76, 242, 166, .35), rgba(76, 242, 166, .15)); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn.ghost { border-color: var(--line); background: transparent; color: var(--ink); }

/* readouts */
.readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.readout { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(3, 7, 15, .45); }
.readout .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.readout .v { font-size: clamp(20px, 5vw, 28px); font-variant-numeric: tabular-nums; color: var(--ink); }
.readout.ok .v { color: var(--phos); } .readout.nok .v { color: var(--red); }
.ratio { margin-top: 12px; display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 107, 125, .25); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--phos), var(--cyan)); box-shadow: 0 0 12px rgba(76, 242, 166, .6); }

/* results */
.verdict { display: flex; align-items: center; gap: 18px; margin: 4px 0 18px; }
.sym { font-size: clamp(54px, 15vw, 84px); line-height: 1; font-weight: 700; }
.sym svg { width: 1em; height: 1em; display: block; }
.sym.ok { color: var(--phos); text-shadow: 0 0 26px rgba(76, 242, 166, .7); }
.sym.nok { color: var(--red); text-shadow: 0 0 26px rgba(255, 107, 125, .6); }
.sym.warn { color: var(--amber); text-shadow: 0 0 26px rgba(255, 204, 102, .5); }
.verdict h1 { margin: 0; font-size: clamp(24px, 6vw, 34px); }
.verdict p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.coords {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: 10px; border: 1px dashed rgba(76, 242, 166, .55);
  background: rgba(3, 7, 15, .7); margin: 10px 0 18px;
}
.coords code { font: 600 clamp(18px, 4.8vw, 24px) var(--mono); color: var(--phos); letter-spacing: .04em; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.foot { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }

/* imaginary histogram in the footer */
.hist { width: 102px; height: 26px; color: var(--phos); }
.hist.nok { color: var(--red); } .hist.warn { color: var(--amber); }
.hist rect { fill: currentColor; opacity: .75; transform-box: fill-box; transform-origin: bottom; animation: breathe 3.2s ease-in-out infinite; }
.hist line { stroke: rgba(127, 141, 176, .5); stroke-width: .8; }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.72); } }

/* smallest phones: one-line header, slightly smaller emblem and title */
@media (max-width: 360px) {
  .head-sub { display: none; }
  .emblem { gap: 12px; }
  .emblem svg { width: 84px; }
  .title { font-size: 24px; }
}

/* low screens (phone in landscape): compact so the button stays in view */
@media (max-height: 520px) and (orientation: landscape) {
  body { padding-top: 10px; padding-bottom: 10px; }
  .panel-head { padding: 8px 16px; }
  .panel-body { padding: 14px 20px 14px; }
  .emblem { margin-bottom: 4px; }
  .emblem svg { width: 76px; }
  .title { font-size: 24px; }
  .lead { margin-bottom: 10px; font-size: 13px; }
  .entry { gap: 8px; }
  .entry input[type=text] { padding: 9px 14px; font-size: 22px; }
  .btn { padding: 10px 18px; }
  .readouts { margin-top: 14px; }
  .readout { padding: 6px 10px; }
  .readout .v { font-size: 20px; }
  .foot { margin-top: 12px; padding-top: 10px; }
  .verdict { margin-bottom: 10px; }
  .sym { font-size: 52px; }
}

@media (max-width: 480px) {
  .panel-body { padding: 22px 16px 20px; }
  .readouts { gap: 8px; }
  .readout { padding: 8px 10px; }
  .actions .btn { flex: 1 1 100%; }
}
