/* SEOCheckHQ — shared styles (public site, web app, admin) */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --text: #141824;
  --muted: #5d6476;
  --border: #e3e6ef;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --on-primary: #ffffff;
  --success: #15803d;
  --success-soft: #e7f6ec;
  --warning: #b45309;
  --warning-soft: #fdf3e2;
  --danger: #c2261d;
  --danger-soft: #fdecea;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 14px;
  --radius-sm: 9px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1118;
    --surface: #161a24;
    --surface-2: #1d2230;
    --text: #e8eaf1;
    --muted: #9aa1b4;
    --border: #2a3040;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-soft: #23264a;
    --on-primary: #0e1118;
    --success: #4ade80;
    --success-soft: #133222;
    --warning: #fbbf24;
    --warning-soft: #3a2c10;
    --danger: #f87171;
    --danger-soft: #3d1a1a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 42px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none !important; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { filter: brightness(.97); }
.btn-success { background: var(--success-soft); color: var(--success); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .875rem; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; color: var(--text); padding: 8px; border-radius: 8px; cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--surface-2); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none !important; }
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; font-size: .8rem; font-weight: 700;
}
.brand-center { justify-content: center; width: 100%; margin-bottom: 18px; }

/* Public site */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.nav .brand span:last-child { font-size: .95rem; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 500; }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
  .nav .brand span:last-child { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.hero { padding: 56px 0 40px; background: radial-gradient(1200px 400px at 50% -100px, var(--primary-soft), transparent); }
.hero-inner { text-align: center; max-width: 820px; }
.hero h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); margin: 16px 0; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 680px; margin: 0 auto 26px; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: .85rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 8px 22px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.hero-points li::before { content: "✓ "; color: var(--success); font-weight: 700; }
.section { padding: 48px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-title { font-size: 1.6rem; text-align: center; }
.section-lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature p { color: var(--muted); }
.steps { max-width: 720px; margin: 0 auto; padding-left: 1.4em; display: grid; gap: 14px; }
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px 22px; box-shadow: var(--shadow); }
.auth-card h1 { text-align: center; font-size: 1.45rem; }
.auth-links { display: grid; gap: 8px; margin-top: 18px; text-align: center; font-size: .92rem; }

/* Forms */
.form { display: grid; gap: 14px; }
.form-narrow { max-width: 420px; }
.field { display: grid; gap: 6px; font-weight: 500; font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-weight: 400;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .82rem; font-weight: 500; }
.hint { color: var(--muted); font-weight: 400; font-size: .8rem; }
.form-msg { padding: 10px 12px; border-radius: var(--radius-sm); font-size: .9rem; margin: 0; }
.form-msg.error { background: var(--danger-soft); color: var(--danger); }
.form-msg.ok { background: var(--success-soft); color: var(--success); }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

/* Cards, stats, badges, lists */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 500; }
.stat-value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.stat-note { font-size: .8rem; color: var(--muted); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 16px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-active, .badge-open, .badge-ok, .badge-done { background: var(--success-soft); color: var(--success); }
.badge-pending_approval, .badge-warn, .badge-partial { background: var(--warning-soft); color: var(--warning); }
.badge-suspended, .badge-revoked, .badge-fail { background: var(--danger-soft); color: var(--danger); }
.badge-muted, .badge-used, .badge-expired, .badge-todo { background: var(--surface-2); color: var(--muted); }
.list { display: grid; gap: 0; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1 1 200px; min-width: 0; }
.list-item .title { font-weight: 600; overflow-wrap: anywhere; }
.soon-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--danger); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.copy-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .85rem; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.tab { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .select { min-height: 42px; padding: 8px 12px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); max-width: 100%; }
.toolbar input { flex: 1 1 220px; min-height: 42px; padding: 8px 12px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 8px; font-size: .82rem; }
  .kv dt:first-child { margin-top: 0; }
}
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.progress-bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #06b6d4); border-radius: 999px; }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--text); font-size: .9rem; margin-bottom: 16px; }
.notice-warn { background: var(--warning-soft); }

/* Web app */
.app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.app-topbar .brand span:last-child { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; gap: 8px; }
.app-main { padding-top: 22px; padding-bottom: 40px; }
.app-main .grid-3 { margin-bottom: 16px; }
.page-title { font-size: 1.5rem; }

/* Admin */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 250px; flex: none; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { padding: 10px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; text-decoration: none; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { display: none; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar-title { font-weight: 600; }
.admin-content { padding: 24px; max-width: 1100px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 19; }
@media (max-width: 900px) {
  .admin-topbar { display: flex; }
  .sidebar { position: fixed; z-index: 20; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .admin-content { padding: 16px; }
}

/* Responsive table: rows become cards on phones */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 8px; border-bottom: 1px solid var(--border); }
table.data td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; overflow-wrap: anywhere; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--surface-2); }
@media (max-width: 640px) {
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 12px; background: var(--surface); }
  table.data td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.data td::before { content: attr(data-label); color: var(--muted); font-weight: 500; text-align: left; flex: none; }
}

/* Customer app tabs and website screens */
.app-tabs { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 59px; z-index: 4; }
.tabs-row { display: flex; gap: 4px; overflow-x: auto; }
.tabs-row a { padding: 12px 14px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs-row a.active { color: var(--primary); border-bottom-color: var(--primary); }
.list-link { color: inherit; text-decoration: none !important; }
.list-link:hover { background: var(--surface-2); }
.choice-group { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.field-legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.choice > span { display: grid; gap: 2px; }
.steps-small { margin: 0 0 12px; padding-left: 1.3em; display: grid; gap: 4px; color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; overflow-wrap: anywhere; }

/* Checkup Center and audit report */
.check-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check-card { display: grid; gap: 4px; text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.check-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.check-card:disabled { opacity: .6; cursor: progress; }
.score-chip { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 8px; font-weight: 700; font-size: .85rem; margin-right: 6px; }
.score-chip.good, .score-ring.good { background: var(--success-soft); color: var(--success); }
.score-chip.mid, .score-ring.mid { background: var(--warning-soft); color: var(--warning); }
.score-chip.bad, .score-ring.bad { background: var(--danger-soft); color: var(--danger); }
.progress-bar > span.indeterminate { width: 35%; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .progress-bar > span.indeterminate { animation: none; width: 100%; opacity: .5; } }
.score-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.score-ring { width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none; }
.score-ring span { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.score-ring small { font-size: .8rem; opacity: .8; }
.score-side { flex: 1 1 220px; min-width: 0; }
.finding { border-bottom: 1px solid var(--border); }
.finding:last-child { border-bottom: 0; }
.finding > summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 0; cursor: pointer; list-style: none; }
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.finding[open] > summary::before { transform: rotate(90deg); }
.finding-title { font-weight: 600; flex: 1 1 200px; min-width: 0; }
.finding-body { padding: 0 0 14px 18px; }
.evidence { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: .85rem; }
.evidence li { display: grid; gap: 2px; }
.url-cell { overflow-wrap: anywhere; word-break: break-word; }
.amount-row { display: flex; flex-wrap: wrap; gap: 8px; }
.amount-chip { position: relative; }
.amount-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.amount-chip span { display: inline-block; min-width: 64px; text-align: center; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; }
.amount-chip input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.amount-chip input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.current-val { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .9rem; overflow-wrap: anywhere; }
.edit-field textarea { width: 100%; }
.sugg { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.sugg-text { width: 100%; min-height: 60px; padding: 10px 12px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--primary); border-radius: var(--radius-sm); }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; }
.mb-12 { margin-bottom: 12px; }
.receipt-preview { max-width: 100%; max-height: 420px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.ai-text { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; font-size: .92rem; line-height: 1.6; overflow-wrap: anywhere; }
.choice:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.checklist { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.checklist li > span { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.checklist li.ok > span { background: var(--success-soft); color: var(--success); }
.checklist li.bad > span { background: var(--danger-soft); color: var(--danger); }
.ev-value { color: var(--muted); overflow-wrap: anywhere; }

/* ===== Public website ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.beta-bar { background: linear-gradient(90deg, #4f46e5, #0891b2); color: #fff; text-align: center; font-size: .85rem; padding: 7px 16px; }
.beta-bar a { color: #fff; text-decoration: underline; }
.brand-name { white-space: nowrap; }
.nav-links a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.nav-actions { display: inline-flex; gap: 8px; margin-left: 6px; }
.nav-toggle { display: none; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { display: block !important; padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .nav-actions { margin: 12px 0 0; }
  .nav-actions .btn { flex: 1; }
  .site-header { position: sticky; }
  .site-header .container { position: relative; }
}
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); padding-top: 16px; }
.breadcrumbs a { color: var(--muted); }

.hero2 { padding: 56px 0 48px; background: radial-gradient(900px 420px at 15% -10%, var(--primary-soft), transparent), radial-gradient(700px 380px at 100% 0%, color-mix(in srgb, #06b6d4 14%, transparent), transparent); }
.hero2-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero2 h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.1; letter-spacing: -.03em; margin: 16px 0; font-weight: 800; }
.grad { background: linear-gradient(90deg, #6366f1, #06b6d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead2 { font-size: 1.08rem; color: var(--muted); max-width: 560px; margin-bottom: 26px; }
.hero2 .hero-cta { justify-content: flex-start; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; color: var(--muted); font-size: .95rem; }
.ticks li::before { content: "✓"; color: var(--success); font-weight: 800; margin-right: 8px; }
@media (max-width: 900px) { .hero2-grid { grid-template-columns: 1fr; gap: 32px; } .hero2 { padding-top: 36px; } }

.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(30, 27, 75, .35), var(--shadow); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mock-bar em { margin-left: 8px; font-style: normal; font-size: .8rem; color: var(--muted); font-weight: 600; }
.mock-body { padding: 18px; display: grid; gap: 14px; }
.mock-score { display: flex; gap: 14px; align-items: center; }
.mock-score .ring { width: 74px; height: 74px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--success-soft); color: var(--success); flex: none; }
.mock-score .ring b { font-size: 1.6rem; line-height: 1; }
.mock-score .ring small { font-size: .7rem; }
.mock-score p { margin: 2px 0 6px; font-size: .82rem; color: var(--muted); }
.mock-pills, .mock-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mock i { font-style: normal; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.b-fail { background: var(--danger-soft); color: var(--danger); } .b-warn { background: var(--warning-soft); color: var(--warning); } .b-ok { background: var(--success-soft); color: var(--success); }
.mock-list { list-style: none; padding: 0; margin: 0; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 12px; }
.mock-list li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .86rem; font-weight: 600; }
.mock-list li:last-child { border-bottom: 0; }
.mock-list li span { grid-column: 2; font-weight: 400; color: var(--muted); font-size: .78rem; }
.mock-sugg { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--primary); background: var(--primary-soft); }
.mock-sugg small { color: var(--primary); font-weight: 700; }
.mock-sugg p { margin: 2px 0 0; font-size: .86rem; }
.mock-btn { background: var(--primary); color: var(--on-primary); font-size: .8rem; font-weight: 700; padding: 7px 14px; border-radius: 8px; }
.mock-safe { font-size: .8rem; color: var(--success); font-weight: 600; }

.works-with { border-block: 1px solid var(--border); background: var(--surface); }
.works-with .container { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: center; padding-top: 18px; padding-bottom: 18px; }
.works-with span { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.works-with ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; font-weight: 700; color: var(--text); opacity: .8; }

.feature2 { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 6px; align-content: start; }
.feature2 p { color: var(--muted); margin: 0 0 8px; }
.feature2 .btn, .feature2 .badge { justify-self: start; }
.ic-wrap { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 6px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.safe-flow { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
.safe-flow h2 { font-size: 1.8rem; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.flow li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); }
.flow b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; flex: none; font-size: .85rem; }
@media (max-width: 800px) { .safe-flow { grid-template-columns: 1fr; gap: 20px; } }

.tool-teaser { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; }
.tool-teaser h2 { font-size: 1.6rem; }
.tool-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tool-form input { flex: 1 1 220px; min-height: 50px; padding: 10px 14px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tool-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tool-form .btn { min-height: 50px; }
@media (max-width: 800px) { .tool-teaser { grid-template-columns: 1fr; } }

.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.price-card.featured { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow); }
.price-card .price { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 10px; }
.price-card ul { padding-left: 1.1em; color: var(--muted); display: grid; gap: 6px; margin: 12px 0 0; }

.narrow { max-width: 760px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; }
.faq-item summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--primary); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

.cta-band { background: linear-gradient(120deg, #4338ca, #0e7490); color: #fff; padding: 48px 0; }
.cta-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta-inner h2 { margin: 0; font-size: 1.6rem; }
.btn-light { background: #fff; color: #312e81; }
.btn-light:hover { background: #eef2ff; }

.page-hero { padding: 28px 0 8px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.02em; margin-bottom: 8px; }
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 720px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.prose h3 { margin-top: 1.2em; }
.prose p, .prose li { color: var(--text); line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 6px; }
.prose .note { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-top: 40px; padding-bottom: 24px; }
.footer-grid h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.footer-grid a:not(.brand) { display: block; color: var(--text); padding: 4px 0; font-size: .92rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 16px; padding-bottom: 24px; font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
.site-footer { padding: 0; }

.feature2.recommended { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow); }
.check-results { display: grid; gap: 8px; margin-top: 16px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.check-row .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.check-row.ok .dot { background: var(--success-soft); color: var(--success); }
.check-row.warn .dot { background: var(--warning-soft); color: var(--warning); }
.check-row.bad .dot { background: var(--danger-soft); color: var(--danger); }
.check-row div { min-width: 0; overflow-wrap: anywhere; }

/* Utilities (no inline styles: the CSP forbids them) */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.subcard { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin: 0; min-width: 0; }
details > summary { list-style: none; display: inline-flex; }
details > summary::-webkit-details-marker { display: none; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); z-index: 50; max-width: calc(100% - 32px); font-size: .9rem; }

.pre-line { white-space: pre-line; }
.break-all { word-break: break-all; }

/* Free check band right under the hero */
.check-band { padding: 8px 0 40px; }
.check-band .tool-teaser { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--primary) 55%, transparent); }
.check-band h2 { margin: 10px 0 6px; }
@media (max-width: 800px) { .check-band .tool-teaser { padding: 20px; } }

/* Simple home page */
.home-hero { padding: 72px 0 56px; text-align: center; background: radial-gradient(900px 420px at 50% -10%, var(--primary-soft), transparent); }
.home-hero-inner { max-width: 760px; }
.home-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 800; }
.home-hero .lead2 { margin: 0 auto 28px; }
.home-check { max-width: 620px; margin: 0 auto 12px; }
.home-check input { min-height: 52px; font-size: 1rem; }
.ic-wrap b { font-size: 1.1rem; }
.home-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 980px; margin: 0 auto; }
.home-check-item { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.home-check-item .ic-wrap { flex: none; margin: 0; }
.home-check-item h3 { font-size: 1rem; margin: 0 0 2px; }
.home-check-item p { margin: 0; color: var(--muted); font-size: .92rem; }
.price-simple { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; margin: 0 auto; }
.price-simple > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.price-simple .price { font-size: 1.8rem; font-weight: 800; margin: 4px 0 6px; }
@media (max-width: 900px) { .home-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .home-checks, .price-simple { grid-template-columns: 1fr; } .home-hero { padding: 44px 0 40px; } }
@media (max-width: 600px) { .home-check .btn { width: 100%; } }

/* ---------- Round meter ---------- */
.gauge { position: relative; width: 168px; flex: none; text-align: center; }
.gauge svg { width: 168px; height: 168px; display: block; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 10; }
.g-track { stroke: var(--surface-2); }
.g-fill { stroke-linecap: round; transition: stroke .3s; }
.gauge-good .g-fill { stroke: var(--success); }
.gauge-mid .g-fill { stroke: var(--warning); }
.gauge-bad .g-fill { stroke: var(--danger); }
.gauge-work .g-fill { stroke: var(--primary); }
.g-spin { stroke: color-mix(in srgb, var(--primary) 45%, transparent); stroke-linecap: round; stroke-width: 10; transform-origin: 60px 60px; animation: g-rotate 1.4s linear infinite; }
@keyframes g-rotate { to { transform: rotate(360deg); } }
.g-center { position: absolute; top: 0; left: 0; width: 168px; height: 168px; display: grid; place-content: center; line-height: 1; }
.g-center b { font-size: 2.9rem; font-weight: 800; letter-spacing: -.03em; }
.g-center small { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.gauge-good .g-center b { color: var(--success); }
.gauge-mid .g-center b { color: var(--warning); }
.gauge-bad .g-center b { color: var(--danger); }
.gauge-work .g-center b { color: var(--primary); }
.g-label { margin-top: 8px; font-weight: 700; }
.gauge-sm, .gauge-sm svg, .gauge-sm .g-center { width: 120px; height: auto; }
.gauge-sm svg, .gauge-sm .g-center { height: 120px; }
.gauge-sm .g-center b { font-size: 2.1rem; }
@media (prefers-reduced-motion: reduce) { .g-spin { animation: none; } }

/* ---------- Report header and tiles ---------- */
.report-hero { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.report-hero .rh-text { flex: 1 1 260px; min-width: 0; }
.report-hero h1 { margin: 0 0 4px; font-size: 1.5rem; }
.grade { font-size: 1.35rem; font-weight: 800; margin: 10px 0 4px; }
.grade.good { color: var(--success); } .grade.mid { color: var(--warning); } .grade.bad { color: var(--danger); }
.rh-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-tile { display: grid; gap: 2px; justify-items: start; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; border-top-width: 4px; }
.stat-tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-tile b { font-size: 1.9rem; line-height: 1.1; }
.stat-tile span { font-weight: 600; }
.stat-tile small { color: var(--muted); }
.stat-tile.t-bad { border-top-color: var(--danger); } .stat-tile.t-bad b { color: var(--danger); }
.stat-tile.t-warn { border-top-color: var(--warning); } .stat-tile.t-warn b { color: var(--warning); }
.stat-tile.t-muted { border-top-color: var(--muted); }
.stat-tile.t-ok { border-top-color: var(--success); } .stat-tile.t-ok b { color: var(--success); }
@media (max-width: 700px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* What we checked: one round mark per area */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cat-item { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.cat-mark { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 3px solid; }
.cat-mark.ok { color: var(--success); border-color: var(--success); background: var(--success-soft); }
.cat-mark.warn { color: var(--warning); border-color: var(--warning); background: var(--warning-soft); }
.cat-mark.bad { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.cat-mark.muted { color: var(--muted); border-color: var(--border); background: var(--surface-2); }
.cat-item strong { display: block; font-size: .95rem; }
.cat-item small { color: var(--muted); }

/* Findings as cards with a clear Details button */
.finding.fcard { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 0 14px; background: var(--surface); }
.finding.fcard.sev-critical { border-left-color: var(--danger); }
.finding.fcard.sev-warning { border-left-color: var(--warning); }
.finding.fcard.sev-pass { border-left-color: var(--success); }
.finding.fcard > summary::before { content: none; }
.finding.fcard .details-btn { margin-left: auto; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); font-size: .85rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
.finding.fcard[open] .details-btn::after { content: " ▴"; }
.finding.fcard:not([open]) .details-btn::after { content: " ▾"; }
.finding.fcard .finding-body { padding-left: 0; }

/* Live check: phase steps */
.progress-card { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.progress-card .pc-side { flex: 1 1 260px; min-width: 0; }
.phase-steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.phase-steps li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.phase-steps li i { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .8rem; border: 2px solid var(--border); }
.phase-steps li.done { color: var(--text); }
.phase-steps li.done i { background: var(--success); border-color: var(--success); color: #fff; }
.phase-steps li.active { color: var(--text); font-weight: 700; }
.phase-steps li.active i { border-color: var(--primary); border-top-color: transparent; animation: g-rotate .9s linear infinite; }
.live-counts { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.live-counts b { color: var(--text); font-size: 1.05rem; }

/* Check buttons with icon and a visible Start */
.check-card { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.check-card .cc-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); grid-row: span 3; }
.check-card .cc-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.check-card .cc-go { justify-self: start; margin-top: 6px; padding: 5px 12px; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 600; font-size: .85rem; }
.check-card:disabled .cc-go { opacity: .6; }
.stat-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-tiles-3 .stat-tile { cursor: default; }
.stat-tiles-3 .stat-tile:hover { box-shadow: none; transform: none; }
@media (max-width: 520px) { .stat-tiles-3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .stat-tiles-3 .stat-tile { padding: 12px; } .stat-tile b { font-size: 1.5rem; } }
@media (max-width: 520px) { .report-hero { justify-content: center; text-align: center; } .report-hero .rh-actions { justify-content: center; } }
.running-note { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; border-color: var(--primary); }

/* Web installer */
.install-page { padding: 32px 16px 48px; }
.install-page .brand { display: flex; gap: 10px; align-items: center; font-weight: 700; margin-bottom: 18px; }
.install-page .card { margin: 14px 0; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; font-size: .85rem; }
