/* Frontstage — Substack-clean editorial palette.
 *
 * Accent: deep teal (#2c5f5d) — calm, considered, not finance-blue.
 * Body type: Charter / Georgia (serif), used for thesis bodies and meeting
 * transcripts. Chrome type: system sans (Inter where available).
 *
 * Hard rule for v0: ONE accent color. Positive/negative deltas use
 * subtle dark green / dark red, not screen-broadcast bright.
 */

:root {
    --bg: #f6f7f9;            /* cool slate, WSJ-style */
    --bg-elevated: #ffffff;
    --bg-subtle: #eef0f4;
    --rule: #dde1e8;
    --text: #0e1116;
    --text-muted: #4a5260;
    --text-faint: #7d8694;
    --accent: #2c5f5d;        /* deep teal (kept — matches brand mark) */
    --accent-soft: #e2ecec;
    --pos: #2a5d36;           /* muted dark green */
    --neg: #8a322a;           /* muted dark red */
    --warn: #8a6a2a;
    --serif: "Charter", "Iowan Old Style", "Georgia", "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
            "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", "SF Mono", "Menlo", "Consolas", monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
}

/* Sticky-footer pattern: body is a column flex, main takes remaining
   vertical space, footer always sits at the bottom even on short pages. */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body > main {
    flex: 1 1 auto;
    min-width: 0;
    /* Hard cap on the cross-axis so a flex item's intrinsic min-
       content can't stretch the cross-axis past the body's content
       box. Combined with min-width: 0 this lets long headings and
       wide tables wrap or scroll inside main rather than push main
       wider than viewport. */
    max-width: 100%;
    width: 100%;
}
body > footer {
    flex-shrink: 0;
}

html, body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

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

.container {
    /* Site-wide content width. Pages with wide tables (positions,
       audit) inherit this directly; editorial pages (prelaunch hero,
       legal, bulletin bodies) constrain their inner content with
       their own narrower max-widths so reading column stays
       comfortable. The 1280 default keeps the chrome (header, nav,
       footer) aligned on every page. */
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    /* Header + footer chrome. Matches .container (1280) so the brand
       aligns with the left edge of body content on every page. */
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Paper-trading banner ------------------------------------------------ */
.paper-banner {
    background: #fff7e6;
    color: #6b4f1a;
    border-bottom: 1px solid #ead6a8;
    text-align: center;
    padding: 6px 16px;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.paper-banner strong { color: #5a3f0f; }

/* --- Header / nav -------------------------------------------------------- */
.site-header {
    border-bottom: 1px solid var(--rule);
    padding: 18px 0;
    background: var(--bg);
}

.site-header .container-wide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    border-bottom: none;
}

.brand .brand-dot {
    color: var(--accent);
    font-weight: 700;
}
.brand .brand-tld {
    color: var(--text-faint);
    font-weight: 400;
}

.site-nav {
    display: flex;
    gap: 22px;
}

.site-nav a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid transparent;
}

.site-nav a:hover, .site-nav a.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* Mobile hamburger button. Hidden on desktop; activates the
   .site-nav as a full-screen overlay at narrow widths. */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 5px auto;
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Scoreboard (above the fold) ---------------------------------------- */
.scoreboard {
    margin: 32px 0 12px;
    padding: 28px 32px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: 4px;
}

.scoreboard-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
}

.scoreboard-head h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    margin: 0;
    letter-spacing: -0.01em;
}

.scoreboard-head .day-count {
    color: var(--text-faint);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.score-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: end;
}

.score-tile .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.score-tile .value {
    font-family: var(--serif);
    font-size: 38px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.score-tile .value.pos { color: var(--pos); }
.score-tile .value.neg { color: var(--neg); }
/* `neutral` is used for small-magnitude deltas (e.g. gap to target
   within ±200 bps): the sign still reads in the number itself, so
   we don't need to alarm with the same red/green a 1000 bps move
   would get. */
.score-tile .value.neutral { color: var(--text); }
.score-tile .sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.spark-wrap {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 18px;
}

.spark-wrap svg {
    width: 100%;
    height: 64px;
    flex: 1;
}

.spark-legend {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.spark-legend .swatch {
    display: inline-block;
    width: 14px;
    height: 2px;
    vertical-align: middle;
    margin-right: 6px;
}

.spark-legend .swatch.fund { background: var(--accent); }
.spark-legend .swatch.spy { background: var(--text-faint); }

/* --- Meeting countdown -------------------------------------------------- */
.meet-card {
    margin: 18px 0 36px;
    padding: 18px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.meet-card.live {
    border-left-color: var(--neg);
    background: #fff8f6;
}

.meet-card .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 4px;
}

.meet-card .text {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
}

.meet-card .text .countdown {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.meet-card .cta {
    background: var(--accent);
    color: white;
    padding: 10px 18px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: none;
}

.meet-card .cta:hover { background: #1e4847; border-bottom-color: transparent; }
.meet-card.live .cta { background: var(--neg); }
.meet-card.live .cta:hover { background: #6f261f; }

.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--neg);
    margin-right: 8px;
    vertical-align: 1px;
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.25); }
}

/* --- Avatars ------------------------------------------------------------- */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    overflow: hidden;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }

/* --- Section heading ---------------------------------------------------- */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 36px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
}

.section-head h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 24px;
    margin: 0;
    letter-spacing: -0.01em;
}

.section-head .more {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Bulletin card ------------------------------------------------------ */
.bulletin {
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
    /* Editorial reading column inside the wide page container. */
    max-width: 820px;
}

.bulletin:last-child { border-bottom: none; }

.bulletin .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.bulletin .meta .name {
    font-weight: 600;
    color: var(--text);
}

.bulletin .kind {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 2px;
    background: var(--bg-subtle);
    color: var(--text-muted);
}

.bulletin .kind.digest { background: var(--accent-soft); color: var(--accent); }
.bulletin .kind.alert { background: #fbe8e4; color: var(--neg); }

.bulletin .headline {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 4px 0 8px;
}

.bulletin .headline a { color: var(--text); border-bottom: none; }
.bulletin .body {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
}

.bulletin .body p { margin: 0 0 12px; }
.bulletin .body strong { font-weight: 600; }

.bulletin .tickers {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-faint);
}

.bulletin .tickers .ticker {
    font-family: var(--mono);
    font-size: 11px;
    padding: 2px 6px;
    background: var(--bg-subtle);
    border-radius: 2px;
    margin-right: 4px;
}

/* --- Tables ------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 12px 0 32px;
}

.data-table th, .data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--rule);
    font-variant-numeric: tabular-nums;
}

.data-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    font-weight: 500;
    border-bottom-color: var(--text-faint);
}

.data-table td.num { text-align: right; font-family: var(--mono); font-size: 13px; }
.data-table td .ticker {
    font-family: var(--mono);
    font-weight: 600;
}
.data-table tr:hover { background: var(--bg-subtle); }

.pill {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 2px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-weight: 500;
}
.pill.pending { background: #fdf3e0; color: #8a6a2a; }
.pill.approved, .pill.executed, .pill.confirmed, .pill.active { background: #e3efe6; color: var(--pos); }
.pill.vetoed, .pill.denied, .pill.alert, .pill.critical, .pill.unsubscribed { background: #fbe8e4; color: var(--neg); }
.pill.warn { background: #fdf3e0; color: var(--warn); }
.pill.under_review, .pill.deferred { background: #ecedee; color: var(--text-muted); }
.pill.closed, .pill.retired { background: #ecedee; color: var(--text-faint); }
.pill.running { background: #fbe8e4; color: var(--neg); }

/* --- Meeting transcript -------------------------------------------------- */
.transcript {
    padding: 24px 0;
    /* Reading column inside the wide page container — long-form
       serif lines hurt above ~75 chars wide. */
    max-width: 820px;
}

.turn {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}

.turn:last-child { border-bottom: none; }

.turn .who { padding-top: 2px; }

.turn-body { min-width: 0; }

.turn .what {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
}

.turn .who-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    flex-wrap: wrap;
}

.turn .who-meta .name { font-weight: 600; }

.turn .what p { margin: 0 0 12px; }

/* Kind-specific styling — read the shape of a meeting at a glance. */
.kind-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 600;
    background: transparent;
    color: var(--text-faint);
}
.kind-badge.kind-opening   { background: rgba(0,0,0,0.04); color: var(--text-muted); }
.kind-badge.kind-proposal  { background: var(--accent-soft); color: var(--accent); }
.kind-badge.kind-response  { background: transparent;        color: var(--text-faint); }
.kind-badge.kind-object    { background: #fbe8e4;            color: var(--neg); }
.kind-badge.kind-vote      { background: rgba(44, 95, 93, 0.10); color: var(--accent); }
.kind-badge.kind-minutes   { background: var(--accent-soft); color: var(--accent); }

/* Vote pill — surface the actual decision next to the badge. */
.vote-pill {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
}
.vote-pill.vote-approve  { background: rgba(42, 93, 54, 0.14); color: var(--pos); }
.vote-pill.vote-reject   { background: rgba(138, 50, 42, 0.14); color: var(--neg); }
.vote-pill.vote-abstain  { background: rgba(0, 0, 0, 0.06); color: var(--text-muted); }

/* Container variants by kind — set apart the structural turns. */
.turn-opening .what {
    color: var(--text-muted);
    font-style: italic;
}
.turn-proposal {
    background: rgba(44, 95, 93, 0.035);
    border-left: 3px solid var(--accent);
    padding-left: 14px;
    margin-left: -14px;
    border-radius: 0 4px 4px 0;
}
.turn-object {
    background: rgba(138, 50, 42, 0.04);
    border-left: 3px solid var(--neg);
    padding-left: 14px;
    margin-left: -14px;
    border-radius: 0 4px 4px 0;
}
.turn-vote .what {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
}
.turn-minutes {
    background: var(--accent-soft);
    border: 1px solid rgba(44, 95, 93, 0.18);
    border-radius: 6px;
    padding: 18px 22px;
    margin-top: 8px;
}
.turn-minutes .what {
    font-family: var(--serif);
    font-size: 16px;
}

/* --- Agent grid --------------------------------------------------------- */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin: 24px 0 36px;
}

.agent-card {
    padding: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--rule);
    border-radius: 4px;
    display: flex;
    gap: 16px;
}

.agent-card .body {
    flex: 1;
}

.agent-card .name {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
}

.agent-card .role {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin: 2px 0 8px;
}

.agent-card .bio {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
}

.agent-card .stats {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 10px;
}

/* --- Agent header (single agent page) ----------------------------------- */
.agent-header {
    display: flex;
    gap: 22px;
    align-items: center;
    padding: 28px 0 22px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 24px;
}

.agent-header .name {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.agent-header .role {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin: 4px 0 8px;
}

.agent-header .bio {
    font-family: var(--serif);
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.5;
}

/* --- Forms -------------------------------------------------------------- */
.form-row {
    display: flex;
    gap: 8px;
    margin: 18px 0;
}

input[type="email"], input[type="text"] {
    flex: 1;
    padding: 12px 14px;
    font-family: var(--sans);
    font-size: 15px;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: var(--bg-elevated);
    color: var(--text);
}

input[type="email"]:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

button.primary {
    padding: 12px 22px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

button.primary:hover { background: #1e4847; }

/* --- Filter chips ------------------------------------------------------ */
.filter-bar {
    display: flex;
    gap: 8px;
    margin: 16px 0 8px;
}

.filter-bar a {
    font-size: 13px;
    padding: 5px 11px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--text-muted);
}

.filter-bar a.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.filter-bar a:hover { border-bottom-color: transparent; }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--rule);
    margin-top: 56px;
    padding: 24px 0 40px;
    color: var(--text-faint);
    font-size: 13px;
}

.site-footer .container-wide {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--text-muted);
    border-bottom: none;
}

.site-footer a:hover { color: var(--accent); }

/* --- Misc utilities ----------------------------------------------------- */
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.kicker {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 6px;
}

/* Keep avatar + name on one line in table cells. The avatar is inline-flex
   and the name follows inline — without nowrap, long names (Margaret)
   break to the next line while short ones (Priya) stay inline. */
.data-table td.agent-cell {
    white-space: nowrap;
}
.data-table td.agent-cell .avatar {
    vertical-align: middle;
}
.data-table td.agent-cell a {
    vertical-align: middle;
}

/* --- Investment universe (audit page) ----------------------------------- */
.universe-legend {
    /* Bullet list immediately under the intro on the audit page. Tight
       leading + reading-column width matches the surrounding prose. */
    font-size: 15px;
    line-height: 1.55;
    max-width: 60ch;
    margin: 6px 0 0;
    padding-left: 22px;
}
.universe-legend li { margin-bottom: 4px; }
.universe-legend li:last-child { margin-bottom: 0; }

.universe-grid {
    display: grid;
    /* auto-fill scales to 3 columns at 1280px and collapses to 2 (then 1
       on mobile via the @media rule below) as the viewport narrows. With
       15 sector buckets the extra column on wide screens trims a lot of
       vertical real estate. */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px 32px;
    margin: 16px 0 8px;
}
.universe-sector {
    border-bottom: 1px solid var(--bg-subtle);
    padding-bottom: 10px;
}
.universe-sector-name {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.universe-sector-tickers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.universe-sector-tickers .ticker {
    font-size: 12px;
}
@media (max-width: 720px) {
    .universe-grid { grid-template-columns: 1fr; }
}

/* --- Legal pages -------------------------------------------------------- */
.legal-page {
    /* Narrow reading column for dense legal prose, inside the
       wider 1280 container. Auto margin keeps it left-aligned
       like the rest of the editorial content (transcript, bulletins). */
    max-width: 720px;
    padding: 16px 0 64px;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
}
.legal-page h1 { color: var(--text); }
.legal-page h2 {
    font-family: var(--serif);
    font-size: 22px;
    margin: 36px 0 14px;
    color: var(--text);
}
.legal-page h3 {
    font-family: var(--sans);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 24px 0 10px;
    color: var(--text-muted);
}
.legal-page p { margin: 0 0 14px; }
.legal-page ul { margin: 0 0 14px; padding-left: 22px; }
.legal-page li { margin-bottom: 6px; }
.legal-page hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 36px 0;
}
.legal-page a { color: var(--accent); }

.footer-legal {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-faint);
}
.footer-legal a { color: var(--text-faint); }
.footer-legal a:hover { color: var(--accent); }

.book-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin: 18px 0 28px;
    padding: 18px 20px;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 6px;
}
.book-stat .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 4px;
}
.book-stat .value {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.book-stat .value.pos { color: var(--pos); }
.book-stat .value.neg { color: var(--neg); }
.book-stat .sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Positions table — packed, right-aligned numerics, small P&L sub-line */
.positions-table th,
.positions-table td { padding: 8px 10px; font-size: 13px; }
.positions-table .ticker { font-weight: 600; }
.positions-table td.num .sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Sector exposure bar — uses --accent so it picks up the brand teal */
.sector-table .bar-cell { width: 40%; }
.sector-table .bar {
    background: var(--rule);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}
.sector-table .bar-fill {
    background: var(--accent);
    height: 100%;
    border-radius: 4px;
}

/* Buy/sell pills in the trade log */
.pill.buy { background: rgba(42, 93, 54, 0.12); color: var(--pos); }
.pill.sell { background: rgba(138, 50, 42, 0.12); color: var(--neg); }

/* --- Agenda preview (scheduled meeting page) ---------------------------- */
.agenda-preview.kickoff {
    padding: 18px 22px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
}
.agenda-list {
    list-style: decimal;
    padding-left: 22px;
    margin: 8px 0 0;
}
.agenda-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-subtle);
}
.agenda-item:last-child { border-bottom: none; }
.agenda-title {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--text);
    line-height: 1.5;
}
.agenda-meta {
    font-family: var(--sans);
    font-size: 12px;
    margin-top: 4px;
    letter-spacing: 0.01em;
}

/* --- Pre-launch hero ---------------------------------------------------- */
.prelaunch {
    margin-top: 24px;
    margin-bottom: 48px;
}

.prelaunch-hero {
    padding: 36px 0 28px;
    border-bottom: 1px solid var(--bg-subtle);
    /* Headline + lede live in a comfortable reading column inside
       the wider page container. The committee strip and trail cards
       below intentionally span the full container width. */
    max-width: 820px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.8s ease-in-out infinite;
}

.prelaunch-head {
    font-family: var(--serif);
    font-size: 38px;
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    color: var(--text);
}

.prelaunch-lede {
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 60ch;
    margin: 0;
}

.prelaunch-cta {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 32px;
    margin: 28px 0;
    padding: 24px 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-subtle);
    border-left: 3px solid var(--accent);
}
.prelaunch-cta-kicker {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.prelaunch-cta-head {
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
    color: var(--text);
}
.prelaunch-cta-lede {
    font-family: var(--serif);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}
.prelaunch-cta-form { position: relative; }
.prelaunch-cta-form .form-row {
    display: flex;
    gap: 8px;
}
.prelaunch-cta-form input[type="email"] {
    flex: 1;
    padding: 10px 12px;
    font-family: var(--sans);
    font-size: 14px;
    border: 1px solid var(--bg-subtle);
    background: var(--bg);
    color: var(--text);
    border-radius: 3px;
}
.prelaunch-cta-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
}

.committee-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin: 28px 0 36px;
}

.committee-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 8px;
    border: 1px solid var(--bg-subtle);
    border-radius: 10px;
    background: var(--bg-elevated);
    text-decoration: none;
    border-bottom: 1px solid var(--bg-subtle);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.committee-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.committee-body { text-align: center; }
.committee-name {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.committee-role {
    font-family: var(--sans);
    font-size: 11.5px;
    color: var(--text-faint);
    letter-spacing: 0.01em;
}

.prelaunch-trail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 32px;
    border-top: 1px solid var(--bg-subtle);
}
.trail-card {
    padding: 18px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-subtle);
    border-radius: 6px;
}
.trail-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.trail-text {
    font-family: var(--serif);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-muted);
}
.trail-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.trail-text {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 960px) {
    .book-summary { grid-template-columns: repeat(3, 1fr); }
    .committee-strip { grid-template-columns: repeat(3, 1fr); }
    .prelaunch-trail { grid-template-columns: repeat(2, 1fr); }
    .prelaunch-head { font-size: 30px; }
    .prelaunch-cta { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 720px) {
    /* Stop wide tables (or any overflow source) from blowing out
       horizontal layout at the body level — without this, position:
       fixed elements compute width relative to the overflowing root
       rather than the visible viewport. */
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Layout / grids collapse */
    .score-row { grid-template-columns: 1fr; gap: 18px; }
    .agent-grid { grid-template-columns: 1fr; }
    .meet-card { flex-direction: column; align-items: flex-start; }
    .turn { grid-template-columns: 44px 1fr; }
    .book-summary { grid-template-columns: repeat(2, 1fr); }
    .committee-strip { grid-template-columns: repeat(2, 1fr); }
    .prelaunch-trail { grid-template-columns: 1fr; }
    .prelaunch-head {
        font-size: 24px;
        line-height: 1.2;
    }
    .prelaunch-lede { font-size: 17px; }
    .prelaunch-hero { padding-top: 24px; }
    /* Defensive: long compound words wrap even if the box is narrower
       than the longest word's natural width. */
    .prelaunch-head,
    .prelaunch-lede,
    .prelaunch-cta-head,
    .prelaunch-cta-lede,
    .meet-card .text {
        overflow-wrap: anywhere;
    }

    /* Mobile container padding tightens up so the scoreboard
       doesn't lose 48px to side margin on a 375px viewport. */
    .container, .container-wide { padding: 0 16px; }

    /* --- Hamburger nav --- */
    .nav-toggle { display: block; }
    .site-header .container-wide {
        justify-content: space-between;
        gap: 0;
    }
    /* When the overlay is open, the header bar (brand + close button)
       stays on top of it so the user can always tap to close. The
       nav is nested inside the header, so making the header a
       stacking context isn't enough — the brand and toggle need
       their own z-index inside that context, above the nav (50). */
    body.nav-open .site-header {
        position: relative;
        z-index: 60;
        background: var(--bg);
    }
    body.nav-open .brand,
    .nav-toggle {
        position: relative;
        z-index: 70;
    }
    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-width: 100vw;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        /* Top padding clears the header bar (banner + brand row ≈ 110px)
           plus 32px of breathing room before the first menu item. */
        padding: 140px 24px 40px;
        z-index: 50;
        transform: translateX(100%);
        transition: transform 0.22s ease-out;
        overflow-y: auto;
    }
    body.nav-open .site-nav {
        transform: translateX(0);
    }
    .site-nav a {
        font-size: 22px;
        font-family: var(--serif);
        font-weight: 500;
        padding: 14px 0;
        border-bottom: 1px solid var(--rule);
    }
    .site-nav a.active {
        color: var(--accent);
    }
    /* Lock body scroll behind the overlay */
    body.nav-open {
        overflow: hidden;
    }

    /* --- Scoreboard tightens up --- */
    .scoreboard { padding: 22px 20px 20px; }
    .scoreboard-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .scoreboard-head h1 { font-size: 20px; }
    .score-tile .value { font-size: 36px; }

    /* --- Tables: become horizontally scrollable blocks. The visual
       compromise is real (column widths no longer align to the
       widest cell) but the alternative is hidden columns. --- */
    .data-table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .data-table thead,
    .data-table tbody {
        display: table;
        width: max-content;
        min-width: 100%;
    }
    /* Reset the universal wrap on the agent + ticker name cells so
       company names like "NVIDIA Corporation" don't blow up
       horizontal width unnecessarily. */
    .data-table .faint { white-space: normal; }

    /* --- Legal pages shed their fixed 720 column on small screens. --- */
    .legal-page {
        max-width: 100%;
        padding: 8px 0 48px;
    }
    .legal-page h1 { font-size: 26px; }
    .legal-page h2 { font-size: 19px; }

    /* --- Footer stacks --- */
    .site-footer .container-wide {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}
