/* ============================================================================
   Wealthcare — Proactive Wealthcare :: shared stylesheet (FEAT-001)
   Single stylesheet reused by every page (index, architecture, dashboards,
   roadmap). Visual identity = Risk Runners dark family; accent swapped to teal.
   Author: Jefferson Richards <Jefferson@richards.plus>
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Inter:wght@300;400;600;700;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Locked palette (custom properties) ───────────────────────────────────
   Palette inherited from street.riskrunners.com; --accent is the Wealthcare
   teal (health/wealth), --risk the red reserved for RiskAssessment emphasis,
   and the three tier colors come from the account-ninja pipeline. */
:root {
    --bg: #08080d;
    --panel: #0f0f18;
    --border: #1a1a2e;
    --text: #d0d0d0;
    --muted: #888;
    --accent: #2fb8a0;   /* teal — Wealthcare health/wealth accent */
    --risk: #dc3250;     /* red — RiskAssessment / risk emphasis only */
    --tier-low: #2563eb; /* LOW   */
    --tier-med: #059669; /* MEDIUM */
    --tier-high: #dc2626;/* HIGH  */
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

a { color: var(--accent); }

/* ============================================================================
   HEADER NAV
   Sticky translucent bar modeled on street's .section-nav. Left wordmark area
   with a Courier-Prime eyebrow tag; right <nav> link list. Active link
   (aria-current="page") takes the accent underline/color. A hamburger button
   (hidden on desktop) toggles a stacked menu below 640px via the .is-open
   class that nav.js sets.
   ========================================================================== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 8, 13, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

/* Left wordmark area */
.site-header .wordmark {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.site-header .wordmark-eyebrow {
    font-family: 'Courier Prime', monospace;
    font-size: 0.68em;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
}

.site-header .wordmark-name {
    font-size: 1.15em;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}

/* Right nav link list */
.primary-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.primary-nav a {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.primary-nav a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Active page link */
.primary-nav a[aria-current="page"] {
    color: var(--accent);
    border-color: rgba(47, 184, 160, 0.4);
    background: rgba(47, 184, 160, 0.08);
    border-bottom: 2px solid var(--accent);
}

/* Keyboard focus states in accent */
.primary-nav a:focus-visible,
.site-header .wordmark:focus-visible,
.nav-toggle:focus-visible,
.footer-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Hamburger button — hidden on desktop, shown under 640px */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 8px 12px;
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
}

.nav-toggle:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   COMPLIANCE BANNER
   High-contrast role="note" banner on every page. Teal-tinted panel with a
   strong accent border; AA-contrast text on the dark palette.
   ========================================================================== */
.compliance-banner {
    max-width: 1100px;
    margin: 20px auto;
    padding: 14px 20px;
    background: rgba(47, 184, 160, 0.08);
    border: 1px solid rgba(47, 184, 160, 0.45);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 0.92em;
    line-height: 1.6;
}

.compliance-banner strong {
    color: var(--accent);
    font-weight: 700;
}

.compliance-banner a {
    color: var(--accent);
    text-decoration: underline;
}

/* ============================================================================
   SHARED PRIMITIVES
   Reusable layout pieces for later pages: hero, .card grid, tables, timeline
   strip, two-lane mapping figure, and CSS-only device frames.
   ========================================================================== */

/* ── Hero (gradient + faint grid, modeled on street's .hero) ── */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(47, 184, 160, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(60, 120, 230, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(5, 150, 105, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-tag {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85em;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.5em, 7vw, 5em);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
}

.hero-sub {
    font-size: 1.2em;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 20px;
    font-weight: 300;
}

/* ── Card grid (street .card style) ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(47, 184, 160, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-accent { height: 4px; width: 100%; background: var(--accent); }

.card-body {
    padding: 28px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-text {
    font-size: 0.9em;
    color: var(--muted);
    line-height: 1.7;
    flex: 1;
}

/* ── Semantic table ── */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.92em;
}

.table-scroll .data-table { margin: 0; min-width: 560px; }

.data-table caption {
    caption-side: top;
    text-align: left;
    color: var(--muted);
    font-family: 'Courier Prime', monospace;
    font-size: 0.8em;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.data-table thead th {
    color: #fff;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Tier emphasis helpers (reused by dashboards/architecture) */
.tier-low { color: var(--tier-low); font-weight: 600; }
.tier-med { color: var(--tier-med); font-weight: 600; }
.tier-high { color: var(--tier-high); font-weight: 600; }

/* §5.5 funding-scenario emphasis — must match the chart's scenario line colors
   (magenta 10% / cyan 20%), and must NOT be any of the three tier colors. */
.scenario-10 { color: #e05fd8; font-weight: 600; }
.scenario-20 { color: #22d3ee; font-weight: 600; }

.funding-howto { font-size: 0.95em; color: var(--muted); }
.funding-howto strong { color: #e6e6e6; }

/* §5.5 funding tables: visually separate the "lump sum" column group from the
   "per-cycle vesting" group with a divider before the first per-cycle column. */
.funding-table th,
.funding-table td { text-align: right; white-space: nowrap; }
.funding-table th[scope="row"] { text-align: left; }
.funding-table thead th[scope="colgroup"] {
    text-align: center;
    font-family: 'Courier Prime', monospace;
    font-size: 0.82em;
    letter-spacing: 1px;
    color: var(--muted);
}
/* divider between the lump-sum group (cols 2-5) and per-cycle group (cols 6-9) */
.funding-table th:nth-child(6),
.funding-table tbody td:nth-child(6) { border-left: 2px solid var(--border); }
.funding-table thead tr:first-child th:nth-child(3) { border-left: 2px solid var(--border); }

/* ── Timeline strip (horizontal, stacks on mobile) ── */
.timeline {
    display: flex;
    gap: 0;
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    list-style: none;
}

.timeline li {
    flex: 1;
    position: relative;
    padding: 20px 16px 0;
    border-top: 2px solid var(--border);
}

.timeline li::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline .timeline-era {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75em;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
}

.timeline .timeline-title {
    display: block;
    color: #fff;
    font-weight: 600;
    margin: 6px 0 4px;
}

.timeline .timeline-desc { font-size: 0.85em; color: var(--muted); }

/* ── Two-lane mapping figure (two columns of resource chips) ── */
.two-lane {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.two-lane .lane {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.two-lane .lane-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    margin-bottom: 4px;
}

.chip {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text);
    text-align: center;
    font-size: 0.9em;
}

.two-lane .connector {
    color: var(--accent);
    font-size: 1.4em;
    text-align: center;
}

/* ── CSS-only device frames (phone + desktop/browser) ── */
.device-frame {
    background: var(--panel);
    border: 1px solid var(--border);
    margin: 0 auto;
}

/* Phone frame */
.device-phone {
    width: 300px;
    max-width: 100%;
    border: 10px solid #16161f;
    border-radius: 36px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.device-phone .device-notch {
    height: 22px;
    background: #16161f;
    border-radius: 0 0 14px 14px;
    width: 44%;
    margin: 0 auto;
}

.device-phone .device-screen {
    padding: 16px;
    min-height: 420px;
}

/* Desktop / browser frame */
.device-desktop {
    width: 760px;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.device-desktop .device-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    background: #16161f;
    border-bottom: 1px solid var(--border);
}

.device-desktop .device-bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #2a2a3a;
    display: inline-block;
}

.device-desktop .device-screen {
    padding: 20px;
    min-height: 360px;
}

/* ============================================================================
   FOOTER  (copied from street.riskrunners.com — structure VERBATIM)
   Only change vs street: the hover color swapped #dc3250 -> var(--accent),
   and its rgba border/background accents swapped to teal.
   ========================================================================== */
footer {
    text-align: center;
    padding: 50px 20px;
    border-top: 1px solid #141420;
    color: #444;
    font-size: 0.85em;
}

footer .brand {
    font-family: 'Courier Prime', monospace;
    font-size: 1em;
    letter-spacing: 3px;
    color: #666;
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #888;
    text-decoration: none;
    font-size: 0.9em;
    padding: 8px 16px;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.footer-links a:hover {
    color: #2fb8a0;
    border-color: rgba(47, 184, 160, 0.4);
    background: rgba(47, 184, 160, 0.05);
}

.footer-links svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Short compliance line in the footer (§9) */
.footer-compliance {
    margin-top: 18px;
    font-size: 0.82em;
    color: #555;
}

.footer-compliance a { color: var(--accent); text-decoration: underline; }

/* ============================================================================
   RESPONSIVE  (<=600px) — mirrors street's responsive rules; everything stacks
   and nothing overflows at ~375px.
   ========================================================================== */
@media (max-width: 640px) {
    /* Header collapses to hamburger */
    .nav-toggle { display: inline-block; }

    .primary-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
        margin-top: 12px;
    }

    /* nav.js adds .is-open to reveal the stacked menu */
    .primary-nav.is-open { display: flex; }

    .primary-nav a { font-size: 0.8em; }
}

@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; padding: 30px 16px; }
    .hero { min-height: 50vh; padding: 40px 16px; }
    .hero-sub { font-size: 1.02em; }
    .card-body { padding: 20px 18px; }
    .card-title { font-size: 1.15em; }
    .card-text { font-size: 0.85em; }
    footer { padding: 40px 16px; }

    /* Timeline + two-lane figure stack vertically */
    .timeline { flex-direction: column; gap: 24px; }
    .timeline li { border-top: none; border-left: 2px solid var(--border); padding: 0 0 0 20px; }
    .timeline li::before { top: 0; left: -7px; }

    .two-lane { grid-template-columns: 1fr; }
    .two-lane .connector { transform: rotate(90deg); }

    .device-desktop .device-screen,
    .device-phone .device-screen { padding: 14px; }

    .compliance-banner { margin: 16px; }
}

/* ============================================================================
   PAGE SECTIONS (FEAT-002) — index.html, architecture.html, roadmap.html
   Shared content-section primitives used by the three non-chart pages.
   ========================================================================== */
.section { padding: 48px 20px; }

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.9em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.25;
}

.section-lead {
    color: var(--muted);
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 18px;
}

.section-lead:last-child { margin-bottom: 0; }

/* Page intro title/eyebrow for architecture + roadmap (the single <h1>) */
.page-eyebrow { margin-bottom: 10px; }

.page-title {
    font-size: clamp(2em, 5vw, 3em);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
}

code {
    font-family: 'Courier Prime', monospace;
    font-size: 0.9em;
    color: var(--accent);
    background: rgba(47, 184, 160, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ── index.html: Objective card emphasis ── */
.card-objective {
    border-color: rgba(47, 184, 160, 0.5);
    box-shadow: 0 0 0 1px rgba(47, 184, 160, 0.25), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.card-objective .card-accent { height: 6px; }

.card-objective .card-title { color: var(--accent); }

/* ── index.html: "How it works" flow diagram (CSS/HTML only, no library) ── */
.flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin-top: 24px;
    padding: 0;
}

.flow-node {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9em;
    color: var(--text);
    text-align: center;
}

.flow-node a { color: var(--accent); text-decoration: none; }
.flow-node a:hover { text-decoration: underline; }

.flow-node-risk { border-color: rgba(220, 50, 80, 0.5); }
.flow-node-risk a { color: var(--risk); }

.flow-label { color: var(--text); }

.flow-arrow {
    color: var(--accent);
    font-size: 1.2em;
    flex-shrink: 0;
}

/* ── index.html: full disclaimer panel ── */
.disclaimer-panel {
    background: var(--panel);
    border: 1px solid rgba(47, 184, 160, 0.45);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 24px;
    color: #e6e6e6;
    line-height: 1.8;
}

.disclaimer-panel strong { color: var(--accent); }

/* ── architecture.html + roadmap.html: spec/justification lists ── */
.spec-list {
    list-style: none;
    padding: 0;
    margin: 18px 0;
}

.spec-list li {
    position: relative;
    padding: 10px 0 10px 22px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    line-height: 1.75;
}

.spec-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.spec-list li:last-child { border-bottom: none; }

/* ── architecture.html: two-lane connector column + risk chip ── */
.connector-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.connector-column .connector { line-height: 2.6; }

.chip-risk {
    border-color: rgba(220, 50, 80, 0.5);
    color: var(--risk);
}

/* ── architecture.html: RiskAssessment figure + mandatory micro-disclaimer ── */
.risk-figure { color: var(--risk); }

.micro-disclaimer {
    font-family: 'Courier Prime', monospace;
    font-size: 0.82em;
    color: var(--muted);
    font-style: normal;
}

.micro-disclaimer-block {
    display: block;
    margin-top: 10px;
    padding: 12px 16px;
    background: rgba(220, 50, 80, 0.06);
    border: 1px solid rgba(220, 50, 80, 0.3);
    border-radius: 8px;
    line-height: 1.7;
}

/* ── roadmap.html: phased plan ── */
.phase-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.phase {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 22px 0;
    border-top: 1px solid var(--border);
}

.phase:first-child { border-top: none; }

.phase-marker {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    padding-top: 4px;
}

.phase-title {
    font-size: 1.25em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.phase-body p { margin-bottom: 8px; color: var(--text); line-height: 1.7; }
.phase-body p:last-child { margin-bottom: 0; }
.phase-body strong { color: #fff; }
.phase-body a { color: var(--accent); }

/* ── roadmap.html: governance workflow + design note ── */
.workflow-list {
    margin: 18px 0 0 20px;
    padding: 0;
    color: var(--text);
}

.workflow-list li { padding: 6px 0; line-height: 1.7; }

.design-note {
    margin-top: 18px;
    padding: 16px 20px;
    background: rgba(47, 184, 160, 0.06);
    border: 1px solid rgba(47, 184, 160, 0.3);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    color: #e6e6e6;
    line-height: 1.7;
}

.design-note strong { color: var(--accent); }

@media (max-width: 600px) {
    .section { padding: 32px 16px; }
    .section-title { font-size: 1.5em; }
    .flow { flex-direction: column; align-items: stretch; }
    .flow-node { text-align: left; }
    .flow-arrow { transform: rotate(90deg); align-self: center; }
    .phase { grid-template-columns: 1fr; gap: 8px; }
}

/* ============================================================================
   DASHBOARDS (FEAT-003) — mockup gallery primitives for dashboards.html only.
   Device frames, tiles, observations feed, chart figures + fallback note,
   RiskAssessment card, and the syndication message thread.
   ========================================================================== */

/* Caption/label under each device-frame mockup */
.mockup { margin: 28px 0 0; }

.mockup-caption {
    font-family: 'Courier Prime', monospace;
    font-size: 0.78em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

/* "illustrative" badge + persona header (§5.1, §5.6) */
.illustrative-badge {
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.72em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(47, 184, 160, 0.1);
    border: 1px solid rgba(47, 184, 160, 0.4);
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.persona-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 1.05em;
    font-weight: 600;
    color: #fff;
}

/* §5.1 four summary tiles */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.tile {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.tile-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.72em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.tile-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.tile-value .illustrative-badge { font-size: 0.42em; font-weight: 400; }

.tile-risk .tile-value { color: var(--risk); }

/* §5.2 observations feed */
.feed {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 520px;
    overflow-y: auto;
}

.feed-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--border);
}

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

.feed-code {
    grid-column: 1;
    grid-row: 1;
    font-family: 'Courier Prime', monospace;
    font-size: 0.78em;
    color: var(--accent);
    letter-spacing: 1px;
}

.feed-label {
    grid-column: 1;
    grid-row: 2;
    color: var(--text);
    font-size: 0.9em;
}

.feed-value {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-weight: 700;
    color: #fff;
    font-size: 0.95em;
}

.feed-meta {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
    font-size: 0.72em;
    color: var(--muted);
    font-family: 'Courier Prime', monospace;
}

.feed-chip {
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.68em;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 6px;
    color: var(--muted);
    margin-right: 6px;
}

/* Row 11 anomaly — golf-cart breach in risk red */
.feed-row-anomaly {
    background: rgba(220, 50, 80, 0.08);
    border-left: 3px solid var(--risk);
    padding-left: 8px;
}

.feed-row-anomaly .feed-code,
.feed-row-anomaly .feed-value { color: var(--risk); }

/* §5.3 / §5.5 chart figure + paired table wrapper */
.chart-figure { margin: 0; }

.chart-canvas-wrap {
    position: relative;
    height: 320px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 16px;
}

/* Chart.js draws into this canvas; keep it bounded by its wrapper so a slow
   responsive-resize can never paint wider than the device frame. */
.chart-canvas-wrap > canvas {
    max-width: 100% !important;
}

/* role=status note shown when Chart.js is unavailable (§10.2) */
.charts-fallback {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: rgba(220, 50, 80, 0.06);
    border: 1px solid rgba(220, 50, 80, 0.3);
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 0.88em;
}

/* §5.5 goal-funding note */
.funding-note {
    margin-top: 16px;
    padding: 14px 18px;
    background: rgba(47, 184, 160, 0.06);
    border: 1px solid rgba(47, 184, 160, 0.3);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    color: #e6e6e6;
    line-height: 1.7;
    font-size: 0.9em;
}

.funding-note strong { color: var(--accent); }

/* §5.4 RiskAssessment card */
.risk-card {
    background: var(--panel);
    border: 1px solid rgba(220, 50, 80, 0.4);
    border-left: 4px solid var(--risk);
    border-radius: 10px;
    padding: 22px;
    max-width: 640px;
}

.risk-card h3 { color: #fff; margin-bottom: 10px; font-size: 1.15em; }

.risk-card .spec-list li::before { color: var(--risk); }

/* §5.6 syndication message thread */
.thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thread-msg {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.9em;
    line-height: 1.6;
}

.thread-msg a { color: var(--accent); }

.badge-pipeline {
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.68em;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--tier-low);
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 10px;
    padding: 1px 8px;
    margin-left: 6px;
}

.slot-list { list-style: none; margin: 6px 0 0; padding: 0; }

.slot {
    display: block;
    width: 100%;
    text-align: left;
    background: rgba(47, 184, 160, 0.08);
    border: 1px solid rgba(47, 184, 160, 0.4);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.9em;
    font-family: 'Courier Prime', monospace;
    cursor: pointer;
}

.slot:hover { background: rgba(47, 184, 160, 0.14); }

.slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.thread-caption {
    margin-top: 6px;
    font-size: 0.82em;
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 600px) {
    /* Taller canvas so the wrapped legend + 12 bars stay legible on a phone. */
    .chart-canvas-wrap { height: 300px; }

    /* Tighten the device frames so the chart/table get the full phone width. */
    .device-desktop .device-screen,
    .device-phone .device-screen { padding: 12px; }

    /* The paired tables scroll horizontally inside the frame; hint it on mobile. */
    .table-scroll { margin: 14px 0; }
    .table-scroll .data-table { min-width: 480px; font-size: 0.84em; }
    .data-table th, .data-table td { padding: 8px 10px; }
}
