/* ============================================================
   AdSense Preflight — shared design system
   ============================================================ */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f1efe8;
  --border: rgba(0,0,0,0.12);
  --border-strong: rgba(0,0,0,0.22);
  --text: #1a1a1a;
  --text-2: #5f5e5a;
  --text-3: #888780;
  --accent: #c96442;
  --accent-hover: #a44f33;
  --good: #1D9E75;
  --good-bg: #EAF3DE;
  --good-text: #173404;
  --warn: #BA7517;
  --warn-bg: #FAEEDA;
  --warn-text: #412402;
  --bad: #A32D2D;
  --bad-bg: #FCEBEB;
  --bad-text: #501313;
  --info: #185FA5;
  --info-bg: #E6F1FB;
  --info-text: #042C53;
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1917;
    --surface: #262522;
    --surface-2: #2f2e2b;
    --border: rgba(255,255,255,0.1);
    --border-strong: rgba(255,255,255,0.2);
    --text: #e8e6e0;
    --text-2: #a8a6a0;
    --text-3: #7a7872;
    --good-bg: rgba(29,158,117,0.15);
    --good-text: #7be5b8;
    --warn-bg: rgba(186,117,23,0.15);
    --warn-text: #f5c26b;
    --bad-bg: rgba(163,45,45,0.18);
    --bad-text: #f08a8a;
    --info-bg: rgba(24,95,165,0.18);
    --info-text: #7cb5e8;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}
.container { max-width: 820px; margin: 0 auto; padding: 32px 20px 80px; }

/* Site nav */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; z-index: 10;
}
.site-nav-brand {
  font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.site-nav-brand-dot {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
}
.site-nav-links { display: flex; gap: 4px; }
.site-nav-link {
  padding: 6px 12px; font-size: 13px; color: var(--text-2);
  text-decoration: none; border-radius: var(--radius); transition: background 0.15s, color 0.15s;
}
.site-nav-link:hover { background: var(--surface-2); color: var(--text); }
.site-nav-link.active { color: var(--text); font-weight: 600; }

header { padding: 20px 0 32px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
h1 { font-size: 26px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.02em; }
.tagline { font-size: 14px; color: var(--text-2); margin: 0; }
h2 { font-size: 18px; font-weight: 600; margin: 28px 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--text-2); font-size: 13px; }
.small { font-size: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.card-muted { background: var(--surface-2); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input[type="text"], input[type="password"], textarea {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; resize: vertical; min-height: 180px; }
label { font-size: 13px; color: var(--text-2); display: block; margin-bottom: 6px; }
button {
  padding: 9px 16px; font-size: 14px; font-family: inherit; cursor: pointer;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
button:hover:not(:disabled) { background: var(--surface-2); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary { background: var(--accent); color: white; border-color: var(--accent); }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button.large { padding: 12px 24px; font-size: 15px; }

/* score components */
.score-hero { background: var(--surface-2); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.score-hero-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.score-label { font-size: 13px; color: var(--text-2); }
.score-verdict { font-size: 13px; font-weight: 600; }
.score-value { font-size: 36px; font-weight: 600; line-height: 1; }
.score-total { font-size: 16px; color: var(--text-2); margin-left: 8px; }
.score-bar { height: 6px; background: var(--surface); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.score-bar-fill { height: 100%; width: 0%; transition: width 0.5s, background 0.5s; }
.score-desc { font-size: 13px; color: var(--text-2); margin: 12px 0 0; }
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center; }
.metric-label { font-size: 10px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 6px; font-weight: 600; }
.metric-value { font-size: 22px; font-weight: 600; margin: 0; line-height: 1.1; }
.metric-sub { font-size: 11px; color: var(--text-2); margin: 4px 0 0; }
.good { color: var(--good) !important; }
.warn-c { color: var(--warn) !important; }
.bad { color: var(--bad) !important; }
.row-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); align-items: flex-start; }
.row-item:first-child { border-top: none; }
.row-icon { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; margin-top: 2px; }
.ri-pass { background: var(--good-bg); color: var(--good-text); }
.ri-fail { background: var(--bad-bg); color: var(--bad-text); }
.ri-warn { background: var(--warn-bg); color: var(--warn-text); }
.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 13px; margin: 0; line-height: 1.5; }
.row-desc { font-size: 12px; color: var(--text-2); margin: 2px 0 0; line-height: 1.5; }
.tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; flex-shrink: 0; }
.tag-high { background: var(--bad-bg); color: var(--bad-text); }
.tag-med { background: var(--warn-bg); color: var(--warn-text); }
.tag-low { background: var(--surface-2); color: var(--text-2); }
.callout { padding: 12px 14px; margin-bottom: 8px; border-radius: var(--radius); font-size: 13px; line-height: 1.55; }
.c-good { background: var(--good-bg); color: var(--good-text); }
.c-warn { background: var(--warn-bg); color: var(--warn-text); }
.c-bad { background: var(--bad-bg); color: var(--bad-text); }
.c-info { background: var(--info-bg); color: var(--info-text); }
.status-msg { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin: 10px 0; }
.hidden { display: none !important; }
.link-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; gap: 10px; }
.link-row:first-child { border-top: none; }
.link-row-label { min-width: 0; }
.link-row-value { text-align: right; flex-shrink: 0; min-width: 0; max-width: 60%; }
.link-btn { font-size: 12px; color: var(--info); cursor: pointer; text-decoration: underline; background: none; border: none; padding: 0; font-family: inherit; }
.anomaly { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12px; font-family: var(--font-mono); flex-wrap: wrap; }
.anomaly:first-child { border-top: none; }
.anomaly-issue { color: var(--bad); flex-shrink: 0; font-weight: 600; }
.anomaly-meta { color: var(--text-2); }
.offender { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.offender:first-child { border-top: none; }
.offender-ip { font-family: var(--font-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.b-legit { background: var(--good-bg); color: var(--good-text); }
.b-block { background: var(--bad-bg); color: var(--bad-text); }
.b-neutral { background: var(--surface-2); color: var(--text-2); }
footer { margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12px; text-align: center; }
footer a { color: var(--text-2); }
.paste-status { font-size: 12px; color: var(--text-2); align-self: center; margin-left: auto; }
.bot-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; gap: 10px; }
.bot-row:first-child { border-top: none; }
.bot-name-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bot-count { color: var(--text-2); font-size: 12px; flex-shrink: 0; }
.explainer { background: var(--info-bg); color: var(--info-text); padding: 14px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; line-height: 1.6; }
.explainer strong { font-weight: 600; }
ol, ul { padding-left: 24px; margin: 0 0 12px; }
li { margin-bottom: 6px; font-size: 14px; }
code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.section-divider { margin: 32px 0 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid transparent; border-top-color: currentColor; border-right-color: currentColor; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.subtab-row { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.subtab { font-size: 12px; padding: 5px 10px; }
.subtab.active { background: var(--info-bg); color: var(--info-text); border-color: var(--info); }

/* Homepage hero */
.hero {
  text-align: center; padding: 60px 20px 40px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 100%);
  border-radius: var(--radius-lg); margin-bottom: 40px;
}
.hero h1 { font-size: 38px; line-height: 1.15; max-width: 600px; margin: 0 auto 16px; }
.hero p { font-size: 17px; color: var(--text-2); max-width: 540px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 32px 0; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.feature-icon {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 14px;
}
.feature h3 { margin: 0 0 8px; font-size: 16px; }
.feature p { margin: 0; font-size: 14px; color: var(--text-2); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: white; font-weight: 600; font-size: 13px;
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; font-size: 13px; color: var(--text-2); }

/* Gate / login screen */
.gate-card {
  max-width: 440px; margin: 80px auto 40px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}
.gate-card h2 { margin-top: 0; }
.gate-quota {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-2);
}
.gate-quota-bar {
  height: 6px; background: var(--surface-2); border-radius: 3px;
  margin: 8px 0 4px; overflow: hidden;
}
.gate-quota-fill {
  height: 100%; background: var(--accent); transition: width 0.3s;
}

.step-label { color: var(--text); font-weight: 600; }
