:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #131a2b;
  --muted: #5b6577;
  --line: #e5e9f2;
  --brand: #2f5bff;
  --brand-dark: #1f4fd0;
  --ok: #12a150;
  --warn: #d98a00;
  --bad: #dc2828;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06);
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

/* Layout */
.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 64px; }
.narrow { max-width: 460px; }
.wide { max-width: 1180px; }
.center-block { display: flex; justify-content: center; padding-top: 6vh; }
.grid { display: grid; gap: 18px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px){ .cols-3,.cols-2,.cols-4 { grid-template-columns: 1fr; } }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { margin-right: 4px; }
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav a { color: var(--muted); font-weight: 600; font-size: .92rem; }
.topnav a:hover { color: var(--ink); text-decoration: none; }
.plan-chip { background: #eef3ff; color: var(--brand-dark); font-weight: 700; font-size: .78rem; padding: 3px 10px; border-radius: 999px; }
.badge { background: var(--bad); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: .72rem; font-weight: 700; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.pad-lg { padding: 32px; }
.card h2 { font-size: 1.1rem; }
.card + .card { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; } /* grid gap handles spacing; keeps cards in a row equal height */

/* Buttons + forms */
.btn {
  display: inline-block; background: var(--brand); color: #fff; font-weight: 700;
  padding: 11px 18px; border-radius: 10px; border: 0; cursor: pointer; font-size: .95rem;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-sm { padding: 7px 13px; font-size: .85rem; color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f2f5ff; }
.btn-danger { background: #fff; color: var(--bad); border: 1px solid #f3c9c9; }
.btn-danger:hover { background: #fdeeee; }
.btn-block { display: block; width: 100%; text-align: center; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--ink); }
.inline { display: inline; }
label { display: block; font-weight: 600; font-size: .88rem; margin: 14px 0 5px; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; }
input:focus, select:focus { outline: 2px solid #cddbff; border-color: var(--brand); }
.form-row { display: flex; gap: 10px; }
.form-row .grow { flex: 1; }

/* Flash messages */
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; font-size: .9rem; }
.flash.ok { background: #e6f6ec; color: #0d7a3d; }
.flash.err { background: #fdeaea; color: #b32020; }

/* Hero / landing */
.hero { text-align: center; padding: 8vh 20px 4vh; }
.hero h1 { font-size: 2.8rem; max-width: 760px; margin: 0 auto .3em; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 620px; margin: 0 auto 2rem; }
.hero-form { display: flex; gap: 10px; max-width: 520px; margin: 0 auto; }
.hero-form input { flex: 1; }
@media (max-width: 560px){ .hero-form { flex-direction: column; } .hero h1 { font-size: 2rem; } }
.trust { color: var(--muted); font-size: .85rem; margin-top: 14px; }
.features { max-width: 1000px; margin: 40px auto; }
.feature .ico { font-size: 1.6rem; }
.feature h3 { font-size: 1.05rem; margin-top: 8px; }

/* Score dial */
.score-dial { text-align: center; }
.dial {
  --v: 0; width: 150px; height: 150px; border-radius: 50%; margin: 0 auto;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--dial-c) calc(var(--v) * 1%), #eceff6 0);
}
.dial::before { content: ""; position: absolute; inset: 14px; background: var(--surface); border-radius: 50%; }
.dial .num { position: relative; font-size: 2.6rem; font-weight: 800; }
.grade-pill { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-weight: 800; font-size: 1.4rem; color: #fff; }
.g-a { background: #12a150; } .g-b { background: #4caf50; } .g-c { background: #d98a00; }
.g-d { background: #e8720c; } .g-e { background: #e0480c; } .g-f { background: #dc2828; } .g-x { background: #94a3b8; }

/* Findings */
.finding { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.finding:first-child { border-top: 0; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; }
.dot.pass { background: var(--ok); } .dot.warn { background: var(--warn); }
.dot.fail { background: var(--bad); } .dot.info { background: #94a3b8; }
.finding h4 { margin: 0 0 3px; font-size: 1rem; }
.finding .found { margin: 0 0 6px; }
.finding .fix { background: #f4f7ff; border-left: 3px solid var(--brand); padding: 8px 12px; border-radius: 6px; font-size: .9rem; margin-top: 6px; }
.cat-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 4px; }
.cat-head h3 { margin: 0; }
.tag { font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.tag.pass { background: #e6f6ec; color: #0d7a3d; }
.tag.warn { background: #fdf1dd; color: #9a6200; }
.tag.fail { background: #fdeaea; color: #b32020; }
.tag.info { background: #eef1f6; color: #556; }

/* Stat tiles */
.stat { text-align: center; }
.stat .n { font-size: 2rem; font-weight: 800; }
.stat .l { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.stat.bad .n { color: var(--bad); } .stat.warn .n { color: var(--warn); } .stat.ok .n { color: var(--ok); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: #fafbfe; }
.table-wrap { overflow-x: auto; }

/* Site rows */
.site-row { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.site-row .grow { flex: 1; }
.site-row .host { color: var(--muted); font-size: .85rem; }
.status-up { color: var(--ok); } .status-down { color: var(--bad); }

/* Pricing */
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 12px 32px rgba(47,107,255,.16); }
.price-card .amt { font-size: 2.4rem; font-weight: 800; }
.price-card .amt small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0; flex: 1; }
.price-card li { padding: 7px 0 7px 26px; position: relative; font-size: .92rem; border-top: 1px solid var(--line); }
.price-card li::before { content: "✓"; color: var(--ok); font-weight: 800; position: absolute; left: 0; }
.price-card li.no { color: var(--muted); }
.price-card li.no::before { content: "—"; color: var(--muted); }
.ribbon { position: absolute; top: -11px; right: 16px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* Misc */
.spinner { width: 34px; height: 34px; border: 4px solid #e3e8f2; border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 30px; border-top: 1px solid var(--line); }
.progress { height: 8px; background: #eceff6; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Feature additions: verification, billing toggle, tokens, logo */
.verified-badge { display: inline-block; background: #e6f6ec; color: #0d7a3d; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.save-chip { background: #eef3ff; color: var(--brand-dark); font-weight: 700; font-size: .72rem; padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.token-box { background: #0f172a; color: #d7e3ff; padding: 12px 14px; border-radius: 8px; font-size: .82rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check-row input { width: auto; }
.inline-label { display: inline-flex; margin-right: 18px; }
.bill-toggle { display: flex; align-items: center; }

/* Per-dimension score tiles on the report */
.dim-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 18px 0 6px; }
.dim-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 10px; text-align: center; color: var(--ink); }
.dim-tile:hover { text-decoration: none; border-color: var(--brand); }
.dim-ico { font-size: 1.3rem; }
.dim-score { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.dim-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.dim-heading { margin: 30px 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }

/* Content pages */
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; resize: vertical; }
textarea:focus { outline: 2px solid #cddbff; border-color: var(--brand); }
.feature-list, .legal-list { padding-left: 0; list-style: none; margin: 10px 0; }
.feature-list li, .legal-list li { position: relative; padding: 6px 0 6px 26px; border-top: 1px solid var(--line); }
.feature-list li::before { content: "✓"; color: var(--ok); font-weight: 800; position: absolute; left: 0; }
.legal-list li::before { content: "•"; color: var(--brand); font-weight: 800; position: absolute; left: 6px; }
.feature-list li:first-child, .legal-list li:first-child { border-top: 0; }
.soon-badge { display: inline-block; vertical-align: middle; background: #fdf1dd; color: #9a6200; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-left: 8px; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; margin-bottom: 10px; background: var(--surface); }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item p { padding: 12px 0 4px; }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 40px; padding: 40px 24px 20px; }
.footer-grid { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 24px; }
@media (max-width: 860px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; }
.site-footer a { display: block; color: #9fb0cc; font-size: .88rem; padding: 3px 0; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-base { max-width: 1080px; margin: 26px auto 0; padding-top: 16px; border-top: 1px solid #1e2a44; color: #6b7c9c; font-size: .8rem; text-align: center; }

/* Maintenance banner (admin) */
.maint-banner { background: #fdf1dd; color: #9a6200; text-align: center; padding: 8px 16px; font-size: .88rem; font-weight: 600; border-bottom: 1px solid #f0dcae; }
.maint-banner a { color: #7a4e00; text-decoration: underline; }

/* Live admin dashboard */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin: 0 2px; box-shadow: 0 0 0 0 rgba(18,161,80,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18,161,80,.5); } 70% { box-shadow: 0 0 0 6px rgba(18,161,80,0); } 100% { box-shadow: 0 0 0 0 rgba(18,161,80,0); } }
.live-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.live-tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; }
.live-tile .lt-n { font-size: 1.6rem; font-weight: 800; }
.live-tile .lt-l { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.live-tile.accent { border-color: var(--brand); background: #f2f6ff; }
.live-tile.accent .lt-n { color: var(--brand-dark); }
.live-tile.warn { border-color: #f0dcae; background: #fdf7ea; }
.live-tile.warn .lt-n { color: var(--warn); }
.chart-box { width: 100%; overflow-x: auto; }
.dbar-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.dbar-label { width: 110px; font-size: .85rem; font-weight: 600; flex: none; }
.dbar-track { flex: 1; height: 12px; background: #eceff6; border-radius: 999px; overflow: hidden; }
.dbar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.dbar-val { width: 34px; text-align: right; font-weight: 800; font-size: .9rem; flex: none; }

/* Dashboard posture */
.posture-grid { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 14px; align-items: stretch; }
.posture-grid > .card { margin: 0; }
.score-hero { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.score-hero .grade-pill { margin-bottom: 6px; }
.sh-score { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.sh-score small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.sh-delta { margin-top: 6px; font-weight: 700; font-size: .85rem; }
.sh-delta.up { color: var(--ok); }
.sh-delta.down { color: var(--bad); }

/* Dashboard onboarding empty state */
.onboard { border: 1px solid var(--brand); background: #f7faff; }
.what-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.what-cell { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.what-ico { font-size: 1.6rem; flex: none; }

/* Dashboard upgrade teasers */
.lock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.lock-card { display: flex; align-items: center; gap: 14px; margin: 0; }
.lock-card .lock-ico { font-size: 1.6rem; flex: none; opacity: .85; }

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

/* Pricing comparison table */
table.compare td, table.compare th { border-bottom: 1px solid var(--line); }
table.compare td.yes { color: var(--ok); font-weight: 800; }
table.compare td.no { color: #b8c0cf; }
table.compare tr td:first-child { font-weight: 600; }
table.compare th.center, table.compare td.center { text-align: center; }
