@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root, [data-theme="light"] {
    --bg: #f8f7f4;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-subtle: #f1f0ed;
    --border: #e8e6e1;
    --border-light: #d8d6d1;
    --text: #1a1a1a;
    --text-dim: #474747;
    --text-muted: #6b6b6b;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.08);
    --cta-bg: #f59e0b;
    --cta-text: #1a1a1a;
    --green: #16a34a;
    --green-bg: rgba(22, 163, 74, 0.06);
    --yellow: #ca8a04;
    --yellow-bg: rgba(202, 138, 4, 0.06);
    --red: #dc2626;
    --red-bg: rgba(220, 38, 38, 0.06);
    --emerald: #059669;
    --orange: #ea580c;
    --blue: #2563eb;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(22,32,90,0.06), 0 2px 6px rgba(22,32,90,0.05);
    --shadow: 0 2px 6px rgba(22,32,90,0.07), 0 8px 22px rgba(22,32,90,0.09);
    --shadow-md: 0 10px 30px rgba(22,32,90,0.13), 0 3px 10px rgba(22,32,90,0.07);
    --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

[data-theme="dark"] {
    --bg: #111111;
    --bg-card: #1a1a1a;
    --bg-input: #222222;
    --bg-subtle: #161616;
    --border: #2a2a2a;
    --border-light: #333333;
    --text: #eeeeee;
    --text-dim: #b0b0b0;
    --text-muted: #8a8a8a;
    --cta-bg: #f59e0b;
    --cta-text: #1a1a1a;
    --accent: #60a5fa;
    --accent-dark: #3b82f6;
    --accent-glow: rgba(96, 165, 250, 0.08);
    --green: #34d399;
    --green-bg: rgba(52, 211, 153, 0.06);
    --yellow: #fbbf24;
    --yellow-bg: rgba(251, 191, 36, 0.06);
    --red: #f87171;
    --red-bg: rgba(248, 113, 113, 0.06);
    --emerald: #34d399;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow: 0 1px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Line wrapping, site-wide: balance headings/short lines so we never leave one
   lone word on its own line, and forbid widows in body copy. Responsive-safe,
   no hardcoded <br> (which would just break at other screen widths). */
h1, h2, h3, h4, h5, h6, .pricing-desc, .honest-title, .happen-head { text-wrap: balance; }
p, li, blockquote, figcaption, summary { text-wrap: pretty; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* NAV */
nav {
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #171b26;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--sans); font-size: 30px; font-weight: 900; text-decoration: none; letter-spacing: -1.2px; line-height: 1; }
.logo-icon { height: 36px; width: auto; display: block; }
.logo-tofu { color: #5a99f8; }
.logo-bofu { color: #f59e0b; }
.nav-links { display: flex; gap: 32px; align-items: center;
    /* swap these three to change nav icon-chip color (emerald default; blue: #7aa7f7 / rgba(59,130,246,.12) / rgba(59,130,246,.25)) */
    --nav-ic: #34d399; --nav-ic-bg: rgba(52,211,153,0.12); --nav-ic-bd: rgba(52,211,153,0.28); --nav-ic-hover: #6ee7b7;
}
.nav-links > a, .nav-dropdown-trigger { color: #d7dae3; text-decoration: none; font-size: 15px; font-weight: 600; transition: color 0.2s; letter-spacing: -0.1px; }
.nav-links > a:hover, .nav-dropdown-trigger:hover { color: #ffffff; }
.nav-auth { display: inline-flex; align-items: center; gap: 16px; }
.nav-auth-link { color: #d7dae3; text-decoration: none; font-size: 15px; font-weight: 600; transition: color 0.2s; letter-spacing: -0.1px; cursor: pointer; }
.nav-auth-link:hover { color: #ffffff; }
/* Tofu-blue login button (pairs with the Bofu-amber Free Audit) */
.nav-login { background: #3b82f6; color: #ffffff; padding: 11px 22px; border-radius: var(--radius); font-weight: 800; box-shadow: 0 3px 12px rgba(59,130,246,0.35); transition: background 0.18s, box-shadow 0.18s; }
.nav-login:hover { background: #5a99f8; color: #ffffff; box-shadow: 0 5px 16px rgba(59,130,246,0.45); }

/* In-page tabs (Scans / Monitor) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-top: 20px; }
.tab {
    padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--text-dim);
    text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===================================================================
   APP SHELL (authenticated product — distinct from marketing site)
   =================================================================== */
body.app { background: var(--bg); }
.app-layout { display: grid; grid-template-columns: 212px 1fr; min-height: 100vh; }

.app-sidebar {
    position: sticky; top: 0; height: 100vh; align-self: start;
    background: #0d0f14; border-right: 1px solid rgba(255,255,255,0.07);
    display: flex; flex-direction: column; padding: 18px 14px;
}
.app-logo { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px 16px; font-weight: 900; font-size: 19px; letter-spacing: -0.7px; text-decoration: none; }
.app-logo-icon { height: 24px; width: auto; display: block; }
.app-logo .tofu { color: #5a99f8; } .app-logo .bofu { color: #f59e0b; }
.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px;
    color: #a3a9b5; text-decoration: none; font-size: 14px; font-weight: 600; transition: background .15s, color .15s;
}
.app-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.app-nav a.active { background: rgba(90,153,248,0.16); color: #7cb0ff; }
.app-nav a svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }
.app-new { margin: 14px 4px; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px; background: var(--cta-bg); color: var(--cta-text); border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; }
.app-new:hover { filter: brightness(0.96); }
.app-side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; }
.app-user { display: flex; align-items: center; gap: 9px; padding: 7px 8px; margin-bottom: 4px; border-radius: 8px; text-decoration: none; transition: background .15s; }
.app-user:hover { background: rgba(255,255,255,0.06); }
.app-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.app-user-email { font-size: 12px; color: #8b909c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-side-actions { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.app-side-actions button, .app-side-actions a { background: none; border: none; font-family: var(--sans); font-size: 13px; font-weight: 600; color: #9aa0ad; cursor: pointer; text-decoration: none; padding: 6px 4px; }
.app-side-actions button:hover, .app-side-actions a:hover { color: #fff; }

.app-main { display: flex; flex-direction: column; min-width: 0; }
/* Page header sits inside the cream content (not a separate black bar): the sidebar
   already shows which page you're on, so this just holds the title + page actions. */
.app-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
    padding: 26px 30px 2px; background: transparent; }
.app-topbar h1 { font-size: 23px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.15; color: var(--text); }
.app-topbar .sub { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-top: 3px; }
.app-topbar .app-burger { color: var(--text); }
.app-topbar-actions { display: flex; align-items: center; gap: 10px; }
.app-content { padding: 18px 30px 70px; width: 100%; max-width: 1180px; background: var(--bg); }
.app-burger { display: none; background: none; border: none; cursor: pointer; color: var(--text); font-size: 22px; line-height: 1; padding: 2px 6px; }

.app-select { padding: 9px 13px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 7px; color: var(--text); font-size: 14px; font-family: var(--sans); font-weight: 600; }
.app-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; background: var(--cta-bg); color: var(--cta-text); border-radius: 7px; font-weight: 700; font-size: 14px; text-decoration: none; border: none; cursor: pointer; }
.app-btn:hover { filter: brightness(0.96); }
.app-btn-ghost { background: var(--bg-card); color: var(--text-dim); border: 1px solid var(--border); }
.app-btn-ghost:hover { color: var(--text); border-color: var(--border-light); filter: none; }

.app-scrim { display: none; }
@media (max-width: 900px) {
    .app-layout { grid-template-columns: 1fr; }
    .app-sidebar { position: fixed; left: 0; top: 0; width: 250px; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-md); }
    .app-sidebar.open { transform: translateX(0); }
    .app-burger { display: inline-flex; }
    .app-topbar { padding: 14px 16px; }
    .app-content { padding: 18px 16px 56px; }
    .app-scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; }
}

/* ===================================================================
   AUTH PAGES (minimal, no app chrome, no marketing nav)
   =================================================================== */
body.auth { background: var(--bg-subtle); display: flex; align-items: center; min-height: 100vh; }
.auth-wrap { max-width: 408px; width: 100%; margin: 0 auto; padding: 40px 20px; }
.auth-logo { display: block; text-align: center; font-weight: 800; font-size: 25px; letter-spacing: -0.7px; text-decoration: none; margin-bottom: 8px; }
.auth-logo .tofu { color: var(--accent); } .auth-logo .bofu { color: var(--cta-bg); }
.auth-tag { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 26px; font-weight: 500; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 4px; }
.auth-card .lede { font-size: 14px; color: var(--text-dim); margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-dim); }
.auth-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ===================================================================
   MONITOR — richer charts
   =================================================================== */
.m-loading, .m-empty { text-align: center; padding: 64px 24px; color: var(--text-dim); }
.m-empty { background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius-lg); }
.m-empty h3 { color: var(--text); font-size: 18px; margin-bottom: 8px; }
.m-banner { background: var(--accent-glow); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 16px; font-size: 13.5px; color: var(--text-dim); margin-bottom: 22px; }
.m-banner strong { color: var(--text); }

.sched-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.sched-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-glow); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sched-ico svg { width: 18px; height: 18px; stroke-width: 2; }
.sched-label { font-size: 13.5px; font-weight: 700; }
.sched-sub { font-size: 12.5px; color: var(--text-muted); }
.sched-next { font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
.sched-bar .app-select { margin-left: auto; padding: 8px 12px; }
.sched-on { color: var(--green); font-weight: 700; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 760px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } }
.metric-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow-sm); }
.metric-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); font-weight: 700; }
.metric-value { font-size: 29px; font-weight: 800; letter-spacing: -1px; margin: 5px 0 2px; }
.metric-value .unit { font-size: 15px; font-weight: 600; color: var(--text-dim); margin-left: 1px; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
.delta { font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); } .delta.flat { color: var(--text-muted); }
.metric-spark { width: 80px; height: 26px; }

.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-title { font-size: 15px; font-weight: 700; }
.chart-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.metric-toggle { display: flex; gap: 4px; flex-wrap: wrap; }
.metric-toggle button { padding: 6px 13px; font-size: 12.5px; font-weight: 600; font-family: var(--sans); cursor: pointer; background: transparent; border: 1px solid var(--border); border-radius: 999px; color: var(--text-dim); transition: all .15s; }
.metric-toggle button:hover { border-color: var(--border-light); color: var(--text); }
.metric-toggle button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chart-wrap { position: relative; margin-top: 12px; }
.chart { width: 100%; display: block; }
.chart text { fill: var(--text-muted); font-size: 11px; font-family: var(--sans); }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .guide { stroke: var(--border-light); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.chart .overlay { fill: transparent; cursor: crosshair; }
.chart-empty { text-align: center; color: var(--text-muted); padding: 46px 0; font-size: 13px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 8px; box-shadow: var(--shadow-md); padding: 8px 11px; font-size: 12px; min-width: 132px; opacity: 0; transition: opacity .1s; z-index: 5; transform: translateX(-50%); }
.chart-tip .tt-date { font-weight: 700; margin-bottom: 5px; color: var(--text); }
.chart-tip .tt-row { display: flex; align-items: center; gap: 6px; color: var(--text-dim); line-height: 1.7; }
.chart-tip .tt-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.chart-tip .tt-val { margin-left: auto; font-weight: 700; color: var(--text); padding-left: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-val { color: var(--text-muted); font-weight: 700; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 920px) { .two-col { grid-template-columns: 1fr; } }

.move-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 4px; }
@media (max-width: 680px) { .move-grid { grid-template-columns: 1fr; } }
.move-col h4 { font-size: 12.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.move-col h4 .move-count { padding: 1px 8px; border-radius: 999px; font-size: 11px; }
.move-col.gain h4 { color: var(--green); } .move-col.gain .move-count { background: var(--green-bg); }
.move-col.loss h4 { color: var(--red); } .move-col.loss .move-count { background: var(--red-bg); }
.move-q { font-size: 13px; color: var(--text-dim); padding: 8px 0; border-bottom: 1px solid var(--border); line-height: 1.4; }
.move-q:last-child { border-bottom: none; }
.move-empty { font-size: 13px; color: var(--text-muted); padding: 8px 0; }
.move-more { font-size: 12px; color: var(--text-muted); padding-top: 8px; }

.scan-history { width: 100%; border-collapse: collapse; }
.scan-history th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.scan-history td { padding: 11px 10px; font-size: 14px; border-bottom: 1px solid var(--border); }
.scan-history tr:last-child td { border-bottom: none; }
.scan-history a { color: var(--accent); font-weight: 600; text-decoration: none; }
.scan-history .num { font-variant-numeric: tabular-nums; }

.report-row { display: grid; grid-template-columns: 1fr 140px 110px 96px 60px; align-items: center; gap: 16px; padding: 15px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; text-decoration: none; color: var(--text); transition: border-color .2s; box-shadow: var(--shadow-sm); cursor: pointer; }
.report-row:hover { border-color: var(--accent); }
.report-pdf { display: inline-flex; align-items: center; gap: 4px; justify-self: end; font-size: 11px; font-weight: 700; color: var(--text-dim); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; text-decoration: none; transition: all .15s; }
.report-pdf:hover { color: var(--accent); border-color: var(--accent); }
.report-pdf.disabled { opacity: .35; pointer-events: none; }
.report-brand { font-weight: 600; font-size: 15px; }
.report-domain, .report-industry { font-size: 13px; color: var(--text-dim); }
.report-status { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.report-status.completed { color: var(--green); } .report-status.running { color: var(--yellow); } .report-status.failed { color: var(--red); }
.report-date { font-size: 12px; color: var(--text-muted); text-align: right; }
.reports-header { display: grid; grid-template-columns: 1fr 140px 110px 96px 60px; gap: 16px; padding: 4px 18px 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
@media (max-width: 640px) { .report-row, .reports-header { grid-template-columns: 1fr 60px; } .report-industry, .report-date, .report-status { display: none; } }

/* ===================================================================
   FIXES — gamified recommendation tasks
   =================================================================== */
.fx-hero { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; margin-bottom: 8px; }
@media (max-width: 820px) { .fx-hero { grid-template-columns: 1fr; } }
.fx-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.fx-score { display: flex; align-items: center; gap: 18px; }
.fx-ring { width: 96px; height: 96px; flex-shrink: 0; }
.fx-score .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); font-weight: 700; }
.fx-score .big { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.fx-goal { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.fx-goal button { background: none; border: none; color: var(--accent); font-weight: 700; font-family: var(--sans); font-size: 12.5px; cursor: pointer; padding: 0 0 0 4px; }
.fx-level-top { display: flex; align-items: center; justify-content: space-between; }
.fx-level-badge { font-size: 14px; font-weight: 800; color: var(--accent); }
.fx-level-sub { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.fx-xpbar { height: 9px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.fx-xpbar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s ease; }
.fx-xp-note { font-size: 11.5px; color: var(--text-muted); margin-top: 7px; font-weight: 600; }
.fx-streak-num { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.fx-progress-bar { height: 9px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.fx-progress-bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .5s ease; }

.fx-managed { display: flex; gap: 10px; align-items: center; background: var(--green-bg); border: 1px solid var(--green); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; font-size: 13.5px; color: var(--text); }
.fx-section-title { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; margin: 26px 0 12px; }
.fx-section-title .n { color: var(--text-muted); font-weight: 700; }
.fx-list { display: flex; flex-direction: column; gap: 9px; }
.fx-rec { display: flex; gap: 13px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.fx-rec.top { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow), var(--shadow-sm); }
.fx-rec.done { opacity: 0.5; }
.fx-rec.done .fx-rec-title { text-decoration: line-through; }
.fx-check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border-light); background: transparent; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; margin-top: 1px; transition: all .15s; }
.fx-check.checked { background: var(--green); border-color: var(--green); }
.fx-rec-body { flex: 1; min-width: 0; }
.fx-rec-title { font-size: 14.5px; font-weight: 700; }
.fx-rec-desc { font-size: 13px; color: var(--text-dim); margin-top: 3px; line-height: 1.5; }
.fx-evidence { margin-top: 9px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-glow); border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0; }
.fx-evidence-label { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.fx-evidence-quote { font-size: 12.5px; font-style: italic; color: var(--text-dim); line-height: 1.5; }
.fx-badges { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; align-items: center; }
.fx-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: capitalize; }
.fx-badge.positioning { background: rgba(139,92,246,0.13); color: #8b5cf6; }
.fx-badge.criteria { background: var(--yellow-bg); color: var(--yellow); }
.fx-badge.narrative { background: rgba(236,72,153,0.13); color: #ec4899; }
.fx-badge.comparison { background: var(--accent-glow); color: var(--accent); }
.fx-badge.gap { background: var(--red-bg); color: var(--red); }
.fx-badge.quickwin { background: var(--yellow-bg); color: var(--yellow); }
.fx-badge.schema { background: var(--accent-glow); color: var(--accent); }
.fx-badge.content { background: rgba(139,92,246,0.13); color: #8b5cf6; }
.fx-badge.channel { background: rgba(16,185,129,0.13); color: #10b981; }
.fx-start { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--cta-bg); color: #fff; letter-spacing: 0.2px; }
.fx-xp { font-size: 11.5px; font-weight: 800; color: var(--cta-bg); }
.fx-by { font-size: 11px; color: var(--green); font-weight: 700; }
.fx-collapse { background: none; border: none; font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--text-dim); cursor: pointer; padding: 8px 0; }
.fx-toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--accent); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 800; font-size: 14px; box-shadow: var(--shadow-md); opacity: 0; transition: all .3s; z-index: 100; pointer-events: none; }
.fx-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================================================================
   SCAN — in-app scan flow
   =================================================================== */
.usage-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-dim); background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; white-space: nowrap; }
@media (max-width: 560px) { .usage-chip { display: none; } }
.usage-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.usage-chip.empty .dot { background: var(--red); }
.usage-chip b { color: var(--text); }
.scan-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); max-width: 700px; }
.scan-research { display: flex; gap: 8px; margin-bottom: 6px; }
.scan-research input { flex: 1; padding: 11px 14px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 7px; color: var(--text); font-size: 14px; font-family: var(--sans); }
.scan-research input:focus { outline: none; border-color: var(--accent); }
.scan-research button { white-space: nowrap; }
.scan-or { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin: 20px 0; }
.scan-or::before, .scan-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.scan-running { text-align: center; padding: 40px 20px; }
.scan-running .progress-spinner { margin: 0 auto 16px; }

/* ===================================================================
   MONITOR DEPTH — tabs, funnel, query receipts, citations, head-to-head
   =================================================================== */
.mtab-bar { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 4px 0 20px; flex-wrap: wrap; }
.mtab { padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-dim); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: var(--sans); }
.mtab:hover { color: var(--text); }
.mtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.mtab .mtab-n { color: var(--text-muted); font-weight: 700; }

.funnel-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 680px) { .funnel-strip { grid-template-columns: 1fr; } }
.funnel-cell { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.funnel-cell .stage { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 700; }
.funnel-cell .pct { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin: 3px 0; }
.funnel-cell .det { font-size: 12px; color: var(--text-dim); }
.funnel-bar { height: 7px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.funnel-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.mq { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 7px; box-shadow: var(--shadow-sm); }
.mq-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; }
.mq-q { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.mq-funnel { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; }
.mq-engines { display: flex; gap: 5px; flex-shrink: 0; }
.mq-pill { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.mq-pill.mentioned { background: var(--green-bg); color: var(--green); }
.mq-pill.partial { background: var(--yellow-bg); color: var(--yellow); }
.mq-pill.absent { background: var(--red-bg); color: var(--red); }
.mq-caret { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.mq-body { display: none; border-top: 1px solid var(--border); padding: 14px 16px; }
.mq.open .mq-body { display: block; }
.mq-resp { margin-bottom: 12px; }
.mq-resp:last-child { margin-bottom: 0; }
.mq-resp h5 { font-size: 12px; font-weight: 700; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.mq-resp .rtext { font-size: 13px; color: var(--text-dim); line-height: 1.6; white-space: pre-wrap; background: var(--bg-subtle); border-radius: 8px; padding: 10px 12px; max-height: 240px; overflow: auto; }
.mq-comp { font-size: 11px; color: var(--text-muted); font-weight: 600; }

.cit-row { display: grid; grid-template-columns: 1fr 64px 104px; gap: 12px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 7px; box-shadow: var(--shadow-sm); }
.cit-domain { font-weight: 700; font-size: 14px; }
.cit-eg { font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cit-count { font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.cit-ctx { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-align: center; text-transform: capitalize; }
.cit-ctx.brand { background: var(--green-bg); color: var(--green); }
.cit-ctx.competitor { background: var(--red-bg); color: var(--red); }

.h2h { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.h2h-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.h2h-name { font-size: 15px; font-weight: 800; }
.h2h-score { font-size: 12.5px; color: var(--text-muted); font-weight: 700; }
.h2h-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .h2h-cols { grid-template-columns: 1fr; } }
.h2h-col h5 { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.h2h-col.win h5 { color: var(--green); } .h2h-col.lose h5 { color: var(--red); }
.h2h-q { font-size: 12.5px; color: var(--text-dim); padding: 6px 0; border-bottom: 1px solid var(--border); line-height: 1.4; }
.h2h-q:last-child { border-bottom: none; }
.h2h-empty { font-size: 12.5px; color: var(--text-muted); padding: 6px 0; }

/* Insights tab */
.ins-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.ins-title { font-size: 15px; font-weight: 800; letter-spacing: -0.2px; }
.ins-title .c { color: var(--text-muted); font-weight: 700; }
.ins-sub { font-size: 12.5px; color: var(--text-muted); margin: 2px 0 14px; line-height: 1.5; }
.ins-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ins-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text-dim); }
.ins-chip .n { color: var(--text-muted); font-weight: 700; font-size: 11px; }
.ins-chip.untracked { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.ins-lost-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.ins-lost-row:last-child { border-bottom: none; }
.ins-lost-row .who { color: var(--red); font-weight: 600; font-size: 12px; white-space: nowrap; }
.ins-fixnote { font-size: 12px; color: var(--accent); font-weight: 700; margin-top: 14px; }
.nav-login { padding: 11px 22px; background: #3b82f6; border: none; border-radius: var(--radius); color: #ffffff; font-weight: 700; font-size: 14px; text-decoration: none; transition: all 0.2s; box-shadow: 0 3px 12px rgba(59,130,246,0.4); }
.nav-login:hover { background: #2f74e8; box-shadow: 0 5px 16px rgba(59,130,246,0.5); }
.nav-register { padding: 10px 18px; font-size: 14px; font-weight: 700; }
.nav-cta { padding: 11px 24px; font-size: 14px; font-weight: 800; box-shadow: 0 3px 12px rgba(245, 158, 11, 0.38); }
.nav-cta:hover { box-shadow: 0 5px 16px rgba(245, 158, 11, 0.48); }
.nav-caret { font-size: 9px; opacity: 0.5; }
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: 4px; }
.nav-dropdown-menu {
    opacity: 0; visibility: hidden; transform: translateY(4px);
    position: absolute; top: 100%; left: 0;
    background: #1f2430; border: 1px solid rgba(255,255,255,0.09); border-radius: var(--radius-lg);
    padding: 8px 0; min-width: 220px; box-shadow: 0 16px 40px rgba(0,0,0,0.4); z-index: 300;
    transition: opacity 0.22s cubic-bezier(0.16,1,0.3,1), transform 0.22s cubic-bezier(0.16,1,0.3,1), visibility 0.22s;
}
.nav-dropdown::after {
    content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px; display: none;
}
.nav-dropdown:hover::after { display: block; }
/* all menus open the same way: left-anchored under the trigger, same fade-and-slide */
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(10px); }
.nav-dropdown-menu a {
    display: block; padding: 9px 18px; font-size: 13px; color: #c7cbd6;
    text-decoration: none; transition: background 0.15s, color 0.15s; font-weight: 500; white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.06); color: #ffffff; }
.nav-tier { float: right; margin-left: 16px; font-size: 11px; color: var(--cta-bg); font-weight: 600; }
.nav-dropdown-2col { min-width: 380px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }

/* RICH MEGA-MENU (Solutions) */
.nav-dropdown-menu.nav-mega {
    width: 560px; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
    transition: opacity 0.22s cubic-bezier(0.16,1,0.3,1), transform 0.22s cubic-bezier(0.16,1,0.3,1), visibility 0.22s;
}
.nav-dropdown:hover .nav-mega { transform: translateY(10px); }
.nav-mega .nav-mega-item {
    display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px;
    border-radius: 11px; white-space: normal; background: transparent;
    transition: background 0.16s ease;
}
.nav-mega .nav-mega-item:hover { background: rgba(255,255,255,0.06); }
.nav-mega-ic {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: var(--nav-ic); background: var(--nav-ic-bg); border: 1px solid var(--nav-ic-bd);
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.nav-mega-ic svg { width: 17px; height: 17px; }
.nav-mega .nav-mega-item:hover .nav-mega-ic { background: var(--nav-ic-bd); border-color: var(--nav-ic); color: var(--nav-ic-hover); }
.nav-mega-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-mega-tx strong { font-size: 13px; font-weight: 700; color: #eef1f7; letter-spacing: -0.1px; }
.nav-mega-tx em { font-size: 11.5px; font-style: normal; color: #99a0b0; line-height: 1.4; }
.nav-mega .nav-mega-item:hover .nav-mega-tx strong { color: #ffffff; }

/* GROUPED MENU (Resources) */
.nav-dropdown-menu.nav-grouped { width: 440px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; align-items: start; }
.nav-grp-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--nav-ic); margin: 4px 10px 6px; }
.nav-grouped .nav-grp a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; font-size: 13px; color: #c7cbd6; text-decoration: none; border-radius: 8px; font-weight: 500; white-space: nowrap; transition: background 0.16s, color 0.16s; }
.nav-grouped .nav-grp a:hover { background: rgba(255,255,255,0.06); color: #ffffff; }
.nav-grouped .nav-grp a svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--nav-ic); }

/* PAGE-DIM SCRIM (depth when a menu opens) */
.nav-scrim {
    position: fixed; inset: 79px 0 0 0; background: rgba(9,11,17,0.5);
    opacity: 0; visibility: hidden; pointer-events: none; z-index: 200;
    transition: opacity 0.22s ease, visibility 0.22s;
}
nav:has(.nav-dropdown:hover) .nav-scrim { opacity: 1; visibility: visible; }

/* HAMBURGER (hidden on desktop) */
.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 9px; background: transparent; border: none; cursor: pointer;
}
.nav-toggle span {
    display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE NAV */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #171b26; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08);
        padding: 8px 0; box-shadow: 0 16px 40px rgba(0,0,0,0.4); max-height: calc(100vh - 64px); overflow-y: auto;
    }
    .nav-links.nav-open { display: flex; }
    .nav-links > a, .nav-dropdown-trigger {
        display: flex; align-items: center; justify-content: space-between;
        padding: 13px 28px; font-size: 15px; width: 100%;
    }
    .nav-dropdown { position: static; }
    .nav-dropdown::after { display: none; }
    .nav-dropdown-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        display: none; box-shadow: none; border: none; background: rgba(255,255,255,0.04);
        border-radius: 0; padding: 4px 0; min-width: 0; width: 100%;
    }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown.open .nav-caret { transform: rotate(180deg); }
    .nav-dropdown-menu a { padding: 11px 28px 11px 40px; font-size: 14px; white-space: normal; }
    .nav-dropdown-2col { min-width: 0; }
    .nav-dropdown-menu.nav-mega { display: none; width: 100%; grid-template-columns: 1fr; padding: 4px 0; transform: none; }
    .nav-dropdown.open .nav-dropdown-menu.nav-mega { display: grid; }
    .nav-mega .nav-mega-item { padding: 11px 28px 11px 40px; border-radius: 0; }
    .nav-dropdown-menu.nav-grouped { display: none; width: 100%; grid-template-columns: 1fr; padding: 4px 0; }
    .nav-dropdown.open .nav-dropdown-menu.nav-grouped { display: block; }
    .nav-grp-h { margin: 10px 28px 4px; }
    .nav-grouped .nav-grp a { padding: 10px 28px 10px 40px; border-radius: 0; }
    .nav-scrim { display: none; }
    .nav-links .btn { margin: 10px 28px; width: calc(100% - 56px); padding: 13px; }
    .nav-caret { transition: transform 0.2s ease; }
    .theme-toggle { margin: 6px 28px; }
}

/* BLOG INDEX GRID */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.blog-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-top: 3px solid var(--c); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c); }
.blog-card-body { display: flex; flex-direction: column; gap: 7px; padding: 18px 18px 18px; flex: 1; }
.blog-card-cat { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; color: var(--c); }
.blog-card-title { font-family: var(--sans); font-size: 16px; font-weight: 700; line-height: 1.32; margin: 0; letter-spacing: -0.2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.blog-card-avatar { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; color: #fff; background: var(--c); letter-spacing: 0.2px; }
.blog-card-author { font-weight: 600; color: var(--text-dim); }
.blog-card-sep { opacity: 0.5; }
.blog-card-more { margin-top: auto; padding-top: 12px; font-size: 12px; font-weight: 700; color: var(--c); }
.blog-card:hover .blog-card-more { letter-spacing: 0.3px; }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; background: var(--cta-bg); color: var(--cta-text); border: none;
    border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; font-family: var(--sans); letter-spacing: -0.1px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25); text-decoration: none;
}
.btn:hover { background: #e8930a; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.38); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-outline {
    background: transparent; border: 1.5px solid var(--border-light); color: var(--text);
    text-decoration: none; border-radius: var(--radius); font-weight: 700; padding: 10px 20px;
    font-size: 13px; display: inline-flex; align-items: center; transition: all 0.2s;
    box-shadow: none;
}
.btn-outline:hover { border-color: var(--text); box-shadow: none; }
.btn-outline:hover { border-color: var(--text); }

/* FORM */
.form-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 32px; box-shadow: var(--shadow);
}
.form-group { margin-bottom: 18px; text-align: left; }
.form-group label {
    display: block; font-size: 12px; font-weight: 600; color: var(--text-dim);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 11px 14px; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text); font-size: 14px; font-family: var(--sans);
    transition: border-color 0.2s;
}
.form-group select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    padding-right: 40px; cursor: pointer; font-weight: 600; line-height: 1.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.hint { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* REPORT STYLES */
.report-header { padding: 40px 0 24px; margin-bottom: 28px; }
.report-header h1 { font-family: var(--sans); font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.report-header .meta { color: var(--text-dim); font-size: 13px; }

.score-section {
    display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
    padding: 28px 32px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.score-ring {
    width: 110px; height: 110px; border-radius: 50%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.score-ring .number { font-size: 34px; font-weight: 800; line-height: 1; }
.score-ring .label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; opacity: 0.7; }
.score-ring.low { background: var(--red-bg); color: var(--red); border: 3px solid var(--red); }
.score-ring.medium { background: var(--yellow-bg); color: var(--yellow); border: 3px solid var(--yellow); }
.score-ring.high { background: var(--green-bg); color: var(--green); border: 3px solid var(--green); }
.score-info h2 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.score-info p { color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.score-benchmarks { display: flex; flex-direction: column; gap: 8px; }
.benchmark { text-align: center; padding: 10px 18px; background: var(--bg-subtle); border-radius: 8px; }
.benchmark .num { font-size: 20px; font-weight: 800; }
.benchmark .lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-card .stat-num { font-size: 26px; font-weight: 800; margin-bottom: 2px; }
.stat-card .stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; line-height: 1.4; }
.stat-num.red { color: var(--red); }
.stat-num.yellow { color: var(--yellow); }
.stat-num.green { color: var(--green); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm);
}
.card-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-muted); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

.provider-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.provider-item:last-child { border: none; }
.provider-name { width: 100px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.provider-score { width: 36px; font-size: 18px; font-weight: 800; text-align: right; flex-shrink: 0; }
.provider-bar { flex: 1; height: 4px; background: var(--bg-subtle); border-radius: 2px; overflow: hidden; }
.provider-bar-fill { height: 100%; border-radius: 2px; transition: width 0.8s ease-out; }
.provider-label { font-size: 11px; color: var(--text-dim); width: 140px; text-align: right; flex-shrink: 0; }

.comp-item { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.comp-name { width: 120px; font-size: 13px; flex-shrink: 0; }
.comp-name.is-brand { font-weight: 700; color: var(--accent); }
.comp-bar { flex: 1; height: 5px; background: var(--bg-subtle); border-radius: 3px; overflow: hidden; }
.comp-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease-out; }
.comp-score { width: 36px; font-size: 13px; font-weight: 600; text-align: right; }

.section { margin-bottom: 36px; }
.section-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.section-header h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.section-header .count { font-size: 11px; color: var(--text-muted); background: var(--bg-subtle); padding: 2px 10px; border-radius: 6px; }
.section-icon { font-size: 16px; }

.threat-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; margin-bottom: 10px; border-left: 3px solid var(--red); box-shadow: var(--shadow-sm);
}
.threat-query { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.threat-competitor { font-size: 12px; color: var(--red); font-weight: 600; margin-bottom: 8px; }
.threat-excerpt {
    font-size: 13px; color: var(--text-dim); line-height: 1.7; font-style: italic;
    padding: 12px 16px; background: var(--bg-subtle); border-radius: 6px;
}

.root-cause {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.root-cause-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.root-cause-header .icon { font-size: 18px; }
.root-cause-header h4 { font-size: 14px; font-weight: 700; }
.root-cause p { color: var(--text-dim); font-size: 13px; line-height: 1.7; }

.gap-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 8px; box-shadow: var(--shadow-sm); transition: border-color 0.2s;
}
.gap-card:hover { border-color: var(--accent); }
.gap-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.priority-dot.high { background: var(--red); }
.priority-dot.medium { background: var(--yellow); }
.priority-dot.low { background: var(--green); }
.gap-card h4 { font-size: 14px; font-weight: 600; }
.gap-card p { color: var(--text-dim); font-size: 13px; line-height: 1.7; margin-bottom: 6px; }

.schema-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 8px; box-shadow: var(--shadow-sm);
}
.schema-card h4 { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 6px; font-family: 'SF Mono', Monaco, monospace; }
.schema-card p { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; line-height: 1.7; }
.schema-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.schema-tag {
    font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 500;
    background: var(--accent-glow); color: var(--accent); font-family: 'SF Mono', Monaco, monospace;
}
.schema-toggle { cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 500; }
.schema-code {
    margin-top: 8px; padding: 14px; background: var(--bg-subtle); border-radius: 6px;
    font-size: 12px; font-family: 'SF Mono', Monaco, monospace; overflow-x: auto; white-space: pre;
    color: var(--text-dim); line-height: 1.5; border: 1px solid var(--border);
}

.action-card {
    display: flex; gap: 14px; padding: 18px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 8px; align-items: flex-start;
    box-shadow: var(--shadow-sm); transition: border-color 0.2s;
}
.action-card:hover { border-color: var(--accent); }
.action-num {
    width: 30px; height: 30px; border-radius: 6px; background: var(--cta-bg); color: var(--cta-text);
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.action-content { flex: 1; }
.action-content h4 { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.action-content p { color: var(--text-dim); font-size: 13px; line-height: 1.6; margin-bottom: 6px; }
.action-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag {
    font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 500;
    background: var(--bg-subtle); color: var(--text-dim); border: 1px solid var(--border);
}
.tag.cat-schema { border-color: var(--blue); color: var(--blue); background: rgba(37,99,235,0.04); }
.tag.cat-authority { border-color: var(--orange); color: var(--orange); background: rgba(234,88,12,0.04); }
.tag.cat-citation { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.tag.cat-content { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.tag.cat-technical { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-bg); }
.tag.priority-high { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.tag.priority-medium { background: var(--yellow-bg); border-color: var(--yellow); color: var(--yellow); }

.progress-container { text-align: center; padding: 140px 0; }
.progress-container h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 8px; font-weight: 400; }
.progress-bar { width: 280px; height: 3px; background: var(--bg-subtle); border-radius: 2px; margin: 20px auto; overflow: hidden; }
.progress-fill { height: 100%; background: var(--cta-bg); border-radius: 2px; transition: width 0.3s; }
.progress-text { color: var(--text-muted); font-size: 13px; }
.progress-spinner {
    width: 28px; height: 28px; border: 2px solid var(--border); border-top-color: var(--cta-bg);
    border-radius: 50%; margin: 20px auto; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.report-footer { text-align: center; padding: 36px; margin: 36px 0; border-top: 1px solid var(--border); }
.report-footer p { color: var(--text-muted); font-size: 13px; }

.legend { display: flex; gap: 16px; margin-bottom: 12px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-dim); }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; }

.theme-toggle {
    background: transparent; border: 1px solid var(--border); border-radius: 6px;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; transition: all 0.2s; color: var(--text-muted);
}
.theme-toggle:hover { border-color: var(--text); color: var(--text); }
nav .theme-toggle { border-color: rgba(255,255,255,0.2); color: #d7dae3; }
nav .theme-toggle:hover { border-color: #ffffff; color: #ffffff; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 28px; }
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.product-card .product-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.product-card .product-role { display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 1px 6px; border-radius: 3px; margin-bottom: 6px; }
.product-role.hero { background: var(--green-bg); color: var(--green); }
.product-role.challenger { background: var(--yellow-bg); color: var(--yellow); }
.product-card .product-rate { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.product-card .product-ctx { font-size: 11px; color: var(--text-dim); line-height: 1.4; }

.report-row {
    display: grid; grid-template-columns: 1fr 140px 110px 96px 60px;
    align-items: center; gap: 16px; padding: 14px 18px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 6px; text-decoration: none; color: var(--text); transition: border-color 0.2s;
    box-shadow: var(--shadow-sm); cursor: pointer;
}
.report-row:hover { border-color: var(--accent); }

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .score-section { grid-template-columns: 1fr; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .provider-label { display: none; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
