/* ---------- Design tokens ---------- */
/* Light is the base :root palette; dark overrides both under
   prefers-color-scheme (guarded so an explicit data-theme="light" wins)
   and under data-theme="dark" (so the toggle wins in both directions).
   See web/js/theme-init.js for how data-theme gets set before paint. */
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-alt: #eef0f3;
  --border: #e1e4e9;
  --fg: #14181f;
  --fg-muted: #5c6370;
  --accent: #2f6feb;
  --accent-fg: #ffffff;
  --accent-geo: #7c5cff;
  --accent-perf: #0d9488;
  --success: #1a7f37;
  --success-bg: #dcf5e1;
  --warning: #9a6700;
  --warning-bg: #fdf1cd;
  --danger: #b3261e;
  --danger-bg: #fbe2e1;
  --shadow: 0 1px 2px rgba(20, 24, 31, 0.04), 0 2px 8px rgba(20, 24, 31, 0.06);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1013;
    --surface: #16191f;
    --surface-alt: #1d2129;
    --border: #2b303a;
    --fg: #e7e9ec;
    --fg-muted: #9aa1ac;
    --accent: #6ea2ff;
    --accent-fg: #0e1013;
    --accent-geo: #a78bfa;
    --accent-perf: #2dd4bf;
    --success: #3fb950;
    --success-bg: rgba(63, 185, 80, 0.14);
    --warning: #d29922;
    --warning-bg: rgba(210, 153, 34, 0.14);
    --danger: #f85149;
    --danger-bg: rgba(248, 81, 73, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1013;
  --surface: #16191f;
  --surface-alt: #1d2129;
  --border: #2b303a;
  --fg: #e7e9ec;
  --fg-muted: #9aa1ac;
  --accent: #6ea2ff;
  --accent-fg: #0e1013;
  --success: #3fb950;
  --success-bg: rgba(63, 185, 80, 0.14);
  --warning: #d29922;
  --warning-bg: rgba(210, 153, 34, 0.14);
  --danger: #f85149;
  --danger-bg: rgba(248, 81, 73, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Full width: wide screens get columns (see the layout rules at the end),
   not a narrow centered strip. */
.container {
  margin: 0;
  padding: 0 clamp(1rem, 3vw, 2.5rem) 4rem;
}

h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.01em; margin: 2rem 0 0.75rem; }
h2 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1rem; }
a { color: var(--accent); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- Header / footer ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
}

/* Deliberately quiet — muted color, small size, no border/background — so
   it reads as ambient context next to the logo rather than competing with
   it. Populated by initHeaderStats() in app.js; stays hidden until then
   and on narrow screens where there's no room for it next to the brand. */
.header-stats {
  font-size: 0.78rem;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .header-stats { display: none; }
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

nav a:hover { color: var(--accent); }

.theme-toggle {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  background: var(--surface-alt);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--accent); }

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding: 0.35rem 0.9rem 0.35rem 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--fg-muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: border-color 0.15s;
}

.footer-brand:hover { border-color: var(--accent); }

.footer-brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

.footer-brand strong {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- Buttons / inputs (shared) ---------- */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"] {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

button {
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
  transition: opacity 0.15s;
}

button:hover { opacity: 0.92; }
button:disabled { opacity: 0.55; cursor: default; }

/* ---------- Spinner ---------- */
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: -0.15em;
}

.spinner-lg {
  width: 2.25rem;
  height: 2.25rem;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Homepage ---------- */
.hero-accent {
  width: 64px;
  height: 4px;
  border-radius: 2px;
  margin: 2rem 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-geo), var(--accent-perf));
}

.hero-accent + h1 { margin-top: 0.9rem; }

.lede {
  font-size: 1.05rem;
  color: var(--fg-muted);
}

.scan-form {
  display: flex;
  gap: 0.6rem;
  margin: 1.75rem 0;
}

.scan-form input { flex: 1; }
.scan-error { color: var(--danger); font-size: 0.9rem; }
.form-success { color: var(--success); font-size: 0.9rem; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.feature {
  --feature-color: var(--accent);
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--feature-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature h3 { margin: 0 0 0.4rem; font-size: 0.95rem; color: var(--feature-color); }
.feature p { margin: 0; font-size: 0.88rem; color: var(--fg-muted); }

.feature--seo { --feature-color: var(--accent); }
.feature--geo { --feature-color: var(--accent-geo); }
.feature--perf { --feature-color: var(--accent-perf); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin: 2rem 0 2.5rem;
}

/* Same "labeled number in a bordered card" idiom as the report page's
   .sub-score (monospace figure, uppercase muted label, colored top edge) —
   reused rather than a one-off style so this page reads as part of the
   same site instead of a bolted-on admin screen. */
.stat-tile {
  --tile-color: var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 1.1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--tile-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-tile-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--fg);
}

.stat-tile-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Status-state tiles reuse the site's existing status palette (same
   tokens as score-tier-good/warn/bad) — a meaningful color here, not a
   decorative one, so it stays reserved for these three. */
.stat-tile--good { --tile-color: var(--success); }
.stat-tile--warn { --tile-color: var(--warning); }
.stat-tile--bad { --tile-color: var(--danger); }

.signup-cta {
  margin: 2.5rem 0;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-geo);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.signup-cta h2 { margin: 0 0 0.6rem; }

.signup-cta ul {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  color: var(--fg-muted);
}

.signup-cta li { margin-bottom: 0.3rem; }

.button {
  display: inline-block;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  background: var(--accent-geo);
  color: var(--accent-fg);
  text-decoration: none;
  transition: opacity 0.15s;
}

.button:hover { opacity: 0.9; }

/* ---------- Auth forms ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 24rem;
  margin: 1.75rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-form button { align-self: flex-start; }

/* ---------- Report page ---------- */
.overall-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 2.5rem 0 2rem;
}

.score-gauge {
  --gauge-color: var(--accent);
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: conic-gradient(var(--gauge-color) calc(var(--score) * 1%), var(--surface-alt) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-gauge::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.score-gauge-value {
  position: relative;
  z-index: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 2.5rem;
  font-weight: 700;
}

.score-gauge-value small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg-muted);
}

.score-tier-good { --gauge-color: var(--success); }
.score-tier-warn { --gauge-color: var(--warning); }
.score-tier-bad { --gauge-color: var(--danger); }

.score-label { font-size: 1.05rem; font-weight: 600; color: var(--fg-muted); margin: 0; }

.sub-scores {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.sub-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 92px;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gauge-color, var(--accent));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sub-score.score-tier-good { --gauge-color: var(--success); }
.sub-score.score-tier-warn { --gauge-color: var(--warning); }
.sub-score.score-tier-bad { --gauge-color: var(--danger); }

.sub-score-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.6rem;
  font-weight: 700;
}

.sub-score-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-category { margin: 2.25rem 0; }

.score-category h2 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.5rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.score-category-total {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
}

.check {
  --check-color: var(--fg-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--check-color);
  border-radius: 8px;
  padding: 0 0.9rem;
  margin-bottom: 0.5rem;
}

.check--pass { --check-color: var(--success); }
.check--warn { --check-color: var(--warning); }
.check--fail { --check-color: var(--danger); }

.check summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.check summary::-webkit-details-marker { display: none; }

.check summary::after {
  content: "›";
  margin-left: auto;
  color: var(--fg-muted);
  transform: rotate(90deg);
  transition: transform 0.15s;
}

.check[open] summary::after { transform: rotate(-90deg); }

.check-icon {
  color: var(--check-color);
  font-weight: 700;
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.check p {
  color: var(--fg-muted);
  font-size: 0.92rem;
  margin: 0 0 0.8rem 1.75rem;
}

.scan-meta, .scan-url { color: var(--fg-muted); }

.scan-meta code {
  background: var(--surface-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.cta {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.cta p { margin: 0; }
.cta a { font-weight: 600; }

.cta-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 0.7rem;
}

.cta-logo { border-radius: 8px; display: block; vertical-align:middle;}
.cta-brand-name { font-weight: 700; font-size: 1.05rem; color: var(--fg); }

.pending-state {
  text-align: center;
  padding: 3rem 0;
  color: var(--accent);
}

.pending-state p { color: var(--fg-muted); }
.pending-state .scan-url { margin-top: 1.1rem; }

/* ---------- Dashboard ---------- */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.dashboard-table th, .dashboard-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.dashboard-table th {
  background: var(--surface-alt);
  color: var(--fg-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-table tbody tr:hover { background: var(--surface-alt); }

.trend-up { color: var(--success); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 600; }

.dashboard-pagination {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.dashboard-pagination button {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.dashboard-pagination button:hover:not(:disabled) { border-color: var(--accent); opacity: 1; }
.dashboard-pagination span { color: var(--fg-muted); font-size: 0.9rem; }

/* ---------- Migration assessment ---------- */
.muted { color: var(--fg-muted); font-size: 0.92rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.privacy-callout {
  padding: 0.8rem 1rem;
  background: var(--success-bg);
  border-left: 3px solid var(--success);
  border-radius: 8px;
  font-size: 0.95rem;
}

.export-steps, .assess-form { margin: 2rem 0; }
.export-steps ol { padding-left: 1.3rem; margin: 0; }
.export-steps li { margin-bottom: 0.35rem; }

.inline-code,
.export-steps code,
.feature code {
  background: var(--surface-alt);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.inline-code { margin-left: 0.6rem; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 2.25rem 1rem;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone--over { border-color: var(--accent); }
.dropzone--over { background: var(--surface-alt); }
.dropzone--has-file { border-style: solid; border-color: var(--success); }
.dropzone-link { color: var(--accent); font-weight: 600; text-decoration: underline; }
.dropzone-file { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88rem; color: var(--fg-muted); }

.plugins-paste {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.plugins-paste summary { cursor: pointer; font-weight: 500; }
.plugins-paste p { margin: 0.75rem 0; }

.plugins-paste textarea {
  width: 100%;
  font: inherit;
  font-size: 0.88rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  resize: vertical;
}

.plugins-paste textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.assess-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.button-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
}

.button-secondary:hover { border-color: var(--accent); opacity: 1; }

.report { display: block; margin-top: 2.5rem; scroll-margin-top: 5rem; }
.report[hidden] { display: none; }
.report-head { padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.report-title { font-size: 1.5rem; margin: 0 0 0.25rem; }
.report-head .scan-meta { margin: 0 0 0.4rem; }
.privacy-note { color: var(--success); font-size: 0.88rem; font-weight: 500; margin: 0; }

.tier-card {
  --tier-color: var(--accent);
  margin: 1.75rem 0;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--tier-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tier-card--good { --tier-color: var(--success); }
.tier-card--warn { --tier-color: var(--warning); }
.tier-card--bad { --tier-color: var(--danger); }

.tier-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-label { font-size: 1.45rem; margin: 0.2rem 0 0.4rem; color: var(--tier-color); }
.tier-blurb { color: var(--fg-muted); }
.tier-reasons { margin: 0 0 1rem; padding-left: 1.2rem; }
.tier-price { margin: 0; padding-top: 0.85rem; border-top: 1px solid var(--border); }
.tier-price-label { color: var(--fg-muted); }

.report-section { margin: 2.25rem 0; }

.report-section > h2 {
  padding-bottom: 0.5rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.report-section .dashboard-table { margin: 0 0 1rem; }

.flag {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.94rem;
}

.check--info { --check-color: var(--accent); }

.plugin-group { margin-bottom: 1.25rem; }
.plugin-group p { margin: 0 0 0.4rem; }
.plugin-kind { font-size: 0.95rem; margin: 0 0 0.2rem; }
.plugin-kind--outOfScope { color: var(--danger); }
.plugin-kind--builder { color: var(--warning); }
.plugin-kind--obsolete { color: var(--success); }
.plugin-list { margin: 0; padding-left: 1.2rem; }
.plugin-list li { margin-bottom: 0.25rem; }

@media (max-width: 640px) {
  .report-section { overflow-x: auto; }
  .tier-card { padding: 1.25rem; }
}

.lead-form {
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-geo);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lead-form[hidden] { display: none; }
.lead-form h2 { margin: 0 0 0.5rem; }
.lead-form .scan-form { margin: 1rem 0; }
.lead-preview summary { cursor: pointer; color: var(--fg-muted); font-size: 0.88rem; }

.lead-preview pre {
  max-height: 16rem;
  overflow: auto;
  padding: 0.75rem;
  background: var(--surface-alt);
  border-radius: 8px;
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .lead-form .scan-form { flex-direction: column; }
}

/* ---------- Public site check ---------- */
.site-form { margin: 2rem 0 1rem; }
.site-form-label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.site-form .scan-form { margin: 0 0 0.6rem; }
.site-form .muted { margin: 0; }

.noticed-list { margin: 0; padding-left: 1.2rem; }
.noticed-list li { margin-bottom: 0.3rem; }

.export-pointer {
  padding: 0.8rem 1rem;
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}

.wordpress-path {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 5rem;
}
.path-title { font-size: 1.4rem; margin: 0 0 0.5rem; }
.export-steps h3, .assess-form h3 { font-size: 1.1rem; margin: 0 0 0.75rem; }

@media (max-width: 640px) {
  .site-form .scan-form { flex-direction: column; }
}

/* ---------- Full-width layout ----------
   Columns on wide screens; everything stacks below 900px. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding-bottom: 1rem;
}
.hero h1 { font-size: clamp(1.85rem, 3vw, 2.6rem); }
.hero .lede { font-size: 1.12rem; }
.hero .features { grid-template-columns: 1fr; margin: 2rem 0 0; }

.site-form {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.site-form .scan-form input { font-size: 1.05rem; }

/* Detail sections flow into as many columns as fit; empty columns
   collapse, so a short report still uses the full width. */
.report-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  column-gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}
.report-sections > .report-section { margin: 1.25rem 0; min-width: 0; }

.lead-form:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}
.lead-form .lead-intro p { margin: 0; }
.lead-form .scan-form { margin: 0 0 0.75rem; }

.wordpress-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.wordpress-path .assess-form {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.wordpress-path .dropzone { min-height: 9rem; }
.wp-intro .export-steps { margin-bottom: 0; }

@media (max-width: 900px) {
  .hero,
  .wordpress-path,
  .lead-form:not([hidden]) { grid-template-columns: 1fr; }
  .hero .features { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/* ---------- Plain-language sections ---------- */
.feature--edit { --feature-color: var(--warning); }
.hero .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tier-card--neutral { --tier-color: var(--accent-geo); }

.section-title { font-size: 1.4rem; margin: 0 0 1rem; }
.how-it-works, .pricing, .about, .ownership-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--fg-muted);
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
}
.steps strong { display: block; color: var(--fg); }

.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.price-card {
  --price-color: var(--accent);
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--price-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.price-card h3 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--price-color); }
.price-card .price { margin: 0; font-size: 1.5rem; font-weight: 700; }
.price-card .muted { margin: 0 0 0.6rem; }
.price-card p:last-child { margin: 0; font-size: 0.92rem; }
.price-card--good { --price-color: var(--success); }
.price-card--warn { --price-color: var(--warning); }
.price-card--neutral { --price-color: var(--accent-geo); }
.price-card--hosting { --price-color: var(--accent-perf); }

.ownership {
  padding: 0.8rem 1rem;
  background: var(--surface-alt);
  border-left: 3px solid var(--accent-perf);
  border-radius: 8px;
}

.about p { color: var(--fg-muted); }

.details-heading {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
  color: var(--fg-muted);
}

.estimate-notes { margin: 0.5rem 0 1.5rem; }
.estimate-notes summary { cursor: pointer; color: var(--fg-muted); font-size: 0.92rem; }
.estimate-notes ul { margin-top: 0.5rem; }

@media (max-width: 640px) {
  .hero .features { grid-template-columns: 1fr; }
}

/* ---------- Search sections: proof, platforms, FAQ ---------- */
.eyebrow {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow + h1 { margin-top: 0.35rem; }

.results, .platforms, .faq, .page-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.result-card {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--success);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.result-card h3 { margin: 0 0 0.3rem; }
.result-card p { margin: 0 0 0.4rem; }
.result-score { font-size: 1.35rem; font-weight: 700; }
.result-score span:last-child { color: var(--success); }
.result-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.result-shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.platform-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem 2rem;
  margin-bottom: 1rem;
}
.platform-groups h3 { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--fg-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 0.3rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
}

.faq details {
  margin-bottom: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.faq summary { cursor: pointer; padding: 0.85rem 1.1rem; font-weight: 600; }
.faq details > div { padding: 0 1.1rem 0.9rem; color: var(--fg-muted); }
.faq details > div p { margin: 0; }

.page-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.page-list li { margin-bottom: 0.45rem; }
.price-card .page-list { margin: 0 0 0.6rem; font-size: 0.92rem; }
/* Chips with their own page stand out from plain ones. */
.chips a { color: var(--accent); font-weight: 600; text-decoration: none; }
.chips a:hover { text-decoration: underline; }
.shot { position: relative; }
.shot a { display: block; }
.result-proof { font-size: 0.9rem; }
.shot-label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--fg-muted);
}
.shot-label--after { background: var(--success); }
