:root {
  --bg: #0a0d14;
  --bg-glow-1: #12233d;
  --bg-glow-2: #1b1030;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .10);
  --line-soft: rgba(255, 255, 255, .06);
  --txt: #e8ecf4;
  --txt-dim: #9aa4b8;
  --txt-faint: #6b7689;
  --accent: #4d9dff;
  --ok: #35d07f;
  --warn: #ffb020;
  --bad: #ff5d5d;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  padding: 40px 20px 56px;
  font: 15px/1.55 var(--sans);
  color: var(--txt);
  background:
    radial-gradient(900px 520px at 12% -8%, var(--bg-glow-1) 0%, transparent 62%),
    radial-gradient(760px 480px at 92% 8%, var(--bg-glow-2) 0%, transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #04101f;
  padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { left: 16px; top: 16px; z-index: 20; }

.shell { max-width: 880px; margin: 0 auto; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px; }
.brand__mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  color: var(--accent);
  background: linear-gradient(160deg, rgba(77,157,255,.20), rgba(77,157,255,.05));
  border: 1px solid rgba(77,157,255,.28);
}
.brand__text { font-size: 20px; letter-spacing: -.2px; font-weight: 500; }
.brand__text strong { font-weight: 750; font-size: 30px; }
.brand__tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--txt-dim); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 999px; margin-top: 2px;
}

/* ---------- card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  backdrop-filter: blur(6px);
}
.card__status { display: flex; gap: 18px; align-items: flex-start; }
.card__copy { min-width: 0; }
h1 { margin: 2px 0 8px; font-size: 22px; line-height: 1.25; letter-spacing: -.3px; font-weight: 650; }
#subline { margin: 0; color: var(--txt-dim); max-width: 60ch; }

.spinner {
  flex: 0 0 auto; width: 34px; height: 34px; margin-top: 4px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: var(--accent);
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

html[data-state="done"] .spinner {
  border-color: rgba(53,208,127,.25); border-top-color: var(--ok);
  animation: none; position: relative;
}
html[data-state="done"] .spinner::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/16px 16px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2335d07f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E");
}
html[data-state="flagged"] .spinner {
  border-color: rgba(255,176,32,.25); border-top-color: var(--warn);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.live { margin: 18px 0 10px; font-size: 13.5px; color: var(--txt-dim); min-height: 20px; }

/* ---------- progress ---------- */
.bar {
  height: 6px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,.08);
}
.bar__fill {
  height: 100%; width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #3f7fe0, var(--accent));
  transition: width .45s cubic-bezier(.4,0,.2,1);
}
html[data-state="done"] .bar__fill { background: linear-gradient(90deg, #23a765, var(--ok)); }
html[data-state="flagged"] .bar__fill { background: linear-gradient(90deg, #d98c11, var(--warn)); }

/* ---------- check list ---------- */
.checks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 1px; }
.checks li {
  display: grid; grid-template-columns: 16px 1fr auto;
  align-items: center; gap: 10px;
  padding: 9px 2px; font-size: 14px;
  border-top: 1px solid var(--line-soft);
}
.checks li:first-child { border-top: 0; }
.checks__val { font: 12px/1 var(--mono); color: var(--txt-faint); letter-spacing: .02em; }

.dot {
  width: 9px; height: 9px; margin-left: 3px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
  transition: background .25s, box-shadow .25s;
}
li[data-status="run"]  .dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(77,157,255,.16); }
li[data-status="run"]  .checks__val { color: var(--accent); }
li[data-status="pass"] .dot { background: var(--ok); }
li[data-status="pass"] .checks__val { color: var(--ok); }
li[data-status="warn"] .dot { background: var(--warn); }
li[data-status="warn"] .checks__val { color: var(--warn); }
li[data-status="fail"] .dot { background: var(--bad); }
li[data-status="fail"] .checks__val { color: var(--bad); }

/* ---------- suspicious notice ---------- */
.notice {
  display: flex; gap: 14px; margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255,176,32,.30);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,176,32,.09), rgba(255,176,32,.03));
  animation: rise .35s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.notice[hidden] { display: none; }
.notice__icon { color: var(--warn); margin-top: 2px; flex: 0 0 auto; }
.notice__title { margin: 0 0 6px; font-size: 15.5px; font-weight: 650; color: #ffd48a; }
.notice__body { margin: 0; color: var(--txt-dim); font-size: 14px; max-width: 66ch; }

.reasons { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.reasons li {
  font-size: 13px; color: var(--txt-dim);
  padding-left: 18px; position: relative;
}
.reasons li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--warn);
}
.reasons code { font: 12px var(--mono); color: #ffd48a; }

.notice__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.btn {
  font: inherit; font-size: 14px; font-weight: 550;
  color: var(--txt); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 16px; cursor: pointer;
  transition: background .18s, border-color .18s, transform .08s;
}
.btn:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.20); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(180deg, #59a6ff, #2f7fe0);
  border-color: #2f7fe0; color: #04101f; font-weight: 650;
}
.btn--primary:hover { background: linear-gradient(180deg, #6cb1ff, #3a89e8); }

/* ---------- detail table ---------- */
.detail {
  margin-top: 22px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.025);
}
.detail__title { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.detail__hint { margin: 0 0 16px; font-size: 13px; color: var(--txt-faint); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 26px; margin: 0; }
.grid__row {
  display: grid; grid-template-columns: 130px 1fr; gap: 12px;
  align-items: baseline; padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}
.grid__row--wide { grid-column: 1 / -1; }
.grid dt { font-size: 12.5px; color: var(--txt-faint); }
.grid dd { margin: 0; font-size: 13.5px; min-width: 0; }
.mono { font: 12.5px/1.5 var(--mono); color: #cdd8ea; }
.wrap { overflow-wrap: anywhere; }

.score { font-weight: 650; }
.score--low { color: var(--ok); }
.score--mid { color: var(--warn); }
.score--high { color: var(--bad); }

.copy {
  margin-left: 8px; font: 11px var(--sans); font-weight: 600;
  color: var(--txt-dim); background: transparent;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 7px; cursor: pointer; vertical-align: 1px;
}
.copy:hover { color: var(--txt); border-color: rgba(255,255,255,.24); }
.copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.copy--block { margin: 10px 0 0; display: inline-block; padding: 5px 10px; font-size: 12px; }

.raw { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.raw summary { cursor: pointer; font-size: 13px; color: var(--txt-dim); }
.raw summary:hover { color: var(--txt); }
.raw__pre {
  margin: 12px 0 0; padding: 14px; max-height: 300px; overflow: auto;
  background: rgba(0,0,0,.35); border: 1px solid var(--line-soft);
  border-radius: 10px; font-size: 12px;
}

/* ---------- footer ---------- */
.foot { margin-top: 22px; text-align: center; color: var(--txt-faint); font-size: 12.5px; }
.foot p { margin: 0 0 6px; }
.foot__small { font-size: 12px; opacity: .8; }

.noscript {
  max-width: 880px; margin: 18px auto 0; padding: 16px 18px;
  border: 1px solid rgba(255,93,93,.35); border-left: 3px solid var(--bad);
  border-radius: var(--radius); background: rgba(255,93,93,.08); font-size: 14px;
}

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  body { padding: 24px 14px 40px; }
  .card, .detail { padding: 18px 16px; }
  .grid { grid-template-columns: 1fr; }
  .grid__row { grid-template-columns: 1fr; gap: 2px; }
  h1 { font-size: 19px; }
  .notice { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fb; --bg-glow-1: #dce8fb; --bg-glow-2: #e7e0fa;
    --surface: rgba(255,255,255,.78); --surface-2: rgba(0,0,0,.04);
    --line: rgba(15,28,50,.14); --line-soft: rgba(15,28,50,.08);
    --txt: #131b2b; --txt-dim: #4d5a72; --txt-faint: #6f7c93;
    --accent: #1f6fdc;
  }
  .mono { color: #24334d; }
  .notice__title { color: #8a5600; }
  .reasons code { color: #8a5600; }
  .raw__pre { background: rgba(15,28,50,.05); }
  .btn--primary { color: #fff; }
}
