/* =====================================================================
   RankPilot — dark SaaS design system
   ===================================================================== */
:root {
  --bg: #0E0E10;
  --surface: #16161A;
  --surface-2: #1C1C21;
  --surface-3: #232329;
  --border: #26262C;
  --border-strong: #34343C;
  --primary: #FF5A1F;
  --primary-600: #E64A12;
  --primary-soft: rgba(255, 90, 31, .12);
  --text: #F4F4F6;
  --muted: #8E8E98;
  --muted-2: #6A6A74;
  --error: #EF4444;
  --warning: #F59E0B;
  --ok: #10B981;
  --error-soft: rgba(239, 68, 68, .12);
  --warning-soft: rgba(245, 158, 11, .12);
  --ok-soft: rgba(16, 185, 129, .12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rail-w: 84px;
  --side-w: 236px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.accent { color: var(--primary); }
.hidden { display: none !important; }
[data-lucide] { width: 18px; height: 18px; stroke-width: 1.75; }

/* ---------- Scrollbars: thin, dark, only visible on hover ---------- */
* { scrollbar-width: thin; scrollbar-color: #2E2E35 transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2E2E35; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #45454F; }
.rail, .sidebar { scrollbar-width: none; -ms-overflow-style: none; }   /* still scrollable, no visible bar */
.rail::-webkit-scrollbar, .sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-link { background: none; border: 0; color: var(--primary); font-weight: 500; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.btn-link [data-lucide] { width: 14px; height: 14px; }

.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.badge-error { background: var(--error-soft); color: var(--error); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-notice { background: rgba(142, 142, 152, .14); color: var(--muted); }
.badge-ok, .badge-fixed { background: var(--ok-soft); color: var(--ok); }
.badge-new { background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(255, 90, 31, .35); }
.badge-persisting { background: rgba(142, 142, 152, .12); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-error { background: var(--error); } .dot-warning { background: var(--warning); } .dot-notice { background: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  font-weight: 600; border: 1px solid;
}
.pill small { font-weight: 500; font-size: 12px; opacity: .85; }
.pill [data-lucide] { width: 16px; height: 16px; }
.pill-error { color: var(--error); border-color: rgba(239, 68, 68, .45); background: var(--error-soft); }
.pill-warning { color: var(--warning); border-color: rgba(245, 158, 11, .45); background: var(--warning-soft); }
.pill-ok { color: var(--ok); border-color: rgba(16, 185, 129, .45); background: var(--ok-soft); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 12px; color: var(--muted); }

/* =====================================================================
   PUBLIC LANDING
   ===================================================================== */
.site-nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 56px); background: rgba(14, 14, 16, .8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; }
.site-nav nav { display: flex; gap: 28px; color: var(--muted); font-weight: 500; }
.site-nav nav a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 8px; }

.hero {
  position: relative; text-align: center; padding: clamp(64px, 10vw, 120px) 20px 80px; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 640px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 90, 31, .22), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 500;
}
.eyebrow b { color: var(--primary); font-weight: 600; }
.hero h1 {
  position: relative; max-width: 900px; margin: 22px auto 18px; font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05; letter-spacing: -.035em; font-weight: 700;
}
.hero h1 span { background: linear-gradient(90deg, #FF5A1F, #FF9A5B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { position: relative; max-width: 620px; margin: 0 auto 34px; color: var(--muted); font-size: 17px; }

.quick-audit {
  position: relative; display: flex; gap: 8px; max-width: 640px; margin: 0 auto; padding: 8px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow);
}
.quick-audit .qa-icon { display: grid; place-items: center; padding-left: 10px; color: var(--muted); }
.quick-audit input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; outline: none; font-size: 15px; }
.hero-meta { position: relative; display: flex; justify-content: center; gap: 22px; margin-top: 18px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; gap: 6px; align-items: center; }
.hero-meta [data-lucide] { width: 15px; height: 15px; color: var(--ok); }

.qa-result { max-width: 920px; margin: 32px auto 0; text-align: left; }
.qa-grid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.qa-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qa-score { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.qa-score b { font-size: 22px; display: block; }
.qa-issues { margin-top: 14px; display: grid; gap: 6px; }
.qa-issue { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg); }
.qa-issue span:nth-child(2) { flex: 1; }

.section { padding: 80px clamp(16px, 5vw, 56px); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; margin: 12px 0; }
.section-head p { color: var(--muted); font-size: 16px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 1180px; margin: 0 auto; }
.feature { padding: 24px; }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 16px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; }

/* Pricing */
.billing-toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); margin-top: 18px;
}
.billing-toggle button {
  height: 34px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--muted);
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.billing-toggle button.active { background: var(--primary); color: #fff; }
.billing-toggle .save { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.billing-toggle button.active .save { background: rgba(255, 255, 255, .2); color: #fff; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1080px; margin: 0 auto; }
.plan { position: relative; padding: 28px 26px; display: flex; flex-direction: column; gap: 18px; }
.plan.popular { border-color: rgba(255, 90, 31, .6); box-shadow: 0 0 0 1px rgba(255, 90, 31, .25), 0 20px 50px rgba(255, 90, 31, .12); }
.plan .tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.plan h3 { font-size: 18px; }
.plan .price { display: flex; align-items: baseline; gap: 6px; }
.plan .price b { font-size: 42px; letter-spacing: -.03em; }
.plan .price small { color: var(--muted); }
.plan .billed { color: var(--muted); font-size: 12px; min-height: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: #D8D8DE; }
.plan li [data-lucide] { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; flex: none; }
.plan li.off { color: var(--muted-2); }
.plan li.off [data-lucide] { color: var(--muted-2); }

.matrix-wrap { max-width: 1080px; margin: 40px auto 0; overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; min-width: 640px; }
.matrix th, .matrix td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; color: var(--muted); }
.matrix thead th { color: var(--text); font-size: 15px; }
.matrix thead th.popular { color: var(--primary); }
.matrix td [data-lucide] { margin: 0 auto; width: 18px; height: 18px; }
.matrix .yes { color: var(--ok); } .matrix .no { color: var(--muted-2); }

.site-footer { padding: 40px clamp(16px, 5vw, 56px); border-top: 1px solid var(--border); color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }

/* Auth page */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(60% 50% at 50% 0%, rgba(255, 90, 31, .14), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; padding: 32px; display: grid; gap: 18px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--bg); border-radius: 10px; border: 1px solid var(--border); }
.auth-tabs button { height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.auth-tabs button.active { background: var(--surface-3); color: var(--text); }
.form-error { color: var(--error); font-size: 13px; min-height: 18px; }
.demo-hint { font-size: 12px; color: var(--muted); text-align: center; padding: 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }

/* =====================================================================
   WORKSPACE (dual-rail sidebar + canvas)
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--rail-w) var(--side-w) 1fr; min-height: 100vh; }
.app.side-collapsed { grid-template-columns: var(--rail-w) 0 1fr; }
.app.side-collapsed .sidebar { visibility: hidden; padding: 0; border: 0; }

.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; align-items: stretch;
  gap: 2px; padding: 12px 8px; background: #0B0B0D; border-right: 1px solid var(--border); overflow-x: hidden;
}
.rail .logo { display: grid; place-items: center; height: 44px; margin-bottom: 8px; flex: none; }
.rail-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; flex: none; border-radius: 10px;
  color: var(--muted); font-size: 10.5px; line-height: 1.2; text-align: center; cursor: pointer; border: 0; background: none;
  transition: background .15s, color .15s;
}
.rail-item [data-lucide] { width: 20px; height: 20px; }
.rail-item:hover { color: var(--text); background: var(--surface); }
.rail-item.active { color: var(--primary); background: var(--primary-soft); }
.rail-spacer { flex: 1; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; padding: 16px 10px; gap: 2px; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 12px; }
.sidebar-head h2 { font-size: 13px; color: var(--muted); font-weight: 600; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn [data-lucide] { width: 16px; height: 16px; }
.project-switch { margin: 0 4px 12px; }
.project-switch .select { height: 36px; background: var(--bg); }
.side-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: #C9C9D1;
  font-weight: 500; font-size: 13.5px; cursor: pointer; border: 1px solid transparent; transition: background .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none;
}
.side-item [data-lucide] { flex: none; }
.side-item:hover { background: var(--surface-2); }
.side-item.active { background: var(--surface-3); border-color: var(--border-strong); color: var(--text); }
.side-item .count { margin-left: auto; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-3);
  color: var(--muted); font-size: 11px; display: grid; place-items: center; font-weight: 600; }
.side-sep { height: 1px; background: var(--border); margin: 10px 8px; }

.main { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 60px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.crumb [data-lucide] { width: 15px; height: 15px; }
.domain-head { display: flex; align-items: center; gap: 14px; }
.favicon { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border-strong); background: #000; display: grid; place-items: center; overflow: hidden; flex: none; }
.favicon img { width: 24px; height: 24px; }
.domain-head h1 { font-size: 26px; letter-spacing: -.02em; }
.domain-head p { color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); }
.plan-chip b { color: var(--text); }
.user-menu { position: relative; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar { overflow: hidden; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #FF5A1F, #FF9A5B); display: grid; place-items: center; font-weight: 700; color: #fff; border: 0; cursor: pointer; }
.dropdown { position: absolute; right: 0; top: 44px; min-width: 220px; padding: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 40; }
.dropdown a, .dropdown button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: #D8D8DE; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-3); }
.dropdown .dd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown .dd-head small { color: var(--muted); display: block; }

/* Overview mega-card (matches the reference layout) */
.overview { overflow: hidden; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.kpi { padding: 20px 22px; border-right: 1px solid var(--border); }
.kpi:last-child { border-right: 0; }
.kpi .label { color: #C9C9D1; font-size: 13px; }
.kpi .value { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0 4px; }
.kpi .value.accent { color: var(--primary); }
.kpi .hint { color: var(--muted); font-size: 12px; }

.ov-row { display: grid; border-bottom: 1px solid var(--border); }
.ov-row:last-child { border-bottom: 0; }
.ov-row.score-traffic { grid-template-columns: 260px 1fr; }
.ov-row.health { grid-template-columns: 1.25fr 1fr; }
.ov-cell { padding: 18px 22px; min-width: 0; }
.ov-cell + .ov-cell { border-left: 1px solid var(--border); }

.gauge-wrap { position: relative; width: 190px; height: 150px; margin: 8px auto 0; }
.gauge-wrap canvas { width: 190px !important; height: 190px !important; }
.gauge-center { position: absolute; top: 60px; left: 0; right: 0; text-align: center; }
.gauge-center b { display: block; font-size: 34px; font-weight: 500; letter-spacing: -.02em; }
.status-pill { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #111; }
.status-good { background: #F5B731; } .status-great { background: var(--ok); } .status-bad { background: var(--error); color: #fff; }

.traffic-chart { position: relative; height: 150px; }
.chart-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.growth-up { color: var(--ok); } .growth-down { color: var(--error); }

.health-left { display: flex; align-items: center; gap: 22px; }
.radar-box { width: 210px; height: 190px; flex: none; position: relative; }
.big-number { font-size: 36px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0 8px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Data tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th:first-child { border-top-left-radius: 8px; } .table th:last-child { border-top-right-radius: 8px; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: rgba(255, 255, 255, .015); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .issue-title { display: flex; align-items: center; gap: 10px; }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.table-tools .input { max-width: 280px; height: 36px; }
.table-tools .select { width: auto; height: 36px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--muted); font-size: 13px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty [data-lucide] { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--muted-2); }

.delta-up { color: var(--ok); font-weight: 600; } .delta-down { color: var(--error); font-weight: 600; } .delta-flat { color: var(--muted); }
.pos { display: inline-grid; place-items: center; min-width: 34px; height: 26px; border-radius: 6px; background: var(--surface-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.pos.top3 { background: var(--ok-soft); color: var(--ok); } .pos.top10 { background: var(--primary-soft); color: var(--primary); }
.spark { width: 110px; height: 28px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 16px; }
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 26px; font-weight: 600; margin-top: 4px; letter-spacing: -.02em; }

.vital { padding: 20px; }
.vital .value { font-size: 30px; font-weight: 600; margin: 6px 0; }
.vital .bar { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--ok) 0 33%, var(--warning) 33% 66%, var(--error) 66%); position: relative; margin-top: 12px; }
.vital .bar i { position: absolute; top: -4px; width: 3px; height: 14px; background: #fff; border-radius: 2px; }
.rating-good { color: var(--ok); } .rating-needs-improvement { color: var(--warning); } .rating-poor { color: var(--error); }

.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* AI writer */
.writer { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.writer .textarea { min-height: 460px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; background: var(--bg); }
.score-ring { width: 120px; height: 120px; margin: 0 auto; position: relative; }
.score-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; }
.check-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; }
.check-list [data-lucide] { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.check-list .pass { color: var(--ok); } .check-list .fail { color: var(--muted-2); }
.check-list em { margin-left: auto; color: var(--muted); font-style: normal; }

pre.code { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; font-size: 12px; color: #D8D8DE; white-space: pre-wrap; word-break: break-all; }

/* Toasts + modal + loaders */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { padding: 12px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow); max-width: 380px; animation: pop .2s ease; display: flex; gap: 10px; align-items: center; }
.toast.error { border-color: rgba(239, 68, 68, .5); } .toast.success { border-color: rgba(16, 185, 129, .5); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 90; padding: 20px; }
.modal { width: 100%; max-width: 480px; padding: 24px; display: grid; gap: 16px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* PDF report (rendered off-screen, light theme for print) */
.pdf-report { width: 794px; padding: 40px; background: #fff; color: #111; font: 13px/1.5 var(--font); }
.pdf-report h1 { font-size: 26px; } .pdf-report h2 { font-size: 16px; margin: 24px 0 10px; }
.pdf-report .pdf-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 3px solid var(--brand, #FF5A1F); }
.pdf-report .pdf-head img { max-height: 44px; max-width: 180px; }
.pdf-report .pdf-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.pdf-report .pdf-kpis div { border: 1px solid #e5e5ea; border-radius: 8px; padding: 10px; }
.pdf-report .pdf-kpis b { display: block; font-size: 20px; color: var(--brand, #FF5A1F); }
.pdf-report table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pdf-report th, .pdf-report td { border-bottom: 1px solid #eee; padding: 7px 6px; text-align: left; }
.pdf-report th { background: #f6f6f8; }
.pdf-report .charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; }
.pdf-report .charts img { width: 100%; }
.pdf-report .foot { margin-top: 30px; color: #888; font-size: 11px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .ov-row.health { grid-template-columns: 1fr; }
  .ov-row.health .ov-cell + .ov-cell { border-left: 0; border-top: 1px solid var(--border); }
  .writer { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  :root { --side-w: 0px; }
  .app { grid-template-columns: var(--rail-w) 1fr; }
  .sidebar { position: fixed; left: var(--rail-w); width: 250px; z-index: 30; transform: translateX(-120%); transition: transform .2s; box-shadow: var(--shadow); }
  .app.side-open .sidebar { transform: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .plans { grid-template-columns: 1fr; max-width: 460px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  :root { --rail-w: 64px; }
  .rail-item span { display: none; }
  .ov-row.score-traffic { grid-template-columns: 1fr; }
  .ov-row.score-traffic .ov-cell + .ov-cell { border-left: 0; border-top: 1px solid var(--border); }
  .health-left { flex-direction: column; align-items: flex-start; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .site-nav nav { display: none; }
  .qa-grid { grid-template-columns: 1fr; }
  .kpi .value { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Short screens: tighten rails further */
@media (max-height: 860px) {
  .side-item { padding: 6px 12px; }
  .rail-item { padding: 6px 4px; font-size: 10px; }
  .rail-item [data-lucide] { width: 18px; height: 18px; }
  .sidebar-head { padding-bottom: 8px; } .project-switch { margin-bottom: 8px; }
}

/* =====================================================================
   LANDING v2: promo bar, plan groups, reviews, FAQ
   ===================================================================== */
.promo-bar { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 10px 16px;
  background: linear-gradient(90deg, #2A0F05, #3B1508 50%, #2A0F05); border-bottom: 1px solid rgba(255,90,31,.35); font-size: 14px; }
.promo-text { font-weight: 600; }
.countdown { display: inline-flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.countdown b { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 7px; font-size: 15px; }
.countdown small { color: var(--muted); font-size: 11px; margin-right: 6px; }

.pricing-controls { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 18px; }
.group-tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); }
.group-tabs button { height: 42px; padding: 0 22px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; }
.group-tabs button.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pricing .billing-toggle { margin-top: 0; }
.group-sub { text-align: center; color: var(--muted); margin: 0 0 26px; }
.plans.plans-1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.plans.plans-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.plan .price .was { color: var(--muted-2); font-size: 16px; margin-right: 2px; }
.plan .price .was:empty { display: none; }
.plan li b { color: var(--text); }
.included { max-width: 1080px; margin: 24px auto 0; padding: 24px 26px; }
.included h3 { font-size: 16px; margin-bottom: 14px; }
.included-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; color: #D8D8DE; font-size: 14px; }
.included-grid span { display: flex; gap: 8px; align-items: center; }
.included-grid [data-lucide] { width: 16px; height: 16px; color: var(--ok); flex: none; }

.stars { color: #3A3A42; letter-spacing: 1px; font-size: 15px; }
.stars .on { color: #FBBC04; }
.stars .half { background: linear-gradient(90deg, #FBBC04 50%, #3A3A42 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars.big { font-size: 22px; }
.rating-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); font-size: 13px; }
.review-summary { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.review-summary > b { font-size: 28px; }
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; max-width: 1180px; margin: 0 auto; }
.review { margin: 0; padding: 20px; display: grid; gap: 10px; align-content: start; }
.review-head { display: flex; align-items: center; gap: 12px; }
.review-head img, .avatar-fallback { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.review-head figcaption { font-weight: 600; }
.review-head .g-mark { margin-left: auto; }
.review-text { margin: 0; color: #D8D8DE; font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { padding: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary [data-lucide] { flex: none; color: var(--muted); transition: transform .2s; }
.faq details[open] summary [data-lucide] { transform: rotate(45deg); color: var(--primary); }
.faq details p { padding: 0 22px 20px; color: var(--muted); line-height: 1.65; }

.cta { max-width: 980px; margin: 0 auto; padding: 48px 24px; text-align: center; display: grid; gap: 14px;
  background: radial-gradient(60% 120% at 50% 0%, rgba(255,90,31,.18), transparent 70%), var(--surface); }
.cta h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.02em; }
@media (max-width: 720px) {
  .group-tabs button { padding: 0 14px; font-size: 14px; }
  .plans.plans-2 { grid-template-columns: 1fr; }
}

/* =====================================================================
   SIDEBAR v2 — matches the reference workspace (compact, no scrollbars)
   ===================================================================== */
:root { --rail-w: 80px; --side-w: 210px; }
.rail { padding: 14px 6px; gap: 4px; background: #0B0B0D; }
.rail .logo { height: 40px; margin-bottom: 14px; }
.rail-item { position: relative; gap: 4px; padding: 9px 2px; border-radius: 10px; font-size: 9.5px; line-height: 1.15; color: #9A9AA4; }
.rail-item [data-lucide] { width: 19px; height: 19px; stroke-width: 1.6; }
.rail-item.active { color: var(--primary); background: rgba(255, 90, 31, .10); }
.rail-item.active::after { content: ""; position: absolute; right: -7px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--primary); }
.sidebar { padding: 14px 8px; gap: 3px; background: #121215; }
.sidebar-head { padding: 0 6px 12px; }
.sidebar-head h2 { font-size: 11.5px; letter-spacing: .02em; color: #A3A3AC; }
.sidebar .icon-btn { width: 26px; height: 26px; border-radius: 7px; }
.project-switch { margin: 0 2px 10px; }
.project-switch .select { height: 32px; font-size: 12.5px; padding: 0 10px; }
.side-item { gap: 11px; padding: 9px 10px; font-size: 12.5px; border-radius: 9px; color: #C4C4CC; }
.side-item [data-lucide] { width: 16px; height: 16px; stroke-width: 1.6; color: #A3A3AC; }
.side-item.active { background: #222228; border-color: #2E2E36; color: #fff; }
.side-item.active [data-lucide] { color: #fff; }
.side-item .count { min-width: 22px; height: 20px; font-size: 10.5px; background: #26262C; }
@media (max-height: 860px) {
  .side-item { padding: 7px 10px; }
  .rail-item { padding: 6px 2px; }
}
@media (max-width: 720px) { :root { --rail-w: 64px; } }

/* =====================================================================
   LANDING v3 — light/dark theme, language picker, global hero,
   money-back guarantee, testimonials
   ===================================================================== */

/* ---------- Light theme (landing page only; set on <html data-theme>) ---------- */
html[data-theme="light"] {
  --bg: #F7F7F9;
  --surface: #FFFFFF;
  --surface-2: #F2F2F5;
  --surface-3: #E8E8EE;
  --border: #E6E6EC;
  --border-strong: #D6D6DE;
  --primary-600: #E14A12;
  --primary-soft: rgba(255, 90, 31, .10);
  --text: #121216;
  --muted: #5C5C68;
  --muted-2: #9B9BA6;
  --error-soft: rgba(239, 68, 68, .10);
  --warning-soft: rgba(245, 158, 11, .12);
  --ok-soft: rgba(16, 185, 129, .12);
  --shadow: 0 12px 32px rgba(17, 17, 26, .08);
  color-scheme: light;
}
html[data-theme="dark"] { color-scheme: dark; }
body.landing { transition: background-color .25s, color .25s; }
html[data-theme="light"] .site-nav { background: rgba(247, 247, 249, .82); }
html[data-theme="light"] .plan li,
html[data-theme="light"] .included-grid,
html[data-theme="light"] .review-text { color: #33333C; }
html[data-theme="light"] .stars { color: #D4D4DC; }
html[data-theme="light"] .stars .half { background: linear-gradient(90deg, #FBBC04 50%, #D4D4DC 50%); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .promo-bar { background: linear-gradient(90deg, #FFF1EA, #FFE3D6 50%, #FFF1EA); }
html[data-theme="light"] .plan.popular { box-shadow: 0 0 0 1px rgba(255, 90, 31, .25), 0 20px 50px rgba(255, 90, 31, .10); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #CFCFD8; }

/* ---------- Header controls ---------- */
.nav-actions { align-items: center; }
.lang-select {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); cursor: pointer;
}
.lang-select:hover { color: var(--text); }
.lang-select [data-lucide] { width: 16px; height: 16px; flex: none; }
.lang-select .chev { width: 14px; height: 14px; pointer-events: none; }
.lang-select select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--text);
  font-size: 13px; font-weight: 500; cursor: pointer; outline: none; max-width: 112px; padding-right: 2px;
}
.lang-select select option { background: var(--surface); color: var(--text); }
.lang-select:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle [data-lucide] { width: 17px; height: 17px; }
html[data-theme="dark"] .theme-toggle .ico-moon,
html[data-theme="light"] .theme-toggle .ico-sun { display: none; }

/* Hide Google Translate's own banner, tooltips and highlights */
#google_translate_element, .goog-te-banner-frame, iframe.skiptranslate, .skiptranslate > iframe,
#goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font[style] { background: transparent !important; box-shadow: none !important; }

/* ---------- Hero v3 (two-column, global) ---------- */
.hero { text-align: left; padding: clamp(48px, 7vw, 96px) clamp(16px, 5vw, 56px) 56px; }
.hero::before { display: none; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg::before {          /* dotted world-grid */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 60% at 60% 35%, #000 20%, transparent 75%);
          mask-image: radial-gradient(70% 60% at 60% 35%, #000 20%, transparent 75%);
  opacity: .7;
}
.hero-bg::after {           /* warm glow */
  content: ""; position: absolute; width: 900px; height: 700px; right: -200px; top: -260px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 90, 31, .22), transparent 70%);
}
html[data-theme="light"] .hero-bg::after { background: radial-gradient(50% 50% at 50% 50%, rgba(255, 90, 31, .14), transparent 70%); }
.hero-inner {
  position: relative; z-index: 1; max-width: 1220px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero .eyebrow [data-lucide] { width: 14px; height: 14px; color: var(--primary); }
.hero h1 { margin: 22px 0 18px; max-width: 640px; font-size: clamp(36px, 5vw, 60px); }
.hero p.lead { margin: 0 0 28px; max-width: 560px; }
.hero .quick-audit { margin: 0; max-width: 600px; }
.hero .hero-meta { justify-content: flex-start; }
.hero-meta [data-lucide="shield-check"] { color: var(--primary); }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 34px 0 0; max-width: 620px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden;
}
.hero-stats div { padding: 14px 14px; border-right: 1px solid var(--border); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats dt { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.hero-stats dd { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }

.hero-visual { position: relative; min-height: 460px; display: grid; place-items: center; padding: 52px 0 44px; }
.globe { position: absolute; width: 112%; max-width: 560px; aspect-ratio: 1; stroke: var(--border-strong); stroke-width: 1; opacity: .7;
  animation: globe-spin 60s linear infinite; }
@keyframes globe-spin { to { transform: rotate(360deg); } }
.mock { position: relative; width: 100%; max-width: 440px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
html[data-theme="light"] .mock { box-shadow: 0 30px 70px rgba(17, 17, 26, .12); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock-bar > span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mock-bar > span:first-child { background: #FF5F57; } .mock-bar > span:nth-child(2) { background: #FEBC2E; } .mock-bar > span:nth-child(3) { background: #28C840; }
.mock-url { margin-left: 10px; flex: 1; display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 6px;
  background: var(--bg); color: var(--muted); font-size: 11.5px; }
.mock-url [data-lucide] { width: 12px; height: 12px; color: var(--ok); }
.mock-body { padding: 16px; display: grid; grid-template-columns: 110px 1fr; gap: 14px 16px; }
.mock-score { position: relative; width: 110px; height: 110px; }
.ring { width: 110px; height: 110px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { stroke: var(--primary); stroke-linecap: round; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font-size: 28px; line-height: 1; }
.ring-label small { color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.mock-kpis { display: grid; gap: 8px; align-content: center; }
.mock-kpis div { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--bg); }
.mock-kpis small { color: var(--muted); font-size: 11.5px; }
.mock-kpis b { font-size: 14px; }
.mock em { font-style: normal; font-size: 11px; font-weight: 600; }
.mock em.up { color: var(--ok); } .mock em.flat { color: var(--muted); }
.mock-spark { grid-column: 1 / -1; width: 100%; height: 56px; }
.mock-ranks { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mock-ranks li { display: grid; grid-template-columns: 30px 1fr 30px 32px; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--bg); font-size: 12.5px; }
.mock-ranks .kw { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-ranks .pos { min-width: 28px; height: 22px; font-size: 12px; }
.mock-ranks em { text-align: right; }
.cc { display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px; border-radius: 4px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; }

.float-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 12px; animation: floaty 6s ease-in-out infinite; }
.float-chip [data-lucide] { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); flex: none; }
.float-chip b { display: block; font-size: 12.5px; }
.float-chip small { color: var(--muted); font-size: 11px; }
.chip-ai { left: -8px; top: 4px; }
.chip-ai [data-lucide] { background: var(--ok-soft); color: var(--ok); }
.chip-cwv { right: -8px; bottom: 12px; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.mock-caption { position: absolute; bottom: -14px; left: 0; right: 0; text-align: center; color: var(--muted-2); font-size: 11px; }

.hero-engines { position: relative; z-index: 1; max-width: 1220px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 12px 28px; flex-wrap: wrap; font-size: 13px; }
.hero-engines ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px 28px; flex-wrap: wrap; justify-content: center; }
.hero-engines li { font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--muted); opacity: .85; }
.hero .qa-result { max-width: 1220px; position: relative; z-index: 1; }

/* ---------- Money-back guarantee ---------- */
.plan-guarantee { display: flex; align-items: center; gap: 6px; margin: -6px 0 0; color: var(--muted); font-size: 12.5px; }
.plan-guarantee [data-lucide] { width: 15px; height: 15px; color: var(--primary); }
.guarantee {
  max-width: 1080px; margin: 24px auto 0; padding: 30px 32px; display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: center;
  background: radial-gradient(80% 140% at 0% 50%, rgba(255, 90, 31, .12), transparent 60%), var(--surface);
  border-color: rgba(255, 90, 31, .35);
}
.seal { position: relative; width: 140px; height: 140px; }
.seal svg { width: 100%; height: 100%; }
.seal-ring { fill: none; stroke: var(--primary); stroke-width: 3; stroke-dasharray: 4 5; }
.seal-inner { fill: var(--primary); }
.seal-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; }
.seal-text b { font-size: 44px; line-height: 1; letter-spacing: -.03em; }
.seal-text small { font-size: 11px; font-weight: 700; letter-spacing: .2em; }
.guarantee-copy h3 { font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -.02em; margin: 12px 0 8px; }
.guarantee-copy > p { color: var(--muted); max-width: 640px; }
.guarantee-copy ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.guarantee-copy li { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.guarantee-copy li [data-lucide] { width: 16px; height: 16px; color: var(--ok); }
.guarantee .eyebrow [data-lucide] { width: 14px; height: 14px; color: var(--primary); }
.small { font-size: 13px; margin-top: 12px; }
.link { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Testimonials ---------- */
.sample-note { display: inline-flex; align-items: flex-start; text-align: left; gap: 8px; margin-top: 6px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong); font-size: 13px !important; }
.sample-note [data-lucide] { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.sample-note code { font-size: 12px; }
.testimonial .review-head > div { min-width: 0; display: grid; gap: 2px; }
.testimonial .review-head small { display: block; line-height: 1.35; }
.testimonial .t-country { display: flex !important; align-items: center; gap: 6px; }
.testimonial .sample-badge { align-self: flex-start; }
.reviews-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1080px; }
@media (max-width: 960px) { .reviews-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .reviews-3 { grid-template-columns: 1fr; } }
.sample-badge { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 999px; background: var(--surface-3); color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .site-nav nav { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-copy, .hero-visual { min-width: 0; }
  .hero-copy { text-align: center; }
  .hero h1, .hero p.lead, .hero .quick-audit, .hero-stats { margin-left: auto; margin-right: auto; }
  .hero .hero-meta { justify-content: center; }
  .hero-visual { min-height: 420px; }
}
@media (max-width: 720px) {
  .lang-select select { max-width: 64px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats div:nth-child(2) { border-right: 0; }
  .hero-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .float-chip { display: none; }
  .mock-body { grid-template-columns: 1fr; justify-items: center; }
  .mock-kpis { width: 100%; }
  .guarantee { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 26px 20px; }
  .guarantee-copy ul { justify-content: center; }
}
@media (max-width: 480px) {
  .site-nav { padding: 12px 14px; gap: 8px; }
  .brand { font-size: 0; gap: 0; }            /* logo mark only */
  .nav-actions .btn-ghost { display: none; }   /* sign-up page has a Log in tab */
  .nav-actions .btn-primary { height: 36px; font-size: 13px; }
  .lang-select, .theme-toggle { height: 36px; }
  .theme-toggle { width: 36px; }
  .lang-select select { max-width: 70px; font-size: 12px; }
  .hero .quick-audit { flex-direction: column; }
  .hero .quick-audit .qa-icon { display: none; }
  .hero .quick-audit .btn { width: 100%; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-primary { padding: 0 12px; }
  .lang-select { padding: 0 8px; }
  .lang-select .chev { display: none; }
}

/* =====================================================================
   Research modules — Keyword Explorer · Backlinks · SERP Analysis
   ===================================================================== */
.setup-card { max-width: 860px; }
.setup-head { display: flex; gap: 16px; align-items: flex-start; }
.setup-head h3 { margin: 2px 0 6px; font-size: 18px; }
.setup-ico { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.setup-ico [data-lucide] { width: 22px; height: 22px; }
.setup-steps { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text); font-size: 14px; }
.setup-steps li::marker { color: var(--primary); font-weight: 700; }
.gads-connect { margin: 4px 0 12px; }

.kx-form { display: grid; grid-template-columns: 2fr 1.3fr 1fr 1fr auto; gap: 12px; align-items: end; }
.kx-form .field { margin: 0; }
.kx-meta { margin-top: 10px; font-size: 12px; }
.kx-tools { align-items: center; }
.kx-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.kd { display: inline-grid; place-items: center; min-width: 34px; height: 24px; border-radius: 6px; font-weight: 700; font-size: 12px; }
.kd-easy { background: var(--ok-soft); color: var(--ok); }
.kd-mid { background: var(--warning-soft); color: var(--warning); }
.kd-hard { background: var(--error-soft); color: var(--error); }

.bl-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; }
.bl-bar > span { margin-right: auto; }
.bl-url { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }

.serp-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.serp-kw-list { display: grid; gap: 4px; max-height: 620px; overflow-y: auto; margin: -4px; padding: 4px; }
.serp-kw { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 9px 10px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; font: inherit; }
.serp-kw:hover { background: var(--surface-2); }
.serp-kw.active { background: var(--primary-soft); border-color: rgba(255, 90, 31, .35); }
.serp-kw .kw { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-kw .meta { grid-column: 1; font-size: 11.5px; }
.serp-kw .pos { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.serp-head { align-items: flex-start; flex-wrap: wrap; }
.serp-actions { display: flex; gap: 8px; align-items: center; }
.serp-you { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.serp-features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.feat { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted); }
.feat.owned { color: var(--ok); border-color: rgba(16, 185, 129, .45); background: var(--ok-soft); }
.feat [data-lucide] { width: 13px; height: 13px; }
.serp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.serp-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 60px; gap: 12px; align-items: start; padding: 10px; border-radius: 10px; }
.serp-list li:hover { background: var(--surface-2); }
.serp-list li.you { background: var(--ok-soft); box-shadow: inset 3px 0 0 var(--ok); }
.serp-res a { font-weight: 600; color: var(--text); }
.serp-res a:hover { color: var(--primary); }
.serp-dom { font-size: 12px; color: var(--muted); margin-top: 2px; }
.serp-res p { font-size: 12.5px; margin-top: 4px; line-height: 1.45; }
.serp-chg { text-align: right; font-size: 12.5px; padding-top: 3px; }

@media (max-width: 1180px) {
  .kx-form { grid-template-columns: 1fr 1fr; }
  .kx-form .kx-seeds { grid-column: 1 / -1; }
  .serp-layout { grid-template-columns: 1fr; }
  .serp-kw-list { max-height: 260px; }
}
@media (max-width: 640px) { .kx-form { grid-template-columns: 1fr; } }

/* =====================================================================
   Google Search Console
   ===================================================================== */
.gsc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.gsc-prop { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-right: 6px; }
.gsc-prop [data-lucide] { width: 16px; height: 16px; color: var(--primary); }
.gsc-sync { font-size: 12px; margin-left: auto; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.gsc-tile { border-top: 3px solid var(--border-strong); }
.gsc-tile.c-clicks { border-top-color: #FF5A1F; } .gsc-tile.c-impr { border-top-color: #8B5CF6; }
.gsc-tile.c-ctr { border-top-color: #10B981; } .gsc-tile.c-pos { border-top-color: #F59E0B; }
.gsc-tile .delta { font-size: 12px; margin-top: 4px; min-height: 16px; }
.gsc-pick { max-width: 860px; }
.gsc-pick-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.gsc-pick-row .select { flex: 1; min-width: 260px; }
.gsc-key { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .gsc-sync { margin-left: 0; width: 100%; } }

/* =====================================================================
   Brand logos (assets/img) — light-text logo on dark, dark-text logo in light mode
   ===================================================================== */
.brand-logo { height: 46px; width: auto; display: block; }
.brand-logo-mark { display: none; height: 38px; width: 38px; }
.logo-on-light { display: none; }
html[data-theme="light"] .logo-on-dark { display: none; }
html[data-theme="light"] .logo-on-light { display: block; }
.brand-auth .brand-logo { height: 52px; }
.brand-mark-img { width: 38px; height: 38px; object-fit: contain; display: block; }
@media (max-width: 480px) {
  .site-nav .brand-logo { display: none !important; }
  .site-nav .brand-logo-mark { display: block; }
}

/* =====================================================================
   Help & Guides
   ===================================================================== */
.help-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-toc { position: sticky; top: 16px; display: grid; gap: 12px; }
.help-toc nav { display: grid; gap: 2px; }
.help-toc nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 13.5px; }
.help-toc nav a:hover { background: var(--surface-2); color: var(--text); }
.help-toc nav a.active { background: var(--primary-soft); color: var(--text); }
.help-toc .n { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); font-size: 11px; font-weight: 700; }
.help-toc nav a.active .n { background: var(--primary); color: #fff; }
.help-contact { font-size: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.help-body { display: grid; gap: 20px; }
.help-guide { scroll-margin-top: 16px; }
.help-guide-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.help-guide-head > div { flex: 1; }
.help-guide-head h2 { font-size: 19px; margin: 2px 0 4px; letter-spacing: -.01em; }
.help-steps { list-style: none; margin: 0; padding: 0; counter-reset: hs; display: grid; gap: 18px; }
.help-steps > li { counter-increment: hs; position: relative; padding-left: 42px; }
.help-steps > li::before { content: counter(hs); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; }
.help-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: -14px; width: 2px; background: var(--border); }
.help-step-text { font-size: 14.5px; line-height: 1.6; padding-top: 2px; }
.help-shot { margin: 12px 0 0; }
.help-zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--bg); cursor: zoom-in; }
.help-zoom img { display: block; width: 100%; height: auto; }
.help-zoom:hover { border-color: var(--primary); }
.help-shot figcaption { margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.help-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 0; }
.help-list > div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.help-list dt { font-weight: 600; margin-bottom: 4px; }
.help-list dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.help-tips { display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--primary-soft); border: 1px solid rgba(255, 90, 31, .25); }
.help-tips [data-lucide], .help-tips svg { flex: none; width: 18px; height: 18px; color: var(--primary); margin-top: 1px; }
.help-tips ul { margin: 0; padding-left: 16px; display: grid; gap: 4px; font-size: 13.5px; }
.help-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .86); display: grid; place-items: center; padding: 32px; cursor: zoom-out; }
.help-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.help-lightbox .icon-btn { position: absolute; top: 16px; right: 16px; }
@media (max-width: 1100px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; }
  .help-toc nav { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 640px) { .help-steps > li { padding-left: 36px; } }

/* =====================================================================
   Legal pages (privacy.php, terms.php) + footer links
   ===================================================================== */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal { max-width: 860px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) clamp(16px, 5vw, 32px) 64px; line-height: 1.7; font-size: 15.5px; }
.legal .eyebrow [data-lucide], .legal .eyebrow svg { width: 14px; height: 14px; color: var(--primary); }
.legal h1 { font-size: clamp(32px, 4.5vw, 44px); letter-spacing: -.03em; margin: 16px 0 6px; line-height: 1.15; }
.legal-updated { color: var(--muted); font-size: 13.5px; margin: 0 0 24px; }
.legal-lead { font-size: 17px; color: var(--text); }
.legal h2 { font-size: 21px; letter-spacing: -.015em; margin: 40px 0 10px; padding-top: 18px; border-top: 1px solid var(--border); scroll-margin-top: 90px; }
.legal p, .legal li { color: var(--muted); }
.legal p b, .legal li b { color: var(--text); }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal code { font-size: 13px; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.legal-toc a { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.legal-toc a:hover { color: var(--text); background: var(--surface-3); }
.legal-callout { padding: 14px 16px; border-radius: 12px; background: var(--primary-soft); border: 1px solid rgba(255, 90, 31, .3); color: var(--text) !important; }
.legal-table td, .legal-table th { vertical-align: top; font-size: 14px; }
.legal-table td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; }
.legal-table td { color: var(--muted); }
.legal-agree { font-size: 12.5px; color: var(--muted); text-align: center; margin: -4px 0 0; line-height: 1.5; }
.legal-agree a, .auth-legal-links a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.auth-legal-links { text-align: center; font-size: 12px; color: var(--muted); margin: 0; }
@media (max-width: 640px) { .legal-table td:first-child { white-space: normal; } }
.help-toc nav a[hidden], .help-guide[hidden], .help-empty[hidden] { display: none !important; }
.help-contact a { white-space: nowrap; }

.auth-title { font-size: 22px; letter-spacing: -.02em; text-align: center; margin: 4px 0 0; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: -6px 0 2px; }

.ps-alert { display: flex; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(245, 158, 11, .45); background: var(--warning-soft); font-size: 13.5px; line-height: 1.55; }
.ps-alert > [data-lucide], .ps-alert > svg { flex: none; width: 20px; height: 20px; color: var(--warning); margin-top: 2px; }
.ps-alert p { margin: 4px 0 0; }
.ps-alert.ps-alert-info { border-color: rgba(59, 130, 246, .45); background: rgba(59, 130, 246, .10); }
.ps-alert.ps-alert-info > [data-lucide], .ps-alert.ps-alert-info > svg { color: #3B82F6; }
/* AI provider test */
.ai-test { display: grid; gap: 6px; margin: 0 0 12px; }
.ai-test-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.ai-test-msg { flex-basis: 100%; color: var(--muted); font-size: 12px; }

/* ---------------- Coupons ---------------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.stat .stat-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 10px; }
.stat .stat-ico svg { width: 20px; height: 20px; }
.coupon-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 12px; }
.coupon-bar > svg { color: var(--primary); width: 20px; height: 20px; flex: none; }
.coupon-bar .input { flex: 1; min-width: 180px; max-width: 320px; height: 36px; text-transform: uppercase; }
.coupon-on { flex: 1; font-size: 14px; }
.coupon-on b { color: var(--ok); font-family: ui-monospace, Menlo, Consolas, monospace; }
.coupon-err { color: var(--error); font-size: 13px; flex-basis: 100%; }
.coupon-price { margin-top: 8px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.coupon-plans { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.coupon-plans label { display: flex; gap: 6px; align-items: center; }
a.plan-chip { text-decoration: none; }
.plan-chip-alert { border-color: rgba(239, 68, 68, .5) !important; color: var(--error) !important; }

/* Date pickers: visible calendar icon on dark surfaces; the whole field opens the calendar (app.js) */
.input[type="date"], .input[type="datetime-local"] { cursor: pointer; }
html:not([data-theme="light"]) .input[type="date"], html:not([data-theme="light"]) .input[type="datetime-local"] { color-scheme: dark; }
.input[type="date"]::-webkit-calendar-picker-indicator, .input[type="datetime-local"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .85; padding: 4px; border-radius: 6px; }
.input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: var(--surface-3); }

/* ---------------- Content Gap Analysis ---------------- */
.cg-scope button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px; }
.cg-scope svg, .cg-tabs svg { width: 14px; height: 14px; }
.cg-comp-row { display: flex; gap: 8px; align-items: center; }
.cg-comp-row .input { flex: 1; }
.cg-cnum { width: 30px; flex: none; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.cg-err { color: var(--error); font-size: 13px; }
.cg-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.cg-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #ff8a4c); border-radius: 99px; transition: width .4s; }
.cg-urls { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cg-urls li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.cg-urls li svg { width: 16px; height: 16px; flex: none; }
.cg-u-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-u-state { color: var(--muted); font-size: 12px; }
.cg-u-err { flex-basis: 100%; font-size: 12px; color: var(--warning); padding-left: 26px; }
.cg-u-ok svg { color: var(--ok); } .cg-u-warn svg { color: var(--warning); } .cg-u-err svg, li.cg-u-err svg { color: var(--error); } .cg-u-run svg { color: var(--primary); } .cg-u-muted svg { color: var(--muted); }
.spin { animation: spin 1s linear infinite; }
.cg-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cg-title { font-size: 20px; margin: 6px 0 2px; word-break: break-word; }
.cg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cg-notes { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.cg-notes > div, .cg-warn { display: flex; gap: 8px; align-items: flex-start; }
.cg-notes svg, .cg-warn svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.cg-warn { color: var(--warning); font-size: 13px; }
.cg-summary { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; border-color: rgba(255, 90, 31, .35); }
.cg-summary svg { color: var(--primary); flex: none; margin-top: 3px; }
.cg-summary p { margin: 0; line-height: 1.6; }
.cg-kpis .stat .label { margin-bottom: 8px; }
.cg-score-pill { display: inline-block; min-width: 38px; padding: 1px 8px; border-radius: 8px; text-align: center; font-weight: 700; }
.cg-score-pill.status-great { color: var(--ok); background: var(--ok-soft); }
.cg-score-pill.status-good { color: var(--warning); background: var(--warning-soft); }
.cg-score-pill.status-bad { color: var(--error); background: var(--error-soft); }
.cg-parts { display: grid; gap: 4px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.cg-parts div { display: grid; grid-template-columns: 62px 1fr 26px; align-items: center; gap: 6px; text-transform: capitalize; }
.cg-parts i { height: 5px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.cg-parts b { display: block; height: 100%; background: var(--primary); border-radius: 9px; }
.cg-parts em { font-style: normal; text-align: right; color: var(--text); }
.cg-quick { cursor: pointer; transition: border-color .15s; }
.cg-quick:hover { border-color: var(--primary); }
.cg-quick-t { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.cg-matrix th:first-child { white-space: nowrap; color: var(--muted); font-weight: 500; }
.cg-matrix thead th { vertical-align: bottom; }
.cg-mh { font-size: 11px; font-weight: 400; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-matrix .cg-you, .cg-matrix tbody td:nth-child(2) { background: rgba(255, 90, 31, .05); }
.cg-low { color: var(--error); font-weight: 600; }
.cg-high { color: var(--ok); }
.cg-low-key { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--error); margin-right: 4px; }
.cg-yes { color: var(--ok); } .cg-no { color: var(--error); }
.cg-pm { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px; align-items: stretch; }
.cg-pm-h { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.cg-pm-h svg { width: 14px; height: 14px; }
.cg-pm-r { display: flex; align-items: center; }
.cg-pm-c { text-align: left; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; display: flex; gap: 10px; align-items: flex-start; min-height: 56px; }
.cg-pm-c b { font-size: 20px; line-height: 1; min-width: 24px; }
.cg-pm-c span { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cg-pm-c:hover:not([disabled]) { border-color: var(--primary); }
.cg-pm-c[disabled] { opacity: .45; cursor: default; }
.cg-pm-high b { color: var(--error); } .cg-pm-medium b { color: var(--warning); }
.cg-tabs { flex-wrap: wrap; }
.cg-tabs button { display: inline-flex; gap: 6px; align-items: center; }
.cg-tabs em { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.cg-gaps td { vertical-align: top; }
.cg-detail { font-size: 12.5px; margin-top: 2px; }
.cg-why { font-size: 12.5px; margin-top: 4px; display: flex; gap: 6px; color: var(--text); }
.cg-why svg { width: 13px; height: 13px; color: var(--primary); flex: none; margin-top: 2px; }
.cg-ev { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cg-ev span { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; margin: 0 4px 4px 0; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.cg-action { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; white-space: nowrap; color: var(--muted); }
.cg-action svg { width: 13px; height: 13px; }
.cg-action.cg-new { color: #60A5FA; }
.cg-flash { animation: cgflash 1.6s ease; }
@keyframes cgflash { 0%, 60% { background: var(--primary-soft); } 100% { background: transparent; } }
.cg-brief h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cg-h1 { font-size: 22px; margin: 0 0 12px; }
.cg-meta { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.cg-meta dt { color: var(--muted); }
.cg-meta dd { margin: 0; }
.cg-len { font-size: 11px; padding: 0 5px; border-radius: 5px; margin-left: 4px; }
.cg-len.ok { background: var(--ok-soft); color: var(--ok); } .cg-len.bad { background: var(--warning-soft); color: var(--warning); }
.cg-outline { padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; }
.cg-outline ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }
.cg-outline p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.cg-faq { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.cg-faq p { margin: 4px 0 0; color: var(--muted); }
.cg-brief-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.cg-brief-pdf { color: #111; }
.cg-brief-pdf .cg-meta dt, .cg-brief-pdf h4, .cg-brief-pdf .cg-outline p, .cg-brief-pdf .cg-outline ul, .cg-brief-pdf .cg-faq p { color: #555; }
.cg-brief-pdf .cg-chip { background: #f3f3f5; border-color: #ddd; color: #111; }
@media (max-width: 760px) { .cg-pm { grid-template-columns: 64px 1fr 1fr; } .cg-meta { grid-template-columns: 1fr; } }
