:root {
  /* Matches the XAU PORTFOLIO dashboard: dark navy header band with stat cards,
     white rounded cards on a cool-grey page, indigo accent, soft tinted status badges.
     Layout: app bar (logo + tabs) -> optional dark band -> content column of cards. */
  --page: #f4f6fa;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --band: #0f172a;
  --band-card: #1e293b;
  --band-line: #334155;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --red: #b91c1c; --red-bg: #fef2f2; --red-line: #fecaca;
  --amber: #b45309; --amber-bg: #fffbeb; --amber-line: #fde68a;
  --green: #047857; --green-bg: #ecfdf5; --green-line: #a7f3d0;
  --blue: #1d4ed8; --blue-bg: #eff6ff; --blue-line: #bfdbfe;
  --violet: #6d28d9; --violet-bg: #f5f3ff; --violet-line: #ddd6fe;
  --slate-bg: #f1f5f9;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 15px/1.5 var(--font-body); }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; } h2 { font-size: 17px; font-weight: 700; } h3 { font-size: 15px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---- app bar */
.appbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.appbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); margin-right: 8px; }
.logo-tile { width: 46px; height: 46px; border-radius: 12px; display: block; flex: none; box-shadow: 0 1px 3px rgba(15,23,42,.25); }
.logo-tile svg { display: block; width: 46px; height: 46px; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: .01em; }
.brand-sub { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--slate-bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs a { display: inline-flex; gap: 7px; align-items: center; text-decoration: none; color: #475569; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.tabs a.active { background: var(--card); color: var(--accent); box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.userbox { margin-left: auto; display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.userbox form { margin: 0; }
.linkish { border: 0; background: none; color: var(--muted); padding: 6px 8px; cursor: pointer; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; border-radius: 8px; }
.linkish:hover, .userbox a:hover { color: var(--ink); background: var(--slate-bg); }
.userbox a { color: var(--muted); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 8px; font-weight: 600; }

/* ---- dark band with stat cards */
.band { background: var(--band); }
.band-inner { max-width: 1240px; margin: 0 auto; padding: 18px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { background: var(--band-card); border: 1px solid var(--band-line); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; color: #fff; text-decoration: none; min-height: 92px; }
a.stat:hover { border-color: #64748b; }
.stat.hot { border-color: #b45309; box-shadow: inset 0 0 0 1px rgba(245,158,11,.25); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.stat-icon .icon { width: 20px; height: 20px; }
.i-amber { background: rgba(245,158,11,.18); color: #fbbf24; }
.i-indigo { background: rgba(99,102,241,.22); color: #a5b4fc; }
.i-blue { background: rgba(59,130,246,.2); color: #93c5fd; }
.i-green { background: rgba(16,185,129,.2); color: #6ee7b7; }
.i-red { background: rgba(244,63,94,.2); color: #fda4af; }
.stat-value { font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 12.5px; color: #cbd5e1; font-weight: 500; }

main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 40px; display: grid; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; justify-content: space-between; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.section-title { font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.count-chip { background: var(--slate-bg); border: 1px solid var(--line); color: #334155; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.id-chip { font-family: var(--font-mono); font-size: 11px; color: #475569; background: var(--slate-bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }

/* facts (period summary boxes) */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fact { border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; background: #fbfcfe; }
.fact .label { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fact .value { font-weight: 700; }
.fact.due { border-color: var(--amber-line); background: var(--amber-bg); }
.fact.due .label, .fact.due .value { color: var(--amber); }

/* summary cards (like Client Health's All Green / Amber / Red) */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.sum { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 4px; }
.sum-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sum-label { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #334155; }
.sum-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.sum-value { font-size: 26px; font-weight: 800; }
.sum-sub { font-size: 13px; color: var(--muted); }
.t-red { color: var(--red); } .bg-red { background: var(--red-bg); color: var(--red); }
.t-amber { color: var(--amber); } .bg-amber { background: var(--amber-bg); color: var(--amber); }
.t-green { color: var(--green); } .bg-green { background: var(--green-bg); color: var(--green); }
.t-indigo { color: var(--accent); } .bg-indigo { background: var(--accent-soft); color: var(--accent); }

/* stacked health bar */
.hbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--slate-bg); }
.hbar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: #334155; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* status badges: soft tinted, like "Past due" / "Pending" / "N/A" */
.pill, .badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 8px; border: 1px solid transparent; white-space: nowrap; min-width: 96px; }
.s-open, .h-amber, .h-amber-soft { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.s-submitted, .h-blue { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-line); }
.s-entered, .h-purple { background: var(--violet-bg); color: var(--violet); border-color: var(--violet-line); }
.s-posted, .h-green { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.s-off, .h-red { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.h-gray { background: var(--slate-bg); color: #64748b; border-color: var(--line); }
.health { font-size: 13px; }

/* filters */
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fbfcfe; }
.search input { border: 0 !important; background: transparent !important; padding: 10px 0 !important; outline: none; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--slate-bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: #475569; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.seg .n { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: 12px; color: #334155; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: #f8fafc; }
td.r, th.r { text-align: right; }
td.c, th.c { text-align: center; }
tfoot td { font-weight: 700; border-bottom: 0; }
tbody tr:hover td { background: #fafbff; }
.client-cell strong { font-weight: 700; }
.client-cell .sub { display: block; font-size: 12.5px; color: var(--muted); }

/* forms */
input[type="number"], input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="datetime-local"], input[type="search"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
input:focus, select:focus, textarea:focus { border-color: #a5b4fc; outline: 2px solid #e0e7ff; outline-offset: 0; }
input.hrs { max-width: 100px; text-align: right; font-variant-numeric: tabular-nums; }
input:disabled, textarea:disabled { background: var(--slate-bg); color: var(--muted); }
label { display: grid; gap: 5px; font-size: 13px; color: #475569; font-weight: 600; }
label.check { display: flex; gap: 9px; align-items: center; color: var(--ink); font-size: 15px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.emp-name { font-weight: 700; }
.type-tag { font-size: 12.5px; color: var(--muted); }

.btn { border: 1px solid var(--line); background: var(--card); padding: 9px 16px; border-radius: 10px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.btn:hover { border-color: #a5b4fc; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #4338ca; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 5px 11px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline { display: inline; margin: 0; }

.flash { border-radius: 12px; padding: 12px 16px; font-weight: 600; border: 1px solid transparent; }
.flash.info { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-line); }
.flash.warn { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.flash.error { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.banner { border-radius: 12px; padding: 12px 16px; font-weight: 600; border: 1px solid transparent; }
.banner.info { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-line); }
.banner.good { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.banner.warn { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }

.run { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.run-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.run-nums span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.run-nums b { font-size: 17px; }

.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.module { text-decoration: none; color: var(--ink); align-content: start; }
a.module:hover { border-color: #a5b4fc; }
.module p { margin: 0; }
.module .btn { justify-self: start; }
.module-head { display: flex; gap: 10px; align-items: center; }

.login-wrap { max-width: 420px; margin: 6vh auto; width: 100%; }
.secret { font-family: var(--font-mono); font-size: 20px; background: var(--accent-soft); color: var(--accent); padding: 12px 16px; border-radius: 12px; word-break: break-all; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 28px; }
@media (max-width: 760px) {
  .appbar-inner { padding: 10px 14px; }
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .userbox { margin-left: 0; }
  main { padding: 16px 14px 32px; }
  .band-inner { padding: 14px; grid-template-columns: repeat(2, 1fr); }
  .stat { min-height: 0; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .tabs a, .stat { transition: background-color .15s, border-color .15s, color .15s; } }
.stat-value.stat-text { font-size: 17px; }

/* ---- documents + company info ---- */
.kv { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 10px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.kv dd { margin: 0; font-weight: 600; }
.year-block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.year-block:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.year-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.year-head h3 { margin: 0; font-size: 18px; }
.file-cell { display: flex; gap: 10px; align-items: center; }
.file-cell .sum-icon { flex: none; width: 30px; height: 30px; border-radius: 8px; }
.file-cell .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.cat-chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--slate-bg); border: 1px solid var(--line); color: #334155; white-space: nowrap; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.person { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; }
.person .who { display: flex; gap: 10px; align-items: center; }
.person .who strong { font-size: 15px; }
.upload-form input[type=file] { padding: 8px; border: 1px dashed #a5b4fc; border-radius: 10px; background: var(--accent-soft); width: 100%; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; } }
.doc-table { table-layout: fixed; min-width: 720px; }
.doc-table th:nth-child(1) { width: 44%; } .doc-table th:nth-child(2) { width: 18%; } .doc-table th:nth-child(3) { width: 18%; } .doc-table th:nth-child(4) { width: 20%; }
.doc-table td .sub { display: block; }
.doc-table strong { overflow-wrap: anywhere; }
.actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.actions form { margin: 0; }
.person .small .icon { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 720px) {
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; width: auto; min-width: 0; }
  .doc-table thead { display: none; }
  .doc-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .doc-table td { border: 0; padding: 2px 0; text-align: left; }
  .doc-table td:nth-child(2) { display: none; }
  .doc-table td:nth-child(3) { padding-left: 40px; color: var(--muted); }
  .doc-table td:nth-child(3) .sub { display: inline; }
  .doc-table td:nth-child(3) .sub::before { content: " · "; }
  .doc-table td:nth-child(4) { padding: 8px 0 0 40px; }
  .actions { justify-content: flex-start; }
}
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.small-badge { min-width: 0; padding: 2px 8px; font-size: 11.5px; }
.span-2 { grid-column: span 2; }
[hidden] { display: none !important; }
@media (max-width: 640px) { .span-2 { grid-column: auto; } }

/* 2-step sign-in */
.login-wrap.wide { max-width: 560px; }
.steps { padding-left: 20px; display: grid; gap: 12px; }
.qr-box { background: #fff; border-radius: 12px; padding: 8px; width: max-content; max-width: 100%; margin: 10px 0; }
.qr-box svg { display: block; width: 216px; height: 216px; max-width: 100%; }
.code-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 18px; }
.code-list li { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 8px 12px; text-align: center; }

/* ---- public landing page (signed-out visitors) */
.appbar-cta { margin-left: auto; }
.landing main { padding: 0; gap: 0; }
.landing main:empty { display: none; }
.landing footer { padding-top: 22px; }
.btn.big { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn.ghost { background: transparent; color: #e0e7ff; border-color: #475569; }
.btn.ghost:hover { border-color: #a5b4fc; color: #fff; }

.hero { background: var(--band); color: #e2e8f0; }
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 64px 20px 72px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; max-width: 15ch; }
.hero-lead { font-size: 18px; line-height: 1.6; color: #cbd5e1; max-width: 52ch; margin: 22px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { color: #94a3b8; font-size: 14px; margin: 18px 0 0; max-width: 52ch; }
.hero-mark { margin: 0; justify-self: center; width: 100%; max-width: 560px; }
.hero-mark svg { display: block; width: 100%; height: auto; overflow: visible; }

/* the one moment of motion: the mark draws itself, then fills and labels appear.
   Resting state is fully visible, so the mark still shows if animations don't run. */
.hm-shape polygon { stroke-dasharray: 1; stroke-dashoffset: 0; animation: hm-draw 1.4s ease-out backwards, hm-fill .6s ease-out 1.2s backwards; }
.hm-shape polygon:nth-child(2) { animation-delay: .15s, 1.3s; }
.hm-shape polygon:nth-child(3) { animation-delay: .3s, 1.4s; }
.hm-labels { animation: hm-fade .5s ease-out 1.6s backwards; }
@keyframes hm-draw { from { stroke-dashoffset: 1; fill-opacity: 0; } to { fill-opacity: 0; } }
@keyframes hm-fill { from { fill-opacity: 0; } }
@keyframes hm-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hm-shape polygon, .hm-labels { animation: none; }
}

.lp-section { background: var(--card); border-bottom: 1px solid var(--line); }
.lp-section.tint { background: var(--page); }
.lp-inner { max-width: 1240px; margin: 0 auto; padding: 56px 20px; }
.lp-title { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.015em; margin-bottom: 28px; }
.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-feature { padding: 4px 28px 4px 0; display: grid; gap: 10px; align-content: start; }
.lp-feature + .lp-feature { border-left: 1px solid var(--line); padding-left: 28px; }
.lp-feature p, .lp-steps p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 46ch; }
.lp-feature h3, .lp-steps h3 { font-size: 17px; }
.lp-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.lp-icon .icon { width: 22px; height: 22px; }

.lp-split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.lp-split .lp-title { margin-bottom: 12px; }
.lp-split .muted { margin: 0; max-width: 40ch; line-height: 1.6; }
.lp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.lp-checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; line-height: 1.6; }
.lp-checks .icon { color: var(--green); width: 22px; height: 22px; margin-top: 2px; }

.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.lp-steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; }
.lp-steps li::before { content: counter(step); font-size: 40px; font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -.03em; }

.lp-contact { background: var(--band); color: #cbd5e1; }
.lp-contact-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-top: 40px; padding-bottom: 40px; }
.lp-contact h2 { color: #fff; font-size: 22px; font-weight: 800; }
.lp-contact p { margin: 6px 0 0; }
.lp-contact-links { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-contact-links a { display: inline-flex; gap: 8px; align-items: center; color: #e0e7ff; text-decoration: none; font-weight: 600; border: 1px solid #334155; border-radius: 12px; padding: 10px 14px; }
.lp-contact-links a:hover { border-color: #a5b4fc; color: #fff; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 40px 20px 48px; gap: 28px; }
  .hero-mark { max-width: 380px; order: -1; }
  .lp-features, .lp-steps, .lp-split { grid-template-columns: 1fr; }
  .lp-feature { padding: 0 0 22px; }
  .lp-feature + .lp-feature { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; }
  .lp-inner { padding: 40px 20px; }
}

/* landing v2: facts strip, services, quotes, FAQ */
.lp-facts { border-top: 1px solid var(--band-line); }
.lp-facts-inner { max-width: 1240px; margin: 0 auto; padding: 18px 20px; display: grid; grid-template-columns: auto auto 1fr; gap: 40px; }
.lp-facts p { margin: 0; color: #94a3b8; font-size: 14px; }
.lp-facts strong { color: #fff; font-size: 16px; font-weight: 700; margin-right: 4px; }
.hero-inner { padding-bottom: 56px; }
.lp-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.lp-service { border-top: 2px solid var(--line); padding-top: 18px; display: grid; gap: 10px; align-content: start; }
.lp-service h3 { font-size: 17px; }
.lp-service ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.lp-service li { color: #334155; line-height: 1.5; padding-left: 16px; position: relative; }
.lp-service li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: #a5b4fc; }
.lp-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.lp-quote { margin: 0; border-left: 3px solid #a5b4fc; padding-left: 18px; }
.lp-quote blockquote { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.lp-quote figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.lp-faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--accent); font-weight: 700; font-size: 20px; line-height: 1; }
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq details p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; max-width: 62ch; }
.lp-contact-meta { color: #94a3b8; font-size: 14px; }
@media (max-width: 860px) {
  .lp-facts-inner { grid-template-columns: 1fr; gap: 8px; }
  .lp-services { grid-template-columns: 1fr; }
}
.lp-fineprint { margin: 28px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 90ch; }
@media (min-width: 861px) and (max-width: 1100px) { .lp-services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* AI assistant */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.assistant { max-width: 860px; width: 100%; margin: 0 auto; }
.assistant-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.assistant-head p { margin: 6px 0 0; }
.chat { display: grid; gap: 12px; }
.msg { display: grid; gap: 4px; max-width: 85%; }
.msg.user { justify-self: end; }
.msg-who { font-size: 12px; font-weight: 700; color: var(--muted); }
.msg.user .msg-who { text-align: right; }
.msg-body { white-space: pre-wrap; line-height: 1.55; padding: 12px 14px; border-radius: 14px; background: var(--slate-bg); border: 1px solid var(--line); }
.msg.user .msg-body { background: var(--accent-soft); border-color: #c7d2fe; }
.chat-empty { color: var(--muted); }
.chat-empty ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.chat-form textarea { width: 100%; resize: vertical; }
.ai-settings { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-settings legend { font-weight: 700; padding: 0 6px; }
.ai-settings label.check { grid-column: 1 / -1; }
.ai-summary { margin-top: 6px; }
.ai-summary summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); }
.ai-summary-body { white-space: pre-wrap; font-size: 13px; line-height: 1.5; background: var(--slate-bg); border-radius: 10px; padding: 10px 12px; margin: 6px 0 4px; }
@media (max-width: 700px) { .ai-settings { grid-template-columns: 1fr; } .msg { max-width: 100%; } .chat-form { grid-template-columns: 1fr; } }

/* client assistant bubble */
.ai-bubble { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; justify-items: end; gap: 12px; }
.ai-fab { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(79, 70, 229, .35); }
.ai-fab:hover { background: #4338ca; }
.ai-fab .icon { width: 20px; height: 20px; }
.ai-bubble.open .ai-fab-label { display: none; }
.ai-bubble.open .ai-fab { padding: 12px; }
.ai-panel { order: -1; width: min(380px, calc(100vw - 40px)); max-height: min(560px, calc(100vh - 120px)); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 48px rgba(15, 23, 42, .22); display: flex; flex-direction: column; overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px; background: var(--band); color: #fff; }
.ai-panel-head span { display: block; color: #94a3b8; font-size: 12px; margin-top: 2px; }
.ai-close { border: 0; background: none; color: #cbd5e1; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 8px; }
.ai-close:hover { color: #fff; }
.ai-note { margin: 0; padding: 8px 16px; font-size: 12px; color: var(--muted); background: var(--slate-bg); border-bottom: 1px solid var(--line); }
.ai-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.ai-msg { white-space: pre-wrap; line-height: 1.5; font-size: 14px; padding: 9px 12px; border-radius: 14px; max-width: 88%; background: var(--slate-bg); border: 1px solid var(--line); align-self: flex-start; }
.ai-msg.user { align-self: flex-end; background: var(--accent-soft); border-color: #c7d2fe; }
.ai-msg.pending { color: var(--muted); font-style: italic; }
.ai-msg.error { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.ai-empty { color: var(--muted); font-size: 13px; }
.ai-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: end; }
.ai-form textarea { width: 100%; resize: none; font-size: 14px; }
.ai-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 10px; font-size: 12px; }
.ai-foot a { color: var(--muted); }
.ai-foot form { margin: 0; }
.ai-foot .linkish { font-size: 12px; padding: 4px 6px; }
.team-chat { display: grid; gap: 8px; max-height: 520px; overflow-y: auto; }
.team-msg { display: grid; gap: 3px; }
.team-msg-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.team-msg-body { white-space: pre-wrap; font-size: 14px; line-height: 1.5; padding: 8px 12px; border-radius: 10px; background: var(--slate-bg); }
.team-msg.user .team-msg-body { background: var(--accent-soft); }
@media (max-width: 600px) {
  .ai-bubble { right: 12px; bottom: 12px; left: 12px; }
  .ai-panel { width: 100%; max-height: calc(100vh - 100px); }
}
@media (prefers-reduced-motion: no-preference) { .ai-panel { animation: ai-pop .18s ease-out; } }
@keyframes ai-pop { from { opacity: 0; transform: translateY(8px); } }
.footer-version { margin-left: 8px; color: #94a3b8; }

/* ROXI product branding */
.product-mark { font-size: 22px; font-weight: 800; letter-spacing: .14em; line-height: 1; }
.brand-sub { letter-spacing: 0; }
.product-tagline { margin: -6px 0 16px; }
.lp-lead { max-width: 64ch; color: var(--muted); margin: -16px 0 28px; line-height: 1.6; }
.footer-product { display: block; margin-bottom: 4px; }

/* Access requests */
.request-card { margin-top: 16px; }
.request-card h2 { display: flex; gap: 10px; align-items: center; }
.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0 16px; }
.facts-list dt { color: var(--muted); font-weight: 600; }
.facts-list dd { margin: 0; overflow-wrap: anywhere; }
.nav-count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.login-request { margin-top: 4px; }
.sister-welcome { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #ecfdf3; border: 1px solid #bbf7d0; color: #14532d; font-size: 14px; }

/* Show / hide password eye */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--ink); background: var(--slate-bg, #f1f5f9); }
.pw-eye:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 1px; }
.reset-h { font-size: 16px; margin: 18px 0 8px; }
