:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --ink: #171a18;
  --muted: #69716c;
  --line: #dfe5e0;
  --accent: #146c43;
  --accent-soft: #e4f1e9;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --warn: #9a6700;
  --warn-soft: #fff7df;
  --shadow: 0 18px 60px rgba(16, 30, 22, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

.topbar {
  height: 72px;
  max-width: 1240px;
  margin: auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 760; letter-spacing: -.03em; }
.brand-mark { width: 34px; height: 34px; display:grid; place-items:center; border-radius: 10px; color:#fff; background:var(--accent); font-size:20px; }
.beta { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--accent); background: var(--accent-soft); padding: 7px 9px; border-radius: 999px; }

main { max-width: 1184px; margin: auto; padding: 0 28px 80px; }
.hero { padding: 80px 0 74px; text-align: center; max-width: 900px; margin: auto; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--accent); margin-bottom: 18px; }
h1 { margin: 0; font-size: clamp(48px, 7vw, 82px); line-height: .98; letter-spacing: -.065em; font-weight: 770; }
h1 span { color: #64706a; }
.lede { margin: 28px auto 0; max-width: 710px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.6; }
.scan-form { margin: 38px auto 0; max-width: 790px; }
.input-wrap { background: var(--surface); border: 1px solid #d7ddd8; padding: 8px; display:flex; align-items:center; border-radius: 18px; box-shadow: var(--shadow); }
.url-icon { margin-left: 12px; color: var(--muted); font-size: 22px; transform: rotate(-35deg); }
.input-wrap input { min-width: 0; flex:1; border:0; outline:0; padding: 15px 14px; font-size: 17px; background:transparent; color: var(--ink); }
.input-wrap button { border:0; background:var(--accent); color:#fff; font-weight: 750; padding: 15px 20px; border-radius: 12px; min-width: 170px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.input-wrap button:hover { filter: brightness(.94); }
.input-wrap button:disabled { opacity:.65; cursor:wait; }
.form-note { margin-top: 13px; color: #89918c; font-size: 13px; }

.status-panel, .error-panel { max-width: 820px; margin: -28px auto 46px; border-radius: 18px; }
.status-panel { background: var(--surface); border:1px solid var(--line); padding: 22px; display:flex; align-items:center; gap:16px; box-shadow: 0 12px 35px rgba(16,30,22,.06); }
.status-panel p { margin:5px 0 0; color:var(--muted); }
.spinner { width:28px; height:28px; border-radius:50%; border:3px solid var(--accent-soft); border-top-color:var(--accent); animation:spin .8s linear infinite; flex:0 0 auto; }
@keyframes spin { to { transform:rotate(360deg); } }
.error-panel { padding: 18px 20px; background: var(--danger-soft); border:1px solid #f3c5bf; color:var(--danger); font-weight:650; }

.report { padding: 18px 0 60px; }
.report-head { display:flex; justify-content:space-between; gap:25px; align-items:flex-end; margin-bottom:24px; }
.report-head h2 { margin:0; font-size:36px; letter-spacing:-.04em; overflow-wrap:anywhere; }
.muted { color:var(--muted); }
.report-meta { margin:7px 0 0; }
.report-actions { display:flex; gap:9px; }
.button { border:0; border-radius:11px; padding:12px 16px; font-weight:720; }
.button.primary { background:var(--ink); color:#fff; }
.button.secondary { background:#fff; color:var(--ink); border:1px solid var(--line); }

.score-grid { display:grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap:12px; }
.score-card { min-height:138px; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:20px; display:flex; flex-direction:column; justify-content:space-between; }
.score-card span { color:var(--muted); font-size:14px; font-weight:650; }
.score-card strong { font-size:38px; letter-spacing:-.05em; }
.score-card small { color:#929993; }
.score-main strong { font-size:48px; }
.meter { height:7px; background:#edf0ed; border-radius:999px; overflow:hidden; }
.meter i { display:block; height:100%; width:0; background:var(--accent); border-radius:inherit; transition:width .4s ease; }

.toolbar { margin-top:24px; padding: 14px 0; display:flex; gap:15px; justify-content:space-between; align-items:center; }
.filters { display:flex; gap:7px; flex-wrap:wrap; }
.filter { border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:9px 12px; color:#4c554f; font-size:13px; font-weight:700; }
.filter span { margin-left:5px; color:#8a928d; }
.filter.active { background:var(--ink); border-color:var(--ink); color:#fff; }
.filter.active span { color:#bfc5c1; }
.search-results { width:min(300px, 40vw); display:flex; align-items:center; gap:5px; padding:9px 11px; background:#fff; border:1px solid var(--line); border-radius:10px; }
.search-results input { width:100%; border:0; outline:0; }

.table-card { background:var(--surface); border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.table-wrap { overflow:auto; }
table { width:100%; min-width:920px; border-collapse:collapse; font-size:13px; }
th { padding:13px 14px; text-align:left; background:#fafbfa; color:#707873; border-bottom:1px solid var(--line); font-size:11px; letter-spacing:.045em; text-transform:uppercase; }
td { padding:14px; border-bottom:1px solid #edf0ee; vertical-align:top; }
tr:last-child td { border-bottom:0; }
.status { display:inline-flex; align-items:center; gap:7px; font-weight:760; text-transform:capitalize; }
.dot { width:8px; height:8px; border-radius:50%; background:#9ba19d; }
.status.broken { color:var(--danger); } .status.broken .dot { background:var(--danger); }
.status.redirect { color:var(--warn); } .status.redirect .dot { background:#d49400; }
.status.healthy { color:var(--accent); } .status.healthy .dot { background:var(--accent); }
.url-main { display:block; max-width:390px; font-weight:650; color:#262a27; text-decoration:none; overflow-wrap:anywhere; }
.url-main:hover { text-decoration:underline; }
.url-sub { margin-top:4px; max-width:390px; color:#8a928c; overflow-wrap:anywhere; }
.pill { display:inline-block; border-radius:999px; padding:4px 7px; background:#f1f3f1; color:#5d655f; font-size:11px; font-weight:700; text-transform:capitalize; }
.empty { padding:40px; text-align:center; color:var(--muted); }
.page-errors { margin-top:15px; padding:18px; background:var(--warn-soft); border:1px solid #f0dfaa; border-radius:14px; color:#71500b; }
.page-errors strong { display:block; margin-bottom:8px; }
.page-error-item { font-size:13px; padding:5px 0; overflow-wrap:anywhere; }

.features { margin-top:70px; display:grid; grid-template-columns:repeat(3,1fr); border-top:1px solid var(--line); padding-top:38px; gap:44px; }
.feature b { color:var(--accent); font-size:12px; letter-spacing:.08em; }
.feature h3 { margin:12px 0 8px; letter-spacing:-.025em; }
.feature p { margin:0; color:var(--muted); line-height:1.6; }
footer { max-width:1184px; margin:auto; padding:25px 28px 40px; border-top:1px solid var(--line); display:flex; justify-content:space-between; color:#7a827d; font-size:13px; }
footer span:first-child { font-weight:800; color:var(--ink); }

@media (max-width: 840px) {
  .hero { padding-top:55px; }
  .score-grid { grid-template-columns:1fr 1fr; }
  .score-main { grid-column:1 / -1; }
  .features { grid-template-columns:1fr; gap:28px; }
  .report-head { align-items:flex-start; flex-direction:column; }
  .toolbar { align-items:stretch; flex-direction:column; }
  .search-results { width:100%; }
}

@media (max-width: 620px) {
  main { padding-left:16px; padding-right:16px; }
  .topbar { padding:0 16px; height:62px; }
  .hero { padding:42px 0 54px; }
  h1 { font-size:46px; }
  .lede { font-size:16px; }
  .input-wrap { display:block; padding:9px; }
  .url-icon { display:none; }
  .input-wrap input { width:100%; display:block; padding:13px 10px; }
  .input-wrap button { width:100%; }
  .score-grid { grid-template-columns:1fr; }
  .score-main { grid-column:auto; }
  .report-actions { width:100%; }
  .report-actions .button { flex:1; }
  footer { margin:0 16px; padding-left:0; padding-right:0; }
}

/* v2 report states */
.status.server { color:#b54708; } .status.server .dot { background:#e07919; }
.status.blocked { color:#59636f; } .status.blocked .dot { background:#7d8895; }
.scan-warning { margin-top:16px; padding:16px 18px; border:1px solid #efd08a; background:#fff8e5; border-radius:14px; color:#72510b; }
.scan-warning strong { display:block; margin-bottom:4px; }
.source-details summary { cursor:pointer; font-weight:700; color:#39423c; }
.source-details[open] summary { margin-bottom:8px; }
.source-list { display:flex; flex-direction:column; gap:7px; max-width:420px; }
.source-list a { color:#4e5d54; text-decoration:none; overflow-wrap:anywhere; }
.source-list a:hover { text-decoration:underline; }
