:root {
  --ink: #0f0a07;
  --panel: #1a120c;
  --gold: #d9b45f;
  --gold-hi: #f0d79c;
  --ivory: #f3ead9;
  --dim: rgba(243, 234, 217, 0.72);
  --faint: rgba(243, 234, 217, 0.5);
  --red: #e5372d;
  --focus: #f6dc9a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 0%, #2a1a10, var(--ink) 70%) fixed;
  color: var(--ivory);
  font: 400 17px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  padding: 0 16px 48px;
}
.brand { max-width: 560px; margin: 0 auto; padding: 28px 0 8px; text-align: center; }
.brand-name { margin: 0; font: 400 26px/1.1 Georgia, serif; }
.brand-name span { color: var(--ivory); }
.brand-name em { color: var(--gold); font-style: normal; }
.brand-tag { margin: 6px 0 0; font: 600 10.5px/1 "Segoe UI", sans-serif; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
main {
  max-width: 560px; margin: 18px auto 0; padding: 26px 26px 30px;
  border-radius: 16px; background: linear-gradient(180deg, #24170e, var(--panel));
  border: 1px solid rgba(240, 215, 156, 0.35); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
h1 { margin: 0 0 8px; font: 400 28px/1.2 Georgia, serif; }
h1:focus { outline: none; }
p { margin: 8px 0; }
.lede { color: var(--dim); }
.hint { font-size: 14.5px; color: var(--faint); margin: 6px 0 0; }
.field { margin-top: 18px; border: 0; padding: 0; }
label, legend {
  display: block; margin-bottom: 6px; padding: 0;
  font: 600 12.5px/1.2 "Segoe UI", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
}
input[type="text"], select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(240, 215, 156, 0.3);
  background: #0b0705; color: var(--ivory); font: inherit;
}
input:focus-visible, select:focus-visible, button:focus-visible, .choice input:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
.choice { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.choice label, .check label { margin: 0; font: 400 17px/1.4 "Segoe UI", sans-serif; letter-spacing: 0; text-transform: none; color: var(--ivory); }
input[type="radio"], input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.check { display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; align-items: start; }
.check .hint { grid-column: 2; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 14px 24px; border-radius: 12px; cursor: pointer;
  font: 600 16px/1.2 "Segoe UI", sans-serif; border: 1px solid transparent;
}
.btn-gold { color: #221607; border-color: #fff0c8; background: linear-gradient(180deg, #f8e4b1, var(--gold) 45%, #9d7535); }
.btn-quiet { color: var(--ivory); border-color: rgba(240, 215, 156, 0.45); background: #2a1a10; }
.btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.actions { margin-top: 22px; }
.meter { margin: 14px 0 4px; height: 10px; border-radius: 6px; background: #050302; box-shadow: inset 0 1px 3px #000; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, #4fbf6b, var(--gold-hi) 70%, var(--red)); transition: width 0.12s linear; }
.problem { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(229, 55, 45, 0.14); border: 1px solid rgba(229, 55, 45, 0.5); }
.rec-banner {
  display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 12px 16px; border-radius: 12px;
  background: rgba(229, 55, 45, 0.16); border: 1px solid rgba(229, 55, 45, 0.55); font-weight: 600;
}
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); animation: pulse 1.4s ease-in-out infinite; }
#rec-clock { margin-left: auto; font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { opacity: 0.35; } }
.step[hidden], [hidden] { display: none !important; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } .meter-fill { transition: none; } }

.leftover { margin: 0 0 22px; padding: 16px 18px; border-radius: 12px; background: rgba(217, 180, 95, 0.12); border: 1px solid rgba(217, 180, 95, 0.5); }
.leftover h2 { margin: 0 0 6px; font: 400 21px/1.2 Georgia, serif; }
.leftover .btn { margin: 6px 8px 0 0; }

.note { margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: rgba(217, 180, 95, 0.12); border: 1px solid rgba(217, 180, 95, 0.45); font-size: 15.5px; }
