/* Veritas Nexum — Institutional Financial Synthesis Platform */

/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ── Colour Palette ── */
    --color-bg:             #4a4a4c;          /* Medium gunmetal gray */
    --color-surface:        #fffdf5;          /* Ivory / cream */
    --color-text:           #f1f5f9;          /* Platinum — default for dark background */
    --color-text-secondary: #cbd5e1;          /* Soft silver — secondary on dark background */
    --color-border:         #dde1e9;          /* Muted steel */
    --color-bg-subtle:      #f0eff0;          /* Whisper grey */

    /* Accent — used sparingly */
    --color-accent:         #2c3e6b;          /* Accent blue (bridges, active state) */
    --color-accent-subtle:  rgba(44, 62, 107, 0.07);
    --color-gold:           #b8972e;          /* Champagne gold (compounder tag only) */
    --color-gold-subtle:    rgba(184, 151, 46, 0.10);

    /* Shadows */
    --shadow-card:          0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-card-hover:    0 4px 18px rgba(0, 0, 0, 0.09);
    --shadow-modal:         0 8px 40px rgba(0, 0, 0, 0.14);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                    Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono:    'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono',
                    Consolas, monospace;

    /* Spacing — slightly expanded for breathing room */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.75rem;
    --space-lg: 2.5rem;
    --space-xl: 3.5rem;

    /* Layout */
    --max-width:  740px;
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: color 0.3s ease;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

p {
    margin-bottom: var(--space-md);
    max-width: 65ch;
}

ul, ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

li {
    margin-bottom: var(--space-xs);
}

a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
}

a:hover {
    border-bottom-color: var(--color-text);
}

/* ── Links inside Ivory cards — flip to charcoal ink ── */
.section-executive a,
.accordion details a,
.landing-card a,
.archetype-explanation a,
.archetype-detail a,
.methodology-nav a,
.methodology-def-list a {
    color: #1c2331;
    border-bottom-color: rgba(28, 35, 49, 0.3);
}

.section-executive a:hover,
.accordion details a:hover,
.landing-card a:hover,
.archetype-explanation a:hover,
.archetype-detail a:hover,
.methodology-nav a:hover,
.methodology-def-list a:hover {
    border-bottom-color: #1c2331;
}

/* ── Report Header ── */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: var(--space-xl);
}

.header-title h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    text-transform: none;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}

.ticker-secondary {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
    color: #cbd5e1;
}

.header-nav {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.header-nav a {
    font-size: 0.875rem;
    border: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-bottom-color 0.2s ease, text-shadow 0.2s ease;
}

.header-nav a:hover {
    color: #ffffff;
    border-bottom-color: #94a3b8;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    opacity: 1;
}

/* ── Segmented Control (Display Mode Toggle) ── */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.language-toggle label {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

/* The pill track */
.segmented-control {
    display: inline-flex;
    background-color: #3d3d3f;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

/* Each segment button */
.segmented-control button {
    font-family: var(--font-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 0.25rem 0.875rem;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease,
                box-shadow 0.18s ease;
    white-space: nowrap;
    line-height: 1.5;
}

.segmented-control button:hover {
    color: var(--color-text);
}

/* Active / selected segment */
.segmented-control button.active {
    background-color: var(--color-surface);
    color: var(--color-accent);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

/* ── New Report button ── */
.btn-new-report {
    padding: 0.375rem var(--space-sm);
    background-color: #1c2331;
    color: #f1f5f9 !important;
    border: none !important;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: opacity 0.15s ease, border 0.15s ease;
}

.btn-new-report:hover {
    opacity: 0.85;
    border: 1px solid #b8972e !important;
}

/* ── Accordion — How to Read ── */
.accordion {
    margin-bottom: var(--space-xl);
}

.accordion details {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.accordion summary {
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    list-style: none;
}

.accordion summary::-webkit-details-marker {
    display: none;
}

.accordion summary::before {
    content: '▸ ';
    display: inline-block;
    margin-right: var(--space-xs);
}

.accordion details[open] summary::before {
    content: '▾ ';
}

.accordion-content {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

/* ── Sections ── */
.section {
    margin-bottom: calc(var(--space-xl) * 1.4);
}

.section-executive {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background-color: #f8fafc;
    border: 1px solid rgba(28, 35, 49, 0.1);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-lg);
    transition: color 0.3s ease;
}

.section-executive:first-of-type {
    margin-top: 0;
}

.section-executive h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.01em;
    color: #1c2331;
}

.section-executive details {
    color: #1c2331;
}

.section-executive .section-content p {
    line-height: 1.85;
    margin-bottom: var(--space-lg);
    color: #1c2331;
}

.section-executive .section-content li {
    color: #1c2331;
}

.section-collapsible details {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-xl);
}

.section-collapsible summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
    padding: var(--space-lg) 0;
    transition: background-color 0.2s ease;
    border-radius: var(--radius-sm);
}

.section-collapsible summary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.section-collapsible summary::-webkit-details-marker {
    display: none;
}

.section-collapsible summary h2 {
    display: inline;
    font-size: 1.125rem;
    color: #ffffff;
}

.section-collapsible summary::before {
    content: '▸ ';
    display: inline-block;
    margin-right: var(--space-xs);
    color: #cbd5e1;
}

.section-collapsible details[open] summary::before {
    content: '▾ ';
}

.section-content {
    padding-top: var(--space-lg);
}

.section-content p + p {
    margin-top: var(--space-md);
}

/* ── Collapsible section text anchors — eliminate inheritance dependency ── */
.section-collapsible .section-content p,
.section-collapsible .section-content li {
    color: #f1f5f9;
    font-weight: 500;
}

/* ── Collapsible metric label anchor ── */
.section-collapsible .metric-table dt {
    color: #e2e8f0;
}

/* ── Classification Box — Unified Gunmetal Statement ── */
.classification-box {
    background-color: #1e293b;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid #475569;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

/* Pill is now purely typographic — no background box needed */
.archetype-pill {
    display: block;
    background-color: transparent;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0;
    border-radius: 0;
}

/* Pending state — evaluating tone, dashed border signals in-progress */
.archetype-pill.pending {
    color: #cbd5e1;
    font-weight: 600;
    border-bottom: 1px dashed #cbd5e1;
    display: inline-block;
    padding-bottom: 4px;
}

/* Sub-text beneath the title */
.archetype-subtext {
    display: block;
    margin-top: 0.75rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.6;
    text-transform: none;
}

/* Compounder accent — subtle gold bottom border only, unified dark vault bg */
.classification-box.archetype-compounder {
    border-bottom: 3px solid var(--color-gold);
}

/* Sub-headers — MARGINS, LIQUIDITY, BALANCE SHEET, etc. */
.sub-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-text-secondary);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    padding-bottom: 0.375rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sub-header:first-child {
    margin-top: 0;
}

/* ── Metric Table ── */
.metric-table {
    width: 100%;
    margin-bottom: var(--space-lg);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid transparent;
    transition: background-color 0.12s ease;
}

.metric-row:hover {
    background-color: var(--color-accent-subtle);
}

.metric-table dt {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: var(--space-sm);
}

.metric-table dd {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
}

.tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1c2331;
    background-color: #f1f5f9;
    border: 1px solid rgba(28, 35, 49, 0.12);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    margin-left: 0.625rem;
    vertical-align: middle;
}

/* Gold tag for Compounder-style positive signals */
.tag-gold {
    color: var(--color-gold);
    background-color: var(--color-gold-subtle);
    border-color: rgba(184, 151, 46, 0.25);
}

/* ── Signal Table ── */
.signal-table {
    margin-bottom: var(--space-lg);
}

.signal-row {
    display: flex;
    align-items: baseline;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-sm);
}

.signal-row:last-child {
    border-bottom: none;
}

.signal-icon {
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.signal-label {
    flex-shrink: 0;
    width: 10rem;
    font-weight: 600;
    font-size: 0.9375rem;
}

.signal-detail {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

/* ── Plain-language mode elements ── */

/* Bridge sentences — accent blue left border */
.plain-bridge {
    font-style: italic;
    color: #cbd5e1;
    font-size: 0.9375rem;
    padding: 0.75rem 1.125rem;
    margin-bottom: var(--space-md);
    border-left: 3px solid #475569;
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    line-height: 1.65;
    max-width: 65ch;
}

/* Contextual metric descriptions below metric rows */
.metric-description {
    font-size: 0.8125rem;
    color: #cbd5e1;
    font-style: italic;
    margin: 0.125rem 0 0.625rem 0.625rem;
    padding-bottom: 0.375rem;
    line-height: 1.5;
    border-bottom: 1px dashed var(--color-border);
    flex-basis: 100%;
}

/* Metric rows wrap when description is present */
.plain-language-active .metric-row {
    flex-wrap: wrap;
}

/* Archetype explanation — connects visually below the dark card */
.archetype-explanation {
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.65;
    padding: var(--space-sm) var(--space-md);
    margin-top: -0.75rem;
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(28, 35, 49, 0.15);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-card);
}

/* ── Dual-mode section summaries ── */

/* Standard-mode executive insight — Gunmetal inlay on Platinum paper */
.executive-summary-block {
    font-size: 0.9375rem;
    color: #e2e8f0;
    line-height: 1.65;
    margin-top: var(--space-md);
    padding: 24px;
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

/* Plain-language variant — hidden by default, visible when plain mode is active */
.executive-summary-block--plain {
    display: none;
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.65;
    font-style: italic;
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--color-border);
}

/* Swap visibility on mode switch */
.plain-language-active .executive-summary-block {
    display: none;
}

.plain-language-active .executive-summary-block--plain {
    display: block;
}

/* ── Footer ── */
.report-footer {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.report-footer p {
    font-size: 0.875rem;
    margin: 0;
    color: #f1f5f9;
}

.report-data-integrity {
    font-size: 0.75rem;
    color: #cbd5e1;
    margin-top: 0.75rem;
}

.metric-null {
    color: #1c2331;
    font-weight: 600;
    display: inline-block;
    min-width: 1.5rem;
    text-align: center;
}

/* ── Ivory Card Colour Scope ──
   Re-declare dark variable values on every Ivory surface so all
   descendants inherit charcoal automatically. transition: color
   ensures any hover / JS state change breathes rather than snaps.   */
.section-executive,
.accordion details,
.landing-card,
.archetype-explanation,
.archetype-detail,
.methodology-nav,
.methodology-def-list,
.methodology-currency-list,
.classification-box {
    --color-text:           #1c2331;
    --color-text-secondary: #5a6478;
    color: var(--color-text);
    transition: color 0.3s ease;
}

/* Sub-header inside an Ivory card */
.section-executive .sub-header {
    border-bottom-color: var(--color-border);
}

/* ── Status Badges — Institutional Muted Tones ── */
.badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Positive signal — deep forest green */
.badge-positive {
    color: #2d5a27;
    background-color: rgba(45, 90, 39, 0.12);
    border: 1px solid rgba(45, 90, 39, 0.30);
}

/* Risk signal — muted burgundy */
.badge-risk {
    color: #7a2535;
    background-color: rgba(122, 37, 53, 0.10);
    border: 1px solid rgba(122, 37, 53, 0.28);
}

/* Neutral / adequate — slate */
.badge-neutral {
    color: #2d3748;
    background-color: rgba(74, 85, 104, 0.10);
    border: 1px solid rgba(74, 85, 104, 0.25);
}

/* ── Landing Page ── */
.landing {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

.landing h1 {
    margin-bottom: var(--space-md);
}

.landing-description {
    font-size: 1.0625rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
    line-height: 1.75;
}

/* ── Landing MVP — Standard Layout ── */
/* ── Landing global header ── */
.landing-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 70px;
    background: #1e293b;
    border-bottom: 1px solid #2d3a50;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.2rem;
    padding: 0 2rem;
}

.landing-topbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #f1f5f9;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(241, 245, 249, 0.25);
}

.landing-topbar-descriptor {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: #64748b;
    white-space: nowrap;
    text-transform: uppercase;
}

.landing-mvp {
    max-width: 620px;
    margin: 0 auto;
    /* top padding clears the fixed 70px header */
    padding: calc(70px + var(--space-xl)) 0 var(--space-lg);
}

/* Hero block */
.landing-hero {
    text-align: center;
    margin-bottom: 0;
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 14px;
    background: linear-gradient(to bottom, #ffffff, #d1d1d6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-hero-subtitle {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.6;
    margin: 0 auto 0;
    max-width: 44ch;
}

.landing-hero .landing-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0;
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}

/* Card wrapper used across all landing sections */
.landing-card {
    background-color: rgba(255, 253, 245, 0.98);
    backdrop-filter: blur(4px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.3s ease, color 0.3s ease;
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

/* Search card "Handshake" glow — activates when input is focused */
.landing-search-card:focus-within {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18),
                0 0 0 1px rgba(255, 255, 255, 0.14),
                0 0 28px rgba(255, 255, 255, 0.08);
}

/* Descriptor card — generous ivory space */
.landing-card.landing-descriptor-card {
    padding: var(--space-xl) var(--space-lg);
}

/* Descriptor card — secondary information layer */
.landing-card .landing-description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    margin-bottom: var(--space-xs);
    max-width: 100%;
}

.landing-card .landing-description:last-child {
    margin-bottom: 0;
}

/* Search card — prominent */
.landing-search-card {
    border: 1px solid var(--color-border);
}

/* Wide variant — 600px focal engine, centred within the 620px column */
.landing-search-card--wide {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 48px;
}

/* Descriptor constrained to 520px below the wide search card */
.landing-descriptor-card {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--space-md);
    margin-bottom: 12px;
    text-align: center;
}

.landing-search-card .input-group label {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-text);
    text-align: center;
    display: block;
    margin-bottom: 0.75rem;
}

.landing-search-card .search-label-primary {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-text);
    text-align: center;
    display: block;
    margin-bottom: 0.75rem;
}

.landing-search-card .input-group input[type="text"] {
    width: 100%;
    padding: 1.125rem var(--space-md);
    font-size: 1.125rem;
    font-family: var(--font-primary);
    text-align: center;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.landing-search-card .input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.landing-search-card .input-group input[type="text"] {
    caret-color: #1c2331;
}

.landing-search-card .input-group input[type="text"]::placeholder {
    font-weight: 500;
    opacity: 0.45;
    color: #1c2331;
}

.landing-search-card .btn-primary {
    margin-top: var(--space-sm);
    width: 100%;
    background-color: #1c2331;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 1.125rem var(--space-md);
    text-align: center;
    box-shadow: 0 4px 24px rgba(28, 35, 49, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-search-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(28, 35, 49, 0.45);
}

.landing-search-card .secondary-guidance {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin-top: 24px;
    margin-bottom: 0;
    max-width: 100%;
}

.landing-search-card .secondary-guidance + .secondary-guidance {
    margin-top: var(--space-xs);
}

/* Inline form validation message — replaces native browser alert() */
.form-validation-msg {
    display: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #7a2a2a;
    background: rgba(122, 42, 42, 0.07);
    border-left: 3px solid #7a2a2a;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin-top: var(--space-sm);
    text-align: left;
}

/* Disclosure card — compact regulatory note; anchored at bottom of column */
.landing-disclosure-card {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--space-md);
    margin-bottom: 0;
    padding: 0;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}

.landing-disclosure-card .disclosure-section {
    border: none;
    border-radius: var(--radius-lg);
    background: transparent;
    box-shadow: none;
}

.landing-disclosure-card .disclosure-section summary {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.landing-disclosure-card .disclosure-section summary::before {
    color: var(--color-accent);
}

.landing-disclosure-card .disclosure-content {
    padding: 0 var(--space-md) var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.landing-disclosure-card .disclosure-content p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
    max-width: 100%;
}

/* "It does not" list — accent bullets */
.disclosure-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: var(--space-sm);
}

.disclosure-list li {
    position: relative;
    padding-left: 1.375rem;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.375rem;
}

.disclosure-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

.ticker-form {
    margin-bottom: var(--space-lg);
}

.search-legend {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    opacity: 0.75;
    letter-spacing: 0.01em;
}

.input-group {
    margin-bottom: var(--space-md);
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.input-group input {
    width: 100%;
    padding: var(--space-sm);
    font-size: 1rem;
    font-family: var(--font-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.btn-primary {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background-color: #1c2331;
    color: #f1f5f9;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: opacity 0.15s ease;
}

.btn-primary:hover {
    opacity: 0.88;
}

.landing-note {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ── Error Page ── */
.error-page {
    max-width: 540px;
    margin: var(--space-xl) auto;
    padding: var(--space-xl) 0;
    text-align: center;
}

.error-page h1 {
    font-size: 1.4rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.error-message {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    color: #1c2331;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border-left: 3px solid var(--color-accent);
    text-align: left;
}

.error-platform-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
    opacity: 0.6;
}

.error-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

.error-guidance {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.product-description {
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: var(--space-xl);
    color: var(--color-text);
}

.quiet-reassurance {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin-top: var(--space-md);
}

.landing-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
}

.secondary-guidance {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin-top: var(--space-xs);
    margin-bottom: 0;
}

.secondary-guidance + .secondary-guidance {
    margin-top: 0.25rem;
}

/* ── Disclosure Section ── */
.disclosure-section {
    margin-top: var(--space-xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.disclosure-section summary {
    cursor: pointer;
    padding: var(--space-md);
    font-weight: 600;
    user-select: none;
    list-style: none;
}

.disclosure-section summary::-webkit-details-marker {
    display: none;
}

.disclosure-section summary::before {
    content: '▸ ';
    display: inline-block;
    margin-right: var(--space-xs);
    color: var(--color-text-secondary);
}

.disclosure-section[open] summary::before {
    content: '▾ ';
}

.disclosure-content {
    padding: 0 var(--space-md) var(--space-md) var(--space-md);
    border-top: 1px solid var(--color-border);
}

.disclosure-content p {
    margin-bottom: var(--space-sm);
}

.disclosure-content p:last-child {
    margin-bottom: 0;
}

.disclosure-content ul {
    margin-bottom: var(--space-sm);
    padding-left: var(--space-lg);
}

.disclosure-content li {
    margin-bottom: var(--space-xs);
}

/* ── Empty State ── */
.empty-state {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.empty-state p {
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
}

.empty-state p:last-child {
    margin-bottom: 0;
}

/* ── Landing Footer ── */
.landing-footer {
    max-width: 520px;
    margin: 0 auto;
    padding-top: 0;
    text-align: center;
}

/* Single divider — end of app / start of legal */
.footer-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: var(--space-md) auto;
    max-width: 520px;
}

.landing-footer p {
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
    text-align: center;
}

.footer-methodology-link {
    display: block;
    margin-top: 0.875rem;
    margin-bottom: 0.875rem;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.footer-methodology-link:hover {
    text-decoration: underline;
}

.landing-footer p:last-child {
    margin-bottom: 0;
}

/* ── First-use Modal ── */
.first-use-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--color-surface);
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 0;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: var(--space-lg);
    color: #1c2331;
}

.modal-body p,
.modal-body li {
    color: #1c2331;
    line-height: 1.7;
}

.modal-body h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: #1c2331;
}

.modal-header h2 {
    color: #1c2331;
}

.modal-body .btn-primary {
    width: 100%;
    margin-top: var(--space-lg);
}

/* ── About Page ── */
.about-page {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

.about-page h1 {
    margin-bottom: var(--space-lg);
}

.about-page h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.about-nav {
    margin-top: var(--space-xl);
    text-align: center;
}

.btn-secondary {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
    background-color: var(--color-surface);
    border-color: var(--color-text);
}

/* ── Company Search Dropdown ── */
.search-input-group {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #f1f5f9;
    border: 1px solid rgba(28, 35, 49, 0.12);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    margin-top: -1px;
}

.search-result-item {
    padding: var(--space-sm);
    cursor: pointer;
    color: #1c2331;
    border-bottom: 1px solid rgba(28, 35, 49, 0.07);
    transition: background-color 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Name-first hierarchy — bold company name */
.search-result-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1c2331;
    line-height: 1.2;
}

/* Ticker + exchange secondary — platinum, smaller */
.search-result-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.03em;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #e2e8f0;
}

.search-hint {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.78rem;
    font-style: italic;
    color: #cbd5e1;
    text-align: center;
    border-top: 1px solid rgba(28, 35, 49, 0.07);
}

/* Discovery results — slightly muted to preserve local result hierarchy */
.search-result-item--discovery {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #5a6478;
}

.search-result-item--discovery:hover {
    background-color: #e2e8f0;
    color: #1c2331;
}

.search-discovery-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    white-space: nowrap;
    margin-left: var(--space-sm);
    flex-shrink: 0;
}

/* ── Mobile Responsiveness ── */
@media (max-width: 640px) {
    body {
        font-size: 15px;
        line-height: 1.65;
    }

    .container {
        padding: var(--space-md) var(--space-sm);
    }

    .report-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: stretch;
    }

    .header-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .language-toggle {
        order: -1;
        padding-bottom: var(--space-sm);
        border-bottom: 1px solid var(--color-border);
        width: 100%;
    }

    .section {
        margin-bottom: var(--space-xl);
    }

    .section-executive {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }

    .section-executive h2 {
        font-size: 1.25rem;
        margin-bottom: var(--space-md);
    }

    .section-executive .section-content p {
        line-height: 1.75;
        margin-bottom: var(--space-md);
    }

    .section-collapsible summary {
        padding: var(--space-md) 0;
    }

    .section-collapsible details {
        padding-bottom: var(--space-lg);
    }

    p {
        max-width: 100%;
    }

    .signal-label {
        width: auto;
        min-width: 6rem;
    }

    .signal-row {
        gap: var(--space-xs);
    }

    .classification-box {
        font-size: 1rem;
        padding: var(--space-md) var(--space-lg);
    }

    .plain-bridge {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .archetype-explanation {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .executive-summary-block,
    .executive-summary-block--plain {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .segmented-control button {
        padding: 0.25rem 0.625rem;
        font-size: 0.75rem;
    }

    /* Peer grid — scroll horizontally on small screens */
    .peer-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Signal table — wrap label and value on narrow screens */
    .signal-row {
        flex-wrap: wrap;
    }

    /* Metric rows — reduce font on very small screens */
    .metric-table dt,
    .metric-table dd {
        font-size: 0.875rem;
    }

    /* Report header company name — don't overflow */
    .company-name,
    .report-title {
        font-size: 1.25rem;
        word-break: break-word;
    }
}

/* ── Desktop refinements ── */
@media (min-width: 641px) {
    .section-executive .section-content p {
        padding-right: var(--space-md);
    }
}

/* ════════════════════════════════════════════════════════════
   LANDING HERO — Veritas Nexum institutional positioning
   ════════════════════════════════════════════════════════════ */

.landing-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    line-height: 1.2;
    color: #ffffff;
}

.landing-subtitle {
    margin-top: var(--space-sm);
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 56ch;
}

/* ════════════════════════════════════════════════════════════
   METHODOLOGY PAGE — White-paper layout
   ════════════════════════════════════════════════════════════ */

.methodology-page {
    max-width: 780px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.methodology-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-accent);
}

.methodology-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-xs);
}

.methodology-header h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
    margin-bottom: var(--space-sm);
    transition: color 0.3s ease;
}

.methodology-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    max-width: 60ch;
}

/* Contents nav */
.methodology-nav {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
}

.methodology-nav p {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.methodology-nav ol {
    margin: 0;
    padding-left: 1.25rem;
}

.methodology-nav li {
    margin: 0.2rem 0;
    font-size: 0.9rem;
}

.methodology-nav a:hover {
    text-decoration: underline;
}

/* Sections */
.methodology-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.methodology-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.methodology-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
}

.methodology-section p {
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
    transition: color 0.3s ease;
}

/* Definition lists */
.methodology-def-list {
    margin: var(--space-sm) 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.def-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid var(--color-border);
}

.def-row:last-child {
    border-bottom: none;
}

.def-row dt {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-bg-subtle);
    border-right: 1px solid var(--color-border);
}

.def-row dd {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    color: var(--color-text);
    line-height: 1.65;
    margin: 0;
    background-color: var(--color-surface);
}

.def-row dd code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--color-accent-subtle);
    color: var(--color-accent);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

/* Archetype table */
.archetype-table {
    margin: var(--space-sm) 0;
}

.archetype-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.archetype-label {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    color: #fff;
}

.archetype-label--quality   { background: #1c2331; }
.archetype-label--cyclical  { background: #3d4f6b; }
.archetype-label--mature    { background: #2c3e6b; }
.archetype-label--dilutive  { background: #5a6478; }
.archetype-label--turnaround { background: #7a6b3a; }
.archetype-label--capex     { background: #4a4a4a; }
.archetype-label--fragile   { background: #6b2c2c; }

.archetype-detail {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface);
}

.archetype-signal {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.4rem;
    font-style: italic;
}

.archetype-detail p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 0;
}

/* Currency list */
.methodology-currency-list {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    letter-spacing: 0.05em;
}

/* Lists */
.methodology-list {
    padding-left: 1.25rem;
    margin: var(--space-sm) 0;
}

.methodology-list li {
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 0.35rem;
    transition: color 0.3s ease;
}

/* Return link */
.methodology-nav-return {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
}

/* ── Peer Landscape Grid ─────────────────────────────────── */

.peer-landscape-section .section-content {
    padding-top: var(--space-sm);
}

.peer-landscape-caption {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.02em;
}

.peer-grid {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.peer-grid-header {
    display: grid;
    grid-template-columns: 6rem 1fr 8rem;
    background: var(--color-bg-subtle);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--color-border);
}

.peer-grid-row {
    display: grid;
    grid-template-columns: 6rem 1fr 8rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    align-items: center;
}

.peer-grid-row:last-child {
    border-bottom: none;
}

.peer-grid-row:hover {
    background: var(--color-accent-subtle);
}

.peer-symbol {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text);
    letter-spacing: 0.04em;
}

.peer-archetype {
    font-size: 0.85rem;
    color: var(--color-text);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* Archetype colour coding — background tint only, no semantic fill */
.archetype-key--compounder   { background: rgba(184, 151, 46, 0.12); color: #7a620f; }
.archetype-key--cyclical     { background: rgba(44, 62, 107, 0.10); color: var(--color-accent); }
.archetype-key--asset-heavy  { background: rgba(90, 100, 120, 0.10); color: var(--color-text-secondary); }
.archetype-key--turnaround   { background: rgba(80, 120, 80, 0.10); color: #3a6b3a; }
.archetype-key--undefined    { background: transparent; color: var(--color-text-secondary); }

.peer-metric {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.peer-disclaimer {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    border-left: 3px solid var(--color-border);
    padding-left: 0.75rem;
    margin-top: 0;
}

/* Responsive: stack peer grid on mobile */
@media (max-width: 640px) {
    .peer-grid-header,
    .peer-grid-row {
        grid-template-columns: 1fr;
    }

    .peer-grid-header span:not(:first-child) {
        display: none;
    }

    .peer-metric {
        text-align: left;
    }
}

/* Responsive: stack def-rows and archetype-rows on mobile */
@media (max-width: 640px) {
    .def-row,
    .archetype-row {
        grid-template-columns: 1fr;
    }

    .def-row dt,
    .archetype-label {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
}

/* ── Synthesis Loading Overlay ── */
.synthesis-overlay {
    position: fixed;
    inset: 0;
    background-color: #4a4a4c;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.synthesis-overlay--visible {
    opacity: 1;
    pointer-events: all;
}

.synthesis-overlay__inner {
    text-align: center;
    width: 340px;
}

.synthesis-overlay__bar-track {
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.synthesis-overlay__bar {
    height: 100%;
    width: 10%;
    background-color: #ffffff;
    border-radius: 999px;
    transition: width 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.synthesis-overlay__status {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    max-width: 100%;
    min-height: 1.2em;
}


/* ═══════════════════════════════════════════════════════════════
   DUAL-VAULT COMPARISON ENGINE
   ═══════════════════════════════════════════════════════════════ */

/* ── Top navigation bar ── */
.vault-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 48px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    gap: var(--space-lg);
}

.vault-topbar-brand {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #f8fafc;
    text-decoration: none;
    border-bottom: none;
    white-space: nowrap;
}

.vault-topbar-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-align: center;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vault-topbar-vs {
    color: #475569;
    margin: 0 0.5em;
    font-style: italic;
}

.vault-topbar-exit {
    font-size: 0.8rem;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
    white-space: nowrap;
}

.vault-topbar-exit:hover {
    color: #ffffff;
    border-bottom-color: #94a3b8;
}

/* ── Split-screen wrapper ── */
.dual-vault-wrapper {
    display: flex;
    height: 100vh;
    padding-top: 48px;          /* clear the fixed topbar */
    overflow: hidden;           /* wrapper never scrolls */
    background: #334155;        /* 1px slate divider between columns */
}

/* ── Individual vault columns — independent scroll ── */
.vault-column {
    flex: 1 1 50%;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--color-bg);
    padding: var(--space-xl);
    transition: color 0.3s ease;

    /* Scrollbar: hidden at rest, reveals on hover */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.3s ease;
}

.vault-column:hover {
    scrollbar-color: #475569 transparent;
}

/* WebKit scrollbar — hover reveal */
.vault-column::-webkit-scrollbar {
    width: 4px;
}

.vault-column::-webkit-scrollbar-track {
    background: transparent;
}

.vault-column::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.vault-column:hover::-webkit-scrollbar-thumb {
    background: #475569;
}

/* ── 1px Slate divider ── */
.vault-divider {
    width: 1px;
    flex-shrink: 0;
    background: #334155;
}

/* ── Mobile / Tablet: stack vaults vertically below 1024px ── */
@media (max-width: 1024px) {
    .dual-vault-wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .vault-column {
        flex: none;
        width: 100%;
        height: auto;
        overflow-y: visible;
        overflow-x: hidden;
    }

    .vault-divider {
        width: 100%;
        height: 1px;
    }

    .compare-matrix-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .vault-topbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
}

/* ── Vault header — compact variant ── */
.vault-header {
    margin-bottom: var(--space-lg);
}

/* Tighter nav in vault context — no language toggle needed */
.vault-nav {
    gap: var(--space-sm);
}

/* ── Vault body text — brighter silver for legibility on dark bg ── */
.vault-column .section-collapsible .section-content p,
.vault-column .section-collapsible .section-content li {
    color: #f1f5f9;
    font-weight: 500;
}

.vault-column .section-collapsible summary h2 {
    color: #ffffff;
}

/* ── Body of compare.html overrides — full-height layout ── */
body:has(.dual-vault-wrapper) {
    overflow: hidden;
    height: 100vh;
}

/* ── Compare toggle zone (landing page) ── */
.compare-toggle-zone {
    margin-top: var(--space-lg);
    text-align: center;
}

.compare-toggle-link {
    background: none;
    border: none;
    border-bottom: 2px solid #e2e8f0;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1e293b;
    padding: 0 0 2px;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.compare-toggle-link:hover {
    color: #0f172a;
    border-bottom-color: #f1f5f9;
}

.compare-form {
    margin-top: var(--space-md);
}

.compare-inputs {
    display: flex;
    align-items: flex-start;  /* allow dropdowns to extend below without pushing layout */
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

/* Wrapper around each compare input — needed for dropdown positioning */
.compare-input-wrap {
    flex: 1;
    position: relative;
}

.compare-input {
    width: 100%;
    padding: 1.125rem var(--space-md);
    font-size: 1.125rem;
    font-family: var(--font-primary);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    caret-color: #1c2331;
}

.compare-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.compare-input::placeholder {
    font-weight: 500;
    opacity: 0.45;
    color: #1c2331;
}

.compare-vs {
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.06em;
    font-style: italic;
    flex-shrink: 0;
}

.btn-compare {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background-color: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-compare:hover {
    background-color: #273549;
    border-color: #475569;
}

/* ── Vault plain-language mode CSS ── */

/* Dual-mode summary paragraphs — standard visible by default */
.vault-column .executive-summary-block--plain { display: none; }
.vault-column.plain-language-active .executive-summary-block--plain { display: block; color: #e2e8f0; font-style: italic; margin-top: var(--space-md); }
.vault-column.plain-language-active .executive-summary-block { display: none; }

/* Bridge sentences */
.vault-column .plain-bridge {
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Metric descriptions */
.vault-column .metric-description {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    line-height: 1.5;
    grid-column: 1 / -1;
}

/* Archetype explanations inside vaults */
.vault-column .archetype-explanation {
    font-size: 0.875rem;
    color: #e2e8f0;
    margin-top: var(--space-md);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   Deterministic Comparison Matrix
   Full-width institutional table anchoring the compare page
   ══════════════════════════════════════════════════════════════ */

.compare-matrix {
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-xl) var(--space-xl) var(--space-lg);
    transition: color 0.3s ease;
}

.compare-matrix-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.compare-matrix-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #f1f5f9;
    margin: 0 0 0.4rem;
}

.compare-matrix-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    letter-spacing: 0.04em;
    margin: 0;
}

.compare-matrix-table-wrap {
    max-width: 860px;
    margin: 0 auto;
    overflow-x: auto;
}

.compare-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.compare-matrix-table thead th {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.compare-matrix-table thead th.col-pillar {
    text-align: left;
}

.matrix-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.15s ease;
    scroll-margin-top: 80px; /* clears fixed topbar on anchor jump */
}

.matrix-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.matrix-row td {
    padding: 0.875rem 1rem;
    color: #e2e8f0;
    text-align: center;
    vertical-align: middle;
    transition: color 0.3s ease;
}

.matrix-row td.col-pillar {
    text-align: left;
}

.pillar-label {
    display: block;
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.875rem;
}

/* Plain-language descriptions — hidden in standard mode */
.pillar-plain {
    display: none;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    line-height: 1.5;
    font-style: italic;
    font-weight: 400;
}

/* Activated by the vault plain-language toggle */
.plain-mode-active .pillar-plain {
    display: block;
}

.plain-mode-active .pillar-label {
    display: none;
}

/* Chevron direction indicator */
.col-chevron {
    width: 3rem;
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 700;
}

.matrix-chevron {
    display: inline-block;
    color: #cbd5e1;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.matrix-chevron.chevron-left  { color: #f1f5f9; }
.matrix-chevron.chevron-right { color: #f1f5f9; }

/* Highlight the favoured cell */
.matrix-row td.matrix-favoured {
    color: #ffffff;
    font-weight: 700;
}

.compare-matrix-note {
    max-width: 860px;
    margin: var(--space-md) auto 0;
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
    letter-spacing: 0.01em;
    line-height: 1.6;
}
