/* Elarin/Solih semantic tokens; reference and asset provenance in docs/PANEL_DESIGN.md. */
@font-face { font-family: "Nunito Sans"; src: url("/assets/nunito-sans.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  --brand-image-filter: brightness(0);
  --primary: #74c611; --on-primary: #151515; --bg: #f9f9f7; --surface: #ffffff; --sidebar: #f3f3f1; --input: #f9f9f9; --selected: #f0efeb;
  --ink: #060606; --ink-2: #696969; --muted: #717171; --line: rgb(18 25 38 / .08); --axis: #d7d7d7;
  --accent: #74c611; --accent-ink: #151515; --focus: #427400; --link: #427400;
  --s1: #427400; --s2: #6074b7; --s3: #b96a28; --s4: #777177;
  --good: #427400; --bad: #b42318; --warn-bg: #fff4df; --warn-ink: #79530c; --fail-bg: #fce8e6; --fail-ink: #b42318; --ok-bg: #edf7e4; --ok-ink: #427400; --info-bg: #eaf0fb; --info-ink: #39578f;
  --sim-bg: #f0efeb; --sim-ink: #696969;
  --f0: #d3edb7; --f1: #bce88a; --f2: #a0d968; --f3: #8bd243; --f4: #74c611; --f5: #62a60e; --f6: #518a0b; --f7: #427400;
  --h0: #f2f8e9; --h1: #e3f1d2; --h2: #d3edb7; --h3: #bce88a; --h4: #a0d968; --h5: #74c611; --h6: #518a0b; --h7: #365e00;
  --h0t: #151515; --h1t: #151515; --h2t: #151515; --h3t: #151515; --h4t: #151515; --h5t: #151515; --h6t: #060606; --h7t: #ffffff;
  --radius: 16px; --radius-card: 16px; --radius-control: 12px; --sidebar-width: 248px; --header-height: 64px;
}
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) {
  color-scheme: dark;
  --brand-image-filter: none;
  --bg: #151515; --surface: #202020; --sidebar: #111111; --input: #1f1f1f; --selected: #2a2a2a;
  --ink: #f2f2f2; --ink-2: #b6b5b2; --muted: #a2a19e; --line: rgb(255 255 255 / .06); --axis: #373737;
  --accent: #74c611; --accent-ink: #151515; --focus: #74c611; --link: #a0d968;
  --s1: #74c611; --s2: #9ba9d6; --s3: #e2a26b; --s4: #b2aab3;
  --good: #a0d968; --bad: #ff8a80; --warn-bg: #342a18; --warn-ink: #eac789; --fail-bg: #3b211f; --fail-ink: #ffb4ad; --ok-bg: #25331d; --ok-ink: #bce88a; --info-bg: #222c3d; --info-ink: #b2c4e6;
  --sim-bg: #2a2a2a; --sim-ink: #b6b5b2;
  --h0: #1d2b13; --h1: #293e18; --h2: #36571d; --h3: #427400; --h4: #62a60e; --h5: #74c611; --h6: #a0d968; --h7: #d3edb7;
  --h0t: #d3edb7; --h1t: #d3edb7; --h2t: #e3f1d2; --h3t: #ffffff; --h4t: #151515; --h5t: #151515; --h6t: #151515; --h7t: #151515;
} }
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-image-filter: none;
  --bg: #151515; --surface: #202020; --sidebar: #111111; --input: #1f1f1f; --selected: #2a2a2a;
  --ink: #f2f2f2; --ink-2: #b6b5b2; --muted: #a2a19e; --line: rgb(255 255 255 / .06); --axis: #373737;
  --accent: #74c611; --accent-ink: #151515; --focus: #74c611; --link: #a0d968;
  --s1: #74c611; --s2: #9ba9d6; --s3: #e2a26b; --s4: #b2aab3;
  --good: #a0d968; --bad: #ff8a80; --warn-bg: #342a18; --warn-ink: #eac789; --fail-bg: #3b211f; --fail-ink: #ffb4ad; --ok-bg: #25331d; --ok-ink: #bce88a; --info-bg: #222c3d; --info-ink: #b2c4e6;
  --sim-bg: #2a2a2a; --sim-ink: #b6b5b2;
  --h0: #1d2b13; --h1: #293e18; --h2: #36571d; --h3: #427400; --h4: #62a60e; --h5: #74c611; --h6: #a0d968; --h7: #d3edb7;
  --h0t: #d3edb7; --h1t: #d3edb7; --h2t: #e3f1d2; --h3t: #ffffff; --h4t: #151515; --h5t: #151515; --h6t: #151515; --h7t: #151515;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 "Nunito Sans", system-ui, sans-serif; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 750; letter-spacing: -.025em; }
h2 { font-size: 16px; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 14px; margin: 20px 0 10px; }
p { margin-bottom: 12px; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: -999px; top: 0; background: var(--surface); padding: 12px 20px; z-index: 40; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.icon { flex: 0 0 auto; vertical-align: middle; }
.eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .15em; margin-bottom: 9px; }
/* App frame. Same 64px header and 24/16px spacing scale as Solih. */
.top { position: sticky; top: 0; z-index: 5; height: var(--header-height); margin-left: var(--sidebar-width); display: flex; align-items: center; gap: 16px; padding: 0 32px; border-bottom: 1px solid var(--line); background: var(--bg); }
.top-breadcrumb { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 12px; }
.top-breadcrumb strong { font-weight: 650; color: var(--ink); }
.top-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 38px; min-height: 38px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); padding: 0; margin: 0; text-decoration: none; }
.icon-button:hover { background: var(--selected); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; margin-left: 8px; border-radius: 12px; color: var(--on-primary); background: var(--primary); font-size: 12px; font-weight: 800; text-decoration: none; }
.brand { position: relative; display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand img { display: block; width: 144px; height: auto; object-fit: contain; }
.brand-symbol { clip-path: inset(0 60% 0 0); }
.brand-wordmark { position: absolute; inset: 0; clip-path: inset(0 0 0 40%); filter: var(--brand-image-filter); }
.side { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 10; display: flex; flex-direction: column; padding: 0 16px 16px; background: var(--sidebar); border-right: 1px solid var(--line); }
.side-brand { height: 100px; min-height: 100px; display: flex; align-items: center; padding-left: 13px; }
.side nav { overflow-y: auto; min-height: 0; scrollbar-width: thin; padding: 4px 0 16px; }
.nav-group { margin-bottom: 22px; }
.nav-group-label { padding: 0 14px; margin: 0 0 8px; font-size: 9px; letter-spacing: .12em; font-weight: 750; color: var(--ink-2); }
.side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.side li a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--ink-2); font-size: 13px; text-decoration: none; line-height: 20px; }
.side li a:hover { color: var(--ink); background: var(--selected); }
.side li a[aria-current="page"] { background: var(--selected); color: var(--ink); font-weight: 750; }
.side li a[aria-current="page"] .icon { color: var(--link); }
.side-footer { margin-top: auto; padding-top: 16px; }
.workspace-card { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.workspace-card strong { display: block; font-size: 12px; }
.workspace-card small { color: var(--muted); font-size: 10px; }
.workspace-state { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; margin-left: auto; }
.signout { display: flex; justify-content: space-between; align-items: center; margin: 14px 10px 0; font-size: 11px; }
.signout > .muted { color: var(--ink-2); }
.signout .icon { width: 14px; height: 14px; }
.frame { margin-left: var(--sidebar-width); padding: 32px 32px 56px; }
main { width: 100%; max-width: 1440px; margin-inline: auto; min-width: 0; }
main:focus { outline: none; }
.top-breadcrumb a { color: var(--ink-2); text-decoration: none; }
.top-breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.back-to-lobby { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; padding: 11px 14px; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius-control); }
.back-to-lobby:hover { color: var(--ink); background: var(--selected); }
/* Portal: shared identity and account frame, independent of any tool's sidebar or data. */
.portal { min-height: 100dvh; display: flex; flex-direction: column; }
.portal-top { border-bottom: 1px solid var(--line); background: var(--surface); }
.portal-top-inner { max-width: 1240px; min-height: 88px; margin: auto; padding: 16px 40px; display: flex; align-items: center; gap: 40px; }
.portal-links { display: flex; align-items: center; gap: 24px; }
.portal-links a { color: var(--ink-2); text-decoration: none; padding-block: 12px; }
.portal-links a[aria-current] { color: var(--ink); font-weight: 750; }
.portal-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.portal-actions form { margin: 0; }
.portal-signout { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 0; background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.portal-main { max-width: 1240px; padding: 64px 40px 48px; flex: 1; }
.portal-heading { margin-bottom: 16px; }
.portal-heading h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 750; letter-spacing: -.035em; }
.portal-greeting { color: var(--ink-2); margin-bottom: 14px; overflow-wrap: anywhere; }
.portal-greeting strong { color: var(--ink); font-weight: 650; }
.portal-intro { max-width: 640px; color: var(--ink-2); font-size: 15px; line-height: 1.7; margin-bottom: 36px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tool-card { min-width: 0; display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.tool-available { border-color: var(--focus); }
.tool-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.tool-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--selected); color: var(--ink-2); }
.tool-available .tool-icon { background: var(--ok-bg); color: var(--good); }
.tool-icon .icon { width: 24px; height: 24px; }
.tool-card h2 { font-size: 22px; margin-bottom: 12px; letter-spacing: -.02em; }
.tool-description { color: var(--ink-2); line-height: 1.75; margin-bottom: 24px; }
.tool-features { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; color: var(--ink-2); font-size: 12px; }
.tool-features li { display: flex; align-items: center; gap: 9px; }
.tool-features .icon { width: 16px; height: 16px; }
.tool-available .tool-features .icon { color: var(--good); }
.tool-action { margin-top: auto; }
.tool-action a, .tool-action button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 16px; min-height: 46px; margin: 0; border-radius: var(--radius-control); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; }
.tool-open { background: var(--primary); color: var(--on-primary); border: 1px solid transparent; }
.tool-open:hover { filter: brightness(.95); }
.tool-action button:disabled { color: var(--ink-2); background: var(--selected); border: 1px solid var(--line); cursor: not-allowed; opacity: 1; }
.portal-note { color: var(--ink-2); font-size: 12px; margin-top: 24px; }
.portal-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 1240px; margin-inline: auto; padding: 24px 40px; color: var(--ink-2); font-size: 11px; }
@media (max-width: 1100px) { .tool-grid { gap: 16px; } .tool-card { padding: 22px; } }
@media (max-width: 800px) { .tool-grid { grid-template-columns: 1fr; } .portal-main { padding: 40px 24px; } .portal-top-inner { padding-inline: 24px; gap: 24px; } .portal-footer { padding-inline: 24px; } .tool-heading { margin-bottom: 20px; } }
@media (max-width: 480px) { .portal-top-inner { padding: 16px; gap: 16px; flex-wrap: wrap; } .portal-links { order: 3; width: 100%; gap: 24px; } .portal-links a { padding-block: 4px; } .portal-actions { gap: 4px; } .portal-main { padding: 32px 16px; } .portal-footer { padding: 20px 16px; flex-wrap: wrap; } }
.page-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.page-heading h1 { overflow-wrap: anywhere; }
.context { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 25px; font-size: 11px; }
.context > .pill { font-size: 10px; min-height: 24px; }
.nav-toggle, .nav-close { display: none; }
/* Status, cards, overview. */
.pill, .badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; min-height: 27px; border-radius: 8px; font-size: 10px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.pill-sim { background: var(--sim-bg); color: var(--sim-ink); }
.pill-live, .badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill-warn, .badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill-fail, .badge-fail { background: var(--fail-bg); color: var(--fail-ink); }
.badge-unknown { background: var(--selected); color: var(--ink-2); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 13px; }
.notice-ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice-error { background: var(--fail-bg); color: var(--fail-ink); }
.notice-info { background: var(--info-bg); color: var(--info-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); min-width: 0; margin-bottom: 20px; }
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-header h2 { margin: 0; }
.card-header .help { color: var(--muted); margin: 8px 0 0; font-size: 12px; }
.card-content { padding: 20px; }
.card-content > :last-child { margin-bottom: 0; }
div.card { padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr)); gap: 20px; margin-bottom: 20px; }
.grid > .card { margin: 0; }
.grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.kpis { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.kpi-label { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.kpi-value { font-size: clamp(22px, 1.85vw, 30px); font-weight: 750; letter-spacing: -.03em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-delta { font-size: 11px; color: var(--ink-2); }
.kpi-delta.good { color: var(--good); } .kpi-delta.bad { color: var(--bad); }
.kpi-note { color: var(--muted); font-size: 10px; }
.empty { color: var(--muted); padding: 12px 0; }
/* tables */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); font-size: .8rem; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: color-mix(in srgb, var(--line) 45%, transparent); }
td a { font-weight: 600; }
.heat-none { color: var(--muted); }
.heat-0 { background: var(--h0); color: var(--h0t); } .heat-1 { background: var(--h1); color: var(--h1t); } .heat-2 { background: var(--h2); color: var(--h2t); } .heat-3 { background: var(--h3); color: var(--h3t); }
.heat-4 { background: var(--h4); color: var(--h4t); } .heat-5 { background: var(--h5); color: var(--h5t); } .heat-6 { background: var(--h6); color: var(--h6t); } .heat-7 { background: var(--h7); color: var(--h7t); }

/* charts */
.chart { margin: 0; }
.chart figcaption { font-weight: 600; margin-bottom: .3rem; }
.legend { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0 0 .3rem; font-size: .82rem; color: var(--ink-2); flex-wrap: wrap; }
.swatch { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }
.plot { position: relative; }
.plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.axis { fill: var(--muted); font-size: 11px; }
.direct { fill: var(--ink-2); font-size: 11px; }
.line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s1 { stroke: var(--s1); background: var(--s1); } .s2 { stroke: var(--s2); background: var(--s2); } .s3 { stroke: var(--s3); background: var(--s3); } .s4 { stroke: var(--s4); background: var(--s4); }
.dot.s1 { fill: var(--s1); } .dot.s2 { fill: var(--s2); } .dot.s3 { fill: var(--s3); } .dot.s4 { fill: var(--s4); }
.cross { stroke: var(--axis); stroke-width: 1; }
.marker { stroke: var(--surface); stroke-width: 2; }
.marker.s1 { fill: var(--s1); } .marker.s2 { fill: var(--s2); } .marker.s3 { fill: var(--s3); } .marker.s4 { fill: var(--s4); }
.tip { position: absolute; top: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font-size: .8rem; box-shadow: 0 4px 14px rgb(0 0 0 / .12); white-space: nowrap; z-index: 3; }
.tip b { display: block; margin-bottom: .15rem; }
.tip span { display: flex; align-items: center; gap: .35rem; justify-content: space-between; }
details { margin-top: .5rem; font-size: .85rem; }
summary { cursor: pointer; color: var(--link); }
.funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.funnel li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 4.5rem 9rem; gap: .6rem; align-items: center; font-size: .88rem; }
.funnel-bar { width: 100%; height: 14px; background: color-mix(in srgb, var(--line) 60%, transparent); border-radius: 2px; }
.funnel-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.funnel-note { color: var(--muted); font-size: .8rem; }
.f0 { fill: var(--f0); } .f1 { fill: var(--f1); } .f2 { fill: var(--f2); } .f3 { fill: var(--f3); } .f4 { fill: var(--f4); } .f5 { fill: var(--f5); } .f6 { fill: var(--f6); } .f7 { fill: var(--f7); }
@media (max-width: 640px) { .funnel li { grid-template-columns: minmax(0, 1fr) 4rem; } .funnel-bar { grid-column: 1 / -1; grid-row: 2; } .funnel-note { grid-column: 1 / -1; } }

/* forms */
.horizontal-funnel { margin: 0; }
.funnel-scroll { overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--radius-control); }
.funnel-track { display: inline-grid; min-width: 100%; }
.funnel-stages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr); list-style: none; padding: 0; margin: 0; }
.funnel-stages li { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 8px 0; border-right: 1px solid var(--line); }
.funnel-stages li:last-child { border-right: 0; }
.funnel-stage-index { color: var(--link); font-size: 10px; font-weight: 750; letter-spacing: .1em; margin-bottom: 12px; }
.funnel-stage-label { font-size: 12px; color: var(--ink-2); min-height: 36px; max-width: 130px; }
.funnel-stage-value { font-size: 26px; line-height: 1.3; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.03em; margin-bottom: 9px; }
.funnel-stage-rate { font-size: 11px; line-height: 1.5; color: var(--ink-2); max-width: 130px; min-height: 34px; }
.funnel-shape { display: block; width: 100%; height: 240px; }
.funnel-center { stroke: var(--axis); stroke-dasharray: 3 4; stroke-width: 1; }
.funnel-scale-note { color: var(--muted); font-size: 11px; margin: 8px 0 16px; }
@media (forced-colors: active) { .funnel-shape polygon { fill: Highlight; stroke: CanvasText; }.funnel-center { stroke: CanvasText; } }

button, .button { display: inline-block; text-decoration: none; text-align: center; font: inherit; padding: .45rem .9rem; border-radius: 8px; border: 1px solid var(--axis); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 2.5rem; line-height: 1.5; margin: 0 .25rem .25rem 0; }
button:hover { background: var(--line); }
.button[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
button.primary:hover { filter: brightness(1.06); }
button.danger { border-color: var(--bad); color: var(--bad); }
button.link { border: 0; background: none; color: var(--link); padding: 0; min-height: 0; text-decoration: underline; }
input, select, textarea { font: inherit; padding: .45rem .6rem; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); min-height: 2.5rem; max-width: 100%; }
textarea { width: 100%; min-height: 5rem; }
.field { display: flex; flex-direction: column; gap: .25rem; margin: 0 0 .9rem; font-weight: 500; }
.field small, .hint { color: var(--muted); font-weight: 400; font-size: .82rem; }
.field input { width: 100%; max-width: 28rem; }
.field.check { flex-direction: row; align-items: center; gap: .5rem; }
.field.check input { width: auto; min-height: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .9rem; }
.range { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; margin: 0 0 1rem; font-size: .88rem; }
.range label { display: flex; flex-direction: column; gap: .15rem; color: var(--ink-2); }
.presets { display: flex; gap: .75rem; padding-bottom: .55rem; }
.inline { display: inline; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 1rem; padding: .75rem 1rem; }
legend { font-weight: 650; padding: 0 .4rem; }
code, .mono { font-family: "Nunito Sans", system-ui, sans-serif; font-size: .88em; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.card .mono { overflow-wrap: anywhere; }
.analysis-record { overflow-wrap: anywhere; }
.analysis-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.analysis-actions a { display: inline-flex; align-items: center; min-height: 40px; }
.codes { columns: 2; list-style: none; padding: 1rem; background: var(--bg); border: 1px dashed var(--axis); border-radius: var(--radius); font-size: 1.05rem; }
.limit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .6rem 1rem; }
.state-blocked { color: var(--bad); font-weight: 600; }


/* Shared Solih controls: 12px radius, a single density, strong primary action. */
button, .button, input, select, textarea { border-radius: var(--radius-control); font-size: 13px; }
button, .button { font-weight: 650; min-height: 40px; padding: 8px 16px; }
button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
button.primary:hover { filter: brightness(.96); }
button.link { display: inline-flex; gap: 6px; align-items: center; font-size: inherit; }
.icon-button { padding: 0; min-height: 38px; }
input, select, textarea { background: var(--input); padding: 10px 12px; min-height: 42px; border-color: var(--axis); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
input[type="checkbox"] { accent-color: var(--focus); min-height: 16px; width: 16px; height: 16px; }
input[type="hidden"] { display: none; }
.field { gap: 7px; margin-bottom: 18px; font-size: 12px; font-weight: 650; }
.field small, .hint { line-height: 1.6; font-size: 11px; }
fieldset { padding: 16px 20px; border-radius: 16px; }
legend { font-size: 13px; }
.filter-bar { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; gap: 12px; margin-bottom: 16px; }
.filter-bar label { font-size: 11px; gap: 7px; }
.filter-bar input, .filter-bar select, .filter-bar button[type="submit"] { height: 44px; min-height: 44px; }
.filter-bar button { margin: 0; }
.presets { margin-left: auto; padding-bottom: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.presets a { padding: 8px 10px; color: var(--ink-2); text-decoration: none; font-size: 11px; border-radius: 10px; }
.presets a:hover { background: var(--selected); color: var(--ink); }
th { background: var(--input); font-size: 10px; padding: 12px 14px; }
td { padding: 14px; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--input); }
.scroll { max-width: 100%; border: 1px solid var(--line); border-radius: 12px; }
.chart figcaption { font-size: 12px; margin-bottom: 12px; }
.legend { font-size: 11px; margin-bottom: 16px; }
.plot .axis, .plot .direct { font-family: "Nunito Sans", sans-serif; font-size: 10px; }
.funnel { gap: 14px; }.funnel li { font-size: 12px; }.funnel-bar { height: 10px; border-radius: 6px; }
/* Authentication shares the brand and visual tokens, including second factor/recovery/password. */
body.bare { min-height: 100dvh; padding: 0; }
.auth-layout { display: grid; grid-template-columns: 46% minmax(0, 1fr); min-height: 100dvh; }
.auth-story { background: #151515; color: #f2f2f2; padding: 32px 56px; display: flex; flex-direction: column; }
.auth-wordmark { width: 160px; height: 79px; object-fit: contain; margin-left: -7px; }
.auth-story-copy { margin-block: auto; padding: 48px 0; }
.auth-story .eyebrow { color: #a0d968; margin-bottom: 22px; }
.auth-story h2 { font-size: clamp(32px, 3.5vw, 54px); font-weight: 750; letter-spacing: -.04em; line-height: 1.12; margin-bottom: 24px; }
.auth-story p { color: #b6b5b2; font-size: 16px; line-height: 1.6; }
.auth-points { display: grid; gap: 18px; margin-top: 44px; font-size: 12px; color: #d8d8d5; }
.auth-points span { display: flex; align-items: center; gap: 12px; }.auth-points .icon { color: #a0d968; }
.auth-footnote { font-size: 11px; color: #a2a19e; margin-top: 32px; }
.auth-form-area { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px; }
.narrow { max-width: 400px; width: 100%; margin: 0; }
.narrow h1 { font-size: 30px; margin-bottom: 28px; }
.narrow .eyebrow { margin-bottom: 12px; }.narrow .hint { margin-top: 20px; }
.narrow button.primary { width: 100%; margin: 8px 0 0; min-height: 44px; }
.auth-security { display: flex; align-items: center; gap: 8px; margin: 36px 0 0; font-size: 11px; color: var(--muted); }.auth-security .icon { width: 15px; height: 15px; }
.auth-mobile-brand { display: none; }
.nav-scrim { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; padding: 0; margin: 0; background: rgb(0 0 0 / .45); z-index: 9; }
@media (max-width: 1100px) { :root { --sidebar-width: 224px; } .frame { padding: 24px; } .top { padding-inline: 24px; } .kpis { gap: 12px; }.kpi { padding: 16px; } }
@media (max-width: 960px) {
  .top { margin-left: 0; padding: 0 16px; }.frame { margin-left: 0; padding: 24px 16px 40px; }body[data-ui-ready] .nav-toggle { display: inline-flex; }
  .side { position: static; width: 100%; border: 0; padding: 16px; }.side-brand { display: none; }.side nav { display: flex; gap: 16px; overflow: auto; }.nav-group { min-width: 180px; }
  body[data-ui-ready] .side { position: fixed; inset: 0 auto 0 0; width: min(82vw, 280px); transform: translateX(-100%); visibility: hidden; padding: 0 16px 16px; border-right: 1px solid var(--line); }
  body[data-ui-ready] .side-brand { display: flex; justify-content: space-between; padding-right: 0; }.nav-close { display: inline-flex; }
  body[data-ui-ready] .side-footer { display: block; } body[data-ui-ready] .side nav { display: block; }
  body[data-nav-open] .side { transform: translateX(0); visibility: visible; }body[data-nav-open] { overflow: hidden; }
  .page-heading { gap: 12px; }.page-heading h1 { font-size: 25px; }.page-heading > .pill { font-size: 9px; padding: 5px 8px; }
  .card-header { padding: 16px; }.card-content { padding: 16px; }.filter-bar { padding: 16px; }
  .auth-layout { grid-template-columns: 38% minmax(0, 1fr); }.auth-story { padding: 32px; }.auth-form-area { padding: 32px; }
}
@media (max-width: 640px) {
 .top-breadcrumb { font-size: 11px; gap: 10px; }.top-actions { gap: 2px; }.top { gap: 10px; }.top-actions > a.icon-button { display: none; }
 .page-heading { align-items: flex-start; }.page-heading > .pill { margin-top: 23px; }.eyebrow { font-size: 9px; }
 .context { margin-bottom: 20px; font-size: 10px; gap: 10px; }.kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }.kpi-value { font-size: 24px; }
 .filter-bar { gap: 10px; }.filter-bar label { flex: 1; min-width: 115px; }.filter-bar input { width: 100%; }.filter-bar .presets { width: 100%; margin-left: 0; }
 .grid { grid-template-columns: minmax(0,1fr); }.auth-layout { display: block; }.auth-story { display: none; }.auth-form-area { min-height: 100dvh; padding: 32px 24px; }.auth-mobile-brand { display: block; align-self: flex-start; margin: 0 0 52px; }.narrow { max-width: 420px; }.auth-security { margin-top: 40px; }
}
@media (prefers-reduced-motion: no-preference) { .side, button, a { transition: background-color 120ms, color 120ms; } }
@media print { .side, .top, .signout, .range, .context { display: none; }.frame { display: block; margin: 0; padding: 0; } }
@media (forced-colors: active) { .line { stroke: CanvasText; }.badge,.pill { border: 1px solid CanvasText; } }

/* Solih layout: 72px primary rail, 260px drawer, edge-aligned scrolling. */
:root { --rail-width: 72px; --menu-width: 260px; --sidebar-width: 332px; --content-offset: 332px; }
body, button, input, select, textarea, table, summary, code, pre, kbd, samp, .mono, svg text { font-family: "Nunito Sans", system-ui, sans-serif; }
.primary-rail { position: fixed; inset: 0 auto 0 0; z-index: 12; width: var(--rail-width); display: flex; flex-direction: column; align-items: center; background: var(--sidebar); border-right: 1px solid var(--line); padding: 18px 0 16px; }
.primary-rail .brand img { width: 36px; height: 36px; }
.rail-items { display: grid; gap: 8px; margin-top: 28px; }
.rail-item { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); text-decoration: none; }
.rail-item:hover, .rail-item[aria-current] { background: var(--selected); color: var(--link); }
.rail-account { margin-top: auto; }
.mobile-areas { display: none; }
.mobile-areas a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 4px; border-radius: var(--radius-control); color: var(--ink-2); text-decoration: none; font-size: 11px; }
.mobile-areas a[aria-current] { background: var(--selected); color: var(--ink); font-weight: 700; }
.side { left: var(--rail-width); width: var(--menu-width); height: 100dvh; padding: 0; }
.side-brand { height: 64px; min-height: 64px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.module-name { font-size: 16px; font-weight: 750; color: var(--ink); text-decoration: none; }
.side nav { display: block; flex: 1; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; padding: 16px 0; scrollbar-width: thin; scrollbar-gutter: stable; scrollbar-color: var(--axis) transparent; overscroll-behavior: contain; }
.side nav::-webkit-scrollbar { width: 6px; }
.side nav::-webkit-scrollbar-track { background: transparent; }
.side nav::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--axis); }
.nav-group { padding: 0 16px; margin-bottom: 24px; }
.nav-group-label { padding: 0 12px; font-size: 10px; letter-spacing: .06em; margin-bottom: 8px; }
.side li a { padding: 10px 12px; font-size: 14px; min-height: 44px; }
.side li a .icon { stroke-width: 1.5; }
.back-to-lobby { margin: 0 16px 24px; padding: 10px 12px; border: 0; font-size: 13px; }
.side-footer { flex: 0 0 auto; padding: 16px 24px; border-top: 1px solid var(--line); }
.signout { margin: 0; font-size: 12px; }
.frame { padding: 24px 24px 40px; }
.top { margin-left: var(--sidebar-width); padding-inline: 24px; }
.sidebar-collapse { position: fixed; z-index: 13; left: calc(var(--sidebar-width) - 22px); top: 10px; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: 24px; }
.sidebar-collapse::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); border-radius: 50%; background: var(--selected); z-index: -1; }
.sidebar-collapse:hover { background: transparent; color: var(--ink); }
:root[data-sidebar-collapsed="true"] { --sidebar-width: 72px; --content-offset: 72px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-help { position: relative; margin: 0; flex: 0 0 auto; }
.card-help summary, .live-info summary { list-style: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); font-weight: 700; }
.card-help summary::-webkit-details-marker, .live-info summary::-webkit-details-marker { display: none; }
.card-help[open] summary, .card-help summary:hover { background: var(--selected); }
.card-help > p { position: absolute; right: 0; top: 32px; z-index: 20; width: min(320px, 65vw); padding: 16px; margin: 0; background: var(--surface); border: 1px solid var(--axis); border-radius: 12px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.page-heading { margin-bottom: 10px; }
.portal-main { padding-top: 32px; }
.portal-main:has(> .tool-grid) { display: flex; flex-direction: column; justify-content: center; padding-block: 32px; }
.portal-main > .tool-grid { width: 100%; }
.portal-lobby .portal-top { margin-top: 8px; background: transparent; border: 0; }
.portal-lobby .portal-top-inner { max-width: none; min-height: 48px; padding: 0 24px; justify-content: space-between; gap: 16px; }
.portal-lobby .brand img { width: 96px; height: auto; }
.portal-lobby .portal-links { margin-left: auto; }
.portal-lobby .portal-links a { padding-block: 8px; }
.portal-lobby .portal-actions { margin-left: 0; }
.portal-lobby .portal-actions button { min-height: 36px; }
.portal-lobby .portal-signout { padding: 6px 10px; }
@media (max-width: 480px) {
  .portal-lobby .portal-top-inner { padding-inline: 12px; gap: 8px; flex-wrap: nowrap; }
  .portal-lobby .portal-links { order: initial; width: auto; gap: 16px; }
}
@media (max-width: 360px) {
  .portal-lobby .portal-top-inner { padding-inline: 8px; gap: 4px; }
  .portal-lobby .portal-links { gap: 8px; }
}
.tool-card { padding: 24px; }
.tool-heading { margin-bottom: 20px; }
.tool-description { margin-bottom: 28px; }
/* The globe belongs directly to main and paints transparently against the page background. */
.frame-live { isolation: isolate; }
[data-live-globe] { position: relative; }
.has-live-background { min-height: calc(100dvh - 140px); display: flex; flex-direction: column; }
.globe-canvas { flex: none; width: min(100%, 840px); height: auto; aspect-ratio: 1; margin: 32px auto 0; display: block; color: var(--ink); background: transparent; border: 0; border-radius: 0; cursor: grab; touch-action: none; }
.globe-canvas:active { cursor: grabbing; }
[data-live-view="overview"] > .globe-canvas { opacity: .28; }
.globe-markers { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: clip; }
.globe-marker { position: absolute; top: 0; left: 0; width: max-content; max-width: min(200px, calc(100vw - 32px)); margin: 0; pointer-events: auto; font-size: 11px; }
.globe-marker[open] { z-index: 3; }
.globe-marker summary { display: flex; align-items: center; gap: 6px; min-height: 28px; margin: 0; padding: 4px 8px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); list-style: none; }
.globe-marker summary::-webkit-details-marker { display: none; }
.globe-marker summary span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.globe-marker summary:hover, .globe-marker[open] summary { background: var(--selected); }
.globe-marker-menu { display: flex; flex-direction: column; gap: 5px; max-width: 200px; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.globe-marker-menu strong { color: var(--ink); font-weight: 650; }
.globe-marker-menu button { min-height: 28px; margin: 2px 0 0; padding: 4px 8px; font: inherit; }
.globe-marker:not([open]) .globe-marker-menu { display: none; }
.globe-controls { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; align-self: center; max-width: 100%; gap: 6px; margin: 0 auto 12px; opacity: 1; }
.globe-controls output { min-width: 32px; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.frame-live:hover .globe-controls, .globe-controls:focus-within, .globe-canvas:focus ~ .globe-controls { opacity: 1; }
.globe-controls button { display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 50%; padding: 0; margin: 0; background: var(--bg); color: var(--ink-2); font-size: 14px; }
.live-toolbar { position: relative; z-index: 3; align-self: center; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; max-width: 100%; padding: 6px 12px; border-radius: 12px; background: var(--bg); color: var(--ink-2); font-size: 11px; }
.live-count { white-space: nowrap; }
.live-count strong { color: var(--ink); font-size: 15px; margin-right: 4px; font-variant-numeric: tabular-nums; }
.live-status { margin: 0; font-size: 11px; }
.live-countries, .live-info { position: static; margin: 0; }
.live-countries summary { color: var(--ink-2); }
.live-country-list, .live-info > div { position: absolute; z-index: 4; bottom: calc(100% + 8px); right: 0; width: min(320px, calc(100vw - var(--content-offset) - 48px)); max-height: calc(100dvh - 180px); overflow: auto; overscroll-behavior: contain; margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--axis); border-radius: 12px; color: var(--ink); }
.live-info > div { font-size: 12px; line-height: 1.6; }
.live-info p:last-of-type { margin-bottom: 4px; }
.live-countries th, .live-countries td { font-size: 12px; padding: 10px; }
.live-countries td:last-child, .live-countries th:last-child { text-align: right; }
@media(min-width:961px) { :root[data-sidebar-collapsed="true"] .side { visibility: hidden; transform: translateX(-100%); } }
@media(max-width:960px) {
  :root, :root[data-sidebar-collapsed="true"] { --content-offset: 0px; }
  .primary-rail, .sidebar-collapse { display: none; }
  .top, .frame { margin-left: 0; }
  .top { padding-inline: 16px; }
  .frame { padding: 24px 16px 40px; }
  .side { position: static; left: auto; width: 100%; height: auto; padding: 0; }
  .side-brand { display: none; }
  .mobile-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 12px 16px 0; }
  .nav-group { min-width: 0; }
  body[data-ui-ready] .side { position: fixed; inset: 0 auto 0 0; width: min(78vw, 336px); height: 100dvh; padding: 0; }
  body[data-ui-ready] .side-brand { display: flex; justify-content: space-between; padding-right: 16px; }
  body[data-ui-ready] .side nav { display: block; }
  .page-heading > .pill { margin-top: 0; }
  .live-toolbar { gap: 12px; }
}
@media(hover:none), (prefers-reduced-motion:reduce) { .globe-controls { opacity: 1; } }
@media print { .primary-rail, .sidebar-collapse, .globe-canvas, .globe-markers, .globe-controls, .live-toolbar { display: none; } }

.auth-panel { max-width: 420px; margin: auto; width: calc(100% - 32px); padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.auth-panel-brand { margin-bottom: 32px; }
body.bare { display: grid; place-items: center; padding: 24px 0; }
.auth-panel h1 { margin-bottom: 24px; font-size: 26px; }

.page-content { position: relative; z-index: 1; }

