:root {
  color-scheme: dark;
  --night: #050815;
  --night-2: #0a1020;
  --panel: rgba(13, 21, 40, 0.9);
  --panel-2: rgba(20, 31, 55, 0.78);
  --ink: #f4f7ff;
  --dim: #b8c2db;
  --faint: #8491ad;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #00e5ff;
  --pink: #ff2db0;
  --purple: #9b4dff;
  --live: #51e08a;
  --amber: #ffc46b;
  --danger: #ff6584;
  --wood-1: #5a321d;
  --wood-2: #2c180f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(900px 460px at 85% -10%, rgba(155, 77, 255, 0.2), transparent 64%),
    radial-gradient(760px 420px at 0% 25%, rgba(0, 229, 255, 0.12), transparent 66%),
    linear-gradient(180deg, #090d1d 0%, var(--night) 75%);
  background-attachment: fixed;
}

body::before {
  position: fixed;
  inset: auto 0 0;
  z-index: -1;
  height: 42vh;
  content: "";
  opacity: 0.22;
  background:
    linear-gradient(155deg, transparent 46%, rgba(12, 28, 22, 0.9) 47% 54%, transparent 55%) 0 100% / 180px 170px repeat-x,
    linear-gradient(205deg, transparent 46%, rgba(10, 23, 19, 0.95) 47% 54%, transparent 55%) 70px 100% / 210px 200px repeat-x;
  pointer-events: none;
}

a { color: var(--cyan); }

a:hover { color: #8af5ff; }

button, input, select, textarea { font: inherit; }

button, .button {
  min-height: 44px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 12px;
  padding: 0.72rem 1rem;
  color: #001217;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--cyan), #55b9ff);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.16);
  cursor: pointer;
}

button:hover, .button:hover { filter: brightness(1.08); color: #001217; }

button.secondary, .button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
}

button.danger { border-color: rgba(255, 101, 132, 0.4); color: #ffdce5; }

button:disabled { cursor: not-allowed; opacity: 0.48; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.site-rail {
  height: 8px;
  background:
    linear-gradient(90deg, rgba(255, 45, 176, 0.75), rgba(0, 229, 255, 0.72), rgba(155, 77, 255, 0.76)),
    repeating-linear-gradient(100deg, var(--wood-1) 0 36px, var(--wood-2) 36px 72px);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
}

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(0, 229, 255, 0.45);
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.08);
  box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.08);
}

.back-link { color: var(--dim); font-size: 0.92rem; font-weight: 700; text-decoration: none; }

.hero { padding: clamp(2.2rem, 6vw, 5.2rem) 0 2rem; }

.eyebrow, .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(81, 224, 138, 0.34);
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  color: var(--live);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(81, 224, 138, 0.08);
}

.eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; box-shadow: 0 0 12px currentColor; }

h1, h2, h3 { line-height: 1.05; }

h1 {
  max-width: 900px;
  margin: 1rem 0 0.8rem;
  font-size: clamp(2.35rem, 7vw, 5.2rem);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.2rem); }

.lead { max-width: 760px; margin: 0; color: var(--dim); font-size: clamp(1rem, 2vw, 1.18rem); }

.policy-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.policy-strip > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  color: var(--dim);
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.035);
}

main { padding-bottom: 5rem; }

.panel {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--pink), var(--cyan), var(--purple));
  opacity: 0.75;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-head p { margin: 0.45rem 0 0; color: var(--dim); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }

fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
legend, .label { margin-bottom: 0.55rem; color: var(--dim); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }

.choice {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.choice:has(input:checked) { border-color: rgba(0, 229, 255, 0.6); color: var(--ink); background: rgba(0, 229, 255, 0.09); }
.choice input { width: 18px; height: 18px; accent-color: var(--cyan); }

.checklist { display: grid; gap: 0.65rem; }
.group-title { margin: 1rem 0 0.25rem; color: var(--cyan); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }

.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.check-row:has(input:checked) { border-color: rgba(81, 224, 138, 0.35); background: rgba(81, 224, 138, 0.055); }
.check-row input { width: 20px; height: 20px; margin-top: 0.1rem; accent-color: var(--live); }
.check-row small { display: block; margin-top: 0.25rem; color: var(--faint); }
.required { color: var(--amber); font-size: 0.72rem; font-weight: 900; text-transform: uppercase; }

.progress { height: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: #050914; }
.progress > span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--purple), var(--cyan), var(--live)); transition: width 180ms ease; }

.verdict {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0.9rem;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.035);
}
.verdict strong { display: block; margin-bottom: 0.2rem; color: var(--ink); }
.verdict[data-status="ready"] { border-color: rgba(81, 224, 138, 0.42); background: rgba(81, 224, 138, 0.07); }
.verdict[data-status="caution"] { border-color: rgba(255, 196, 107, 0.42); background: rgba(255, 196, 107, 0.07); }

.actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }

.notice { border-left: 3px solid var(--amber); padding: 0.8rem 1rem; color: var(--dim); background: rgba(255, 196, 107, 0.055); }
.notice strong { color: var(--ink); }

.dropzone {
  display: grid;
  min-height: 190px;
  place-items: center;
  border: 2px dashed rgba(0, 229, 255, 0.35);
  border-radius: 16px;
  padding: 1.2rem;
  text-align: center;
  background: rgba(0, 229, 255, 0.035);
  cursor: pointer;
}
.dropzone[data-active="true"] { border-color: var(--live); background: rgba(81, 224, 138, 0.07); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone strong { display: block; font-size: 1.1rem; }
.dropzone span { color: var(--dim); }

textarea {
  width: 100%;
  min-height: 155px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  color: var(--ink);
  background: #070c19;
}

.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.65rem; }
.summary-card { border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem; background: rgba(255, 255, 255, 0.035); }
.summary-card strong { display: block; font-size: 1.45rem; }
.summary-card span { color: var(--faint); font-size: 0.75rem; text-transform: uppercase; }

.findings { display: grid; gap: 0.7rem; margin-top: 1rem; }
.finding { border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px; padding: 0.85rem 0.95rem; background: rgba(255, 255, 255, 0.03); }
.finding[data-severity="error"] { border-left-color: var(--danger); }
.finding[data-severity="warning"] { border-left-color: var(--amber); }
.finding[data-severity="info"] { border-left-color: var(--cyan); }
.finding[data-severity="pass"] { border-left-color: var(--live); }
.finding h3 { margin: 0; font-size: 1rem; }
.finding p { margin: 0.35rem 0 0; color: var(--dim); font-size: 0.9rem; }
.finding .source { color: var(--cyan); font-size: 0.78rem; font-weight: 800; }

.status { min-height: 1.5em; margin-top: 0.7rem; color: var(--dim); }
.status.error { color: #ff9aaf; }
.status.ok { color: var(--live); }

[hidden] { display: none !important; }

.footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--faint); font-size: 0.85rem; }

@media (max-width: 760px) {
  .policy-strip, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-head { display: block; }
  h1 { font-size: clamp(2.15rem, 14vw, 3.5rem); }
}

@media (max-width: 470px) {
  .shell { width: min(100% - 22px, 1120px); }
  .topbar { align-items: flex-start; }
  .brand span:last-child { display: none; }
  .choice-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  button, .button { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
