/* ============================================================
   LEGO Indices - design system
   Light, editorial-financial. References: Robinhood (restraint,
   whitespace, oversized tabular figures), S&P Dow Jones Indices /
   MSCI (factsheet gravitas, "as of" stamps, structured methodology).

   Intentionally NOT the generic AI/Tailwind look: no purple
   gradients, no glassmorphism, no heavy drop-shadow card grids,
   no emoji. Hairline rules, generous space, one restrained accent.

   Typography: editorial serif wordmark/display + system sans for UI
   and data. A self-hosted display face can be dropped in later via
   @font-face (font-src 'self' already permits it) without touching
   the markup.
   ============================================================ */

:root {
    /* Canvas + ink */
    --bg: #FFFFFF;
    --bg-soft: #F7F7F4;      /* warm off-white section band */
    --bg-sunk: #F2F1EC;      /* inset / hover fill */
    --ink: #14150F;          /* near-black text */
    --ink-2: #3D3F38;        /* secondary text */
    --ink-3: #86877E;        /* muted / captions */
    --hairline: #E6E5DF;     /* 1px rules */
    --hairline-2: #D8D7CF;   /* stronger rule */

    /* Single restrained brand accent (swap here to rebrand) */
    --accent: #14150F;       /* chrome uses ink-black, Robinhood-style */
    --link: #1c5d43;         /* muted evergreen for links/active */

    /* Performance semantics - muted, not neon */
    --pos: #0f7a4d;
    --pos-soft: #e8f3ec;
    --neg: #b23a2c;
    --neg-soft: #f7ebe9;

    --radius: 6px;
    --radius-sm: 4px;

    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;

    --maxw: 1140px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
    width: 100%;
}

.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.center { text-align: center; }
.r { text-align: right; }
.pad { padding: 16px; }
.mt { margin-top: 10px; }
.mb { margin-bottom: 14px; }

.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* ---- Top navigation ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(120%) blur(6px);
    border-bottom: 1px solid var(--hairline);
}
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand__mark { flex: none; display: block; }
.brand__text { display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.brand__name {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink);
}
.brand__rule {
    font-family: var(--sans);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-top: 3px;
}
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a {
    position: relative;
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 550;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.01em;
}
.topnav a:hover { background: var(--bg-sunk); text-decoration: none; color: var(--ink); }
.topnav a.active { color: var(--ink); }
/* Absolutely positioned so the underline never changes the item's height
   (otherwise the whole ribbon jumps taller when a tab becomes active). */
.topnav a.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 3px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}
/* Theme nav dropdown */
.topnav__dd { position: relative; display: flex; align-items: center; }
/* inline-flex + centered so the small caret sits on the text's optical
   midline instead of the baseline (which nudged the whole item up). */
.topnav__toggle { display: inline-flex; align-items: center; gap: 3px; }
.topnav__caret { font-size: 9px; opacity: 0.7; line-height: 1; }
.topnav__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 210px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    padding: 5px;
    z-index: 60;
}
.topnav__menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    border-radius: 6px;
    white-space: nowrap;
}
.topnav__menu a:hover { background: var(--bg-sunk); color: var(--ink); }
.topnav__menu-n {
    font-size: 11px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}
.topnav__menu-all {
    margin-top: 4px;
    border-top: 1px solid var(--hairline);
    color: var(--ink) !important;
    font-weight: 600 !important;
}
.board tr.board-group td a { color: inherit; }
.board tr.board-group td a:hover { text-decoration: underline; }

/* Grouped section-header rows on the Theme directory board */
.board tr.board-group td {
    padding: 18px 14px 7px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--ink-3);
    background: transparent;
    border-bottom: 1px solid var(--hairline-2);
    cursor: default;
}
.board tr.board-group:first-child td { padding-top: 4px; }
.board tr.board-group .board-group__n {
    margin-left: 8px;
    font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
    color: var(--ink-3); opacity: 0.7;
}
.board tr.board-group:hover td { background: transparent; }

.conn {
    display: flex; align-items: center; gap: 7px;
    font-size: 11.5px; color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.conn__dot { width: 7px; height: 7px; border-radius: 50%; background: #c9a227; }
.conn__dot.online { background: var(--pos); }
.conn__dot.offline { background: var(--neg); }

main.wrap { padding-top: 30px; padding-bottom: 72px; }

/* ---- Section scaffolding ---- */
.eyebrow {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-3);
    font-weight: 600;
}
.section {
    margin-bottom: 44px;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--hairline);
}
.section-head h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    margin: 0;
    letter-spacing: -0.01em;
}
.section-head .sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.asof { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.asof strong { color: var(--ink-2); font-weight: 600; }

/* ---- Buttons / controls ---- */
.btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    cursor: pointer;
}
.btn:hover { opacity: 0.88; }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--hairline-2);
}
.btn-ghost:hover { background: var(--bg-sunk); opacity: 1; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* Embed snippet dialog */
.embed-dialog {
    width: min(560px, calc(100vw - 32px));
    border: 1px solid var(--hairline-2);
    border-radius: var(--radius, 12px);
    padding: 18px 20px 20px;
    color: var(--ink);
    background: var(--bg, #fff);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}
.embed-dialog::backdrop { background: rgba(20, 21, 15, 0.42); }
.embed-dialog__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.embed-dialog__title { font-family: var(--serif); font-size: 18px; font-weight: 600; margin: 0; }
.embed-dialog__lede { font-size: 13px; color: var(--ink-2); margin: 8px 0 12px; line-height: 1.5; }
.embed-dialog__code {
    width: 100%; resize: vertical; box-sizing: border-box;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 12px; line-height: 1.55; color: var(--ink);
    background: var(--bg-sunk, #f6f5f0);
    border: 1px solid var(--hairline-2); border-radius: 8px;
    padding: 10px 12px;
}
.embed-dialog__actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.embed-dialog__actions .btn { text-decoration: none; }
.embed-dialog__done { font-size: 12px; font-weight: 650; color: var(--pos, #0f7a4d); }
.embed-dialog__done[hidden] { display: none; }

.ix-actions { margin: 2px 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ix-actions .btn { display: inline-flex; align-items: center; text-decoration: none; }
.ix-actions__done { font-size: 12px; font-weight: 650; color: var(--pos, #0f7a4d); }
.ix-actions__done[hidden] { display: none; }

.embed-apps {
    border: 1px solid var(--line, #e6e5df); border-radius: 12px;
    padding: 12px 14px; margin: 4px 0 14px; background: var(--bg-soft, #faf9f5);
}
.embed-apps__label { font-size: 11px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.embed-apps__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.embed-apps__row .btn { text-decoration: none; }
.embed-apps__hint { font-size: 12px; color: var(--ink-2); }
.link-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--link); font-family: inherit; font-size: 13px; font-weight: 550;
}
.link-btn:hover { text-decoration: underline; }
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--ink-3); font-size: 13px; font-weight: 550;
    background: none; border: none; cursor: pointer; padding: 0;
    margin-bottom: 20px; font-family: inherit;
}
.back-link:hover { color: var(--ink); }

.select {
    font-family: inherit;
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid var(--hairline-2);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink);
    font-weight: 550;
    cursor: pointer;
}

/* Segmented control (period toggles) */
.segmented {
    display: inline-flex;
    border: 1px solid var(--hairline-2);
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
}
.segmented button {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 13px;
    border: none;
    background: transparent;
    color: var(--ink-3);
    border-radius: 999px;
    cursor: pointer;
    letter-spacing: 0.02em;
}
.segmented button.active { background: var(--ink); color: #fff; }
.segmented button:hover:not(.active) { color: var(--ink); }

/* Pricing-region (US vs. international) toggle on the factsheet. Sits
   between the level chart and the keystats; governs every current-price
   figure below it (holdings, movers, ROI distribution). */
.ix-region {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    margin: 14px 0 4px;
    padding: 12px 14px;
    border: 1px solid var(--hairline-2);
    border-radius: 12px;
    background: var(--bg-sunk);
}
.ix-region-lab { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ix-region-note { font-size: 12px; color: var(--ink-3); }
.ix-region-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.rchip {
    font-family: inherit; font-size: 12px; font-weight: 600;
    padding: 5px 12px;
    border: 1px solid var(--hairline-2);
    background: var(--bg);
    color: var(--ink-3);
    border-radius: 999px;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.rchip:hover:not(.active) { color: var(--ink); border-color: var(--ink-3); }
.rchip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
/* Muted "shown worldwide" marker on a holdings price that has no listing
   in the selected region(s). */
.ww-tag {
    display: inline-block; margin-left: 5px;
    font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-3);
    vertical-align: middle;
    cursor: help;
}

/* ---- Change indicator ---- */
.chg { font-variant-numeric: tabular-nums; font-weight: 600; }
.chg::before { font-size: 0.82em; margin-right: 3px; }
.chg.up { color: var(--pos); }
.chg.down { color: var(--neg); }
.chg.up::before { content: "\25B2"; }   /* triangle up */
.chg.down::before { content: "\25BC"; }  /* triangle down */
.chg.flat { color: var(--ink-3); }

/* ============================================================
   HOME - index family board
   ============================================================ */
.market-line {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding: 16px 0 22px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 34px;
}
.market-stat .k {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-3); font-weight: 600;
}
.market-stat .v {
    font-size: 21px; font-weight: 650; margin-top: 3px;
    font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}

/* Registered-trademark mark: small superscript, never bold/serif emphasis */
.rtm {
    font-size: 0.58em;
    font-weight: 400;
    line-height: 0;
    vertical-align: super;
    letter-spacing: 0;
}

/* ---- Hero (home) ---- */
.hero {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 52px;
    align-items: center;
    padding: 30px 0 36px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 36px;
}
.hero__title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 40px;
    line-height: 1.07;
    letter-spacing: -0.02em;
    margin: 12px 0 16px;
}
.hero__lede {
    font-size: 15.5px;
    line-height: 1.62;
    color: var(--ink-2);
    max-width: 58ch;
    margin: 0 0 22px;
}
.hero__cta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.hero__cta .btn { display: inline-flex; align-items: center; text-decoration: none; }
.hero__cta .btn-ghost:hover { text-decoration: none; }
.hero__facts {
    display: flex; flex-wrap: wrap; gap: 8px 22px;
    font-size: 12.5px; color: var(--ink-3);
    padding-top: 18px; border-top: 1px solid var(--hairline);
}
.hero__facts span { white-space: nowrap; }
.hero__facts strong { color: var(--ink); font-weight: 650; }

/* Featured index cards (hero, right column) */
.hero__featured { display: flex; flex-direction: column; gap: 14px; }
.fcard {
    display: block; text-decoration: none; color: inherit;
    border: 1px solid var(--hairline-2); border-radius: var(--radius);
    padding: 15px 18px 16px; cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.fcard:hover { border-color: var(--ink-3); background: var(--bg-soft); text-decoration: none; }
.fcard__eyebrow {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--ink-3); font-weight: 600;
}
.fcard__name {
    font-family: var(--serif); font-size: 20px; font-weight: 600;
    letter-spacing: -0.01em; margin-top: 3px;
}
.fcard__quote {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin-top: 10px;
}
.fcard__level {
    font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em; line-height: 1;
}
.fcard__spark { height: 46px; margin-top: 6px; }
.fcard__meta { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }

@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 20px; }
    .hero__title { font-size: 30px; }
    .hero__lede { max-width: none; }
}

/* Featured-card performance-window toggle + card stack */
.feat-toggle { align-self: flex-start; }
.fcards { display: flex; flex-direction: column; gap: 14px; }

/* Home board "Themes" tab: plain rows, no metric header */
.board--themes thead { display: none; }
.board--themes tbody tr { cursor: pointer; }

/* ============================================================
   Retired Set of the Day
   One card in the right gutter on wide screens (>=1440px). Absolutely
   positioned relative to the document (NOT fixed) so it scrolls away with
   the page. Hidden entirely on narrower screens, so nothing shifts there.
   ============================================================ */
/* Default (phones / tablets): an in-flow block above the footer so the card
   stays visible on mobile. It's placed in the DOM right before the footer. */
.sotd {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 4px auto 28px;
    padding: 0 16px;
}
@media (min-width: 1440px) {
    /* Wide screens: pin it into the right-hand whitespace. Because it's a
       body-level child, absolute positioning resolves against the document,
       so it stays put regardless of its DOM order. The whole
       [content + gutter + sidebar] block is centered as one unit, so the
       content shifts left and this fills the reclaimed space. */
    .sotd {
        position: absolute;
        top: 96px;
        left: calc((100vw - 1404px) / 2 + 1164px);
        width: 240px;
        max-width: none;
        margin: 0;
        padding: 0;
        z-index: 5;
    }
    /* Shift the whole page (header, content, footer) left so the content
       column + the Set-of-the-Day sidebar read as one centered block. */
    .wrap { margin-left: calc((100vw - 1404px) / 2); margin-right: auto; }
}

.sotd-card {
    border: 1px solid var(--hairline); border-radius: 10px;
    background: var(--bg); padding: 13px 13px 14px; overflow: hidden;
}
.sotd-card__eyebrow {
    font-size: 10px; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--ink-3);
}
.sotd-thumb {
    margin: 10px 0 9px; height: 104px; border-radius: 7px;
    background: var(--bg-soft); display: flex; align-items: center;
    justify-content: center; overflow: hidden;
}
.sotd-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sotd-name {
    font-size: 13px; line-height: 1.35; color: var(--ink); font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sotd-num { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.sotd-links { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; }
.sotd-btn {
    display: block; text-align: center; font-size: 12.5px; font-weight: 600;
    padding: 7px 10px; border-radius: 6px; border: 1px solid var(--ink);
    background: var(--ink); color: #fff; text-decoration: none;
}
.sotd-btn:hover { text-decoration: none; opacity: 0.9; }
.sotd-btn--ghost { background: transparent; color: var(--ink); border-color: var(--hairline-2); }
.sotd-disc { font-size: 10px; line-height: 1.5; color: var(--ink-3); margin-top: 9px; }

/* Slot E: small ad beneath the Set-of-the-Day card */
.sotd-ad { margin-top: 12px; }
.sotd-ad--ph {
    border: 1px dashed var(--hairline-2); border-radius: 10px;
    background: var(--bg-soft); min-height: 200px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; padding: 12px; text-align: center; color: var(--ink-3);
}
.sotd-ad__lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.sotd-ad__hint { font-size: 11px; line-height: 1.4; }

.board { width: 100%; border-collapse: collapse; }
.board thead th {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--ink-3); font-weight: 600; text-align: right;
    padding: 0 14px 12px; border-bottom: 1px solid var(--hairline);
}
.board thead th:first-child { text-align: left; }
.board tbody tr {
    cursor: pointer;
    border-bottom: 1px solid var(--hairline);
}
.board tbody tr:hover { background: var(--bg-soft); }
.board td { padding: 16px 14px; text-align: right; vertical-align: middle; }
.board td:first-child { text-align: left; }
.board .ix-name {
    font-family: var(--serif); font-size: 18px; font-weight: 600;
    letter-spacing: -0.01em;
}
.board .ix-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.board .ix-level {
    font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.board .spark { width: 132px; height: 40px; }
.board .board-cta { color: var(--ink-3); font-size: 18px; }

/* ============================================================
   INDEX PAGE - factsheet centerpiece
   ============================================================ */
.ix-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.ix-title {
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 4px 0 2px;
    line-height: 1.08;
}
.ix-ticker {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--ink-3);
    letter-spacing: 0.04em;
}
.ix-quote { text-align: right; }
.ix-level {
    font-size: 44px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}
.ix-changes {
    display: flex; gap: 16px; justify-content: flex-end;
    margin-top: 8px; flex-wrap: wrap;
}
.ix-change-item { text-align: right; }
.ix-change-item .lab {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em;
    color: var(--ink-3); font-weight: 600;
}
.ix-change-item .val { font-size: 15px; margin-top: 1px; }
.ix-desc {
    font-size: 15px; color: var(--ink-2); max-width: 62ch;
    margin: 2px 0 22px; line-height: 1.55;
}

.ix-chart-wrap { position: relative; }
.chart-note {
    color: var(--ink-3); font-size: 11.5px; line-height: 1.4;
    margin-top: 8px; display: flex; align-items: center; gap: 7px;
}
.chart-note[hidden] { display: none; }
.chart-note .dash-key {
    flex: none; width: 20px; height: 0; border-top: 2px dashed var(--ink-3);
    display: inline-block;
}
/* Level-history table (alternative to the line chart) */
.ix-table-scroll { max-height: 320px; overflow-y: auto; }
.ix-level-table thead th { position: sticky; top: 0; background: var(--bg); z-index: 1; }
.mdl-tag {
    display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
    font-size: 10px; font-weight: 600; letter-spacing: .02em;
    color: var(--ink-3); background: var(--bg-soft); border: 1px solid var(--hairline);
    vertical-align: middle;
}
.ix-chart-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
/* Holds the Level/Return view toggle + the range buttons; the range
   buttons are hidden (via [hidden]) when the Return distribution is shown. */
.ix-chart-controls { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ix-chart-controls .segmented[hidden] { display: none; }

/* Factsheet key-stats strip */
.keystats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 26px 0 8px;
}
.keystat {
    padding: 14px 16px;
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}
.keystat .k {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--ink-3); font-weight: 600;
}
.keystat .v {
    font-size: 16px; font-weight: 600; margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

/* ---- Movers ---- */
.movers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
}
.mover-col h3 {
    font-size: 13px; font-weight: 600; margin: 0 0 4px;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.mover-col .hint { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.mover-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--hairline);
}
.mover-row .rank {
    font-size: 12px; color: var(--ink-3); width: 16px;
    font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.mover-row img {
    width: 38px; height: 38px; object-fit: contain; flex-shrink: 0;
    background: var(--bg-soft); border-radius: var(--radius-sm);
}
.mover-row .who { min-width: 0; flex: 1; }
.mover-row .who .id { font-weight: 600; font-size: 13.5px; }
.mover-row .who .nm {
    font-size: 12px; color: var(--ink-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mover-row .val { text-align: right; flex-shrink: 0; }
.mover-row .val .big { font-size: 14.5px; }
.mover-row .val .sub { font-size: 11px; color: var(--ink-3); }

/* ============================================================
   TABLES (holdings / screener)
   ============================================================ */
.table-scroll { overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; }
.dtable thead th {
    position: sticky; top: 0;
    background: var(--bg);
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--ink-3); font-weight: 600; text-align: right;
    padding: 10px 12px; border-bottom: 1.5px solid var(--hairline-2);
    white-space: nowrap; cursor: pointer; user-select: none;
}
.dtable thead th:first-child, .dtable thead th.l { text-align: left; }
.dtable thead th .arrow { color: var(--ink); margin-left: 3px; }
.dtable tbody td {
    padding: 11px 12px; text-align: right;
    border-bottom: 1px solid var(--hairline);
    font-variant-numeric: tabular-nums; font-size: 13.5px;
}
.dtable tbody td:first-child, .dtable tbody td.l { text-align: left; }
.dtable tbody tr:hover { background: var(--bg-soft); }
.set-cell { display: flex; align-items: center; gap: 11px; }
.set-cell img {
    width: 40px; height: 40px; object-fit: contain; flex-shrink: 0;
    background: var(--bg-soft); border-radius: var(--radius-sm);
}
.set-cell .id { font-weight: 600; font-size: 13.5px; }
.set-cell .nm { font-size: 12px; color: var(--ink-3); }

/* Weight bar in holdings */
.wbar {
    position: relative; height: 6px; width: 72px; margin-left: auto;
    background: var(--bg-sunk); border-radius: 3px; overflow: hidden;
}
.wbar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.wcell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }

.toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    justify-content: flex-end;
}
.filter-input {
    font-family: inherit; font-size: 13px; padding: 7px 11px;
    border: 1px solid var(--hairline-2); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--ink); min-width: 240px;
}

/* Holdings series facet dropdown (BrickLink Designer Program, etc.). */
.filter-select {
    font-family: inherit; font-size: 13px; padding: 7px 28px 7px 11px;
    border: 1px solid var(--hairline-2); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--ink); cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2386877E' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}

/* Small inline "series" badge next to a constituent's name. */
.series-tag {
    display: inline-block; margin-left: 6px; padding: 1px 6px;
    font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
    color: var(--ink-2); background: var(--bg-sunk);
    border: 1px solid var(--hairline-2); border-radius: 999px;
    vertical-align: middle; white-space: nowrap;
}

/* Column picker (research explorer): a .select-styled button that opens a
   checkbox menu for choosing which scraped fields to show. */
.colpick { position: relative; }
.colpick__btn { display: inline-flex; align-items: center; gap: 6px; }
.colpick__btn::after {
    content: ""; width: 0; height: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 5px solid var(--ink-3); margin-left: 2px;
}
.colpick__btn[aria-expanded="true"] { border-color: var(--ink-3); }
.colpick__menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
    min-width: 190px; max-height: 340px; overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--hairline-2);
    border-radius: var(--radius);
    box-shadow: 0 14px 40px rgba(20,21,15,0.14);
    padding: 6px;
}
.colpick__menu[hidden] { display: none; }
.colpick__item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 9px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 550; color: var(--ink); cursor: pointer;
    white-space: nowrap;
}
.colpick__item:hover { background: var(--bg-sunk); }
.colpick__item input { cursor: pointer; accent-color: var(--link); }

/* ============================================================
   METHODOLOGY (factsheet)
   ============================================================ */
.method {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0 40px;
}
.method__block {
    display: contents;
}
.method__label {
    font-size: 12.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--ink-3);
    padding: 20px 0; border-top: 1px solid var(--hairline);
}
.method__body {
    padding: 20px 0; border-top: 1px solid var(--hairline);
    font-size: 14.5px; color: var(--ink-2); line-height: 1.6;
}
.method__body p { margin: 0 0 10px; }
.method__body ul, .method__body ol { margin: 0; padding-left: 20px; }
.method__body li { margin-bottom: 6px; }
.formula {
    font-family: var(--mono); font-size: 13px; color: var(--ink);
    background: var(--bg-soft); border: 1px solid var(--hairline);
    border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0;
    line-height: 1.5; overflow-x: auto;
}
@media (max-width: 720px) {
    .method { grid-template-columns: 1fr; gap: 0; }
    .method__label { padding-bottom: 4px; border-top: 1px solid var(--hairline); }
    .method__body { padding-top: 6px; border-top: none; }
}

/* ============================================================
   INDEX CHANGES (membership announcements)
   ============================================================ */
.changes { list-style: none; margin: 0; padding: 0; }
.change-row {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 0; border-bottom: 1px solid var(--hairline);
}
.change-row .when {
    font-variant-numeric: tabular-nums; font-size: 12.5px;
    color: var(--ink-3); width: 74px; flex-shrink: 0;
}
.change-row img {
    width: 36px; height: 36px; object-fit: contain; flex-shrink: 0;
    background: var(--bg-soft); border-radius: var(--radius-sm);
}
.change-row .body { flex: 1; min-width: 0; }
.change-row .body .id { font-weight: 600; font-size: 13.5px; }
.change-row .body .why { font-size: 12px; color: var(--ink-3); }
.tag {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
    font-weight: 700; padding: 3px 8px; border-radius: 3px; flex-shrink: 0;
}
.tag.add { color: var(--pos); background: var(--pos-soft); }
.tag.remove { color: var(--neg); background: var(--neg-soft); }
.tenure { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Confidence chip (watchlist) */
.conf {
    font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.04em; margin-left: 6px;
}

/* ---- Notice / banner / disclaimer ---- */
.notice {
    background: var(--bg-soft);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--ink);
    border-radius: var(--radius-sm);
    padding: 12px 16px; font-size: 13px; color: var(--ink-2);
    margin-bottom: 18px;
}
.disclaimer {
    font-size: 12px; color: var(--ink-3); line-height: 1.55;
    border-top: 1px solid var(--hairline); padding-top: 18px; margin-top: 36px;
}

/* Tabs within index page */
.tabs {
    display: flex; gap: 2px; border-bottom: 1px solid var(--hairline);
    margin: 32px 0 24px; flex-wrap: wrap; position: sticky; top: 62px;
    background: var(--bg); z-index: 10;
}
.tab {
    font-family: inherit; font-size: 14px; font-weight: 600;
    color: var(--ink-3); background: none; border: none;
    padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.tabpanel { display: none; }
.tabpanel.active { display: block; }

/* ---- Compare module ---- */
.compare-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: inherit; font-size: 12.5px; font-weight: 600;
    padding: 6px 13px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--hairline-2); background: var(--bg); color: var(--ink-3);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.4; }
.chip.active { color: var(--ink); border-color: var(--ink); }
.chip.active .dot { opacity: 1; }
.chip.at-cap { opacity: 0.4; cursor: not-allowed; }
.chart-empty {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; text-align: center; color: var(--ink-3);
    font-size: 13px; padding: 20px;
}
/* The `display:flex` above outranks the UA [hidden] rule, so without
   this the "no data" overlay would never actually hide. */
.chart-empty[hidden] { display: none; }
.chart-box { position: relative; min-height: 340px; }

/* ---- Theme leaderboard rows (research) ---- */
.lead-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 0; border-bottom: 1px solid var(--hairline); gap: 12px;
}
.lead-row .nm { font-weight: 600; font-size: 13.5px; }
.lead-row .meta { font-size: 12px; color: var(--ink-3); }
.lead-row .num { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 15px; text-align: right; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 40px; }

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--hairline);
    padding: 36px 0 30px; color: var(--ink-3); font-size: 12.5px;
    margin-top: 24px;
}
.foot-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1.2fr;
    gap: 44px;
}
.foot-brand { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.foot-brand__sub {
    font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--ink-3); margin-left: 8px; vertical-align: middle;
}
.foot-tag { margin-top: 9px; max-width: 42ch; line-height: 1.55; color: var(--ink-3); }
.foot-col h4 {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-3); font-weight: 600; margin: 0 0 11px;
}
.foot-col a { display: block; color: var(--ink-2); padding: 3px 0; }
.foot-col a:hover { color: var(--ink); text-decoration: none; }
.foot-col .foot-src { display: block; padding-top: 6px; line-height: 1.5; color: var(--ink-3); }
.foot-legal {
    margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--hairline);
    line-height: 1.6; max-width: 960px; color: var(--ink-3);
}
@media (max-width: 860px) {
    .foot-grid { grid-template-columns: 1fr; gap: 26px; }
}

/* ---- Toast ---- */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--ink); color: #fff; padding: 12px 18px;
    border-radius: var(--radius); font-size: 13px; z-index: 100; max-width: 90vw;
    box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}
.toast.error { background: var(--neg); }

.empty { color: var(--ink-3); font-size: 13px; padding: 28px 0; text-align: center; }

/* ---- Set-number link to BrickLink (inherits color, no blue) ---- */
.set-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.12s ease;
}
.set-link:hover {
    text-decoration: none;
    border-bottom-color: var(--ink-3);
}

/* ---- Clickable set thumbnails (open lightbox) ---- */
.set-cell img, .mover-row img { cursor: zoom-in; }
.set-thumb { cursor: zoom-in; }

/* ---- Lightbox / set-detail ---- */
.lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 21, 15, 0.78);
    padding: 4vh 4vw;
    animation: lb-fade 0.14s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

/* Scrollable card that holds the enlarged image + breakdown. */
.lightbox__panel {
    background: var(--bg); border-radius: var(--radius);
    width: min(880px, 100%); max-height: 92vh;
    overflow-y: auto;
    padding: 22px 24px 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.lightbox__fig {
    margin: 0 0 4px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.lightbox__fig img {
    max-width: 100%; max-height: 46vh; object-fit: contain;
    background: var(--bg-soft); border-radius: var(--radius-sm);
    padding: 10px;
}
.lightbox__cap {
    font-size: 14px; color: var(--ink); text-align: center; font-weight: 600;
}
.lightbox__close {
    position: absolute; top: 20px; right: 24px;
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.92); color: var(--ink);
    font-size: 26px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
}
.lightbox__close:hover { background: #fff; }

/* "Where to buy" affiliate row (shown for sets, under the caption). */
.lb-buy { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.lb-buy[hidden] { display: none; }
.lb-buy__label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-3); font-weight: 600; margin-bottom: 9px;
}
.lb-buy__links { display: flex; gap: 8px; flex-wrap: wrap; }
.buy-btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; padding: 8px 16px;
    border-radius: var(--radius-sm); text-decoration: none;
    background: var(--ink); color: #fff; border: 1px solid var(--ink);
    transition: opacity 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.buy-btn:hover { opacity: 0.86; text-decoration: none; }
.buy-btn--ghost {
    background: transparent; color: var(--ink-2); border-color: var(--hairline-2);
}
.buy-btn--ghost:hover { opacity: 1; color: var(--ink); border-color: var(--ink-3); }
.lb-buy__disc { font-size: 11px; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }

/* KPI strip: part-out value + how much is tied to minifigs. */
.lb-detail { margin-top: 16px; border-top: 1px solid var(--hairline); padding-top: 16px; }
.lb-detail[hidden] { display: none; }
.lb-kpis {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    background: var(--hairline); border: 1px solid var(--hairline);
    border-radius: var(--radius-sm); overflow: hidden;
}
.lb-kpi { background: var(--bg); padding: 10px 12px; }
.lb-kpi__label { font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-3); }
.lb-kpi__value { font-size: 18px; font-weight: 600; margin-top: 2px; }
.lb-kpi__sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* Minifig share meter. */
.lb-meter { height: 6px; border-radius: 3px; background: var(--bg-sunk); overflow: hidden; margin-top: 8px; }
.lb-meter__fill { height: 100%; background: var(--link); border-radius: 3px; }

.lb-sec { margin-top: 18px; }
.lb-sec[hidden] { display: none; }
.lb-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.lb-sec__title { margin: 0; font-size: 14px; font-weight: 600; }
.lb-sec__meta { font-size: 12px; color: var(--ink-3); }

/* Horizontal scroll rail of cards. */
.lb-rail {
    display: flex; gap: 10px; overflow-x: auto;
    padding-bottom: 8px; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.lb-rail::-webkit-scrollbar { height: 8px; }
.lb-rail::-webkit-scrollbar-thumb { background: var(--hairline-2); border-radius: 4px; }
.lb-card {
    flex: 0 0 auto; width: 116px; scroll-snap-align: start;
    border: 1px solid var(--hairline); border-radius: var(--radius-sm);
    background: var(--bg); padding: 8px; position: relative;
    display: flex; flex-direction: column;
    color: inherit; text-decoration: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.lb-card:hover {
    text-decoration: none; border-color: var(--hairline-2);
    box-shadow: 0 4px 14px rgba(20,21,15,0.10); transform: translateY(-1px);
}
.lb-card:hover .lb-card__name { color: var(--link); }
.lb-card__imgwrap {
    height: 96px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-soft); border-radius: var(--radius-sm); overflow: hidden;
}
.lb-card__imgwrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-card__name {
    font-size: 12px; line-height: 1.3; margin-top: 6px; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 31px;
}
.lb-card__val { font-size: 13px; font-weight: 600; margin-top: 4px; }
.lb-card__meta { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.lb-badge {
    display: inline-block; margin-top: 5px; align-self: flex-start;
    font-size: 9px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700;
    color: var(--link); background: var(--pos-soft);
    padding: 2px 6px; border-radius: 999px;
}

.lb-note { font-size: 12px; color: var(--ink-3); margin: 16px 0 0; }
.lb-note[hidden] { display: none; }

.lb-loading {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    padding: 20px 0 4px; color: var(--ink-3); font-size: 13px;
}
.lb-loading[hidden] { display: none; }
.lb-spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--hairline-2); border-top-color: var(--link);
    animation: lb-spin 0.7s linear infinite;
    display: inline-block; vertical-align: middle;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }

/* Inline "still calculating" placeholder inside a KPI value while the
   parts BOM prices in the background (progressive lightbox load). */
.lb-calc { display: inline-flex; align-items: center; }
.lb-calc .lb-spinner { width: 14px; height: 14px; }

/* Loading rail shown in the parts section during phase-2 pricing. */
.lb-rail-loading {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 4px; color: var(--ink-3); font-size: 13px;
}

/* ---- Theme board (theme column) ---- */
#theme-board-body .theme-tag {
    font-size: 12px; color: var(--ink-3);
}

@media (max-width: 720px) {
    .wrap { padding: 0 16px; }
    .ix-title { font-size: 26px; }
    .ix-level { font-size: 34px; }
    .board .spark { display: none; }
    .topnav a { padding: 8px 8px; }
    .lightbox { padding: 0; }
    .lightbox__panel { width: 100%; max-height: 100vh; border-radius: 0; padding: 18px 16px 22px; }
    .lightbox__close { top: 12px; right: 14px; }
    .lb-kpis { grid-template-columns: repeat(2, 1fr); }
    /* Stack the section header so the title isn't squeezed into a narrow
       column beside its toggle/controls; the control drops full-width below. */
    .section-head { flex-direction: column; align-items: stretch; gap: 12px; }
    .section-head .segmented { align-self: flex-start; flex-wrap: wrap; }
    .section-head .asof { align-self: flex-start; }
}

/* ---- Boot splash (cold-start "warming up") ---- */
.boot-splash {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    padding: 24px;
    animation: lb-fade 0.2s ease;
}
.boot-splash[hidden] { display: none; }
.boot-splash__card {
    max-width: 400px; text-align: center;
}
.boot-splash__mark {
    font-family: var(--serif); font-size: 22px; font-weight: 600;
    letter-spacing: -0.01em; color: var(--ink); margin-bottom: 22px;
}
.boot-splash__spinner {
    width: 26px; height: 26px; margin: 0 auto 18px;
    border: 2px solid var(--hairline-2); border-top-color: var(--link);
    border-radius: 50%; animation: lb-spin 0.7s linear infinite;
}
.boot-splash__msg { font-size: 15px; font-weight: 600; color: var(--ink); }
.boot-splash__sub {
    font-size: 13px; line-height: 1.55; color: var(--ink-3);
    margin-top: 8px; max-width: 34ch; margin-left: auto; margin-right: auto;
}
.boot-splash__card .btn { margin-top: 20px; }

/* ---- Static content pages (About / How it works) ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 22px 0 8px; }
.back-link {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--ink-3); font: inherit; font-size: 13px; margin-bottom: 18px;
}
.back-link:hover { color: var(--ink); }
.doc__title {
    font-family: var(--serif); font-weight: 600; font-size: 34px;
    letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 14px;
}
.doc__lede { font-size: 16px; line-height: 1.65; color: var(--ink-2); margin: 0 0 26px; }
.doc__h {
    font-family: var(--serif); font-weight: 600; font-size: 21px;
    letter-spacing: -0.01em; margin: 30px 0 10px;
    padding-top: 22px; border-top: 1px solid var(--hairline);
}
.doc p { font-size: 15px; line-height: 1.68; color: var(--ink-2); margin: 0 0 14px; }
.doc__list, .doc__steps { margin: 0 0 14px; padding-left: 22px; }
.doc__list li, .doc__steps li { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-bottom: 9px; }
.doc__steps { counter-reset: step; }
.doc strong { color: var(--ink); font-weight: 650; }
.doc__note { font-size: 13.5px; color: var(--ink-3); }
.doc__disclaimer {
    margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--hairline);
    font-size: 12.5px; color: var(--ink-3); line-height: 1.6;
}
.doc a { color: var(--link); }

/* FAQ */
.faq { margin: 4px 0 8px; }
.faq__q { font-weight: 650; color: var(--ink); font-size: 15px; margin-top: 16px; }
.faq__a { font-size: 15px; line-height: 1.62; color: var(--ink-2); margin-top: 5px; }

/* Glossary */
.glossary { margin: 6px 0 8px; }
.glossary dt { font-weight: 650; color: var(--ink); font-size: 14.5px; margin-top: 14px; }
.glossary dd { margin: 3px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }

/* References / appendix */
.ref {
    border: 1px solid var(--hairline); border-radius: 10px;
    padding: 18px 20px; margin: 6px 0 8px; background: var(--card, #fff);
}
.ref__title { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.ref__cite { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.ref__summary { font-size: 14.5px; line-height: 1.66; color: var(--ink-2); margin: 12px 0 0; }
.ref__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 13px; }
.ref__links a { font-size: 13px; font-weight: 600; color: var(--link); text-decoration: none; white-space: nowrap; }
.ref__links a:hover { text-decoration: underline; }

@media (max-width: 720px) {
    .doc__title { font-size: 27px; }
}

