/* ============================================================
   TrustScore — Design System
   Rayna color language + Finclusion component architecture
   Plus Jakarta Sans typography, light-first with dark theme
   ============================================================ */

:root {
  /* Brand — Rayna */
  --brand: #2563EB;
  --brand-strong: #1D4ED8;
  --brand-deep: #1E40AF;
  --brand-soft: #EFF6FF;
  --accent: #EA580C;
  --accent-strong: #C2410C;
  --accent-soft: #FFF7ED;

  /* Semantic */
  --green: #15803D;
  --green-soft: #F0FDF4;
  --amber: #92400E;
  --amber-soft: #FFFBEB;
  --red: #B91C1C;
  --red-soft: #FEF2F2;
  --violet: #7C3AED;
  --violet-soft: #F1EBFD;

  /* Cool-gray SaaS surfaces (light) */
  --bg: #F8FAFC;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-2: #334155;
  --text-3: #64748B;
  --text-inverse: #FFFFFF;
  --ring: rgba(37, 99, 235, 0.28);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, 0.16);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --sidebar-w: 232px;
  --topbar-h: 64px;
  --pad: 24px;
  --gap: 16px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body[data-theme="dark"] {
  --bg: #020617;
  --bg-elevated: #0F172A;
  --surface: #0F172A;
  --surface-2: #1E293B;
  --surface-3: #1E293B;
  --border: #1E293B;
  --border-strong: #334155;
  --text: #F8FAFC;
  --text-2: #E2E8F0;
  --text-3: #94A3B8;
  --brand: #3B82F6;
  --brand-strong: #60A5FA;
  --brand-deep: #2563EB;
  --brand-soft: #172554;
  --accent-soft: #431407;
  --green: #BBF7D0;
  --green-soft: #14532D;
  --amber: #FDE68A;
  --amber-soft: #78350F;
  --red: #FECACA;
  --red-soft: #7F1D1D;
  --violet-soft: #1C1533;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.45);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.6);
}

body[data-density="compact"] {
  --pad: 14px;
  --gap: 12px;
  --topbar-h: 54px;
}

* { box-sizing: border-box; }
code { overflow-wrap: anywhere; word-break: break-word; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: 0; text-wrap: balance; }
p { text-wrap: pretty; }
svg { display: block; }
/* Standard icon size — every inline icon defaults to 18px unless a context overrides it */
svg.ic { width: 18px; height: 18px; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 15px; font-weight: 600; font-size: 13.5px; line-height: 1;
  min-height: 40px; background: var(--surface); color: var(--text);
  transition: transform 140ms ease-out, background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out, box-shadow 140ms ease-out, opacity 140ms ease-out;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.96); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-secondary { background: var(--accent); color: #fff; }
.btn-secondary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-sm { min-width: 40px; min-height: 40px; padding: 6px 10px; font-size: 12.5px; }
.btn-lg { min-height: 44px; padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Badges / tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--accent-soft); color: var(--accent-strong); }
.badge-brand { background: var(--brand-soft); color: var(--brand-deep); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-gray { background: var(--surface-3); color: var(--text-3); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--pad); box-shadow: var(--shadow-sm);
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 15px; }
.card-sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.muted { color: var(--text-3); }
.metric { display: flex; flex-direction: column; gap: 6px; }
.metric .val { font-size: 27px; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.metric .lbl { color: var(--text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0; }

/* ---------- Layout shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-elevated); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.side-brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.side-brand .name { font-weight: 800; font-size: 16px; letter-spacing: 0; }
.side-brand .pov { font-size: 11px; color: var(--text-3); font-weight: 600; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px; }
.nav-group-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; color: var(--text-3); padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 600; font-size: 13.5px; margin-bottom: 2px; transition: background-color 140ms ease-out, color 140ms ease-out; position: relative;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-deep); }
body[data-theme="dark"] .nav-item.active { color: var(--brand); }
.nav-item .ic { width: 18px; height: 18px; flex: none; }
.nav-item .chip { margin-left: auto; background: var(--brand); color: #fff; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; font-weight: 700; }
.side-foot { border-top: 1px solid var(--border); padding: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.side-user:hover { background: var(--surface-3); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 13px; flex: none; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); border-bottom: 1px solid var(--border); background: var(--bg-elevated);
  display: flex; align-items: center; gap: 12px; padding: 0 var(--pad); position: sticky; top: 0; z-index: 30;
}
.topbar .search {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; color: var(--text-3); font-size: 13px; min-width: 240px; cursor: text;
}
.topbar .search kbd { margin-left: auto; background: var(--surface-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 11px; font-family: inherit; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--text-2); position: relative; transition: transform 140ms ease-out, background-color 140ms ease-out, color 140ms ease-out; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:active { transform: scale(.96); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.icon-btn .ndot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; border: 2px solid var(--bg-elevated); }
.content { padding: var(--pad); max-width: 1360px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: var(--gap); flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head p { color: var(--text-3); margin: 4px 0 0; font-size: 13.5px; max-width: 640px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: var(--gap); }
/* grid children default to min-width:auto, which lets wide content (tables) push the page; allow them to shrink so inner overflow-x containers scroll instead */
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } .span3 { grid-column: span 2; } }
@media (max-width: 820px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: span 1; } }
@media (max-width: 760px) { .card-h { flex-wrap: wrap; } }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: var(--gap); overflow-x: auto; }
.tab { min-height: 40px; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--text-3); border: 0; border-bottom: 2px solid transparent; background: transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand-deep); border-color: var(--brand); }
body[data-theme="dark"] .tab.active { color: var(--brand); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.tbl thead th { text-align: left; padding: 11px 14px; color: var(--text-3); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; }
.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background-color 140ms ease-out; }
.tbl tbody tr.clickable:hover { background: var(--surface-2); cursor: pointer; }
.tbl .cell-main { font-weight: 600; color: var(--text); }
.tbl .cell-sub { color: var(--text-3); font-size: 12px; }

/* ---------- Score ring ---------- */
.score-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .rc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; }
.ring .rc .n { font-size: 30px; font-weight: 800; letter-spacing: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.ring .rc .b { font-size: 11px; color: var(--text-3); font-weight: 600; line-height: 1; }
.dim-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.dim-row:last-child { border: none; }
.dim-row .dn { font-weight: 600; min-width: 168px; font-size: 13px; }
.bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.dim-row .dv { font-weight: 700; min-width: 34px; text-align: right; font-size: 13px; }

/* ---------- Sparkline / trend ---------- */
.spark { width: 100%; height: 64px; }
.report-toolbar { display: flex; align-items: end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px; margin-bottom: var(--gap); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.report-toolbar label { display: grid; gap: 4px; min-width: 150px; }
.report-toolbar label > span { color: var(--text-3); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.report-toolbar .select { min-height: 38px; padding-block: 7px; }
.report-metrics { margin-bottom: 0; }
.chart-shell { width: 100%; overflow-x: auto; }
.report-chart { display: block; width: 100%; min-width: 560px; aspect-ratio: 680 / 270; max-height: 300px; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.chart-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 10px; color: var(--text-2); font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i, .donut-legend i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.bar-chart { display: grid; grid-template-columns: repeat(var(--bar-count, 5), minmax(50px, 1fr)); gap: 12px; align-items: end; min-height: 250px; padding-top: 16px; overflow-x: auto; }
.bar-col { display: grid; grid-template-rows: 22px 180px minmax(32px, auto); gap: 6px; min-width: 50px; text-align: center; }
.bar-value { align-self: end; color: var(--text-2); font-size: 11px; font-weight: 700; }
.bar-track { display: flex; align-items: end; justify-content: center; height: 180px; border: 1px solid var(--border); border-top: 0; background: var(--surface-2); }
.bar-track button { width: min(44px, 70%); min-height: 6px; border: 0; border-radius: 4px 4px 0 0; cursor: pointer; transition: opacity 140ms ease-out; }
.bar-track button:hover { opacity: .78; }
.bar-label { color: var(--text-3); font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; }
.donut-layout { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; align-items: center; gap: 22px; min-height: 250px; }
.donut { position: relative; aspect-ratio: 1; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut svg circle { cursor: pointer; }
.donut > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut > div strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.donut > div span { color: var(--text-3); font-size: 11px; }
.donut-legend { display: grid; gap: 11px; }
.donut-legend > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid var(--border); font-size: 12px; }
.donut-legend strong { font-variant-numeric: tabular-nums; }
.stacked-list { display: grid; gap: 14px; min-height: 230px; align-content: center; }
.stacked-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 12px; }
.stacked-label strong { font-variant-numeric: tabular-nums; }
.stacked-track { display: flex; height: 18px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.stacked-track button { min-width: 2px; border: 0; cursor: pointer; }
.heatmap { display: grid; grid-template-columns: minmax(78px, auto) repeat(var(--heat-cols), minmax(42px, 1fr)); gap: 6px; align-items: center; min-height: 240px; overflow-x: auto; }
.heatmap b, .heatmap strong { color: var(--text-3); font-size: 10px; text-align: center; }
.heatmap strong { text-align: left; }
.heatmap button { min-width: 42px; min-height: 38px; border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border)); border-radius: 4px; color: var(--text); background: color-mix(in srgb, var(--brand) calc(var(--heat) * 100%), var(--surface)); font-size: 11px; font-weight: 700; cursor: pointer; }
.insight-list { display: grid; }
.insight-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.insight-row:last-child { border-bottom: 0; }
.insight-row:hover strong { color: var(--brand-deep); }
.insight-row > span:nth-child(2) { min-width: 0; }
.insight-row strong, .insight-row small { display: block; }
.insight-row strong { margin-bottom: 3px; font-size: 13px; }
.insight-row small { color: var(--text-3); line-height: 1.4; }
.insight-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--blue); }
.insight-icon.good { background: var(--green-soft); color: var(--green); }
.insight-icon.warn { background: var(--amber-soft); color: var(--amber); }
.report-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
@media (max-width: 640px) {
  .report-toolbar { align-items: stretch; }
  .report-toolbar label { flex: 1 1 130px; min-width: 0; }
  .report-toolbar .btn { flex: 1 1 auto; }
  .donut-layout { grid-template-columns: 1fr; }
  .donut { width: min(190px, 70vw); margin: 0 auto; }
  .bar-chart { gap: 7px; }
  /* line charts shrink to fit the screen instead of scrolling inside the card */
  .report-chart { min-width: 0; }
  .report-chart .chart-axis { font-size: 15px; }
  .chart-shell { overflow-x: visible; }
}
.list-tight > * { padding: 11px 0; border-bottom: 1px solid var(--border); }
.list-tight > *:last-child { border: none; }
.row-flex { display: flex; align-items: center; gap: 12px; }
.row-flex .grow { flex: 1; min-width: 0; }
.mini { font-size: 12px; color: var(--text-3); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Reputation ---------- */
.reputation-page .metric .val { letter-spacing: 0; font-variant-numeric: tabular-nums; }
.reputation-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.reputation-stack { display: flex; flex-direction: column; gap: 12px; }
.reputation-rating-summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.reputation-rating-value { font-size: 32px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.reputation-stars { color: var(--brand); font-size: 15px; line-height: 1; white-space: nowrap; }
.reputation-review { padding: 18px; }
.reputation-review-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.reputation-review-copy { margin: 14px 0 10px; color: var(--text-2); line-height: 1.65; }
.reputation-response { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin: 12px 0; padding: 12px; border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); background: var(--surface-2); }
.reputation-response .ri { width: 30px; height: 30px; display: grid; place-items: center; color: var(--brand-deep); background: var(--brand-soft); border-radius: var(--radius-sm); }
.reputation-response h4 { font-size: 13px; margin-bottom: 3px; }
.reputation-review-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.reputation-achievement { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.reputation-achievement .ei { width: 38px; height: 38px; flex: none; margin: 0; border-radius: var(--radius-sm); }
@media (max-width: 720px) {
  .reputation-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .reputation-summary-grid .card { padding: 16px; }
  .reputation-review-head { grid-template-columns: auto minmax(0, 1fr); }
  .reputation-review-head .reputation-stars { grid-column: 2; }
}
@media (min-width: 721px) and (max-width: 1100px) { .reputation-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Overlays: modal + drawer ---------- */
.ov-backdrop { position: fixed; inset: 0; background: rgba(16,24,40,.44); backdrop-filter: blur(2px); z-index: 100; opacity: 0; animation: fade .16s ease forwards; }
@keyframes fade { to { opacity: 1; } }
.modal {
  position: fixed; z-index: 101; left: 50%; top: 50%; transform: translate(-50%,-48%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); animation: pop .18s ease forwards;
}
.modal.wide { width: min(760px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%,-46%);} to { opacity: 1; transform: translate(-50%,-50%);} }
.drawer {
  position: fixed; z-index: 101; top: 0; right: 0; height: 100vh;
  width: min(500px, 100vw); background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg); overflow-y: auto; animation: slide .2s ease forwards;
}
.drawer.wide { width: min(660px, 100vw); }
@keyframes slide { from { transform: translateX(24px); opacity: .6;} to { transform: translateX(0); opacity: 1;} }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px var(--pad); border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.ov-head h2 { font-size: 17px; }
.ov-head .sub { color: var(--text-3); font-size: 12.5px; margin-top: 3px; }
.ov-body { padding: var(--pad); }
.ov-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px var(--pad); border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); flex-wrap: wrap; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: var(--text-2); }
.field .hint { color: var(--text-3); font-size: 11.5px; margin-top: 5px; }
.field-opt { font-weight: 500; color: var(--text-3); font-size: 11.5px; }

/* Camera-based liveness stage */
.live-stage { position: relative; width: 220px; height: 220px; margin: 14px auto; }
.live-video, .live-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: var(--surface-3); transform: scaleX(-1); }
.live-ring { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; }
.live-ring.idle { border: 3px dashed var(--text-3); color: var(--text-3); }
.live-ring.idle.warn { border-color: var(--amber); color: var(--amber); }
.live-ring.overlay { position: absolute; inset: 0; border: 3px solid var(--brand); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 16%, transparent); pointer-events: none; }
.live-ring.overlay.scanning { border-color: var(--accent); animation: livepulse 1s ease-in-out infinite; }
@keyframes livepulse { 0%,100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 4%, transparent); } }
.live-shot.sm { position: static; width: 96px; height: 96px; }
.input, .select, textarea.input {
  width: 100%; min-height: 40px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-size: 13.5px; font-family: inherit;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, box-shadow 140ms ease-out;
}
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); background: var(--surface); }
textarea.input { resize: vertical; min-height: 84px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 11px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.check:hover { border-color: var(--border-strong); }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); }
.check .ct { font-weight: 600; font-size: 13px; }
.check .cs { color: var(--text-3); font-size: 12px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { min-width: 40px; min-height: 40px; border: none; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 12.5px; color: var(--text-3); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Toast ---------- */
#toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 11px; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--brand); border-radius: 11px; padding: 13px 15px; box-shadow: var(--shadow-lg);
  min-width: 288px; max-width: 380px; animation: toastin .2s ease forwards;
}
@keyframes toastin { from { transform: translateY(10px); opacity: 0;} to { transform: translateY(0); opacity: 1;} }
.toast.ok { border-left-color: var(--green); }
.toast.warn { border-left-color: var(--amber); }
.toast.err { border-left-color: var(--red); }
.toast .tt { font-weight: 700; font-size: 13px; }
.toast .td { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }

/* ---------- Loading skeleton ---------- */
.skel { background: var(--surface-3); animation: skeleton-pulse 1.3s ease-in-out infinite; border-radius: 8px; }
@keyframes skeleton-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.skel-line { height: 12px; margin: 8px 0; }
.skel-card { height: 120px; }

/* ---------- Restricted state ---------- */
.restricted { display: flex; gap: 14px; align-items: flex-start; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); border-radius: var(--radius-lg); padding: 16px 18px; }
.restricted .ri { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); color: var(--amber); display: grid; place-items: center; flex: none; }
.restricted h4 { font-size: 14.5px; margin-bottom: 3px; }
.restricted p { color: var(--text-2); font-size: 13px; margin: 0 0 10px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty .ei { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; margin: 0 auto 14px; color: var(--text-3); }
.empty h4 { color: var(--text); font-size: 15px; margin-bottom: 6px; }

/* ---------- Command palette ---------- */
.cmdk { position: fixed; z-index: 101; left: 50%; top: 84px; transform: translateX(-50%); width: min(620px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .16s ease forwards; }
.cmdk input { width: 100%; border: none; padding: 16px 18px; font-size: 15px; background: transparent; color: var(--text); font-family: inherit; }
.cmdk input:focus { outline: none; }
.cmdk .results { max-height: 380px; overflow-y: auto; border-top: 1px solid var(--border); }
.cmdk .ci { display: flex; align-items: center; gap: 12px; padding: 11px 18px; font-size: 13.5px; }
.cmdk .ci:hover, .cmdk .ci.sel { background: var(--brand-soft); }
.cmdk .ci .ck { margin-left: auto; font-size: 11px; color: var(--text-3); }

/* ---------- Landing ---------- */
.landing { min-height: 100vh; background: var(--bg); }
.lnav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg-elevated) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.lnav-in { max-width: 1160px; margin: 0 auto; padding: 14px 22px; display: flex; align-items: center; gap: 16px; }
.lnav .links { display: flex; gap: 22px; margin-left: 28px; }
@media (max-width: 820px) { .lnav .links { display: none; } }
.lnav .links a { color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.lnav .links a:hover { color: var(--brand); }
.lhero { max-width: 1160px; margin: 0 auto; padding: 72px 22px 40px; text-align: center; }
.lhero .pill { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand-deep); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 12.5px; margin-bottom: 20px; }
.lhero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.05; letter-spacing: 0; max-width: 900px; margin: 0 auto; }
.lhero h1 .grad { color: var(--brand); }
.lhero p { font-size: clamp(15px, 2vw, 18px); color: var(--text-2); max-width: 640px; margin: 20px auto 28px; }
.lhero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lflow { max-width: 1000px; margin: 40px auto 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.lflow .step { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-sm); }
.lflow .arr { color: var(--text-3); }
.lsec { max-width: 1160px; margin: 0 auto; padding: 40px 22px; }
.lsec h2 { font-size: clamp(24px, 3.4vw, 34px); text-align: center; letter-spacing: 0; }
.lsec .lead { text-align: center; color: var(--text-2); max-width: 600px; margin: 12px auto 34px; font-size: 15px; }
.pov-card { text-align: left; transition: transform 140ms ease-out, border-color 140ms ease-out, box-shadow 140ms ease-out; }
.pov-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-md); }
.pov-card .pi { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; }
.pov-card h3 { font-size: 16px; margin-bottom: 6px; }
.pov-card p { color: var(--text-3); font-size: 13px; margin: 0 0 14px; }
.lfeat { display: flex; gap: 14px; align-items: flex-start; }
.lfeat .fi { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; flex: none; }
.lfeat h4 { font-size: 14.5px; margin-bottom: 4px; }
.lfeat p { color: var(--text-3); font-size: 13px; margin: 0; }
.lfoot { border-top: 1px solid var(--border); padding: 30px 22px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-aside { display: none; } }
.auth-aside { background: var(--brand-deep); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside .glow { display: none; }
.auth-aside h2 { font-size: 30px; line-height: 1.15; max-width: 420px; position: relative; }
.auth-aside p { color: rgba(255,255,255,.86); max-width: 400px; margin-top: 14px; position: relative; }
.auth-aside .qt { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 18px; position: relative; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 26px; }
.auth-card .p { color: var(--text-3); margin: 6px 0 22px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .demo-grid { grid-template-columns: 1fr; } .lnav .links { display: none; } }
.demo-acct { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; transition: transform 140ms ease-out, border-color 140ms ease-out, box-shadow 140ms ease-out; }
.demo-acct:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.demo-acct .dn { font-weight: 700; font-size: 13px; }
.demo-acct .dr { color: var(--text-3); font-size: 11.5px; }

.provenance { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 12.5px; }
.provenance dt { color: var(--text-3); font-weight: 600; }
.provenance dd { margin: 0; font-weight: 600; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.kv:last-child { border: none; }
.kv .k { color: var(--text-3); }
.kv .v { font-weight: 600; text-align: right; }
.stepper { display: flex; gap: 6px; margin-bottom: 18px; }
.stepper .st { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-3); }
.stepper .st.on { background: var(--brand); }
.onboarding-card { width: min(620px, 100%); }
.onboarding-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.onboarding-option { min-height: 58px; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); text-align: left; font-weight: 600; }
.onboarding-option:hover { border-color: var(--border-strong); background: var(--surface-2); }
.onboarding-option.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); box-shadow: 0 0 0 2px var(--ring); }
.onboarding-option-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-3); }
.onboarding-option.selected .onboarding-option-icon { background: var(--brand); color: #fff; }
.onboarding-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.onboarding-foot { position: static; padding: 20px 0 0; margin-top: 20px; border: 0; background: transparent; }
.onboarding-complete { text-align: center; }
.onboarding-complete-icon { width: 56px; height: 56px; margin-bottom: 12px; background: var(--green-soft); color: var(--green); }
.onboarding-summary { margin-top: 8px; }
.tour-feature { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.tour-feature p { margin: 0 0 8px; color: var(--text-2); }
.tour-feature-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--brand-deep); background: var(--brand-soft); border-radius: var(--radius-sm); }
.support-tour { width: 100%; background: var(--surface-2); margin-bottom: 14px; }
@media (max-width: 640px) { .onboarding-options { grid-template-columns: 1fr; } .onboarding-foot { align-items: stretch; } }
.hidden { display: none !important; }
.center-col { display: flex; flex-direction: column; align-items: center; }
.notif-item { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif-item .ni { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.dot-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-left: auto; flex: none; margin-top: 6px; }
.pipeline { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.pipe-col { min-width: 220px; flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.pipe-col h4 { font-size: 12.5px; display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--text-2); }
.pipe-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 8px; box-shadow: var(--shadow-sm); cursor: pointer; }
.pipe-card:hover { border-color: var(--brand); }
.graph-canvas { width: 100%; height: 320px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
@media (max-width: 640px) { .shell { grid-template-columns: 1fr; } .sidebar { position: fixed; z-index: 60; transform: translateX(-100%); transition: transform 200ms ease-out; } .sidebar.open { transform: translateX(0); } .content { padding: 14px; } }
.mobile-only { display: none; }
@media (max-width: 640px) { .mobile-only { display: grid; } }

/* floating help/support button */
.fab-support { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #fff; border: none; display: grid; place-items: center; box-shadow: var(--shadow-lg); transition: transform 140ms ease-out, filter 140ms ease-out, box-shadow 140ms ease-out; }
.fab-support:hover { transform: translateY(-2px); filter: brightness(1.04); }
.fab-support:active { transform: scale(.96); }
.fab-support:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 40%, transparent), var(--shadow-lg); }
.fab-support svg { width: 24px; height: 24px; }
@media (max-width: 640px) { .fab-support { right: 14px; bottom: 14px; width: 48px; height: 48px; } }

/* responsive: topbar + mobile sidebar */
@media (max-width: 760px) {
  .topbar .search { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  .topbar .search span:not(:first-child):not(kbd) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .search kbd { display: none; }
}
@media (max-width: 640px) {
  .sidebar { box-shadow: var(--shadow-lg); width: min(280px, 84vw); }
  .sidebar.open ~ .main::before { content: ""; position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 55; }
  .page-head h1 { font-size: 19px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .ov-foot { flex-direction: column-reverse; }
  .ov-foot .btn { width: 100%; }
  .modal, .drawer { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}
@media (max-width: 480px) {
  .metric .val { font-size: 22px; }
  .ring { transform: none; }
}
/* landing mobile polish */
@media (max-width: 640px) {
  .lnav-in { padding: 12px 16px; gap: 10px; }
  .lnav .btn { padding: 8px 12px; font-size: 13px; }
  .lhero { padding: 34px 18px 26px; }
  .lsec { padding: 30px 18px; }
  .lhero .cta { width: 100%; }
  .lhero .cta .btn, .lcta .cta .btn { flex: 1 1 100%; }
  .hero-visual { margin-top: 26px; }
  .hero-card { padding: 16px; }
  .lstats { gap: 10px; }
  .lcta { padding: 32px 18px; }
  .lfeature { padding: 24px 0; }
  .lf-copy h3 { font-size: 19px; }
  .lfoot-cols { padding: 32px 18px 16px; gap: 20px; }
}
@media (max-width: 520px) {
  .lnav .btn-ghost { display: none; }
}

/* ============================================================
   Landing enhancements — richer sections, motion, no gradients
   ============================================================ */
/* icon sizing inside circular badges reads better slightly larger than base */
.pov-card .pi .ic, .lfeat .fi .ic, .empty .ei .ic, .lstat .si .ic, .lstep .sn .ic { width: 20px; height: 20px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* section eyebrow label */
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--brand-deep); background: var(--brand-soft); font-weight: 700; font-size: 11.5px; letter-spacing: 0; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
body[data-theme="dark"] .eyebrow { color: var(--brand); }
.lsec .eyebrow { margin: 0 auto 14px; display: inline-flex; }
.lsec.tc { text-align: center; }

/* hero product mock card */
.hero-visual { max-width: 940px; margin: 40px auto 0; }
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 20px; text-align: left; }
.hero-card .hc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hero-grid { display: grid; grid-template-columns: 200px 1fr; gap: 18px; }
@media (max-width: 640px) { .hero-grid { grid-template-columns: 1fr; } }

/* stats band */
.lstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1000px; margin: 0 auto; }
@media (max-width: 720px) { .lstats { grid-template-columns: repeat(2, 1fr); } }
.lstat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.lstat .si { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; margin: 0 auto 12px; }
body[data-theme="dark"] .lstat .si { color: var(--brand); }
.lstat .sv { font-size: 30px; font-weight: 800; letter-spacing: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.lstat .sl { color: var(--text-3); font-size: 12.5px; font-weight: 600; margin-top: 3px; }

/* alternating feature rows */
.lfeature { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; padding: 34px 0; border-top: 1px solid var(--border); }
.lfeature:first-of-type { border-top: none; }
.lfeature.rev .lf-media { order: -1; }
@media (max-width: 820px) { .lfeature { grid-template-columns: 1fr; gap: 20px; } .lfeature.rev .lf-media { order: 0; } }
.lf-copy h3 { font-size: 22px; letter-spacing: 0; }
.lf-copy p { color: var(--text-2); font-size: 15px; margin: 12px 0 16px; }
.lf-copy .lf-list { display: flex; flex-direction: column; gap: 10px; }
.lf-copy .lf-list .li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 13.5px; }
.lf-copy .lf-list .li svg { color: var(--green); margin-top: 1px; }
.lf-media { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); }

/* numbered how-it-works */
.lsteps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1100px; margin: 0 auto; }
@media (max-width: 860px) { .lsteps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .lsteps { grid-template-columns: 1fr; } }
.lstep { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: relative; }
.lstep .sn { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; margin-bottom: 14px; }
.lstep h4 { font-size: 15px; margin-bottom: 6px; }
.lstep p { color: var(--text-3); font-size: 13px; margin: 0; }

/* logo / trust strip */
.logo-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; max-width: 900px; margin: 0 auto; }
.logo-strip .lchip { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 700; font-size: 13.5px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; }
.logo-strip .lchip svg { color: var(--text-3); }

/* FAQ */
.lfaq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.lfaq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; }
.lfaq details[open] { border-color: var(--border-strong); }
.lfaq summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 14.5px; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); }
.lfaq summary::-webkit-details-marker { display: none; }
.lfaq summary .fq-ic { color: var(--text-3); transition: transform .2s; }
.lfaq details[open] summary .fq-ic { transform: rotate(45deg); color: var(--brand); }
.lfaq .fa-body { color: var(--text-2); font-size: 13.5px; padding: 0 0 16px; line-height: 1.6; }

/* final CTA band (solid, no gradient) */
.lcta { background: var(--brand-deep); border-radius: var(--radius-xl); padding: 48px 30px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.lcta .glow2 { display: none; }
.lcta h2 { font-size: clamp(24px, 3.4vw, 32px); position: relative; }
.lcta p { color: rgba(255,255,255,.9); max-width: 560px; margin: 12px auto 22px; position: relative; }
.lcta .btn-primary { background: #fff; color: var(--brand-deep); }
.lcta .btn-primary:hover { background: #fff; opacity: .92; }
.lcta .btn-outline { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.lcta .btn-outline:hover { border-color: #fff; color: #fff; }

/* footer columns */
.lfoot-cols { max-width: 1160px; margin: 0 auto; padding: 44px 22px 20px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { .lfoot-cols { grid-template-columns: 1fr 1fr; gap: 22px; } }
.lfoot-cols h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0; color: var(--text-3); margin: 0 0 12px; }
.lfoot-cols a { display: block; color: var(--text-2); font-size: 13.5px; padding: 5px 0; }
.lfoot-cols a:hover { color: var(--brand); }
.lfoot-cols p { color: var(--text-3); font-size: 13px; margin: 12px 0 0; max-width: 280px; }

/* Trust Profile records and complete-action states */
.profile-section { display: flex; flex-direction: column; gap: 16px; }
.section-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-toolbar h2 { margin: 0; font-size: 18px; }
.section-toolbar p { margin: 5px 0 0; max-width: 680px; color: var(--text-3); font-size: 13px; }
.record-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.record-summary > div { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--border); }
.record-summary > div:last-child { border-right: 0; }
.record-summary span { display: block; color: var(--text-3); font-size: 12px; }
.record-summary strong { display: block; margin-top: 4px; font-size: 20px; font-variant-numeric: tabular-nums; }
.record-list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.record-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px; border-bottom: 1px solid var(--border); }
.record-item:last-child { border-bottom: 0; }
.record-marker { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); color: var(--brand); background: var(--brand-soft); }
.record-content { min-width: 0; }
.record-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.record-heading h3 { margin: 0; font-size: 15px; }
.record-heading p, .record-description { margin: 4px 0 0; color: var(--text-3); font-size: 12.5px; }
.record-description { max-width: 760px; margin-top: 10px; color: var(--text-2); }
.evidence-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--brand); }
.evidence-line span { display: flex; min-width: 0; flex-direction: column; color: var(--text); font-size: 12.5px; }
.evidence-line small { margin-top: 2px; color: var(--text-3); }
.evidence-line.muted { color: var(--text-3); }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.document-row { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.add-card-button { width: 100%; min-height: 130px; color: var(--text); font: inherit; cursor: pointer; }
.flow-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.flow-step { display: flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.flow-step::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.flow-step.active { color: var(--brand); }
.flow-step.active::before, .flow-step.done::before { background: var(--brand); }
.flow-step + .flow-step::after { content: none; }
.flow-review { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.flow-review .kv { padding: 11px 13px; }
.upload-zone { display: block; padding: 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); text-align: center; cursor: pointer; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-zone strong, .upload-zone span { display: block; }
.upload-zone span { margin-top: 5px; color: var(--text-3); font-size: 12px; }
.result-panel { padding: 18px; border: 1px solid var(--green); border-radius: var(--radius); background: var(--green-soft); }
.result-panel h3 { margin: 0; font-size: 16px; }
.result-panel p { margin: 6px 0 0; color: var(--text-2); font-size: 13px; }
@media (max-width: 640px) {
  .section-toolbar, .record-heading { flex-direction: column; }
  .section-toolbar .btn { width: 100%; }
  .record-summary { grid-template-columns: 1fr; }
  .record-summary > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .record-summary > div:last-child { border-bottom: 0; }
  .record-item { grid-template-columns: 36px minmax(0, 1fr); padding: 14px; }
  .record-marker { width: 34px; height: 34px; }
}
