@import url('./fonts/prototype-fonts.css');

/* Visual adaptation of “Reat.ts prototype pages”. Loaded after the functional
   console styles so the same renderers, actions and API contracts remain in use.

   Colours and bundled Hanken Grotesk / IBM Plex Mono faces follow theme.js
   in that archive. Light and dark share the same component tokens, including
   public and access pages. The original green-tinted highlight is replaced
   by the warm selection colour; no teal or green accent is used. */
:root, [data-theme="dark"] {
  --p-bg: #0e1820; --p-bg2: #0c1a26; --p-panel: #121e26; --p-panel2: #16222b;
  --p-panel3: #17232c; --p-grid: #1d2a33; --p-hl-y: #2a1f1e; --p-ink: #f1ede6;
  --p-ink2: #e8e4dc; --p-ink3: #d8d5ce; --p-ink4: #d4d6d6; --p-mute: #c9ced1;
  --p-mute2: #a9b3ba; --p-dot: #cfd3d4; --p-dim: #a7acaf; --p-line: #3a4851;
  --p-line2: #6b777e; --p-line3: #8b959b; --p-track: #2c3b45; --p-off: #2a3640;
  --p-off2: #4a5560; --p-off-t: #9aa4aa; --p-blue: #b9c4e0; --p-blue2: #6e8bd6;
  --p-blue3: #c9d1e8; --p-acc: #f2593a; --p-acc2: #f26a45; --p-sel: #2a1f1e;
  --p-sel2: #3a2220; --p-done: #3a2a26; --p-yel: #e8c547; --p-amb: #e8a24d;
  --p-amb2: #e08f3a;
  --bg: var(--p-bg);
  --surface: var(--p-panel);
  --surface2: var(--p-panel2);
  --text: var(--p-ink);
  --sub: var(--p-ink4);
  --muted: var(--p-mute2);
  --line: var(--p-line);
  --line2: var(--p-line2);
  --accent: var(--p-acc);
  --accent-strong: var(--p-acc2);
  --accent-bg: var(--p-sel);
  --orange: var(--p-amb);
  --orange-bg: color-mix(in srgb, var(--p-amb) 12%, var(--p-sel));
  --red: var(--p-acc);
  --red-bg: var(--p-sel);
  --blue: var(--p-blue);
  --blue-bg: color-mix(in srgb, var(--p-blue2) 14%, var(--p-panel));
  --shadow: none;
  --radius: 0px;
  --sidebar: 232px;
  --font-ui: 'Hanken Grotesk', 'DM Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --p-bg: #f5f3ee; --p-bg2: #f5f3ee; --p-panel: #ffffff; --p-panel2: #ebe8e1;
  --p-panel3: #efece6; --p-grid: #e3e0d9; --p-hl-y: #f8f1d4; --p-ink: #17222a;
  --p-ink2: #26313a; --p-ink3: #33404a; --p-ink4: #3b464e; --p-mute: #4d5860;
  --p-mute2: #646f78; --p-dot: #9aa1a6; --p-dim: #7f868b; --p-line: #d5d1c9;
  --p-line2: #a6aaa6; --p-line3: #8a9197; --p-track: #e0ddd6; --p-off: #e4e1db;
  --p-off2: #cfcac2; --p-off-t: #7a8288; --p-blue: #34509a; --p-blue2: #5a72bd;
  --p-blue3: #2c4787; --p-acc: #d4492a; --p-acc2: #d4492a; --p-sel: #fbe6dd;
  --p-sel2: #f9dacd; --p-done: #8a3a24; --p-yel: #8f6c00; --p-amb: #a85d0c;
  --p-amb2: #a85d0c;
  /* light acc2 equals acc in theme.js; the hover deepens toward done. */
  --accent-strong: color-mix(in srgb, var(--p-acc) 80%, var(--p-done));
  /* Light acc (4.4:1 on white) and amb (4.2:1 on its tint) are below 4.5:1
     as text: error text takes done, warning text amb deepened toward ink. */
  --red: var(--p-done);
  --orange: color-mix(in srgb, var(--p-amb) 80%, var(--p-ink));
  --orange-bg: color-mix(in srgb, var(--p-amb) 12%, var(--p-panel));
  color-scheme: light;
}
.landing, .access-page, .access-modal { color-scheme: inherit; }
body { font-family: var(--font-ui); font-size: 15px; }
h1, h2, h3, h4, .brand-title, .metric-value, .chart-summary strong,
.decision-number strong, .factor-value, .funding-value strong, .market-kpis strong,
.mini-kpi-list strong, .distribution-labels strong { font-family: var(--font-ui); }
h1 { font-size: clamp(29px, 2.8vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
h2 { font-size: 21px; line-height: 1.25; }
h3 { font-size: 16px; }
.mono, code, pre, .uppercase, .nav-heading, .client-eyebrow { font-family: var(--font-mono); }
.brand-symbol { color: var(--text); }
:is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.button, .select, .input-search, .field, .segmented, .segmented button,
.icon-btn, .tenant-switch, .tenant-monogram, .help-box, .tag, .metric-symbol,
.insight-note, .banner, .binding-card, .reveal-panel, .option-card, .funding-value,
.policy-status, .alert-card, .builder-item, .question-num, .builder-option,
.integration-logo, .modal, .search-result, .callout-block, .client-aside,
.client-summary, .toast, .formula-box { border-radius: 0; box-shadow: none; }
.button { font-size: 14px; padding: 11px 16px; }
.button.small { font-size: 12px; padding: 7px 12px; }
.button:hover { border-color: var(--text); }
.button.primary, [data-theme="dark"] .button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: var(--accent-strong); }
.button .icon { width: 17px; height: 17px; }
.text-button { font-size: 13px; color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--accent); }
.badge { border-radius: 20px; font-size: 11px; padding: 4px 10px; }
.badge.teal { color: var(--blue); background: var(--blue-bg); border-color: var(--p-blue2); }
.badge.orange, .badge.red, .badge.blue, .badge.purple { border-color: currentColor; background: transparent; }
.metric-foot .change { color: var(--blue); }
.progress, .progress > i, .step-progress span { border-radius: 0; }
.select, .input-search input, .field { font-size: 14px; }
.select, .input-search { padding: 10px 12px; }
.segmented { padding: 0; gap: 0; background: transparent; }
.segmented button { font-size: 12px; padding: 9px 14px; }
.segmented button.active { background: var(--accent-bg); color: var(--text); box-shadow: inset 0 -2px var(--accent); }
.note, .card-head p, .card-foot, .person-meta, .table-caption { font-size: 12px; }
.card-head { padding: 22px 24px 0; }
.card-content, .card-pad { padding: 24px; }
.card-foot { padding: 15px 24px; }
.card { background: transparent; }
.card-head .count-bubble, .count-bubble { font-family: var(--font-ui); font-size: 11px; }
.page { max-width: 1800px; padding: 24px 30px 32px; }
.page-header { margin-bottom: 26px; }
.page-subtitle { font-size: 17px; color: var(--sub); margin-top: 8px; }
.workspace-location { margin-bottom: 20px; }
.breadcrumbs { font-size: 12px; }
.breadcrumbs strong { color: var(--muted); }

/* A continuous institutional header, with all workspace routes retained. */
.workspace-topbar { position: sticky; top: 0; z-index: 40; height: 76px; padding: 0 24px; background: var(--bg); gap: 22px; }
.workspace-topbar .brand { height: auto; padding: 0; gap: 12px; color: var(--text); flex: none; }
.workspace-topbar .brand-title { font-size: 25px; white-space: nowrap; }
.workspace-topbar .brand-caption { display: none; }
.workspace-topbar .tenant-switch { margin: 0; width: auto; max-width: 260px; padding: 6px 0 6px 22px; border: 0; border-inline-start: 1px solid var(--line2); background: transparent; flex-shrink: 1; }
.workspace-topbar .tenant-monogram { width: 32px; height: 32px; background: transparent; color: var(--text); }
.workspace-topbar .tenant-meta strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-topbar .tenant-meta span { font-size: 10px; }
.workspace-topbar .topbar-right { flex: 1; min-width: 0; justify-content: flex-end; gap: 12px; }
.workspace-topbar .topbar-search { flex: 1; max-width: 520px; min-width: 40px; height: 42px; border: 1px solid var(--line2); padding: 0 12px; font-size: 14px; }
.workspace-topbar .topbar-search .shortcut { margin-inline-start: auto; }
.workspace-topbar .demo-pill { display: inline-flex; border-radius: 0; border-color: var(--accent); color: var(--accent); align-items: center; font-size: 11px; }
.workspace-topbar .demo-pill::before { display: none; }
.workspace-topbar .live-pill { border-color: var(--p-blue2); color: var(--blue); background: transparent; }
.workspace-topbar .topbar-divider { display: none; }
.workspace-topbar .role-select { max-width: 120px; font-size: 11px; background: transparent; }
.workspace-topbar .lang-select { max-width: 80px; }
.sidebar, [dir="rtl"] .sidebar { top: 76px; background: var(--bg); }
.nav-scroll { padding: 12px 8px; }
.nav-heading { color: var(--muted); letter-spacing: .15em; font-size: 9px; margin: 18px 16px 9px; }
.nav-item { border-radius: 0; border-inline-start: 3px solid transparent; font-size: 14px; padding: 10px 13px; margin: 0; }
.nav-item.active { color: var(--text); border-inline-start-color: var(--accent); }
.nav-item.active .nav-count, [data-theme="dark"] .nav-item.active .nav-count { background: var(--accent-bg); color: var(--accent); }
.sidebar-bottom { padding: 12px; border-top: 1px solid var(--line); }
.help-box { background: transparent; border: 0; padding: 10px 8px 0; font-size: 11px; }
.help-box strong { font-size: 12px; }
.help-box .text-button { font-size: 12px; }
.user-block { padding: 14px; }
.user-block strong { font-size: 12px; }
.user-block small { font-size: 10px; }
.shell { min-height: calc(100vh - 76px); }
.metrics { gap: 0; border-block: 1px solid var(--line); }
.metric { border: 0; border-inline-end: 1px solid var(--line); background: transparent; padding: 20px 24px; }
.metric:last-child { border-inline-end: 0; }
.metric-top { font-size: 14px; }
.metric-symbol { background: none; border: 0; }
.metric-symbol .icon { height: 21px; width: 21px; }
.metric-value { font-size: 34px; }
.metric-foot { font-size: 11px; }
.grid-two, .grid-equal, .grid-three { gap: 18px; }
th { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-mono); background: transparent; padding-block: 14px; }
td { font-size: 14px; padding-block: 16px; }
.person-name { font-size: 14px; }
.avatar { width: 35px; height: 35px; }
.table-top { padding: 20px 24px; }
.attention-title strong { font-size: 14px; }
.attention-title small, .attention-body p, .attention-body .text-button { font-size: 12px; }
.attention-item { padding: 17px 0; }
.insight-note { background: transparent; border-color: var(--line); color: var(--sub); font-size: 12px; }
.tabs { gap: 28px; }
.tabs button { font-size: 14px; padding-bottom: 14px; }
.tabs button.active { color: var(--text); border-color: var(--accent); }
.profile-meta { font-size: 12px; }
.dimension-row, .comparison-row label { font-size: 13px; }
.option-card { padding: 15px; }
.option-card strong, .setting-row strong { font-size: 14px; }
.option-card small, .setting-row p, .factor-card p { font-size: 12px; }
.option-card:hover, .alert-card:hover { border-color: var(--accent); }
.builder-item strong { font-size: 13px; }
.builder-item small { font-size: 11px; }
.banner { border-color: var(--line2); }
.toast { background: var(--surface); border-color: var(--line2); color: var(--text); }
.drawer-header h2 { font-size: 24px; }
.drawer-header p { font-size: 13px; }
.footer-note { font-size: 11px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-note .text-button { font-size: 11px; }
.client-topbar { background: var(--bg); }
.client-content { max-width: 1040px; }
.client-content h1 { font-size: clamp(30px, 4vw, 46px); }
.client-intro { color: var(--sub); font-size: 17px; }
.client-card { padding: 32px; }
.client-card h2 { font-size: 24px; }
.client-card > p { font-size: 15px; }
.client-step { font-size: 12px; }
.client-reassurance, .client-aside, .client-summary p { font-size: 13px; }

/* Public site: the prototype's editorial hero and four-column Evidence Atlas. */
.landing {
  --land-line: var(--line); --land-bg: var(--bg);
  color: var(--text); font-family: var(--font-ui);
}
.landing h1, .landing h2, .landing h3, .land-brand { font-family: var(--font-ui); }
.land-topline, .land-hero-backdrop, .land-governance-glow, .land-final-rings { display: none; }
.land-header { max-width: 1600px; height: 76px; border-bottom: 1px solid var(--line); margin-inline: 32px; padding: 0; }
.land-brand { color: var(--text); font-size: 27px; gap: 12px; }
.land-brand .brand-symbol { color: var(--text); width: 30px; height: 32px; }
.land-brand-dot { display: none; }
.land-nav button, .land-login { color: var(--sub); font-size: 15px; }
.land-button { border-radius: 0; color: var(--text); border-color: var(--line2); font-size: 15px; box-shadow: none; padding: 13px 22px; }
.land-button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; }
.land-button:hover, .land-button.primary:hover { transform: none; background: var(--surface2); border-color: var(--text); color: var(--text); box-shadow: none; }
.land-button.primary:hover { background: var(--accent-strong); color: #fff; }
.land-button.small { font-size: 13px; padding: 10px 16px; }
.land-hero { display: block; max-width: 1600px; padding: 46px 32px 0; }
.land-hero-copy { text-align: center; padding: 0; }
.land-eyebrow { color: var(--sub); letter-spacing: .25em; font-size: 11px; margin-bottom: 20px; }
.land-live-dot { background: var(--accent); box-shadow: none; }
.land-hero h1 { font-size: clamp(38px, 5.5vw, 80px); line-height: 1.03; letter-spacing: -.045em; font-weight: 700; color: var(--text); }
.land-hero h1 > span { background: none; color: var(--muted); -webkit-text-fill-color: currentColor; }
.land-hero h1 em { color: var(--accent); font-style: normal; margin-inline-start: .12em; }
.land-hero-description { max-width: 850px; margin: 22px auto; font-size: 19px; line-height: 1.5; color: var(--sub); }
.land-hero-actions, .land-hero-caption { justify-content: center; }
.land-hero-caption { color: var(--muted); font-size: 11px; margin: 18px 0 28px; }
.land-hero-caption .icon { color: var(--muted); }
.atlas { border: 1px solid var(--line); background: var(--surface); text-align: start; }
.atlas-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.atlas-head h2 { font-size: 21px; margin-inline-end: auto; }
.atlas-head .land-text-link { margin: 0; }
.atlas-grid { display: grid; grid-template-columns: .85fr 1.15fr 1fr 1fr; }
.atlas-column { min-width: 0; border-inline-end: 1px solid var(--line); padding: 0 22px 24px; }
.atlas-column:last-child { border-inline-end: 0; }
.atlas-index { display: flex; gap: 15px; align-items: center; border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 22px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .09em; color: var(--muted); }
.atlas-index::after { content: ''; flex: 1; height: 1px; background: var(--accent); }
.atlas-column h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.atlas-column > p { font-size: 13px; color: var(--muted); }
.atlas-context { display: grid; gap: 4px; margin: 18px 0; }
.atlas-context button { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: transparent; border: 0; border-inline-start: 3px solid transparent; text-align: start; color: var(--sub); }
.atlas-context button:hover { background: var(--surface2); }
.atlas-context button:first-child { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
.atlas-meta { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--sub); }
.atlas-meta strong { font-weight: 500; color: var(--text); }
.atlas-plot { width: 100%; height: 220px; display: block; margin: 14px 0; }
.atlas-plot text { fill: var(--muted); font-family: var(--font-ui); font-size: 10px; }
.atlas-plot .atlas-dot { fill: var(--muted); }
.atlas-plot .atlas-dot.alert { fill: var(--accent); }
.atlas-evidence { margin: 22px 0; }
.atlas-evidence label { display: flex; justify-content: space-between; color: var(--sub); font-size: 13px; margin: 14px 0 7px; }
.atlas-evidence .progress { height: 5px; }
.atlas-evidence .progress > i { background: var(--blue); }
.atlas-column .land-decision-card { position: static; width: auto; padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; transform: none; margin-top: 20px; backdrop-filter: none; }
.land-decision-top { color: var(--sub); }
.land-slider-label { color: var(--sub); font-size: 12px; }
.land-slider-label strong, .land-live-result > strong { color: var(--text); }
.land-range { accent-color: var(--accent); }
.land-range::-webkit-slider-thumb { background: var(--accent); box-shadow: none; }
.land-range::-moz-range-thumb { background: var(--accent); box-shadow: none; }
.land-range.secondary::-webkit-slider-thumb { background: var(--blue); }
.land-range.secondary::-moz-range-thumb { background: var(--blue); }
.land-live-result { border-color: var(--line); }
.land-result-band { background: var(--accent-bg); color: var(--accent); border-radius: 0; }
.land-demo-caption { color: var(--muted); }
.land-demo-tag { color: var(--muted); border-color: var(--line2); border-radius: 0; }
.land-live-result, .land-live-result small { color: var(--muted); }
.land-result-band { border-color: var(--accent); }
.atlas-trace { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 24px; padding: 18px 22px; }
.atlas-trace > span { font-family: var(--font-mono); letter-spacing: .12em; font-size: 10px; }
.atlas-trace ol { display: flex; justify-content: space-around; flex: 1; padding: 0; margin: 0; list-style: none; gap: 14px; }
.atlas-trace li { font-size: 12px; color: var(--sub); }
.atlas-trace li::before { content: ''; width: 8px; height: 8px; border: 1px solid var(--accent); display: inline-block; border-radius: 50%; margin-inline-end: 9px; }
.atlas-trace li:last-child::before { background: var(--accent); }
.land-hero-baseline { grid-column: auto; margin-top: 24px; color: var(--muted); border-color: var(--line); }
.land-section { max-width: 1440px; }
.land-section-heading h2, .land-understand-copy h2, .land-governance-copy h2, .land-final h2 { color: var(--text); font-weight: 700; }
.land-section-heading p, .land-output p, .land-bento-content p, .land-understand-copy > p, .land-governance-copy > p, .land-faq-list p { color: var(--muted); font-size: 15px; }
.land-kicker, .land-text-link, .land-governance-copy h2 > span { color: var(--accent); }
.land-output, .land-bento-card, .land-preview-frame, .land-rule-console, .land-code, .land-connect, .land-feature-tab, .land-governance-steps > div { border-radius: 0; box-shadow: none; background: var(--surface); border-color: var(--line); }
.land-output:hover { background: var(--surface2); border-color: var(--line2); }
.land-feature-tab.active { border-color: var(--accent); background: var(--accent-bg); }
.land-feature-icon, .land-output-top > span { color: var(--text); border-radius: 0; background: var(--surface2); border-color: var(--line); }
.land-window-bar, .land-code-foot { background: var(--surface2); border-color: var(--line); }
.land-governance { background: transparent; border-color: var(--line); }
.land-final { border-block: 1px solid var(--line); background: transparent; }
.land-footer { border-color: var(--line); }
.land-understand-copy h2 span, .land-final h2 > span { color: var(--accent); }
.land-final .land-kicker, .land-final > p, .land-final-note,
.land-feature-tab p, .land-feature-tab strong, .land-mini-link { color: var(--sub); }
.land-mini-profile > h3 { color: var(--text); }
.land-feature-icon, .land-connect-icon, .land-network-core, .land-network-node { background: var(--surface2); color: var(--blue); border-color: var(--line); box-shadow: none; border-radius: 0; }
.land-designer-mini > div.selected { background: var(--accent-bg); border-color: var(--line2); }
.landing :is(button, a, input, summary):focus-visible { outline-color: var(--accent); }

/* Access: keep password/API-key, tenant selection and provisioning forms. */
.access-page { --access-bg: var(--bg); --access-panel: var(--surface); --access-mint: var(--accent); --access-text: var(--text); --access-muted: var(--muted); --access-dim: var(--muted); --access-line: var(--line); font-family: var(--font-ui); }
.access-page::before, .access-page::after, .access-page .access-ambient,
.access-page .access-form-frame::before, .access-page .access-decision::before,
.access-page .access-decision::after { display: none; }
.access-page .access-header { width: auto; max-width: none; margin-inline: 40px; padding: 20px 0; border-bottom: 1px solid var(--access-line); }
.access-page .access-brand .brand-symbol { color: var(--access-text); }
.access-page .access-brand > span { font-family: var(--font-ui); font-size: 27px; font-weight: 700; }
.access-page .access-brand small { color: var(--access-muted); }
.access-page .access-preview-pill { color: var(--access-muted); border-color: var(--access-line); background: transparent; border-radius: 0; }
.access-page .access-main { gap: 0; align-items: stretch; max-width: 1200px; padding: 0; margin: 56px auto; min-height: 0; border: 1px solid var(--line2); }
.access-page .access-story { max-width: none; padding: 40px; border-inline-end: 1px solid var(--line2); }
.access-page .access-story h1 { font-family: var(--font-ui); font-size: 48px; font-weight: 700; color: var(--access-text); }
.access-page .access-eyebrow { color: var(--access-muted); font-size: 11px; letter-spacing: .18em; }
.access-page .access-story-intro { font-size: 16px; color: var(--sub); }
.access-page .access-form-column { max-width: none; padding: 38px 40px; }
.access-page .access-form-frame { border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.access-page .access-card-topline { padding: 0 0 15px; height: auto; color: var(--access-muted); border-color: var(--access-line); font-family: var(--font-mono); font-size: 9px; }
.access-page .access-card-topline > i { display: none; }
.access-page .access-card-topline > span:first-of-type { margin: 0; }
.access-page .access-form-card { padding: 25px 0 0; }
.access-page .access-form-card > h2 { font-family: var(--font-ui); font-size: 34px; font-weight: 700; }
.access-page .access-form-kicker { color: var(--access-muted); font-size: 10px; }
.access-page .access-form-intro { color: var(--sub); font-size: 15px; }
.access-page .access-input-wrap > input, .access-page .access-input-wrap > select { border-radius: 0; background: transparent; border-color: var(--line2); height: 50px; font-size: 15px; }
.access-page .access-input-wrap > input::placeholder { color: var(--access-muted); }
.access-page .access-input-wrap > input:focus, .access-page .access-input-wrap > select:focus { border-color: var(--access-mint); box-shadow: 0 0 0 1px var(--access-mint); }
.access-page .access-input-wrap:focus-within .access-input-icon { color: var(--access-mint); }
.access-page .access-label-row > label, .access-page .access-role-fieldset > legend { font-size: 14px; color: var(--access-text); }
.access-page .access-button, .access-modal .access-button { border-radius: 0; box-shadow: none; background: var(--accent); color: #fff; border-color: var(--accent); font-size: 15px; min-height: 50px; }
.access-page .access-button:hover, .access-modal .access-button:hover { background: var(--accent-strong); box-shadow: none; transform: none; }
.access-page .access-button-secondary, .access-page .access-button-quiet { background: transparent; border-color: var(--line2); color: var(--access-text); }
.access-page .access-button-secondary:hover, .access-page .access-button-quiet:hover { background: var(--surface2); }
.access-page .access-field-hint, .access-page .access-form-utility, .access-page .access-form-utility > span,
.access-page .access-card-bottom, .access-page .access-form-footnote { color: var(--access-muted); font-size: 12px; }
.access-page .access-decision { border-radius: 0; background: var(--access-panel); border-color: var(--access-line); box-shadow: none; }
.access-page .access-decision-top, .access-page .access-rule code b { color: var(--access-text); }
.access-page .access-rail-score { background: var(--blue); box-shadow: none; }
.access-page .access-rail-ceiling { background: var(--access-mint); }
.access-page .access-rule, .access-page .access-rail-labels,
.access-page .access-rail-labels > span:nth-child(2), .access-page .access-story-index { color: var(--access-muted); }
.access-page .access-form-card > h2:focus-visible { outline-color: var(--access-mint); }
.access-page .access-story-features { color: var(--access-muted); }
.access-page .access-story-features > span { font-size: 11px; }
.access-page .access-footer { color: var(--access-muted); border-color: var(--access-line); }
.access-mode, .access-mode button, .access-notice, .access-server-error, .access-tenant-list label, .access-lang { border-radius: 0; }
.access-mode { padding: 0; margin-top: 24px; border-color: var(--line); background: transparent; }
.access-mode button { padding: 12px; font-size: 14px; }
.access-mode button[aria-selected="true"] { background: var(--accent-bg); box-shadow: inset 0 -2px var(--accent); }
.access-page .access-tenant-list label:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.access-page input[type="radio"], .access-page input[type="checkbox"] { accent-color: var(--accent); }

@media (min-width: 1664px) { .land-header { margin-inline: auto; } }
@media (max-width: 1250px) {
  .workspace-topbar { gap: 14px; padding-inline: 18px; }
  .workspace-topbar .brand-title { font-size: 22px; }
  .workspace-topbar .tenant-switch { max-width: 200px; padding-inline-start: 14px; }
  .workspace-topbar .tenant-meta strong { font-size: 14px; }
  .workspace-topbar .topbar-right { gap: 8px; }
  .workspace-topbar .topbar-search span, .workspace-topbar .topbar-search .shortcut { display: none; }
  .workspace-topbar .topbar-search { flex: none; width: 40px; padding: 9px; }
  .atlas-column { padding-inline: 16px; }
  .atlas-column h3 { font-size: 18px; }
  .access-page .access-main { margin: 36px 28px; }
}
@media (max-width: 1000px) {
  :root { --sidebar: 210px; }
  .workspace-topbar .tenant-monogram { display: none; }
  .workspace-topbar .brand-title { font-size: 20px; }
  .workspace-topbar .brand-symbol { width: 26px; }
  .workspace-topbar .tenant-switch { max-width: 160px; }
  .workspace-topbar .tenant-meta span { display: none; }
  .nav-item { font-size: 13px; padding-inline: 10px; }
  .page { padding: 24px 22px; }
  .page-subtitle { font-size: 15px; }
  .grid-two, .grid-equal { grid-template-columns: minmax(0, 1fr); }
  .metric:nth-child(2) { border-inline-end: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .atlas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-column:nth-child(2) { border-inline-end: 0; }
  .atlas-column:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .atlas-trace { flex-wrap: wrap; }
  .atlas-trace ol { flex-basis: 70%; }
  .access-page .access-story, .access-page .access-form-column { padding: 28px; }
  .access-page .access-story h1 { font-size: 38px; }
  [dir="rtl"] .sidebar { transform: none; }
  [dir="rtl"] .shell { margin-right: var(--sidebar); }
}
@media (max-width: 720px) {
  :root { --sidebar: 0px; }
  .workspace-topbar { height: auto; min-height: 64px; padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .workspace-topbar .mobile-menu { display: inline-grid; }
  .workspace-topbar .brand-title { font-size: 21px; }
  .workspace-topbar .brand { gap: 8px; }
  .workspace-topbar .tenant-switch { max-width: 160px; margin-inline-start: auto; padding-inline-start: 10px; }
  .workspace-topbar .tenant-meta strong { font-size: 13px; }
  .workspace-topbar .topbar-right { flex-basis: 100%; justify-content: flex-start; gap: 10px; }
  .workspace-topbar .topbar-search { display: flex; width: 32px; height: 32px; border: 0; padding: 6px; }
  .workspace-topbar .role-select { display: block; max-width: 110px; margin-inline-start: auto; }
  .workspace-topbar .demo-pill { display: none; }
  .sidebar, [dir="rtl"] .sidebar { top: 114px; width: 250px; z-index: 35; }
  .mobile-backdrop.show { z-index: 31; top: 114px; }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  [dir="rtl"] .sidebar.open { transform: none; }
  [dir="rtl"] .shell { margin-right: 0; }
  .page { padding: 22px 16px; }
  .workspace-location { margin-bottom: 16px; }
  .page-header { flex-wrap: wrap; }
  .page-subtitle { max-width: none; font-size: 15px; }
  .header-actions { justify-content: flex-start; }
  .header-actions .button { font-size: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 16px 12px; }
  .metric-value { font-size: 29px; }
  .metric-top { font-size: 12px; }
  .metric-foot { font-size: 10px; }
  .mini-spark { width: 45px; }
  .card-pad, .card-content, .client-card { padding: 20px; }
  .card-head { padding: 18px 18px 0; flex-wrap: wrap; }
  h2 { font-size: 20px; }
  .grid-three { grid-template-columns: minmax(0, 1fr); }
  .filter-bar, .table-top { flex-wrap: wrap; }
  .table-top { padding: 18px; }
  .client-step { font-size: 10px; }
  .client-intro { font-size: 15px; }
  .land-header { margin-inline: 18px; gap: 12px; height: 70px; }
  .land-brand { font-size: 22px; gap: 8px; }
  .land-header-actions { gap: 12px; }
  .land-header-actions .land-button { display: none; }
  .land-nav { background: var(--surface); border-color: var(--line); }
  .land-hero { padding: 36px 18px 0; }
  .land-eyebrow { font-size: 9px; letter-spacing: .15em; }
  .land-hero-description { font-size: 16px; }
  .land-hero-actions { gap: 10px; }
  .land-button { font-size: 13px; padding: 12px 16px; }
  .atlas-head { padding: 14px; gap: 10px; }
  .atlas-head .land-text-link { font-size: 11px; }
  .atlas-grid { grid-template-columns: minmax(0, 1fr); }
  .atlas-column { border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 0 20px 24px; }
  .atlas-column:last-child { border-bottom: 0; }
  .atlas-column h3 { font-size: 22px; }
  .atlas-plot { height: 220px; }
  .atlas-trace ol { flex-basis: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .land-hero-baseline { margin-top: 20px; }
  .access-page .access-header { margin-inline: 20px; padding: 18px 0; gap: 14px; flex-wrap: wrap; }
  .access-page .access-brand > span { font-size: 23px; }
  .access-page .access-header-links { gap: 14px; }
  .access-page .access-main { display: flex; flex-direction: column; margin: 24px 18px; }
  .access-page .access-story { border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 26px 22px; }
  .access-page .access-story h1 { font-size: 34px; }
  .access-page .access-story-intro { font-size: 15px; }
  .access-page .access-form-column { padding: 28px 22px; }
}
@media (max-width: 380px) {
  .workspace-topbar .tenant-switch { max-width: 115px; }
  .workspace-topbar .brand-title { font-size: 18px; }
  .workspace-topbar .topbar-right { gap: 5px; }
}

/* Shared register controls keep search, scope and filters visible at narrow widths. */
.assessment-filters { flex-wrap: wrap; }
.assessment-filters .input-search { flex: 1 1 250px; max-width: none; }
.assessment-filters .filters { flex-wrap: wrap; }
#assessment-results-count, #investor-results-count { color: var(--muted); font-size: 12px; }
#lv-integration-assessment { margin-top: 8px; max-width: 100%; }
.table-wrap { position: relative; }
@media (max-width:720px) {
  .assessment-filters .segmented { flex-wrap: wrap; }
  .assessment-filters .filters { gap: 8px; }
  #lv-assess-state { min-width: 0; }
}

/* Public forms use the same palette in both modes, including native selects. */
.access-notice, .access-lang, .access-tenant-list label { border-color: var(--line2); background: var(--surface); }
.access-result-list div { border-color: var(--line); }
.access-lang option { color: var(--text); background: var(--surface); }
.access-page .access-field-error, .access-server-error { color: var(--red); }
.access-page .access-field.has-error .access-input-wrap > input { border-color: var(--red); }
.access-server-error { background: var(--red-bg); }
/* Small accent text needs the deeper light-theme ink, especially on forms. */
[data-theme="light"] .access-page :is(.access-link, .access-text-button, .access-ready-status) { color: var(--accent-ink); }
