:root {
  --ink: #141a24;
  --ink-2: #3c4555;
  --muted: #6b7484;
  --line: #e4e7ec;
  --bg: #f7f8fa;
  --card: #ffffff;
  --brand: #1f5fd6;
  --brand-ink: #174aa8;
  --brand-soft: #eef4ff;
  --critical: #d22f2f;
  --critical-soft: #fdecec;
  --warning: #d97706;
  --warning-soft: #fef4e6;
  --ok: #16a34a;
  --ok-soft: #e8f7ee;
  --unknown: #7c8493;
  --unknown-soft: #f0f1f4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 16px rgba(16, 24, 40, 0.06);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -0.025em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
[hidden] { display: none !important; }

/* Header / footer */
.sandbox-banner { background: #b45309; color: #fff; text-align: center; font-weight: 600; font-size: 0.9rem; padding: 8px 16px; }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; }
.brand-mark svg { display: block; }
.site-header nav, .site-footer nav { display: flex; gap: 20px; }
.site-header nav a, .site-footer nav a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--brand); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; background: var(--card); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 12px; font-size: 0.9rem; color: var(--muted); flex-wrap: wrap; }
.footer-note { font-size: 0.8rem; color: var(--muted); padding-bottom: 24px; }

/* Hero */
.hero { padding: 56px 0 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 700; color: var(--brand); margin-bottom: 12px; }
.hero h1 { max-width: 820px; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 680px; }

/* Cards / forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.label { display: block; font-weight: 600; margin-bottom: 8px; }
textarea, input[type="email"], input:not([type]), select {
  width: 100%; font: inherit; color: inherit; border: 1px solid #cfd4dc; border-radius: 8px; padding: 10px 12px; background: #fff;
}
textarea { font-family: var(--mono); font-size: 0.92rem; resize: vertical; min-height: 150px; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.scanner-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.scanner-bar p { margin: 0; }
.form-error { margin: 12px 0 0; color: var(--critical); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 0.95rem; padding: 9px 16px; border-radius: 8px; border: 1px solid #cfd4dc; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--ink-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-lg { padding: 12px 26px; font-size: 1.02rem; }
.soon { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--unknown-soft); color: var(--muted); padding: 2px 6px; border-radius: 4px; }

/* Results */
.results { margin-top: 32px; scroll-margin-top: 16px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.results-head h2 { margin-bottom: 4px; }
.scan-state { margin: 0; color: var(--ink-2); min-height: 1.5em; }
.scan-state.warn { color: var(--warning); font-weight: 600; }
.is-scanning .scan-state::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--brand); border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 16px; }
.progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width 0.3s ease; }
.progress.done { visibility: hidden; }

.summary { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 0.92rem; background: var(--unknown-soft); }
.chip strong { font-size: 1rem; }
.chip-critical { background: var(--critical-soft); }
.chip-warning { background: var(--warning-soft); }
.chip-ok { background: var(--ok-soft); }
.chip-pending { background: var(--brand-soft); color: var(--brand-ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--unknown); }
.chip-critical .dot, .status-critical .dot { background: var(--critical); }
.chip-warning .dot, .status-warning .dot { background: var(--warning); }
.chip-ok .dot, .status-ok .dot { background: var(--ok); }

.email-form { margin-bottom: 16px; }
.email-row { display: flex; gap: 8px; margin-bottom: 10px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 0.93rem; margin-bottom: 8px; }
.form-msg { margin: 8px 0 0; font-weight: 600; color: var(--ok); }
.form-msg.error { color: var(--critical); }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.results-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; padding: 12px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.results-table th button { all: unset; cursor: pointer; }
.results-table th button:hover, .results-table th button.active { color: var(--ink); }
.results-table th[aria-sort="ascending"] button.active::after { content: " ↑"; }
.results-table th[aria-sort="descending"] button.active::after { content: " ↓"; }
.results-table th button:focus-visible { outline: 2px solid var(--brand); }
.unit { text-transform: none; font-weight: 500; }
.results-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.results-table .num { text-align: right; }
tr.row { cursor: pointer; }
tr.row:hover { background: #fafbfd; }
tr.row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
td.domain { font-weight: 600; overflow-wrap: anywhere; min-width: 170px; }
.caret { display: inline-block; width: 0; height: 0; border-left: 5px solid var(--muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent; margin-right: 8px; transition: transform 0.15s; vertical-align: 1px; }
tr.open .caret { transform: rotate(90deg); }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.status-critical { color: var(--critical); }
.status-warning { color: var(--warning); }
.status-ok { color: var(--ok); }
.status-unknown { color: var(--unknown); }
.reason { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 2px; max-width: 260px; }
.days { font-variant-numeric: tabular-nums; font-weight: 600; }
.d-critical { color: var(--critical); }
.d-warning { color: var(--warning); }
.hint { font-size: 0.82rem; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.hint-likely_automated { background: var(--ok-soft); color: #11743a; }
.hint-possibly_manual { background: #eef0f3; color: #4b5563; }
.hint-invalid { background: var(--critical-soft); color: #9b1c1c; }
.d-info { color: #1d4ed8; }
.info-badge { display: inline-block; font-size: 0.8rem; padding: 1px 7px; border-radius: 4px; background: #e8efff; color: #1d4ed8; white-space: nowrap; margin-top: 2px; }
.rule-tag { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0 5px; border-radius: 3px; background: var(--critical-soft); color: var(--critical); margin-right: 4px; }
.checking { color: var(--muted); font-size: 0.85rem; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.pending-cell { text-align: center; padding: 24px; }

tr.detail td { background: #fafbfc; padding: 16px 20px 20px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-grid h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 8px; }
.detail-grid h4:not(:first-child) { margin-top: 16px; }
.detail-grid dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 0.88rem; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; word-break: break-word; }
.problem, .problem-list { color: var(--critical); font-weight: 600; font-size: 0.9rem; }
.problem-list, .reasons { margin: 0 0 10px; padding-left: 18px; font-size: 0.88rem; }
.ok-text { color: var(--ok); font-weight: 600; }
.bad-text { color: var(--critical); font-weight: 600; }
.legend { margin-top: 10px; }

.tip { position: relative; cursor: help; }
.tip-icon { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: 0.65rem; margin-left: 2px; }
.tip::after {
  content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 10; width: 300px; padding: 10px 12px;
  background: var(--ink); color: #fff; border-radius: 8px; font-size: 0.8rem; font-weight: 400; text-transform: none; letter-spacing: 0;
  line-height: 1.45; white-space: normal; opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.tip:hover::after, .tip:focus::after { opacity: 1; }

/* CTA */
.cta { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; border-radius: var(--radius); background: linear-gradient(135deg, #10284f, #1f5fd6); color: #fff; }
.cta h2 { font-size: 1.45rem; }
.cta p { color: #d6e2fb; margin-bottom: 6px; max-width: 640px; }
.cta .cta-price { color: #fff; margin-top: 10px; }
.cta .cta-small { font-size: 0.88rem; }
.cta .btn-primary { background: #fff; color: var(--brand-ink); border-color: #fff; }
.cta .btn-primary:hover { background: #eaf1ff; border-color: #eaf1ff; color: var(--brand-ink); }

/* Early access */
.early-access { align-items: flex-start; }
.early-access .ea-text { flex: 1 1 0; }
.early-access-form { flex: 0 1 380px; width: 100%; display: grid; gap: 6px; }
.early-access-form .label { color: #fff; margin: 6px 0 0; }
.early-access-form .opt { font-weight: 400; color: #c7d6f5; }
.early-access-form input[type="email"], .early-access-form select { width: 100%; box-sizing: border-box; color: var(--ink); background: #fff; }
.early-access-form .check { color: #fff; margin: 8px 0 4px; }
.early-access-form .btn { justify-self: start; }
.early-access-form .form-msg { color: #fff; }
.early-access-form .form-msg.error { color: #ffd2d2; }
.early-access-form .ea-small { font-size: 0.82rem; color: #c7d6f5; margin: 4px 0 0; }
.early-access-form .ea-small a { color: #fff; }
.early-access-form [hidden] { display: none !important; }
.turnstile-slot:empty { display: none; }

/* Homepage copy */
.scanner-note { margin: 12px 2px 0; color: var(--ink-2); font-weight: 600; }
.proof { margin: 8px 0 0; padding: 16px 20px; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 8px; font-size: 1.08rem; font-weight: 600; color: var(--ink); max-width: 760px; }
.background-note { max-width: 760px; margin-top: 16px; }

/* Explainer */
.explainer, .checks { margin-top: 64px; }
.explainer-text { max-width: 720px; }
.explainer-text p { color: var(--ink-2); }
.timeline { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.timeline li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; position: relative; }
.timeline li.past { opacity: 0.6; }
.timeline li.now { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tl-date { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.tl-days { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: 6px; }
.timeline li:last-child .tl-days { color: var(--brand); }
.tl-label { color: var(--ink-2); font-size: 0.9rem; }
.tl-label em { display: block; font-style: normal; color: var(--brand); font-weight: 700; font-size: 0.8rem; margin-top: 4px; }
.explainer-grid, .checks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 8px 0 20px; }
.explainer-grid p, .checks-grid p { color: var(--ink-2); font-size: 0.95rem; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* Article / simple pages */
.article { padding-top: 48px; max-width: 760px; }
.article h2 { margin-top: 1.6em; }
.article p { color: var(--ink-2); font-size: 1.05rem; }
.success { padding-top: 56px; }
.success .card { margin: 24px 0; }
.success-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; margin-bottom: 16px; }
.steps { padding-left: 20px; margin: 0; }
.steps li { margin-bottom: 8px; }
.survey { display: grid; gap: 8px; }
.survey .label { margin-top: 8px; margin-bottom: 0; }
.survey .btn { justify-self: start; margin-top: 12px; }
.notice { font-weight: 600; color: var(--ok); }

/* Mobile */
@media (max-width: 860px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .explainer-grid, .checks-grid { grid-template-columns: 1fr; gap: 8px; }
  .cta { flex-direction: column; align-items: flex-start; }
  .early-access-form { flex-basis: auto; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-header nav a:first-child { display: none; }
  .hero { padding-top: 32px; }
  .scanner-bar .btn { width: 100%; }
  .email-row { flex-direction: column; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; }
  .table-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .results-table thead { display: none; }
  .results-table, .results-table tbody, .results-table tr, .results-table td { display: block; width: 100%; }
  tr.row { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 10px; padding: 8px 4px; }
  tr.row.open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .results-table td { border: 0; padding: 4px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .results-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.82rem; text-align: left; flex: none; }
  .results-table td.domain { font-size: 1rem; text-align: left; justify-content: flex-start; gap: 0; }
  .results-table td.domain::before { display: none; }
  .results-table td:empty { display: none; }
  .reason { text-align: right; }
  tr.detail { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
  tr.detail td { display: block; text-align: left; }
  tr.detail td::before { display: none; }
  .detail-grid dl { grid-template-columns: 1fr; gap: 0; }
  .detail-grid dd { margin-bottom: 6px; }
}
