:root {
  --paper: #eef1f4;
  --surface: #ffffff;
  --ink: #17222c;
  --muted: #5a6774;
  --line: #d3dae1;
  --accent: #0b5f73;
  --accent-ink: #ffffff;
  --ok: #17663c;   --ok-bg: #ddf1e4;
  --warn: #7f5200; --warn-bg: #fbefd2;
  --bad: #9e2429;  --bad-bg: #f8dede;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12181e; --surface: #1a232b; --ink: #e5ebf0; --muted: #9aa8b5; --line: #2e3a45;
    --accent: #4fb3c9; --accent-ink: #0d171c;
    --ok: #7fd3a1; --ok-bg: #173826; --warn: #f0c46a; --warn-bg: #3a2e12; --bad: #f19a9d; --bad-bg: #3d1c1e;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 48px 24px 80px; }

header.intro { max-width: 640px; margin-bottom: 40px; }
header.intro h1 {
  font-size: 2.4rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 12px;
}
header.intro h1 .rec {
  font-family: var(--mono); font-weight: 500; font-size: 0.72em;
  color: var(--accent); display: block; margin-bottom: 6px; letter-spacing: 0;
}
header.intro p { margin: 0; color: var(--muted); }
.signout { float: right; font-size: 0.9rem; color: var(--muted); }

/* Steps: a real sequence, so they're numbered */
.step {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  padding: 24px 0; border-top: 1px solid var(--line);
}
.step[hidden] { display: none; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--line); color: var(--muted);
  display: grid; place-items: center; font-weight: 600; font-size: 0.95rem;
}
.step.active .step-num { border-color: var(--accent); color: var(--accent); }
.step.done .step-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step h2 { font-size: 1.15rem; font-weight: 600; margin: 3px 0 12px; }
.step p.hint { color: var(--muted); margin: 0 0 14px; font-size: 0.95rem; max-width: 70ch; }

.drop {
  display: block; border: 2px dashed var(--line); border-radius: 10px;
  background: var(--surface); padding: 36px 24px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); }
.drop strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.drop span { color: var(--muted); font-size: 0.92rem; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

.file-line { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.file-line b { font-weight: 600; }
.file-line .muted { color: var(--muted); }

label.check { display: inline-flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 0.95rem; }

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
select, input[type=password] {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; min-width: 240px;
}
button, .btn {
  font: inherit; font-weight: 600; border-radius: 6px; padding: 10px 18px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  text-decoration: none; display: inline-block;
}
button.secondary, .btn.secondary { background: transparent; color: var(--accent); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, .btn:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.samples { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.samples div { font-family: var(--mono); font-size: 0.85rem; padding: 2px 0; overflow-wrap: anywhere; }
.samples .to { color: var(--ink); }
.samples .none { color: var(--bad); }

.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0 10px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.progress-text { font-size: 0.95rem; color: var(--muted); }
.progress-text b { color: var(--ink); }

.tally { display: flex; flex-wrap: wrap; gap: 28px; margin: 18px 0 8px; }
.tally div { font-size: 0.9rem; color: var(--muted); }
.tally b { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--ink); font-weight: 600; }
.tally .bad b { color: var(--bad); }
.tally .warn b { color: var(--warn); }

.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin: 18px 0 10px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); background: var(--paper); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.domain { font-weight: 600; white-space: nowrap; }
td.rec { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); max-width: 300px; overflow-wrap: anywhere; }
td.notes { color: var(--muted); max-width: 280px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.sub { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
tr.fresh td { animation: land .6s ease-out; }
@keyframes land { from { background: color-mix(in srgb, var(--accent) 14%, transparent); } to { background: transparent; } }

.notice { border-left: 4px solid var(--bad); background: var(--bad-bg); color: var(--ink); padding: 12px 16px; border-radius: 4px; margin: 0 0 20px; }
.notice.warn { border-color: var(--warn); background: var(--warn-bg); }
.notice p { margin: 4px 0; }

.login { max-width: 360px; }
.login form { display: grid; gap: 12px; }

@media (max-width: 640px) {
  .wrap { padding: 28px 16px 60px; }
  header.intro h1 { font-size: 1.9rem; }
  .step { grid-template-columns: 1fr; gap: 8px; }
  select { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
