/* ============================================================
   Adfactors GEO — Screen-specific styles
   ============================================================ */

/* ---------- Login ---------- */
.login-stage { position: fixed; inset: 0; display: grid; place-items: center; padding: var(--s-6);
  background:
    radial-gradient(1100px 600px at 78% -10%, rgba(242,179,95,.20), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(226,143,39,.12), transparent 55%),
    var(--bg);
}
.login-card { width: 100%; max-width: 392px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 38px 34px 32px; animation: viewIn var(--dur-slow) var(--ease-out) both; }
.login-card .brand { justify-content: center; cursor: default; margin-bottom: 22px; }
.login-card .brand .glyph { width: 38px; height: 38px; border-radius: 11px; }
.login-card .brand .glyph svg { width: 20px; height: 20px; }
.login-card .brand .word { font-size: 18px; }
.login-lead { text-align: center; margin-bottom: 26px; }
.login-lead h1 { font-family: var(--font-display); font-weight: 500; font-size: 23px; margin: 0 0 8px; }
.login-lead .secure { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: var(--r-pill); }
.login-lead .secure svg { width: 13px; height: 13px; color: var(--accent-ink); }
.login-foot { text-align: center; margin-top: 20px; font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

/* ---------- Report header ---------- */
.report-head { margin-bottom: var(--s-6); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13px; margin-bottom: var(--s-4); cursor: pointer; white-space: nowrap; }
.back-link:hover { color: var(--accent-ink); }
.report-title { font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 var(--s-4); max-width: 760px; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }

.report-actions { display: flex; gap: var(--s-3); margin-left: auto; }
.head-flex { display: flex; align-items: flex-start; gap: var(--s-5); flex-wrap: wrap; }
.head-flex .titles { flex: 1; min-width: 280px; }

/* link box */
.linkbox { display: flex; align-items: center; gap: var(--s-3); padding: 12px 12px 12px 16px; background: var(--accent-wash); border: 1px solid #f2e2c8; border-radius: var(--r-ctrl); margin-bottom: var(--s-6); animation: viewIn var(--dur) var(--ease-out) both; }
.linkbox .ico { color: var(--accent-ink); display: grid; place-items: center; }
.linkbox .url { flex: 1; font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbox .lbl { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }

/* ---------- Score hero ---------- */
.hero { display: grid; grid-template-columns: 280px 1fr; gap: var(--s-7); align-items: center; }
.gauge-wrap { display: grid; place-items: center; }
.gauge { position: relative; width: 240px; height: 240px; }
.gauge .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge .score-num { font-weight: 800; font-size: 62px; line-height: .9; letter-spacing: -.03em; }
.gauge .score-den { font-size: 15px; color: var(--faint); font-weight: 700; margin-top: 2px; }
.gauge .gletter { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-top: 8px; padding: 2px 12px; border-radius: var(--r-pill); }

.hero-verdict .vlabel { font-family: var(--font-mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.hero-verdict h2 { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.18; letter-spacing: -.01em; margin: 0 0 var(--s-4); max-width: 540px; }
.provenance { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.provenance .pv { padding: 4px 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; white-space: nowrap; }
.extract-note { margin-top: 14px; font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 7px; }

/* ---------- Sub-score cards ---------- */
.subscores { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin: var(--s-6) 0; }
.subscore .sub-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.subscore .sub-name { font-weight: 700; font-size: 13.5px; }
.subscore .sub-val { font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.subscore .sub-val small { font-size: 13px; color: var(--faint); font-weight: 700; }
.subscore .sub-method { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); margin-top: 8px; letter-spacing: .02em; }
.danger-note { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--danger-ink); }

/* progress bar */
.bar-track { height: 9px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--r-pill); transition: width var(--dur-slow) var(--ease-out); }
.bar-thin .bar-track { height: 7px; }

/* ---------- Two-column ---------- */
.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s-5); margin-bottom: var(--s-5); align-items: start; }

/* factor rows */
.factor { border-bottom: 1px solid var(--line); }
.factor:last-child { border-bottom: none; }
.factor-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s-4); padding: 15px 4px; cursor: pointer; align-items: center; }
.factor-row:hover .factor-name { color: var(--accent-ink); }
.factor-left { min-width: 0; }
.factor-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 9px; transition: color var(--dur-fast); }
.factor-name .chev { transition: transform var(--dur); color: var(--faint); display: inline-flex; }
.factor.open .factor-name .chev { transform: rotate(90deg); }
.factor-method { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); margin-top: 5px; }
.factor-method .wt { color: var(--accent-ink); }
.factor-right { display: flex; align-items: center; gap: var(--s-4); width: 230px; }
.factor-right .fbar { flex: 1; }
.factor-right .fscore { font-weight: 800; font-size: 16px; width: 34px; text-align: right; }
.factor-detail { overflow: hidden; max-height: 0; transition: max-height var(--dur-slow) var(--ease); }
.factor.open .factor-detail { max-height: 420px; }
.factor-detail-inner { padding: 4px 4px 20px; }
.rationale { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0 0 14px; }
.evidence { border-left: 2px solid var(--accent-2); padding: 4px 0 4px 14px; margin: 0 0 14px; }
.evidence .eq { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--ink); line-height: 1.5; }
.evidence .es { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); margin-top: 6px; }
.fix { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--accent-wash); border-radius: var(--r-ctrl); font-size: 13px; }
.fix .fl { font-weight: 800; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 6px; }
.fix-body { color: var(--accent-ink); }

/* radar card */
.radar-wrap { display: grid; place-items: center; padding: var(--s-3) 0; }

/* ---------- Recommendations ---------- */
.rec-grid { display: grid; gap: var(--s-3); }
.rec { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-card-sm); background: var(--surface); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.rec:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.prio { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 5px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.prio-high { background: var(--danger-wash); color: var(--danger-ink); }
.prio-med  { background: var(--amber-wash); color: var(--amber-ink); }
.prio-low  { background: var(--surface-2); color: var(--muted); }
.rec-body .rec-factor { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-bottom: 4px; }
.rec-body .rec-action { font-size: 14px; line-height: 1.5; font-weight: 600; }
.impact { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--success-ink); background: var(--success-wash); padding: 6px 11px; border-radius: var(--r-pill); white-space: nowrap; }

/* ---------- Client reviews (agency) ---------- */
.review-item { display: flex; gap: var(--s-4); padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.review-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.review-meta .who { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.review-meta .when { font-family: var(--font-mono); font-size: 11px; color: var(--faint); white-space: nowrap; }
.review-comment { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* =====================================================
   REWRITE screen
   ===================================================== */
.guardrail { display: flex; gap: var(--s-4); padding: 18px 20px; border-radius: var(--r-card); background: linear-gradient(135deg, #fdf4e7, #fefaf3); border: 1px solid #f2e2c8; margin-bottom: var(--s-6); }
.guardrail .lock { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--accent-2), var(--accent-deep)); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 16px -6px rgba(12,131,119,.6); }
.guardrail .lock svg { width: 22px; height: 22px; }
.guardrail h3 { margin: 0 0 5px; font-size: 15.5px; }
.guardrail p { margin: 0; color: var(--accent-ink); font-size: 13.5px; line-height: 1.55; }
.guardrail code { font-family: var(--font-mono); background: rgba(226,143,39,.12); padding: 1px 6px; border-radius: 5px; font-size: 12px; }

.method-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rationale-line { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 var(--s-6); max-width: 760px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.split-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.pane-head { position: sticky; top: 64px; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 13px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pane-head .pl { font-weight: 800; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.pane-head.orig .pl { color: var(--faint); }
.pane-head.opt .pl { color: var(--accent-ink); }
.pane-head .spacer { flex: 1; }
.pane-head .ph-count { font-size: 12px; font-weight: 700; color: var(--amber-ink); background: var(--amber-wash); padding: 4px 10px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 6px; }
.doc { padding: 22px 24px 28px; font-size: 15px; line-height: 1.72; color: var(--ink); }
.doc.serif { font-family: var(--font-display); font-weight: 400; }
.doc p { margin: 0 0 16px; }
.doc h4.doc-title { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin: 0 0 16px; line-height: 1.25; }
.ins { background: var(--amber-wash); color: var(--amber-ink); font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; border: 1px solid #f0dca6; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.add-mark { background: rgba(226,143,39,.16); border-radius: 3px; padding: 0 2px; }

/* =====================================================
   CLIENT REVIEW page (light, premium)
   ===================================================== */
.client-page { min-height: 100vh; background:
   radial-gradient(900px 500px at 85% -8%, rgba(242,179,95,.14), transparent 60%),
   var(--bg); }
.client-topbar { display: flex; align-items: center; gap: 12px; padding: 20px 28px; max-width: 760px; margin: 0 auto; }
.client-topbar .glyph { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent-2), var(--accent-deep)); color: #fff; display: grid; place-items: center; }
.client-topbar .glyph svg { width: 16px; height: 16px; }
.client-topbar .ct-word { font-weight: 800; font-size: 15px; }
.client-topbar .ct-sub { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 12px; white-space: nowrap; }
.client-wrap { max-width: 680px; margin: 0 auto; padding: var(--s-5) 28px var(--s-10); }
.client-prepared { font-size: 13.5px; color: var(--muted); margin: 0 0 var(--s-3); }
.client-prepared b { color: var(--ink); }
.client-h1 { font-family: var(--font-display); font-weight: 500; font-size: 33px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 var(--s-6); }

.client-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: var(--s-7); margin-bottom: var(--s-5); }
.donut-row { display: flex; align-items: center; gap: var(--s-7); }
.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut .dn { font-weight: 800; font-size: 44px; letter-spacing: -.03em; line-height: .9; }
.donut .dg { font-family: var(--font-display); font-weight: 600; font-size: 14px; margin-top: 4px; padding: 2px 11px; border-radius: var(--r-pill); }
.client-verdict .cv-eyebrow { font-size: 12px; font-weight: 700; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.client-verdict h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.3; margin: 0; }

.suggest-list { list-style: none; margin: var(--s-6) 0 0; padding: var(--s-6) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--s-3); }
.suggest-list .sl-h { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.suggest-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
.suggest-list .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); display: grid; place-items: center; flex: none; margin-top: 1px; }
.suggest-list .tick svg { width: 12px; height: 12px; }

/* content toggle */
.content-toggle { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); border: 1px solid var(--line); margin-bottom: var(--s-5); }
.content-toggle button { padding: 8px 16px; border: none; background: none; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; transition: all var(--dur-fast); }
.content-toggle button.active { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.client-doc { font-family: var(--font-display); font-size: 16.5px; line-height: 1.75; color: var(--ink); }
.client-doc p { margin: 0 0 17px; }
.placeholder-note { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--s-5); padding: 13px 15px; background: var(--amber-wash); border: 1px solid #f0dca6; border-radius: var(--r-ctrl); font-size: 13px; color: var(--amber-ink); line-height: 1.5; }
.placeholder-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* decision card */
.decision .field > label { font-size: 13.5px; }
.decision-actions { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-5); }
.decision-actions .btn { width: 100%; }
.secondary-row { display: flex; gap: var(--s-3); }
.secondary-row .btn { flex: 1; }

/* confirmation */
.confirm-panel { text-align: center; padding: var(--s-8) var(--s-6); }
.confirm-panel .big-tick { width: 72px; height: 72px; border-radius: 50%; background: var(--success-wash); color: var(--success); display: grid; place-items: center; margin: 0 auto var(--s-5); animation: pop var(--dur-slow) var(--ease-out) both; }
.confirm-panel .big-tick svg { width: 36px; height: 36px; }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.confirm-panel h2 { font-family: var(--font-display); font-weight: 500; font-size: 26px; margin: 0 0 8px; }
.confirm-panel p { color: var(--muted); max-width: 380px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero-verdict { text-align: center; }
  .hero-verdict h2 { margin-left: auto; margin-right: auto; }
  .provenance { justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: var(--s-6) var(--s-5) var(--s-9); }
  .page-title { font-size: 27px; }
  .subscores { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .topbar { padding: 0 var(--s-5); gap: var(--s-3); }
  .topbar .nav .lbl { display: none; }
  .summary-strip { gap: var(--s-2); }
  .stat-card { min-width: 120px; }
  .hide-sm { display: none !important; }
  .rec { grid-template-columns: 1fr; }
  .rec .impact { justify-self: start; }
  .donut-row { flex-direction: column; text-align: center; }
  .client-h1 { font-size: 27px; }
}
@media (max-width: 600px) {
  .content-table .col-type, .content-table .col-client { display: none; }
  .factor-right { width: 120px; }
  .factor-right .fbar { display: none; }
}
