/* components.css — shared component layer (E1 retokenised, 2026-08-22)
   Loads AFTER tokens.css + base.css, BEFORE any page-specific sheet.
   Colours come from tokens.css only — no hard-coded hex below this line.
   The block marked "absorbed from consolidated-cyberpunk.css" keeps that
   retired sheet's component rules in their original cascade position
   (they used to load after this file). See docs/REDESIGN_V3_PLAN.md §6 E1. */


/* ---- composed font stacks (E3, 2026-08-28) ----
   tokens.css is copied verbatim from REDESIGN_V3_PLAN.md Section 5 and must not
   be edited, but --f-display and --f-mono carry no CJK glyphs and both end in a
   generic family, which terminates the fallback chain before Noto Sans TC is
   ever reached.  Any element that can hold Chinese therefore needs a composed
   stack.  These build on the tokens rather than replacing them.

   They lived HERE and not in base.css because blog/index.html (PLAN
   Section 3, out of scope) linked components.css without tokens.css or
   base.css, so anything the shell needed had to be reachable from this
   file.  E1d (2026-08-28) put that page on tokens + base like every
   other page, so that constraint is gone: these two stacks and the
   literal length fallbacks below are now belt-and-braces, not load
   bearing.  Leave them — they cost nothing and they mean a page that
   forgets the tokens link degrades in colour only, never in layout —
   but do not let them shape where new rules go. */
:root {
    --f-display-cjk: 'Chakra Petch', 'Noto Sans TC', sans-serif;
    --f-mono-cjk:    'IBM Plex Mono', 'Noto Sans TC', monospace;
}

/* ============================================================
   Shell — header + nav (E2, 2026-08-27)
   Moved here from the runtime-injected <style> in
   components/header.html, so the shell lives in one place and the
   cascade is predictable instead of "whatever fetch() appends last".

   Contract (docs/REDESIGN_V3_PLAN.md §6 E2 / design_v3 README §5.2):
   - header is a fixed 56px SINGLE ROW at every viewport width;
   - nav always shows which page you are on (active state);
   - below 900px the nav leaves the row and becomes a five-cell
     equal-width tab strip that never scrolls horizontally.

   Active state is pure CSS: each page-specific sheet ends with one
   attribute-selector rule matching its own nav href. That is
   deliberate — the components are injected with innerHTML, so a
   <script> inside them would never execute.

   E3 (2026-08-28) put the shell on the three-family system: logo
   --f-display-cjk, nav and LIVE --f-mono-cjk, sizes off the §5 ladder.

   var(--header-h, 56px) and every var(--t-*, Npx) carry a literal
   fallback. That was mandatory while blog/index.html loaded this file
   without tokens.css (E2 saw the header collapse to ~24px, E3 saw the
   type ladder vanish); E1d fixed that page, so the fallbacks are now a
   guard rather than a requirement.
   ============================================================ */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-h, 56px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 0 28px;
    box-sizing: border-box;
    background: rgba(5, 5, 10, .92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}

/* Main content spacing — clears the fixed header */
main {
    margin-top: calc(var(--header-h, 56px) + 20px);
    padding: 30px 0;
}

/* Scanline effect using pseudo-element */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.5) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.2;
    z-index: 1;
}

header .container {
    max-width: none;
    width: auto;
    margin: 0;
    padding: 0;
    flex: 0 1 auto;
    min-width: 0;
}

header .header-content {
    display: flex;
    align-items: center;
    padding: 0;
    position: static;
}

/* Logo plate — acid ground, notched bottom-right corner (README §5.2) */
.site-title {
    font-size: var(--t-14, 14px);
    font-weight: 700;
    line-height: 1;
    text-align: left;
    position: relative;
    z-index: 2;
}

.site-title a {
    display: inline-block;
    background: var(--acid);
    color: var(--bg);
    padding: 7px 12px 6px;
    letter-spacing: .08em;
    text-decoration: none;
    text-shadow: none;
    animation: none;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
    transition: background .15s ease;
}

.site-title a:hover {
    background: var(--acid-hover);
    color: var(--bg);
    text-shadow: none;
    animation: none;
}

.hdr-right {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 18px;
}

/* Navigation */
header nav {
    position: static;
    top: auto;
    width: auto;
    background: transparent;
    display: flex;
    align-items: center;
}

header nav ul {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    gap: 22px;
    padding: 0;
    margin: 0;
    max-width: none;
}

header nav ul li a {
    display: block;
    color: var(--txt-5);
    text-decoration: none;
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-11, 11px);
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 6px 2px 4px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    text-shadow: none;
    transition: color .15s ease, border-color .15s ease;
}

header nav ul li a::before { content: none; }

header nav ul li a:hover {
    color: var(--txt-2);
    border-bottom-color: var(--line-hi);
    text-shadow: none;
}

/* Active page. The five per-page rules that actually light a nav item up
   live at the bottom of this file (E5a section, scoped by body[data-page]);
   before E5a they sat at the tail of each *-specific-styles.css.
   This aria-current rule is the canonical definition. */
header nav ul li a[aria-current="page"] {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* LIVE indicator (README §5.2) */
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    padding: 5px 9px;
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-10, 10px);
    line-height: 1;
    letter-spacing: .06em;
    color: var(--txt-5);
    white-space: nowrap;
}

/* E6: README §8 blink. steps(1,end) holds each half of the cycle, so the dot
   snaps rather than fades — a status light, not a pulse. The 6px box-shadow
   stays: §5 allows glow on 1px borders and status dots, never on text.
   base.css turns it off under prefers-reduced-motion, leaving opacity 1. */
@keyframes livePulse {
    0%   { opacity: 1; }
    50%  { opacity: .15; }
    100% { opacity: 1; }
}

.live-pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--up);
    box-shadow: 0 0 6px var(--up);
    flex: 0 0 auto;
    animation: livePulse 2s steps(1, end) infinite;
}

/* E6: keyboard focus for the shell. Everything else on the site picked up a
   :focus-visible rule in E4/E5; the injected header and footer never did.
   Drawn inside (negative offset) so it cannot widen an ancestor's scroll box.
   The logo uses --bg because its plate is already solid --acid. */
header nav ul li a:focus-visible,
header .social-links a:focus-visible,
footer a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: -2px;
}

.site-title a:focus-visible {
    outline: 2px solid var(--bg);
    outline-offset: -4px;
}

/* Social links */
header .social-links {
    display: flex;
    align-items: center;
    gap: 12px;
    position: static;
    transform: none;
}

header .social-links svg {
    width: 18px;
    height: 18px;
    fill: var(--cyan);
    filter: drop-shadow(0 0 3px var(--cyan));
    transition: all 0.3s ease;
}

header .social-links a:hover svg {
    fill: var(--acid);
    filter: drop-shadow(0 0 7px var(--acid));
    transform: scale(1.1);
}

/* ---- 1199px and below: still one row, just tighter ---- */
@media (max-width: 1199px) {
    header { padding: 0 20px; }
    .site-title { font-size: var(--t-12, 12px); }
    .site-title a { padding: 6px 10px 5px; }
    header nav ul { gap: 14px; }
    header nav ul li a { font-size: var(--t-10, 10px); letter-spacing: .08em; }
    header .social-links { display: none; }
}

/* ---- 899px and below: nav drops out of the row into a
   five-cell equal-width tab strip. No horizontal scroll. ---- */
@media (max-width: 899px) {
    header { padding: 0 16px; }

    header nav {
        position: absolute;
        top: var(--header-h, 56px);
        left: 0;
        width: 100%;
        background: var(--bg-2, rgba(5, 5, 10, .96));
        border-bottom: 1px solid var(--line);
    }

    header nav ul {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        width: 100%;
        gap: 0;
        overflow: visible;
    }

    header nav ul li { min-width: 0; }

    header nav ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        padding: 0 4px;
        text-align: center;
        overflow: hidden;
    }

    /* The full labels cannot fit five-up on a phone; each link
       carries a short form in data-short (components/nav.html). */
    header nav ul li a[data-short] { font-size: 0; letter-spacing: 0; }
    header nav ul li a[data-short]::after {
        content: attr(data-short);
        font-size: var(--t-10, 10px);
        letter-spacing: .06em;
    }

    main { margin-top: calc(var(--header-h, 56px) + 44px + 16px); }
}

/* ---- 599px and below ---- */
@media (max-width: 599px) {
    header { padding: 0 12px; }
    .site-title { font-size: var(--t-10, 10px); }
    .site-title a { padding: 6px 8px 5px; }
    header nav ul li a[data-short]::after { font-size: var(--t-10, 10px); letter-spacing: .04em; }
    .live-pill { font-size: var(--t-10, 10px); padding: 4px 7px; gap: 5px; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Footer styles */
footer {
    background-color: var(--bg);
    border-top: none;
    padding: 40px 0;
    margin-top: 60px;
}

footer p {
    text-align: center;
    font-size: var(--t-11, 11px);
    color: var(--cyan);
    font-family: var(--f-mono-cjk);
    letter-spacing: .14em;
    line-height: 1.8;
}

footer a {
    color: var(--acid);
    text-decoration: none;
    transition: color 120ms ease, background-color 120ms ease,
                border-color 120ms ease;
}

/* E6: was text-shadow: 0 0 10px var(--acid) - the single rule that put a glow
   on the footer links of every page on the site (BRIEF section 4.19 footnote).
   The live footer paints its links --cyan from components/footer.html, so the
   hover steps up to --cyan-hover there; that file carries the matching rule. */
footer a:hover {
    color: var(--cyan-hover);
}

/* E6 (2026-08-29): @keyframes titlePulse and @keyframes glitch lived here.
   Both animated text-shadow only - titlePulse drove the pulsing three-layer
   glow on the about page title, glitch had zero references site-wide (it was
   already dead before E6). README Section 11: no glow on text. */

/* ============================================================
   Absorbed from consolidated-cyberpunk.css (E1, 2026-08-22).
   Kept here, after this file's own rules, so the cascade order
   these rules used to have (consolidated loaded after components)
   is preserved exactly.
   ============================================================ */

.site-title {
    color: var(--acid);
    font-family: var(--f-display-cjk);
}

/* Card Styles */
.market-card, .market-update-card, .blog-card, .metric-card, .strategy-card {
    background: var(--panel);
    border: 1px solid var(--ac-crypto);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover,
.blog-post:hover,
.strategy-card:hover,
.market-card:hover,
.market-update-card:hover,
.blog-card:hover,
.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--ac-crypto);
}

/* Blog Styles */
.blog-post {
    background: var(--panel);
    border: 1px solid var(--ac-crypto);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-title {
    font-family: var(--f-display-cjk);
    font-size: var(--t-17, 17px);
    color: var(--cyan);
    margin-bottom: 1rem;
}

.blog-meta {
    font-family: var(--f-mono-cjk);
    font-size: var(--t-11, 11px);
    color: var(--acid);
    margin: 1rem 0;
}

.blog-summary {
    color: var(--txt-2);
    line-height: 1.6;
    margin: 1rem 0;
}

.blog-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Market Updates */
.market-updates {
    font-family: var(--f-cjk, 'Noto Sans TC', sans-serif);
}

.market-value {
    font-family: var(--f-display-cjk);
    font-size: var(--t-14, 14px);
    color: var(--txt);
}

.price-up {
    color: var(--up);
}

.price-down {
    color: var(--down);
}

/* Section Styles */
.section-title {
    font-family: var(--f-display-cjk);
    font-size: var(--t-21, 21px);
    color: var(--cyan);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.date-header {
    font-family: var(--f-mono-cjk);
    font-size: var(--t-13, 13px);
    color: var(--cyan);
    margin-bottom: 1.5rem;
}

/* Source Attribution */
.data-source,
.source-text {
    color: var(--txt-3);
    font-size: var(--t-11, 11px);
    text-align: right;
    margin-top: 0.5rem;
}

/* Special Effects */
.neon-text {
    color: var(--cyan);
}

.pixel-text {
    font-family: var(--f-mono-cjk);
    text-transform: uppercase;
}

/* Responsive styles */
/* Responsive styles */
@media (max-width: 768px) {
    .section-title {
        font-size: var(--t-17, 17px);
    }

    /* .timeline-content came out of this list with E8 (2026-09-03): the
       about page rebuild retired that class and no other document in the
       repo carries it. */
    .blog-content,
    .section-content {
        font-size: var(--t-11, 11px);
    }
}


/* ============================================================
   E4 · COMPONENT LIBRARY (2026-08-28)
   Spec: design_v3/README.md §6 (seven components) plus the three
   shell leftovers E2 deferred here (§5.1 hazard bar, §5.4 background
   fields, §5.5 footer). Authority: docs/REDESIGN_V3_PLAN.md §6 E4.

   RULES THIS BLOCK OBEYS
   - Every selector is class-scoped and every class name below was
     grep-verified unused across the repo before it was written, so
     adding this block changes nothing that is already on the site.
     E4 is additive by construction: no existing page, generator or
     component was touched.
   - Colours: var() only, no hex. Sizes: the §5 twelve-step ladder
     only. Fonts: the three composed stacks (--f-cjk / --f-mono-cjk /
     --f-display-cjk) per the E3 role table.
   - README carries four values that are off its own ladder and one
     off-token colour; they are snapped here, following the E3
     precedent (nav 11.5→11, LIVE 10.5→10, table 12.5→13, stat label
     9.5→10):
       section-head 12px            -> --t-12   (already on ladder)
       table names 12.5px           -> --t-13
       card price 16px              -> --t-17
       card gate chips 9.5px        -> --t-10
       stat label 9.5-10.5px        -> --t-10
       button 11.5px                -> --t-11
       lead-callout 15.5-16px       -> --t-17
       mobile stat 20-22px          -> --t-21
       breaching gate border #4a4520-> --line-hi + --acid-tint
   - Motion belongs to E6. The hazard bar ships as static stripes;
     its 2.4s scroll, the LIVE blink and the rest arrive in E6.
   - Nothing here is applied to a page yet. E5 puts these classes on
     the five pages and folds the seven page-specific sheets in.
   ============================================================ */

/* ---- v3 container (README §5: 1240 / gutter 36, 16 below 600) ----
   NOT a replacement for .container above, which 7 live pages use at
   1200/20px. E5 migrates pages from one to the other. */
.cf-wrap {
    max-width: var(--container, 1240px);
    margin: 0 auto;
    padding: 0 var(--gutter, 36px);
}

/* tokens.css notes that the gutter drops to 16px below 600px, but that file
   is copied verbatim from the plan and cannot carry a media query, so the
   narrow gutter lives here. --s-4 is 16px. */
@media (max-width: 599px) {
    .cf-wrap { padding: 0 var(--s-4, 16px); }
}

/* ---- shared focus ring: one visible treatment for the whole system ---- */
.section-head .sh-link:focus-visible,
.btn:focus-visible,
.dt-row:focus-visible,
.chip-link:focus-visible,
.cf-footer a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}


/* ============================================================
   6.1 .section-head
   [4px x 14px acid bar]  LABEL.NAME  ------------ trailing note
   ============================================================ */
.section-head {
    display: flex;
    align-items: center;
    gap: var(--s-3, 12px);
    margin: 0 0 var(--s-4, 16px);
}

.section-head::before {
    content: '';
    flex: 0 0 auto;
    width: 4px;
    height: 14px;
    background: var(--acid);
}

.section-head--core::before { background: var(--cyan); }
.section-head--breach::before { background: var(--down); }

.section-head .sh-label {
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-12, 12px);
    line-height: 1;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--txt);
    white-space: nowrap;
}

.section-head .sh-rule {
    flex: 1;
    height: 1px;
    background: var(--line);
}

.section-head .sh-note {
    flex: 0 0 auto;
    font-family: var(--f-mono-cjk);
    font-weight: 400;
    font-size: var(--t-11, 11px);
    line-height: 1;
    letter-spacing: .1em;
    color: var(--txt-5);
    white-space: nowrap;
}

/* Trailing action link. Padding + negative margin give it a real
   44px-tall hit box without moving anything visually. */
.section-head .sh-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    /* vertical padding only: a horizontal negative margin would push the
       link past the container edge and give the page a few px of overflow */
    padding: var(--s-3, 12px) 0;
    margin: calc(var(--s-3, 12px) * -1) 0;
    min-height: 44px;
    min-width: 44px;
    justify-content: flex-end;
    box-sizing: border-box;
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-11, 11px);
    line-height: 1;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--cyan);
    text-decoration: none;
    text-shadow: none;
    white-space: nowrap;
    transition: color .15s ease;
}

.section-head .sh-link:hover {
    color: var(--cyan-hover);
    text-shadow: none;
}

@media (max-width: 599px) {
    .section-head { gap: var(--s-2, 9px); }
    .section-head .sh-label { letter-spacing: .12em; }
    /* the trailing note is the first thing to go on a phone */
    .section-head .sh-note { display: none; }
}


/* ============================================================
   6.2 .panel — notched bottom-right corner, border not shadow
   ============================================================ */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: var(--s-5, 20px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.panel--raised {
    background: var(--panel-2);
    border-color: var(--line-hi);
}

/* small card: 12px notch (README §6.2 notch scale) */
.panel--card {
    padding: var(--s-4, 16px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

/* inline data panel inside an article body */
.panel--inline {
    background: var(--panel-3);
    padding: var(--s-4, 16px);
}

/* clip-path crops outlines, so an interactive panel shows focus with
   an inset ring instead */
a.panel:focus-visible,
button.panel:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--cyan);
}

a.panel:hover,
button.panel:hover {
    border-color: var(--line-hi);
}

@media (max-width: 599px) {
    .panel { padding: var(--s-4, 16px); }
}


/* ============================================================
   6.3 .data-table (>=900px) / card list (<900px)
   Desktop columns: SYM NAME PRICE 1W 1M 3M VOL DD
   README §6.3. An 8-column table at 390px is not solvable by
   shrinking, so below 900px every row re-flows into a card.
   .dt-meta uses display:contents on desktop so VOL and DD sit in
   the row grid, and becomes a real flex box in card mode.
   ============================================================ */
.data-table {
    width: 100%;
    font-family: var(--f-mono-cjk);
}

.data-table .dt-head,
.data-table .dt-row {
    display: grid;
    grid-template-columns: 56px 1fr 82px 66px 66px 66px 58px 52px;
    align-items: center;
    column-gap: var(--s-2, 9px);
}

.data-table .dt-head {
    font-size: var(--t-10, 10px);
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-6);
    border-bottom: 1px solid var(--line);
    padding-bottom: var(--s-1, 6px);
}

.data-table .dt-row {
    font-size: var(--t-12, 12px);
    font-weight: 400;
    color: var(--txt-2);
    min-height: 44px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-3);
    text-decoration: none;
    transition: background .12s ease;
}

.data-table .dt-row:last-child { border-bottom: none; }

/* tier: CORE reads cyan and hovers cyan, CONFIRMED reads acid */
.data-table .dt-row--core .dt-sym { color: var(--cyan); }
.data-table .dt-row--core:hover { background: var(--cyan-tint); }
.data-table .dt-row--confirmed .dt-sym { color: var(--acid); }
.data-table .dt-row--confirmed:hover { background: var(--acid-tint-2); }

.data-table .dt-sym {
    font-weight: 600;
    font-size: var(--t-13, 13px);
    letter-spacing: .04em;
}

/* names mix Latin and CJK, so they leave the mono stack */
.data-table .dt-name {
    font-family: var(--f-cjk);
    font-size: var(--t-13, 13px);
    color: var(--txt-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table .dt-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table .dt-price { color: var(--txt-2); }
.data-table .up   { color: var(--up); }
.data-table .down { color: var(--down); }

.data-table .dt-meta { display: contents; }

.data-table .dt-gate {
    text-align: right;
    font-size: var(--t-11, 11px);
    color: var(--txt-4);
}

/* the column header carries the name on desktop, so the cell is just the
   number; in card mode there is no header, so data-label supplies it */
.data-table .dt-gate[data-label]::before { content: none; }

/* ---- card list ---- */
@media (max-width: 899px) {
    .data-table .dt-head { display: none; }

    .data-table .dt-row {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "sym  name  price"
            "meta meta  chg";
        row-gap: var(--s-1, 6px);
        column-gap: var(--s-2, 9px);
        padding: var(--s-3, 12px) 0;
        border-bottom: 1px solid var(--line-3);
    }

    .data-table .dt-sym   { grid-area: sym; align-self: start; }
    .data-table .dt-name  { grid-area: name; align-self: start; color: var(--txt-5); }
    .data-table .dt-price { grid-area: price; align-self: start; font-size: var(--t-17, 17px); }
    .data-table .dt-chg   { grid-area: chg; align-self: end; font-size: var(--t-12, 12px); }

    /* README §6.3 shows only VOL / DD / price / one change on a card.
       The other period columns are dropped rather than shrunk.
       E5 decides per page whether that reduction is acceptable. */
    .data-table .dt-drop-sm { display: none; }

    .data-table .dt-meta {
        display: flex;
        grid-area: meta;
        align-items: center;
        gap: var(--s-1, 6px);
    }

    .data-table .dt-gate {
        text-align: left;
        border: 1px solid var(--line);
        padding: 3px 7px;
        font-size: var(--t-10, 10px);
        line-height: 1.2;
        letter-spacing: .06em;
    }

    .data-table .dt-gate[data-label]::before {
        content: attr(data-label) ' ';
        color: var(--txt-6);
    }
}


/* ============================================================
   6.4 .chip — filled = a live verdict, outline = a neutral state
   ============================================================ */
.chip {
    display: inline-flex;
    align-items: center;
    font-family: var(--f-mono-cjk);
    font-weight: 700;
    font-size: var(--t-10, 10px);
    line-height: 1.2;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 4px 9px;
    white-space: nowrap;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.chip--up   { background: var(--up);   color: var(--bg); }
.chip--down { background: var(--down); color: var(--bg); }
.chip--acid { background: var(--acid); color: var(--bg); }

.chip--outline {
    background: transparent;
    border: 1px solid var(--line-hi);
    color: var(--txt-3);
    font-weight: 500;
    clip-path: none;
}

/* kicker: the "// TODAY" section marker */
.chip--kicker {
    background: var(--acid);
    color: var(--bg);
    letter-spacing: .14em;
    padding: 3px 8px;
    clip-path: none;
}

.chip--kicker::before { content: '// '; }

/* An interactive chip must still be a 44x44 touch target, but a chip is
   only ~20px tall by design and padding it out would inflate the visible
   plate. The hit area is therefore an invisible ::after overlay -- the
   chip keeps its designed size, the finger gets 44px.
   (.sh-link can use padding + negative margin instead because it has no
   background or border, so its padding is invisible.) */
a.chip-link {
    position: relative;
    text-decoration: none;
    text-shadow: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

a.chip-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 44px;
    min-width: 44px;
}

a.chip-link:hover { text-shadow: none; }
a.chip-link.chip--acid:hover { background: var(--acid-hover); }
a.chip-link.chip--outline:hover { border-color: var(--cyan); color: var(--cyan); }


/* ============================================================
   6.5 .stat — number over label, hairline grid for groups
   ============================================================ */
.stat { display: block; }

.stat .stat-value {
    display: block;
    font-family: var(--f-display-cjk);
    font-weight: 700;
    font-size: var(--t-26, 26px);
    line-height: 1;
    color: var(--txt);
    font-variant-numeric: tabular-nums;
}

.stat .stat-label {
    display: block;
    margin-top: var(--s-2, 9px);
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-10, 10px);
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--txt-5);
}

.stat--hero .stat-value { font-size: var(--t-72, 72px); }
.stat--lg   .stat-value { font-size: var(--t-32, 32px); }

.stat .stat-value.up   { color: var(--up); }
.stat .stat-value.down { color: var(--down); }
.stat .stat-value.acid { color: var(--acid); }

/* group = 1px gaps over a --line ground, so the dividers are the
   background showing through. No gaps, no shadows. */
.stat-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.stat-group > .stat {
    flex: 1 1 0;
    min-width: 128px;
    background: var(--panel);
    padding: var(--s-4, 16px);
}

@media (max-width: 899px) {
    .stat--hero .stat-value { font-size: var(--t-46, 46px); }
    .stat--lg   .stat-value { font-size: var(--t-26, 26px); }
}

@media (max-width: 599px) {
    .stat--hero .stat-value { font-size: var(--t-32, 32px); }
    .stat .stat-value { font-size: var(--t-21, 21px); }
    .stat-group > .stat { min-width: 0; flex-basis: calc(50% - 1px); padding: var(--s-3, 12px); }
}


/* ============================================================
   6.6 Buttons — primary is acid, ghost is a hairline
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border: 1px solid transparent;
    background: none;
    font-family: var(--f-mono-cjk);
    font-weight: 700;
    font-size: var(--t-11, 11px);
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn:hover { text-shadow: none; }

.btn--primary {
    background: var(--acid);
    border-color: var(--acid);
    color: var(--bg);
}

.btn--primary:hover {
    background: var(--acid-hover);
    border-color: var(--acid-hover);
    color: var(--bg);
}

.btn--ghost {
    border-color: var(--line-hi);
    color: var(--txt-3);
    font-weight: 500;
}

.btn--ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* clip-path crops an outline ring, so buttons focus inward */
.btn:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--cyan);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3, 12px);
}

@media (max-width: 599px) {
    .btn-row { flex-direction: column; gap: 10px; }
    .btn-row > .btn { width: 100%; }
    .btn { padding: 15px 22px; }
}


/* ============================================================
   6.7 .lead-callout — the one sentence that carries the day
   ============================================================ */
.lead-callout {
    border-left: 3px solid var(--acid);
    background: var(--acid-tint);
    padding: var(--s-4, 16px) var(--s-5, 20px);
    font-family: var(--f-cjk);
    font-weight: 400;
    font-size: var(--t-17, 17px);
    line-height: 1.85;
    color: var(--txt-2);
}

/* same device at pull-quote size inside an article body */
.lead-callout--quote {
    font-size: var(--t-21, 21px);
    line-height: 1.7;
    padding: var(--s-5, 20px) var(--s-6, 26px);
}

@media (max-width: 599px) {
    .lead-callout { padding: var(--s-3, 12px) var(--s-4, 16px); }
    .lead-callout--quote { font-size: var(--t-17, 17px); }
}


/* ============================================================
   Shell leftovers E2 deferred to E4 (design_v3 README §5.1 / §5.4 / §5.5)
   Defined only — E5 puts them on the pages, E6 animates the hazard bar.
   ============================================================ */

/* §5.1 hazard bar. E6 (2026-08-29) added README §8's 2.4s scroll.
   Only background-position animates — no layout property moves.
   base.css turns it off under prefers-reduced-motion.

   E6 also added `background-size: 32px 6px`, which BROKE the stripes, fixed
   2026-08-31. The maths: a -45deg gradient with period P along its own axis
   repeats every P / sin(45deg) = P * sqrt(2) measured along X. 32 was not a
   multiple of that, so every 32px tile restarted the pattern mid-stripe and the
   bar rendered as broken stubs with gaps instead of continuous hazard tape.
   Dropping background-size lets one gradient paint the whole bar seamlessly at
   any width; the scroll then has to step by exactly one X-period.
   ⚠️ CHANGE THE STRIPE WIDTH AND YOU MUST RECOMPUTE THE KEYFRAME.
   P = 22px  ->  22 * sqrt(2) = 31.113px  (current)
   P = 16px  ->  16 * sqrt(2) = 22.627px  (previous)
   Do not "tidy" the number to 31 or 32: the seam comes straight back. */
/* Thickness, 2026-08-31: README §5.1 specifies 6px / 5px mobile. At 6px the
   16px stripe period cannot complete a chevron inside the bar's own height, so
   it reads as a row of slivers rather than hazard tape — the user's words were
   "太幼,睇唔出係 hazard line", and they are right. Height and stripe width are
   scaled together (12px with an 11/22px period); raising height alone just
   makes the stripes look dense. Mobile keeps README's 5:6 ratio => 9px.
   The X-period is therefore 22 * sqrt(2) = 31.113px — see the note above. */
@keyframes hazardScroll {
    from { background-position: 0 0; }
    to   { background-position: 31.113px 0; }
}

.hazard {
    height: 12px;
    background: repeating-linear-gradient(-45deg,
                var(--acid) 0 11px, var(--bg) 11px 22px);
    animation: hazardScroll 2.4s linear infinite;
}

@media (max-width: 599px) {
    .hazard { height: 9px; }
}

/* A page whose <main> opens with the hazard rule means the strip to BE the top
   edge of the page, flush under the fixed header — that is what index.html has
   always done. Every other page inherited main's default 20px margin + 30px
   padding, so their hazard floated 50px down in empty black and read as a
   stray divider rather than the top of the page. Keyed on the markup itself
   rather than a data-page list, so a page can never be added and forgotten. */
main:has(> .hazard:first-child) {
    margin-top: var(--header-h, 56px);
    padding-top: 0;
}

@media (max-width: 899px) {
    main:has(> .hazard:first-child) {
        margin-top: calc(var(--header-h, 56px) + 44px);
    }
}

/* §5.4 background fields — two non-interactive overlays.
   Content above them needs position:relative and z-index 8. */
.field-grid,
.field-scan {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.field-grid {
    z-index: 4;
    background:
        repeating-linear-gradient(90deg,  rgba(255,255,255,.015) 0 1px, transparent 1px 48px),
        repeating-linear-gradient(180deg, rgba(255,255,255,.015) 0 1px, transparent 1px 48px);
}

.field-scan {
    z-index: 6;
    background: repeating-linear-gradient(180deg, rgba(255,255,255,.02) 0 1px, transparent 1px 3px);
}

@media (prefers-reduced-motion: reduce) {
    .field-scan { display: none; }
}

/* §5.5 footer — provenance left, [ EOF ] right.
   A separate class from the live footer.cyber-footer, which stays
   exactly as it is until E5 swaps the markup in components/footer.html. */
.cf-footer {
    border-top: 1px solid var(--line);
    padding: var(--s-6, 26px) 0;
    background: none;
    margin-top: 0;
}

.cf-footer .cf-footer-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-4, 16px);
    font-family: var(--f-mono-cjk);
    font-weight: 400;
    font-size: var(--t-11, 11px);
    line-height: 1.8;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--txt-6);
}

.cf-footer .cf-footer-eof {
    flex: 0 0 auto;
    color: var(--acid);
}

.cf-footer a {
    color: var(--txt-6);
    text-decoration: none;
    text-shadow: none;
    transition: color .15s ease;
}

.cf-footer a:hover { color: var(--cyan); text-shadow: none; }

@media (max-width: 599px) {
    .cf-footer .cf-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s-2, 9px);
        letter-spacing: .1em;
    }
}



/* ============================================================
   Shell — telemetry strip (design_v3 README §5.3)
   E2 deferred this one because it must carry real values, never
   decoration (Constitution A2 + E5 acceptance "no hard-coded
   figures"). E5.1 is the first page to feed it, so it is defined
   here unscoped and E5.2–E5.4 reuse it as-is.
   The cells are written by the page's own script; the strip stays
   hidden until at least one cell has a real value.
   ============================================================ */
.cf-telemetry {
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
}

.cf-telemetry[hidden] { display: none; }

.cf-telemetry .cf-telemetry-row {
    display: flex;
    align-items: stretch;
    min-height: var(--telemetry-h, 34px);
}

.cf-telemetry .cf-tm-cell {
    display: flex;
    align-items: center;
    gap: var(--s-2, 9px);
    min-width: 0;
    padding: var(--s-1, 6px) var(--s-4, 16px);
    border-right: 1px solid var(--line-2);
}

.cf-telemetry .cf-tm-cell:first-child { padding-left: 0; }
.cf-telemetry .cf-tm-cell:last-child  { border-right: none; }

/* the last cell takes the slack so the dividers hug the values */
.cf-telemetry .cf-tm-wide { flex: 1 1 auto; }

.cf-telemetry .cf-tm-k,
.cf-telemetry .cf-tm-v {
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-10, 10px);
    line-height: 1.4;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.cf-telemetry .cf-tm-k { color: var(--txt-5); white-space: nowrap; }

.cf-telemetry .cf-tm-v {
    color: var(--txt-2);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* README §5.3: on a phone the strip collapses to two cells, AS OF first. */
@media (max-width: 599px) {
    .cf-telemetry .cf-tm-cell { padding: var(--s-1, 6px) var(--s-3, 12px); }
    .cf-telemetry .cf-tm-cell:first-child { padding-left: 0; }
    .cf-telemetry .cf-tm-cell:nth-child(n+3) { display: none; }
}

/* ============================================================
   Documentation page scaffolding — /docs/components.html only.
   Not part of the design system and not used by any site page.
   It lives here rather than in a page <style> block so the demo
   proves the "three stylesheets, no page styles" end state instead
   of quietly breaking it on day one. E5 may move it.
   ============================================================ */
.cmpdoc-sec { margin: 0 0 var(--s-9, 44px); }

.cmpdoc-note {
    font-family: var(--f-mono-cjk);
    font-size: var(--t-11, 11px);
    line-height: 1.7;
    letter-spacing: .04em;
    color: var(--txt-5);
    margin: 0 0 var(--s-3, 12px);
}

.cmpdoc-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3, 12px);
    margin: 0 0 var(--s-3, 12px);
}

.cmpdoc-stack > * + * { margin-top: var(--s-4, 16px); }

.cmpdoc-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--s-4, 16px);
}

.cmpdoc-lede {
    font-family: var(--f-cjk);
    font-size: var(--t-17, 17px);
    line-height: 1.9;
    color: var(--txt-3);
    margin: 0 0 var(--s-6, 26px);
}

.cmpdoc-main { position: relative; z-index: 8; }

/* ============================================================
   E5a - FOLDED PAGE LAYERS (2026-08-28)
   The seven page-specific stylesheets and the five hand-written
   pages' inline <style> blocks, moved here verbatim and scoped
   with :where(body[data-page=...]) - which contributes ZERO
   specificity, so every rule keeps the weight it had before.
   Order matters: each page's sheet comes before that page's
   former inline block, exactly as the cascade saw them.
   Originals: assets/css/archive/*.css
   ============================================================ */


/* ---------- home : E5.1 TODAY PAGE (2026-08-28) ----------
   Replaces the folded scrolling-story.css + two inline blocks that E5a
   parked here. Per PLAN §6 E5 ("重排完某一頁 = 順手清走佢喺 E5a 段嗰嚿舊
   規則"), the retired hero banner, .section-title, .market-update-card,
   .arrow-right, .d3-label and .d3-chart-card rules are gone rather than
   left behind; the terminal, FUN ZONE, market-snapshot ticker and
   archive-card rules are carried over verbatim because the markup and
   the JS that writes it are unchanged.
   Page layout follows design_v3 README §7.1. Breakpoints are the system
   ones (1199 / 899 / 599); the old 768px query is retired with it. */

/* This page is built from live data at runtime. Anything that has no
   real source stays out of the document, so the guards below have to
   beat the display rules that follow (Constitution A2). */
:where(body[data-page="home"]) .home-hero[hidden],
:where(body[data-page="home"]) .hv[hidden] { display: none; }

/* the telemetry strip sits flush under the fixed header on this page */
:where(body[data-page="home"]) main {
    margin-top: var(--header-h, 56px);
    padding-top: 0;
    padding-bottom: var(--s-9, 44px);
}

@media (max-width: 899px) {
    :where(body[data-page="home"]) main {
        margin-top: calc(var(--header-h, 56px) + 44px);
    }
}

:where(body[data-page="home"]) .home-sec { padding: var(--s-8, 36px) 0 0; }


/* ---- hero (README §7.1 block 2): 1fr 402px, 1px divider ---- */
:where(body[data-page="home"]) .home-hero {
    padding: var(--s-7, 32px) 0 var(--s-6, 26px);
    border-bottom: 1px solid var(--line);
}

:where(body[data-page="home"]) .home-hero-grid {
    display: grid;
    grid-template-columns: 1fr 402px;
}

:where(body[data-page="home"]) .hh-main { min-width: 0; padding-right: var(--s-8, 36px); }

:where(body[data-page="home"]) .hh-side {
    min-width: 0;
    padding-left: var(--s-8, 36px);
    border-left: 1px solid var(--line);
}

@media (max-width: 899px) {
    :where(body[data-page="home"]) .home-hero-grid { grid-template-columns: 1fr; }
    :where(body[data-page="home"]) .hh-main { padding-right: 0; }
    :where(body[data-page="home"]) .hh-side {
        padding-left: 0;
        padding-top: var(--s-6, 26px);
        margin-top: var(--s-6, 26px);
        border-left: none;
        border-top: 1px solid var(--line);
    }
}

:where(body[data-page="home"]) .hh-kicker {
    display: flex;
    align-items: center;
    gap: var(--s-3, 12px);
    margin-bottom: var(--s-4, 16px);
}

:where(body[data-page="home"]) .hh-kicker-note {
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-11, 11px);
    line-height: 1;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--txt-5);
}

/* the headline is Chinese body-family 900, not the display face, and it
   overrides the base.css h1 cyan glow (README §11: no glow on text) */
:where(body[data-page="home"]) .hh-title {
    margin: 0 0 var(--s-2, 9px);
    font-family: var(--f-cjk);
    font-weight: 900;
    font-size: var(--t-40, 40px);
    line-height: 1.24;
    text-transform: none;
    text-shadow: none;
}

:where(body[data-page="home"]) .hh-title .hh-lead-link {
    color: var(--txt);
    text-decoration: none;
    text-shadow: none;
    transition: color .12s ease;
}

:where(body[data-page="home"]) .hh-title .hh-lead-link:hover { color: var(--cyan); }

:where(body[data-page="home"]) .hh-title .hh-lead-link:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

:where(body[data-page="home"]) .hh-lead-meta {
    margin-bottom: var(--s-5, 20px);
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-11, 11px);
    line-height: 1.4;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-5);
}

/* numbered story list: 2px transparent left border that lights up on hover */
:where(body[data-page="home"]) .hh-list {
    margin: 0 0 var(--s-6, 26px);
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line-2);
}

:where(body[data-page="home"]) .hh-list li { border-bottom: 1px solid var(--line-2); }

:where(body[data-page="home"]) .hh-list a {
    display: flex;
    align-items: baseline;
    gap: var(--s-3, 12px);
    min-height: 44px;
    padding: var(--s-3, 12px);
    border-left: 2px solid transparent;
    text-decoration: none;
    text-shadow: none;
    transition: border-color .12s ease, background .12s ease;
}

:where(body[data-page="home"]) .hh-list a:hover {
    border-left-color: var(--cyan);
    background: var(--cyan-tint);
}

:where(body[data-page="home"]) .hh-list a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: -2px;
}

/* §4 colour code: 01–03 are acid, 04 and beyond are grey */
:where(body[data-page="home"]) .hh-idx {
    flex: 0 0 auto;
    font-family: var(--f-display-cjk);
    font-weight: 700;
    font-size: var(--t-13, 13px);
    line-height: 1.6;
    color: var(--txt-6);
    font-variant-numeric: tabular-nums;
}

:where(body[data-page="home"]) .hh-idx.is-top { color: var(--acid); }

:where(body[data-page="home"]) .hh-row-title {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--f-cjk);
    font-size: var(--t-14, 14px);
    line-height: 1.7;
    color: var(--txt-3);
    transition: color .12s ease;
}

:where(body[data-page="home"]) .hh-list a:hover .hh-row-title { color: var(--txt-2); }

:where(body[data-page="home"]) .hh-row-src {
    flex: 0 0 auto;
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-11, 11px);
    line-height: 1.6;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--txt-5);
    white-space: nowrap;
}


/* ---- HOUSE.VIEW panel (right column) ---- */
:where(body[data-page="home"]) .hv .hv-list {
    margin: var(--s-4, 16px) 0 var(--s-4, 16px);
    padding: 0;
    list-style: none;
}

:where(body[data-page="home"]) .hv .hv-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3, 12px);
    min-height: 44px;
    border-bottom: 1px solid var(--line-2);
}

:where(body[data-page="home"]) .hv .hv-list li:last-child { border-bottom: none; }

:where(body[data-page="home"]) .hv-name {
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-12, 12px);
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--txt-3);
}

/* verdict colour is a data direction, never decoration (README §4) */
:where(body[data-page="home"]) .hv-verdict {
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-12, 12px);
    line-height: 1.4;
    letter-spacing: .08em;
    color: var(--txt-4);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

:where(body[data-page="home"]) .hv-verdict.up   { color: var(--up); }
:where(body[data-page="home"]) .hv-verdict.down { color: var(--down); }

:where(body[data-page="home"]) .hv-more {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-11, 11px);
    line-height: 1;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--cyan);
    text-decoration: none;
    text-shadow: none;
    transition: color .12s ease;
}

:where(body[data-page="home"]) .hv-more:hover { color: var(--cyan-hover); }

:where(body[data-page="home"]) .hv-more:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

/* README §7.6: on a phone the house view becomes a 2x3 hairline grid */
@media (max-width: 599px) {
    :where(body[data-page="home"]) .hv .hv-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        background: var(--line);
        border: 1px solid var(--line);
    }
    :where(body[data-page="home"]) .hv .hv-list li {
        display: block;
        min-height: 0;
        padding: var(--s-3, 12px);
        background: var(--panel-2);
        border-bottom: none;
    }
    :where(body[data-page="home"]) .hv-verdict { display: block; margin-top: var(--s-1, 6px); }
}


/* ---- market snapshot ticker (D3 markup + JS unchanged) ---- */
:where(body[data-page="home"]) .d3-ticker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
:where(body[data-page="home"]) .d3-tk { background: var(--panel-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 4px; }
:where(body[data-page="home"]) .d3-tk .n { font-family: var(--f-mono-cjk); font-size: var(--t-10); color: var(--txt-4); }
:where(body[data-page="home"]) .d3-tk .v { font-size: var(--t-21); font-weight: 700; margin-top: 6px; color: var(--txt-2); }
:where(body[data-page="home"]) .d3-tk .c { font-size: var(--t-14); }
:where(body[data-page="home"]) .d3-tk .c.up { color: var(--up); }
:where(body[data-page="home"]) .d3-tk .c.down { color: var(--down); }

@media (max-width: 899px) {
    :where(body[data-page="home"]) .d3-ticker { grid-template-columns: repeat(3, 1fr); }
}


/* ---- archive cards (D5 markup + JS unchanged) ---- */
:where(body[data-page="home"]) .li-sub { color: var(--txt-4); font-size: var(--t-14); margin: 0 0 1.2rem; }
:where(body[data-page="home"]) a.li-card { display: block; text-decoration: none; background: var(--panel);
    border: 1px solid rgba(0, 214, 196, .18); border-radius: 8px; padding: 1.1rem 1.3rem;
    margin-bottom: 1.1rem; transition: border-color .25s, transform .25s; }
:where(body[data-page="home"]) a.li-card:hover { border-color: var(--cyan); transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 214, 196, .25); }
:where(body[data-page="home"]) .li-card-date { font-family: var(--f-mono-cjk); font-size: var(--t-10);
    color: var(--cyan); letter-spacing: 1px; }
:where(body[data-page="home"]) .li-card-title { color: var(--txt-2); font-weight: 700; font-size: var(--t-17); margin: .45rem 0 .35rem; }
:where(body[data-page="home"]) .li-card-preview { color: var(--txt-4); font-size: var(--t-14); line-height: 1.65; }


/* ---- crypto indicators (README §7.1 block 3) ----
   README describes "1.6fr 1fr 1fr" with a promoted first cell. That cell was
   specced as a numeric Fear & Greed hero; the site publishes the chart as a PNG
   and no F&G number as data, so the promoted cell is the same chart at 1.6x
   width instead of an invented figure (Constitution A2, user decision
   2026-08-28). Two rows of three keeps the block square - a row-spanning
   promoted tile would leave an empty half-panel under it. */
:where(body[data-page="home"]) .hi-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: var(--s-3, 12px);
}

:where(body[data-page="home"]) a.hi-card {
    display: block;
    text-decoration: none;
    text-shadow: none;
}

:where(body[data-page="home"]) .hi-card .hi-t {
    display: block;
    margin-bottom: var(--s-2, 9px);
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-10, 10px);
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cyan);
}

:where(body[data-page="home"]) .hi-card img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line-2);
}

@media (max-width: 899px) {
    :where(body[data-page="home"]) .hh-title { font-size: var(--t-32, 32px); }
    :where(body[data-page="home"]) .hi-grid { grid-template-columns: 1fr 1fr; }
    :where(body[data-page="home"]) .hi-grid > .hi-hero { grid-column: 1 / -1; }
}

@media (max-width: 599px) {
    :where(body[data-page="home"]) .hi-grid { grid-template-columns: 1fr; }
    :where(body[data-page="home"]) .hi-grid > .hi-hero { grid-column: auto; }
}


/* ---- FUN ZONE (markup + both life-support ids unchanged) ---- */
:where(body[data-page="home"]) .d3-fun { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
:where(body[data-page="home"]) .d3-fun-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
:where(body[data-page="home"]) .d3-fun-card .t { font-family: var(--f-mono-cjk); font-size: var(--t-10);
    color: var(--acid); margin-bottom: 12px; text-align: center; }

@media (max-width: 899px) {
    :where(body[data-page="home"]) .d3-fun { grid-template-columns: 1fr; }
}


/* ---- terminal self-introduction (carried over verbatim) ---- */
/* ---- phone: type steps down the §5 ladder, nothing leaves it ---- */
@media (max-width: 599px) {
    :where(body[data-page="home"]) .hh-title { font-size: var(--t-26, 26px); }
    :where(body[data-page="home"]) .hh-row-src { display: none; }
}

/* ---------- daily : E5.2 Global Daily (2026-08-28) ----------
   REPLACES the folded daily-specific-styles.css block. The page was rebuilt on
   the E4 component library, so .page-title / .date-header / .quick-overview /
   .overview-card / .market-value have no markup left to style and are cleared
   rather than left to rot (PLAN §6 E5: "重排完某一頁 = 清走佢喺 E5a 段嗰嚿").
   What survives is what the generator can still emit: the crypto prose
   fallback (.market-section) and the macro list.

   The three inline <style> blocks sync-daily.js used to print (reading size /
   mkt tab bar / crypto table) are gone. The tab bar and the crypto table have
   no markup left either — the crypto table is now the .data-table component —
   so only the reading-size rules survive, folded in below at their E3 values
   (17px / 1.9, design_v3 README §7.5).

   Everything here is prefixed with :where() so it carries zero specificity,
   exactly like the rest of this section. */

/* ---- page header ---- */
:where(body[data-page="daily"]) .dl-head {
    padding: var(--s-8, 36px) 0 var(--s-6, 26px);
}

:where(body[data-page="daily"]) .dl-kicker { margin: 0 0 var(--s-3, 12px); }

/* base.css gives h1 a cyan colour, uppercase and a glow. The v3 headline is a
   white CJK 900 and text never glows (README §11), so all three are reset
   explicitly — an h1 that inherits the base rule comes out cyan and shining. */
:where(body[data-page="daily"]) .dl-title {
    margin: 0;
    font-family: var(--f-cjk);
    font-weight: 900;
    font-size: var(--t-40, 40px);
    line-height: 1.15;
    letter-spacing: normal;
    text-transform: none;
    color: var(--txt);
    text-shadow: none;
    animation: none;
}

:where(body[data-page="daily"]) .dl-date {
    margin: var(--s-2, 9px) 0 0;
    font-family: var(--f-mono-cjk);
    font-size: var(--t-11, 11px);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-5);
}

/* ---- tier count strip: the colours ARE the tier colours (README §6.3),
        and OBSERVING is dim because it is the one tier deliberately absent
        from the table below ---- */
:where(body[data-page="daily"]) .dl-tiers { margin-top: var(--s-5, 20px); }
:where(body[data-page="daily"]) .dl-tiers > .stat { min-width: 0; }
:where(body[data-page="daily"]) .dl-tier--core .stat-value      { color: var(--cyan); }
:where(body[data-page="daily"]) .dl-tier--confirmed .stat-value { color: var(--acid); }

/* ---- index snapshot strip ---- */
:where(body[data-page="daily"]) .dl-idx .stat-label { margin-top: 0; }

:where(body[data-page="daily"]) .dl-idx .stat-value {
    margin-top: var(--s-1, 6px);
    font-size: var(--t-21, 21px);
    color: var(--txt-2);
}

:where(body[data-page="daily"]) .dl-idx-chg {
    display: block;
    margin-top: 4px;
    font-family: var(--f-mono-cjk);
    font-size: var(--t-11, 11px);
    font-variant-numeric: tabular-nums;
    color: var(--txt-4);
}

:where(body[data-page="daily"]) .dl-idx-chg.up   { color: var(--up); }
:where(body[data-page="daily"]) .dl-idx-chg.down { color: var(--down); }

/* ---- blocks and the two-column body ---- */
:where(body[data-page="daily"]) .dl-block { margin: 0 0 var(--s-8, 36px); }
:where(body[data-page="daily"]) .dl-block .section-head { margin-bottom: var(--s-4, 16px); }

:where(body[data-page="daily"]) .dl-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: var(--s-7, 32px);
    align-items: start;
}

:where(body[data-page="daily"]) .dl-cols--solo { grid-template-columns: minmax(0, 1fr); }
:where(body[data-page="daily"]) .dl-main { min-width: 0; }
:where(body[data-page="daily"]) .dl-side-block { margin: 0 0 var(--s-6, 26px); }
:where(body[data-page="daily"]) .dl-side-block:last-child { margin-bottom: 0; }

:where(body[data-page="daily"]) .dl-src {
    margin: 0 0 var(--s-8, 36px);
    font-family: var(--f-mono-cjk);
    font-size: var(--t-10, 10px);
    letter-spacing: .06em;
    color: var(--txt-6);
}

/* ---- table variants.
        These override .data-table's own grid, and E4 defines the <900px card
        layout inside a media query that sits EARLIER in this file — so an
        unguarded override here would win at every width and destroy card mode.
        Both variants are therefore scoped to the desktop range. ---- */
@media (min-width: 900px) {
    /* no registry yet -> only SYM NAME PRICE 1W exist, so the 8-column grid
       would leave four empty tracks */
    :where(body[data-page="daily"]) .data-table--slim .dt-head,
    :where(body[data-page="daily"]) .data-table--slim .dt-row {
        grid-template-columns: 56px minmax(0, 1fr) 92px 72px;
    }

    /* # SYM NAME PRICE 24H 7D MCAP DOM */
    :where(body[data-page="daily"]) .data-table--crypto .dt-head,
    :where(body[data-page="daily"]) .data-table--crypto .dt-row {
        grid-template-columns: 32px 62px minmax(0, 1fr) 96px 70px 70px 88px 62px;
    }
}

:where(body[data-page="daily"]) .data-table--crypto .dt-rank {
    font-size: var(--t-11, 11px);
    color: var(--txt-6);
    font-variant-numeric: tabular-nums;
}

:where(body[data-page="daily"]) .dl-crypto-meta {
    margin: 0 0 var(--s-4, 16px);
    font-family: var(--f-mono-cjk);
    font-size: var(--t-11, 11px);
    color: var(--txt-4);
}

/* The GATES panel, the OBSERVING callout / tier cell and the .dt-gate breach
   highlight were removed 2026-08-31 together with their generators in
   sync-daily.js: promotion thresholds and pipeline candidates are how the
   watchlist is maintained, not what a reader came to read. .dt-gate itself
   stays — it still renders the plain VOL / DD numbers. */

/* ---- sidebar: THEMES.
        The bar is a quantity, not a verdict, so it stays neutral — yellow on
        this page means "breached a published threshold" and nothing else
        (README §4). ---- */
:where(body[data-page="daily"]) .dl-theme {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px var(--s-2, 9px);
    align-items: center;
    margin-bottom: var(--s-3, 12px);
}

:where(body[data-page="daily"]) .dl-theme:last-child { margin-bottom: 0; }

:where(body[data-page="daily"]) .dl-theme-k {
    font-family: var(--f-mono-cjk);
    font-size: var(--t-11, 11px);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--txt-4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:where(body[data-page="daily"]) .dl-theme-n {
    font-family: var(--f-mono-cjk);
    font-size: var(--t-11, 11px);
    color: var(--txt-2);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

:where(body[data-page="daily"]) .dl-theme-bar {
    grid-column: 1 / -1;
    display: block;
    height: 5px;
    background: var(--line-2);
}

:where(body[data-page="daily"]) .dl-theme-fill {
    display: block;
    height: 100%;
    background: var(--txt-5);
}

/* ---- sidebar: LAST CHANGE ---- */
:where(body[data-page="daily"]) .dl-lc-head {
    margin: 0 0 var(--s-3, 12px);
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-11, 11px);
    letter-spacing: .1em;
}

:where(body[data-page="daily"]) .dl-lc-head.up   { color: var(--up); }
:where(body[data-page="daily"]) .dl-lc-head.down { color: var(--down); }

:where(body[data-page="daily"]) .dl-lc-item {
    margin: 0;
    font-family: var(--f-cjk);
    font-size: var(--t-13, 13px);
    color: var(--txt-3);
}

:where(body[data-page="daily"]) .dl-lc-sym {
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    color: var(--acid);
}

:where(body[data-page="daily"]) .dl-lc-move {
    font-family: var(--f-mono-cjk);
    font-size: var(--t-10, 10px);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--txt-5);
}

:where(body[data-page="daily"]) .dl-lc-why {
    margin: 3px 0 var(--s-3, 12px);
    font-family: var(--f-cjk);
    font-size: var(--t-11, 11px);
    line-height: 1.7;
    color: var(--txt-5);
}

:where(body[data-page="daily"]) .dl-lc-why:last-child { margin-bottom: 0; }

/* ---- kept from the folded sheet: the crypto prose fallback and the macro
        list are the only two things the generator can still emit with this
        markup. Reading size folded in from the deleted inline <style>. ---- */
:where(body[data-page="daily"]) .market-section {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: var(--s-5, 20px);
    margin-bottom: var(--s-8, 36px);
}

:where(body[data-page="daily"]) .market-section h2 {
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-12, 12px);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--txt);
    text-shadow: none;
    margin: 0 0 var(--s-4, 16px);
}

:where(body[data-page="daily"]) .market-content {
    font-family: var(--f-cjk);
    font-size: var(--t-17, 17px);
    line-height: 1.9;
    color: var(--txt-3);
}

:where(body[data-page="daily"]) .macro-list { list-style: none; padding: 0; margin: 0; }

:where(body[data-page="daily"]) .macro-item {
    font-family: var(--f-cjk);
    font-size: var(--t-17, 17px);
    line-height: 1.9;
    color: var(--txt-3);
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

:where(body[data-page="daily"]) .macro-item::before {
    content: "→";
    margin-right: 0.5rem;
    color: var(--cyan);
}

/* ---- telemetry: this page feeds the strip four cells, and four long values
        do not fit below the full container. Left to flex-shrink they all
        truncate at once (AS OF collapsed to a 19px stub at 600px), so instead
        the cells stop shrinking and the least load-bearing one is dropped
        first. Scoped to this page: the component itself is shared with the
        Today page, which feeds it shorter values. ---- */
@media (max-width: 1239px) {
    :where(body[data-page="daily"]) .cf-telemetry .cf-tm-cell { flex: 0 0 auto; }
    :where(body[data-page="daily"]) .cf-telemetry .cf-tm-cell:nth-child(4) { display: none; }
    :where(body[data-page="daily"]) .cf-telemetry .cf-tm-cell:nth-child(3) { border-right: none; }
}

@media (max-width: 899px) {
    :where(body[data-page="daily"]) .cf-telemetry .cf-tm-cell:nth-child(n+3) { display: none; }
    /* the two survivors still exceed 358px on a 390px phone. AS OF keeps its
       full width (a half-printed date is worse than no date) and the counts
       cell is the one allowed to ellipsise. */
    :where(body[data-page="daily"]) .cf-telemetry .cf-tm-cell:nth-child(2) {
        flex: 0 1 auto;
        min-width: 0;
        border-right: none;
    }
}

/* ---- 900-1239: the two-column body still holds, but the main column drops to
        ~496px there and the 8-track watchlist grid needs ~509px, so the table
        overflowed by 13px at exactly 900. The sidebar gives back 40px and the
        numeric tracks tighten; below 900 the card layout takes over anyway. ---- */
@media (min-width: 900px) and (max-width: 1239px) {
    :where(body[data-page="daily"]) .dl-cols {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: var(--s-6, 26px);
    }

    :where(body[data-page="daily"]) .dl-main .data-table .dt-head,
    :where(body[data-page="daily"]) .dl-main .data-table .dt-row {
        grid-template-columns: 52px minmax(0, 1fr) 74px 58px 58px 58px 52px 46px;
        column-gap: var(--s-1, 6px);
    }
}

/* ---- responsive: E2 system breakpoints (899 / 599), not the old 768 ---- */
@media (max-width: 899px) {
    :where(body[data-page="daily"]) .dl-cols { grid-template-columns: minmax(0, 1fr); }
    :where(body[data-page="daily"]) .dl-title { font-size: var(--t-32, 32px); }
}

@media (max-width: 599px) {
    :where(body[data-page="daily"]) .dl-head { padding: var(--s-6, 26px) 0 var(--s-5, 20px); }
    :where(body[data-page="daily"]) .dl-title { font-size: var(--t-26, 26px); }
    /* README §7.6: stat strips go 3-up on a phone */
    :where(body[data-page="daily"]) .dl-idx-group > .stat,
    :where(body[data-page="daily"]) .dl-tiers > .stat { flex-basis: calc(33.333% - 1px); }
    :where(body[data-page="daily"]) .dl-idx .stat-value { font-size: var(--t-17, 17px); }
    :where(body[data-page="daily"]) .market-content,
    :where(body[data-page="daily"]) .macro-item { font-size: var(--t-14, 14px); }
}

/* Nav active state (E2, 2026-08-27; re-homed on body[data-page] by E5a) —
   pages/daily.html. Pure CSS: the components are injected with innerHTML, so a
   <script> inside components/nav.html would never run.
   See components.css "Shell — header + nav". */
:where(body[data-page="daily"]) header nav ul li a[href$="/pages/daily.html"] {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}


/* ============================================================
   E5.4 · CRYPTO DAILY (2026-08-28) — design_v3 README §7.4
   Replaces the ENTIRE E5a crypto block (the folded
   crypto-specific-styles.css plus its former inline <style>):
   cleared, not appended to (PLAN §6 E5).
   Every rule is :where(body[data-page="crypto"]) — zero specificity,
   so nothing here can outrank a component rule by accident.

   Retired with the old markup: .metrics-grid · .metric-card ·
   .metric-header · .metric-title · .metric-content · .graph-container ·
   .graph-source · .how-to-use · .info-grid · .pros · .cons ·
   .description · .modal/.modal-content/.modal-close · .section-title
   (this page's copy) · .container (replaced by .cf-wrap) ·
   .content-section / .pixel-border wrappers — and the .page-title rule
   that carried a three-layer text-shadow glow plus titlePulse
   (README §11: never put glow on text). Three glows go to zero here.
   The old markup was the only user of all of them; the one script that
   still parses .metric-card / .metric-title is MarketDashboard.js, an
   unreferenced React/artifact leftover no page loads (verified by grep).

   Layout: ten indicator cards in three tiers, largest first, per the
   PLAN §6 E5 acceptance line "十個 crypto 指標有主次,唔係等權重".
   The tiers differ by chart height, and each tier's card count matches
   its column count exactly so no row is left with a hole.
   ============================================================ */

/* Nav active state (E2, 2026-08-27; re-homed on body[data-page] by E5a;
   CARRIED ACROSS by E5.4) — pages/crypto.html. This rule lives inside the
   page's own block, so clearing the block would silently take the active
   state with it (BRIEF §4.15 — E5.3 did exactly that and shipped a page
   with no active nav until the regression caught it). It belongs to this
   page and moves with it.
   Pure CSS: the components are injected with innerHTML, so a <script>
   inside components/nav.html would never run.
   See components.css "Shell — header + nav". */
:where(body[data-page="crypto"]) header nav ul li a[href$="/pages/crypto.html"] {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* [hidden] has to win over the component's own display value: the stat
   group is a flex box, a stat is a flex item and the lightbox is a flex
   overlay, so the UA's display:none for [hidden] would otherwise lose. */
:where(body[data-page="crypto"]) .cd-stats[hidden],
:where(body[data-page="crypto"]) .cd-stats > .stat[hidden],
:where(body[data-page="crypto"]) .cd-modal[hidden] { display: none; }


/* ---- telemetry: three cells, and SOURCES is long. Left to flex-shrink
        they all truncate together below the full container (BRIEF §4.13,
        the bug E5.2 found on the Global Daily page), so the cells stop
        shrinking and the least load-bearing one is dropped first. Scoped
        to this page: the component is shared with pages that feed it
        shorter values. ---- */
@media (max-width: 1239px) {
    :where(body[data-page="crypto"]) .cf-telemetry .cf-tm-cell { flex: 0 0 auto; }
    :where(body[data-page="crypto"]) .cf-telemetry .cf-tm-wide { flex: 0 1 auto; min-width: 0; }
}

@media (max-width: 899px) {
    /* SOURCES goes; AS OF and the indicator count both fit whole. */
    :where(body[data-page="crypto"]) .cf-telemetry .cf-tm-wide { display: none; }
    :where(body[data-page="crypto"]) .cf-telemetry .cf-tm-cell:nth-last-child(2) { border-right: none; }
}


/* ============ page head ============ */
:where(body[data-page="crypto"]) .cd-head { padding: var(--s-7, 32px) 0 var(--s-8, 36px); }

:where(body[data-page="crypto"]) .cd-kicker { margin: 0 0 var(--s-3, 12px); line-height: 1; }

/* base.css gives every h1 --cyan + a 10px glow + uppercase, so a page
   headline has to say otherwise explicitly (BRIEF §4.10). */
:where(body[data-page="crypto"]) .cd-title {
    font-family: var(--f-cjk);
    font-weight: 900;
    font-size: var(--t-40, 40px);
    line-height: 1.15;
    text-transform: none;
    color: var(--txt);
    text-shadow: none;
    animation: none;
    margin: 0 0 var(--s-3, 12px);
}

:where(body[data-page="crypto"]) .cd-meta {
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-11, 11px);
    line-height: 1.6;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--txt-5);
    margin: 0 0 var(--s-6, 26px);
}

:where(body[data-page="crypto"]) .cd-stats { margin: 0 0 var(--s-6, 26px); }

:where(body[data-page="crypto"]) .cd-lead p { margin: 0; font-size: inherit; line-height: inherit; color: inherit; }

@media (max-width: 899px) {
    :where(body[data-page="crypto"]) .cd-title { font-size: var(--t-32, 32px); }
}

@media (max-width: 599px) {
    :where(body[data-page="crypto"]) .cd-head { padding: var(--s-5, 20px) 0 var(--s-6, 26px); }
    :where(body[data-page="crypto"]) .cd-title { font-size: var(--t-26, 26px); }
}


/* ============ the three tiers ============ */
:where(body[data-page="crypto"]) .cd-sec { margin: 0 0 var(--s-9, 44px); }

:where(body[data-page="crypto"]) .cd-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4, 16px);
}

/* Column counts are written mobile-first and only widened inside
   min-width queries. An unguarded grid-template-columns here would win at
   every width, including the phone layout (BRIEF §4.14). */
@media (min-width: 600px) {
    :where(body[data-page="crypto"]) .cd-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    :where(body[data-page="crypto"]) .cd-grid--t1,
    :where(body[data-page="crypto"]) .cd-grid--t2 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1240px) {
    :where(body[data-page="crypto"]) .cd-grid--t3 { grid-template-columns: repeat(4, 1fr); }
}


/* ============ indicator card ============ */
:where(body[data-page="crypto"]) .mc {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

/* <button>, so the UA chrome has to be undone explicitly. */
:where(body[data-page="crypto"]) .mc-fig {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line-3);
    background: var(--bg-2);
    cursor: zoom-in;
}

:where(body[data-page="crypto"]) .mc-fig img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

:where(body[data-page="crypto"]) .mc-fig:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: -2px;
}

:where(body[data-page="crypto"]) .mc-fig:hover { background: var(--panel-2); }

/* Tier = size. This is the whole hierarchy: valuation charts read biggest,
   flow charts next, positioning/seasonality smallest — and every one of
   them opens full size on click, which is what makes the small tier
   acceptable. */
:where(body[data-page="crypto"]) .cd-grid--t1 .mc-fig { height: 300px; }
:where(body[data-page="crypto"]) .cd-grid--t2 .mc-fig { height: 240px; }
:where(body[data-page="crypto"]) .cd-grid--t3 .mc-fig { height: 190px; }

@media (max-width: 1239px) {
    :where(body[data-page="crypto"]) .cd-grid--t1 .mc-fig { height: 260px; }
    :where(body[data-page="crypto"]) .cd-grid--t2 .mc-fig { height: 210px; }
    :where(body[data-page="crypto"]) .cd-grid--t3 .mc-fig { height: 190px; }
}

/* below 600px there is one card per row, so the tiers stop competing for
   width and each chart gets the same generous box */
@media (max-width: 599px) {
    :where(body[data-page="crypto"]) .cd-grid--t1 .mc-fig,
    :where(body[data-page="crypto"]) .cd-grid--t2 .mc-fig,
    :where(body[data-page="crypto"]) .cd-grid--t3 .mc-fig { height: 220px; }
}

:where(body[data-page="crypto"]) .mc-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    padding: var(--s-4, 16px);
}

/* base.css gives every h2 --acid + an 8px glow + uppercase. */
:where(body[data-page="crypto"]) .mc-title {
    font-family: var(--f-cjk);
    font-weight: 700;
    font-size: var(--t-17, 17px);
    line-height: 1.4;
    text-transform: none;
    color: var(--txt);
    text-shadow: none;
    margin: 0 0 var(--s-1, 6px);
}

/* The source credit is the card's only link, so it is also the card's only
   touch target. A 10px label on a 1.4 line box is 14px tall; padding cannot
   reach 44px and a horizontal overlay would collide with the summary below,
   so the whole credit line is the 44px box and the link stretches to fill it
   (BRIEF §4.16). Ten sub-44px targets on the old page become zero. */
:where(body[data-page="crypto"]) .mc-src {
    display: flex;
    align-items: center;
    gap: .55em;
    min-height: 44px;
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-10, 10px);
    line-height: 1.4;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-6);
    margin: 0;
}

:where(body[data-page="crypto"]) .mc-src-k { flex: 0 0 auto; }

:where(body[data-page="crypto"]) .mc-src a {
    display: flex;
    align-items: center;
    align-self: stretch;
    min-width: 44px;
    color: var(--txt-4);
    text-decoration: none;
    text-shadow: none;
    transition: color .15s ease;
}

:where(body[data-page="crypto"]) .mc-src a:hover { color: var(--cyan); text-shadow: none; }

:where(body[data-page="crypto"]) .mc-src a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}


/* ---- the reading notes, folded away ----
   Kept (they are this page's own original writing and README §7.4 does not
   mention them) but collapsed, so the first screen is charts and figures
   rather than four paragraphs of English. Native <details>: no JS, and it
   still works with JS off. */
:where(body[data-page="crypto"]) .mc-more { margin-top: auto; padding-top: var(--s-1, 6px); }

:where(body[data-page="crypto"]) .mc-sum {
    display: flex;
    align-items: center;
    gap: var(--s-1, 6px);
    /* a 12px label with a 1.4 line box is 17px tall; padding alone cannot
       reach a 44px target, so the box is set directly (BRIEF §4.16) */
    min-height: 44px;
    margin-top: calc(var(--s-3, 12px) * -1);
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-11, 11px);
    line-height: 1.4;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-5);
    cursor: pointer;
    list-style: none;
    transition: color .15s ease;
}

:where(body[data-page="crypto"]) .mc-sum::-webkit-details-marker { display: none; }

:where(body[data-page="crypto"]) .mc-sum::before {
    content: '+';
    display: inline-block;
    width: 1em;
    color: var(--cyan);
}

:where(body[data-page="crypto"]) .mc-more[open] > .mc-sum::before { content: '\2212'; }

:where(body[data-page="crypto"]) .mc-sum:hover { color: var(--txt-2); }

:where(body[data-page="crypto"]) .mc-sum:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

:where(body[data-page="crypto"]) .mc-more-body {
    padding-top: var(--s-2, 9px);
    border-top: 1px solid var(--line-3);
}

:where(body[data-page="crypto"]) .mc-desc {
    font-family: var(--f-cjk);
    font-size: var(--t-14, 14px);
    line-height: 1.8;
    color: var(--txt-3);
    margin: var(--s-2, 9px) 0 var(--s-3, 12px);
}

:where(body[data-page="crypto"]) .mc-h {
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-10, 10px);
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--txt-5);
    margin: 0 0 var(--s-1, 6px);
}

:where(body[data-page="crypto"]) .mc-list {
    list-style: none;
    margin: 0 0 var(--s-3, 12px);
    padding: 0;
}

:where(body[data-page="crypto"]) .mc-list li {
    position: relative;
    padding-left: var(--s-3, 12px);
    font-family: var(--f-cjk);
    font-size: var(--t-13, 13px);
    line-height: 1.75;
    color: var(--txt-4);
}

:where(body[data-page="crypto"]) .mc-list li + li { margin-top: var(--s-1, 6px); }

:where(body[data-page="crypto"]) .mc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .7em;
    width: 4px;
    height: 1px;
    background: var(--line-hi);
}

:where(body[data-page="crypto"]) .mc-pc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4, 16px);
}

:where(body[data-page="crypto"]) .mc-pc .mc-list { margin-bottom: 0; }

@media (max-width: 599px) {
    :where(body[data-page="crypto"]) .mc-pc { grid-template-columns: 1fr; gap: var(--s-3, 12px); }
}


/* ============ page foot note ============ */
:where(body[data-page="crypto"]) .cd-note {
    font-family: var(--f-cjk);
    font-size: var(--t-13, 13px);
    line-height: 1.85;
    color: var(--txt-6);
    margin: 0 0 var(--s-7, 32px);
}


/* ============ lightbox ============
   The header is z-index 1000, so the overlay has to clear it. */
:where(body[data-page="crypto"]) .cd-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5, 20px);
    background: rgba(7, 7, 10, .92);
}

:where(body[data-page="crypto"]) .cd-modal-inner {
    position: relative;
    max-width: 1400px;
    max-height: 92vh;
    background: var(--panel);
    border: 1px solid var(--line-hi);
    padding: var(--s-4, 16px);
}

:where(body[data-page="crypto"]) .cd-modal-img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - var(--s-8, 36px));
    width: auto;
    height: auto;
}

:where(body[data-page="crypto"]) .cd-modal-close {
    position: absolute;
    top: calc(var(--s-4, 16px) * -1 - 1px);
    right: calc(var(--s-4, 16px) * -1 - 1px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line-hi);
    background: var(--panel-2);
    font-family: var(--f-mono-cjk);
    font-size: var(--t-21, 21px);
    line-height: 1;
    color: var(--txt-3);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

:where(body[data-page="crypto"]) .cd-modal-close:hover { color: var(--cyan); border-color: var(--cyan); }

:where(body[data-page="crypto"]) .cd-modal-close:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

@media (max-width: 599px) {
    :where(body[data-page="crypto"]) .cd-modal { padding: var(--s-4, 16px); }
    :where(body[data-page="crypto"]) .cd-modal-close { top: 0; right: 0; }
}


/* ============================================================
   E5.3 · ASSET ALLOCATION (2026-08-28) — README §7.3
   Replaces the ENTIRE E5a allocation block (the folded
   allocation-specific-styles.css plus its two former inline <style>
   blocks): cleared, not appended to (PLAN §6 E5).
   Every rule is :where(body[data-page="allocation"]) — zero specificity,
   so nothing here can outrank a component rule by accident.

   Retired with the old markup: .asof-badge · .main-container ·
   .main-content · .strategy-section/-card/-header/-content ·
   .toggle-icon · .donut-wrap/.donut-center · .weights/.wrow/.wbar-track/
   .wbar-fill/.wpct · .risk-tag · .executive-summary · .content-section ·
   .content-card · .key-takeaways · .neon-text · .section-title — and the
   13 rules that existed only to stop <nav class="toc"> inheriting the
   header's nav styling (NEXT_SESSION_BRIEF §4.4). The nav is still here;
   it now carries .al-toc (the old .toc class is retired with those rules), so the whole
   override family is gone rather than re-pointed.
   ============================================================ */

/* Nav active state (E2 2026-08-27, re-homed on body[data-page] by E5a).
   Pure CSS: the components are injected with innerHTML, so a <script> inside
   components/nav.html would never run — carrying data-page IS the signal for
   which page you are on. This rule belongs to the page, so it moves with the
   page's block; dropping it while clearing the E5a block is exactly the
   NEXT_SESSION_BRIEF §4.1 trap ("漏咗 = 嗰頁冇 active state"), and it is the
   assertion `nav active = ALLOC only` that catches it. */
:where(body[data-page="allocation"]) header nav ul li a[href$="/pages/asset-allocation.html"] {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* ---- asset-class colour carriers: one source for the swatch, the band
        segment and the legend dot. Set --ac once, read it three times. ---- */
:where(body[data-page="allocation"]) .ac--eq     { --ac: var(--ac-equities); }
:where(body[data-page="allocation"]) .ac--fi     { --ac: var(--ac-bonds); }
:where(body[data-page="allocation"]) .ac--gold   { --ac: var(--ac-gold); }
:where(body[data-page="allocation"]) .ac--comm   { --ac: var(--ac-commod); }
:where(body[data-page="allocation"]) .ac--crypto { --ac: var(--ac-crypto); }
:where(body[data-page="allocation"]) .ac--cash   { --ac: var(--ac-cash); }

:where(body[data-page="allocation"]) .swatch {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    display: inline-block;
    background: var(--ac, var(--txt-4));
}

/* ---- page header ---- */
:where(body[data-page="allocation"]) .al-head {
    padding: var(--s-8, 36px) 0 var(--s-6, 26px);
}

:where(body[data-page="allocation"]) .al-kicker { margin: 0 0 var(--s-3, 12px); }

/* base.css gives h1 a cyan colour, uppercase and a glow. The v3 headline is
   a white CJK 900 and text never glows (README §11), so colour, transform,
   shadow and any inherited animation are all reset explicitly. */
:where(body[data-page="allocation"]) .page-title {
    margin: 0;
    font-family: var(--f-cjk);
    font-weight: 900;
    font-size: var(--t-40, 40px);
    line-height: 1.15;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    color: var(--txt);
    text-shadow: none;
    animation: none;
}

:where(body[data-page="allocation"]) .al-meta {
    margin: var(--s-2, 9px) 0 var(--s-5, 20px);
    font-family: var(--f-mono-cjk);
    font-size: var(--t-11, 11px);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-5);
}

/* the lead callout names the quarter's two decisions (README §7.3) */
:where(body[data-page="allocation"]) .al-lead { max-width: 72ch; }
:where(body[data-page="allocation"]) .al-lead p {
    margin: 0;
    font: inherit;
    color: inherit;
}
:where(body[data-page="allocation"]) .al-lead-up   { color: var(--up); font-weight: 700; }
:where(body[data-page="allocation"]) .al-lead-down { color: var(--down); font-weight: 700; }

/* ---- body: content column + sticky index ---- */
:where(body[data-page="allocation"]) .al-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: var(--s-8, 36px);
    align-items: start;
    padding-bottom: var(--s-9, 44px);
}

:where(body[data-page="allocation"]) .al-main { min-width: 0; }

:where(body[data-page="allocation"]) .al-rail {
    position: sticky;
    top: calc(var(--header-h, 56px) + var(--s-5, 20px));
    min-width: 0;
}

:where(body[data-page="allocation"]) .al-toc {
    border-left: 1px solid var(--line);
    padding-left: var(--s-4, 16px);
}

:where(body[data-page="allocation"]) .al-toc-k {
    margin: 0 0 var(--s-3, 12px);
    font-family: var(--f-mono-cjk);
    font-size: var(--t-10, 10px);
    font-weight: 600;
    letter-spacing: .16em;
    color: var(--txt-6);
}

:where(body[data-page="allocation"]) .al-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

:where(body[data-page="allocation"]) .al-toc li { margin: 0; }

:where(body[data-page="allocation"]) .al-toc a {
    /* flex + min-height rather than padding: the index links are the only
       touch targets this page adds, and 44px has to come from the box, not
       from line-height (BRIEF §4.8). */
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 0;
    font-family: var(--f-mono-cjk);
    font-size: var(--t-12, 12px);
    line-height: 1.4;
    letter-spacing: .04em;
    color: var(--txt-5);
    border-left: 2px solid transparent;
    margin-left: calc(-1 * var(--s-4, 16px) - 1px);
    padding-left: var(--s-4, 16px);
    text-shadow: none;
    transition: color .12s ease, border-color .12s ease;
}

:where(body[data-page="allocation"]) .al-toc a:hover {
    color: var(--cyan);
    text-shadow: none;
}

:where(body[data-page="allocation"]) .al-toc a.is-current {
    color: var(--cyan);
    border-left-color: var(--cyan);
}

/* ---- blocks ---- */
:where(body[data-page="allocation"]) .al-block { margin: 0 0 var(--s-9, 44px); }
:where(body[data-page="allocation"]) .al-block .section-head { margin-bottom: var(--s-5, 20px); }

:where(body[data-page="allocation"]) .al-h2 {
    margin: 0 0 var(--s-4, 16px);
    font-family: var(--f-cjk);
    font-weight: 700;
    font-size: var(--t-21, 21px);
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    color: var(--txt);
    text-shadow: none;
}

/* reading copy — one class, so no bare-element descendant selector is
   needed and nothing here can out-specify a component rule (BRIEF §4.12) */
:where(body[data-page="allocation"]) .al-p {
    margin: 0 0 var(--s-4, 16px);
    max-width: 76ch;
    font-family: var(--f-cjk);
    font-size: var(--t-17, 17px);
    line-height: 1.9;
    letter-spacing: normal;
    color: var(--txt-3);
}
:where(body[data-page="allocation"]) .al-p:last-child { margin-bottom: 0; }

/* ============ SCORECARD ============ */
:where(body[data-page="allocation"]) .scorecard {
    border-top: 1px solid var(--line-3);
}

:where(body[data-page="allocation"]) .score-row {
    display: grid;
    grid-template-columns: 168px 168px minmax(0, 1fr);
    gap: var(--s-4, 16px);
    align-items: start;
    padding: var(--s-5, 20px) var(--s-4, 16px);
    border-bottom: 1px solid var(--line-3);
    border-left: 2px solid transparent;
}

/* the two rows that changed this quarter carry a 2px left border and a 3%
   tint — --up for an upgrade, --down for a downgrade (README §7.3). The
   class comes straight off the .chg the row already had, so the highlight
   has a machine-readable source and is never a judgement call.
   The rgba values are var(--up) / var(--down) at 3%; tokens.css is copied
   verbatim and carries no --up-tint, and it may not be added to (PLAN §5). */
:where(body[data-page="allocation"]) .score-row--up {
    border-left-color: var(--up);
    background: rgba(53, 224, 138, .03);
}
:where(body[data-page="allocation"]) .score-row--down {
    border-left-color: var(--down);
    background: rgba(255, 46, 99, .03);
}

:where(body[data-page="allocation"]) .score-asset {
    display: flex;
    align-items: center;
    gap: var(--s-2, 9px);
    min-width: 0;
}

:where(body[data-page="allocation"]) .score-asset .name {
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-13, 13px);
    line-height: 1.4;
    letter-spacing: .04em;
    color: var(--txt-2);
}

:where(body[data-page="allocation"]) .score-rate {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2, 9px);
    min-width: 0;
}

:where(body[data-page="allocation"]) .rating-chip {
    display: inline-block;
    font-family: var(--f-mono-cjk);
    font-weight: 700;
    font-size: var(--t-10, 10px);
    line-height: 1;
    letter-spacing: .1em;
    white-space: nowrap;
    padding: 7px 9px;
    border: 1px solid var(--line-hi);
    color: var(--txt-4);
}
:where(body[data-page="allocation"]) .rating-ow { color: var(--up);   border-color: var(--up); }
:where(body[data-page="allocation"]) .rating-uw { color: var(--down); border-color: var(--down); }
:where(body[data-page="allocation"]) .rating-n  { color: var(--txt-3); border-color: var(--line-hi); }

:where(body[data-page="allocation"]) .chg {
    font-family: var(--f-mono-cjk);
    font-size: var(--t-10, 10px);
    line-height: 1.5;
    letter-spacing: .06em;
    color: var(--txt-5);
}
:where(body[data-page="allocation"]) .chg-up   { color: var(--up); }
:where(body[data-page="allocation"]) .chg-down { color: var(--down); }
:where(body[data-page="allocation"]) .chg-flat { color: var(--txt-5); }

/* unchanged rows read one step back (README §7.3: "--txt-4 body text") so
   the two decisions of the quarter are findable in one second */
:where(body[data-page="allocation"]) .score-why {
    margin: 0;
    font-family: var(--f-cjk);
    font-size: var(--t-14, 14px);
    line-height: 1.85;
    letter-spacing: normal;
    color: var(--txt-4);
}
:where(body[data-page="allocation"]) .score-row--up .score-why,
:where(body[data-page="allocation"]) .score-row--down .score-why { color: var(--txt-3); }

/* ============ MODEL PORTFOLIOS — HUD gauge cards (Q4 2026, user-chosen "H1 v2") ============
   Markup is generated by build_house_view.py (daily-news pipeline) from
   house_view/YYYY-QN.json — never hand-edited. One card per portfolio:
   outer ring = 100 ticks (1 tick = 1%, coloured by asset class), inner arc =
   risk assets (EQ + COMM + CRYPTO) — the same measure on every card, so the
   three numbers always fall from Growth to Conservative. Below: the
   risk / hedge / defensive split, the asset mix, and two concentration
   readouts (top holding, effective number of assets = 1 / sum(w^2)). ---- */
:where(body[data-page="allocation"]) .hud { position: relative; }
:where(body[data-page="allocation"]) .hud-frame {
    background: var(--line-hi);
    padding: 1px;
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
:where(body[data-page="allocation"]) .hud-body {
    position: relative;
    background: var(--panel);
    padding: 48px var(--s-5, 20px) 18px;
    clip-path: polygon(0 0, calc(100% - 17.5px) 0, 100% 17.5px, 100% 100%, 17.5px 100%, 0 calc(100% - 17.5px));
}
/* corner brackets sit on the un-clipped wrapper, so the clip-path cannot eat them */
:where(body[data-page="allocation"]) .hud::before,
:where(body[data-page="allocation"]) .hud::after { content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none; }
:where(body[data-page="allocation"]) .hud::before { top: -5px; left: -5px; border-top: 2px solid var(--acid); border-left: 2px solid var(--acid); }
:where(body[data-page="allocation"]) .hud::after { bottom: -5px; right: -5px; border-bottom: 2px solid var(--acid); border-right: 2px solid var(--acid); }
:where(body[data-page="allocation"]) .hud-tab {
    position: absolute;
    top: 0;
    left: 22px;
    z-index: 2;
    padding: 4px 16px 4px 10px;
    background: var(--acid);
    color: var(--bg);
    font-family: var(--f-mono);
    font-weight: 600;
    font-size: var(--t-10, 10px);
    letter-spacing: .14em;
    clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
:where(body[data-page="allocation"]) .hud-slash {
    display: inline-block;
    width: 38px;
    height: 8px;
    flex: 0 0 auto;
    background: repeating-linear-gradient(115deg, var(--acid) 0 3px, transparent 3px 7px);
}
:where(body[data-page="allocation"]) .hud-k {
    font-family: var(--f-mono);
    font-size: var(--t-10, 10px);
    letter-spacing: .12em;
    color: var(--txt-5);
}
:where(body[data-page="allocation"]) .hud-num {
    font-family: var(--f-display);
    font-weight: 700;
    color: var(--txt);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
:where(body[data-page="allocation"]) .hud-num small { font-size: var(--t-11, 11px); color: var(--txt-5); margin-left: 2px; }
:where(body[data-page="allocation"]) .hud-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--s-4, 16px);
    padding-top: var(--s-3, 12px);
    border-top: 1px solid var(--line-3);
}
:where(body[data-page="allocation"]) .hud-foot .hud-k:last-child { margin-left: auto; }

:where(body[data-page="allocation"]) .hv-key {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    align-items: center;
    margin: 0 0 var(--s-6, 26px);
    padding: var(--s-3, 12px) var(--s-4, 16px);
    border: 1px solid var(--line);
    background: var(--bg-2);
}
:where(body[data-page="allocation"]) .hv-key-i {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-mono);
    font-size: var(--t-11, 11px);
    letter-spacing: .04em;
    color: var(--txt-4);
}
:where(body[data-page="allocation"]) .hv-key-i b { color: var(--txt-2); font-weight: 600; letter-spacing: .1em; }
:where(body[data-page="allocation"]) .hv-key-ticks { width: 30px; height: 10px; flex: 0 0 auto; background: repeating-linear-gradient(90deg, var(--ac-equities) 0 2px, transparent 2px 4px); }
:where(body[data-page="allocation"]) .hv-key-arc { width: 30px; height: 3px; flex: 0 0 auto; background: var(--acid); }

:where(body[data-page="allocation"]) .hv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
:where(body[data-page="allocation"]) .hv-title {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: var(--t-21, 21px);
    line-height: 1.1;
    color: var(--txt);
}
:where(body[data-page="allocation"]) .hv-sub { margin-top: var(--s-1, 6px); }

:where(body[data-page="allocation"]) .hv-gauge { display: block; width: 100%; max-width: 220px; margin: var(--s-4, 16px) auto 4px; overflow: visible; }
:where(body[data-page="allocation"]) .hv-gauge line { stroke-width: 2.4; }
:where(body[data-page="allocation"]) .hv-gauge .hv-g-mark { stroke: var(--acid); stroke-width: 2; }
:where(body[data-page="allocation"]) .hv-gauge .hv-g-orbit { fill: none; stroke: var(--line); stroke-dasharray: 2 5; }
:where(body[data-page="allocation"]) .hv-gauge .hv-g-track { fill: none; stroke: var(--line-2); stroke-width: 4; }
:where(body[data-page="allocation"]) .hv-gauge .hv-g-risk { fill: none; stroke: var(--acid); stroke-width: 4; }
:where(body[data-page="allocation"]) .hv-gauge text { font-family: var(--f-mono); }
:where(body[data-page="allocation"]) .hv-gauge .hv-g-big { font-family: var(--f-display); font-weight: 700; font-size: 40px; fill: var(--txt); }
:where(body[data-page="allocation"]) .hv-gauge .hv-g-pc { font-family: var(--f-display); font-weight: 700; font-size: 16px; fill: var(--txt-5); }
:where(body[data-page="allocation"]) .hv-gauge .hv-g-lab { font-size: 9px; letter-spacing: .14em; fill: var(--txt-5); }

:where(body[data-page="allocation"]) .hv-sec { margin-top: var(--s-4, 16px); }
:where(body[data-page="allocation"]) .hv-sec > .hud-k { display: block; margin-bottom: 8px; }
:where(body[data-page="allocation"]) .hv-split { display: flex; height: 8px; gap: 2px; }
:where(body[data-page="allocation"]) .hv-split span { display: block; height: 100%; }
:where(body[data-page="allocation"]) .hv-split .r { background: var(--acid); }
:where(body[data-page="allocation"]) .hv-split .h { background: repeating-linear-gradient(115deg, var(--acid) 0 2px, transparent 2px 5px); }
:where(body[data-page="allocation"]) .hv-split .d { background: var(--line-hi); }
:where(body[data-page="allocation"]) .hv-split-lab { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; margin-top: 8px; }
:where(body[data-page="allocation"]) .hv-split-lab span { font-family: var(--f-mono); font-size: var(--t-10, 10px); letter-spacing: .1em; color: var(--txt-5); }
:where(body[data-page="allocation"]) .hv-split-lab b { font-family: var(--f-display); font-size: var(--t-14, 14px); color: var(--txt-2); margin-left: 5px; letter-spacing: normal; }

:where(body[data-page="allocation"]) .hv-rows { list-style: none; margin: 0; padding: 0; }
:where(body[data-page="allocation"]) .hv-rows li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-family: var(--f-mono);
    font-size: var(--t-11, 11px);
    letter-spacing: .06em;
    color: var(--txt-4);
}
:where(body[data-page="allocation"]) .hv-rows .hv-lead { flex: 1; border-bottom: 1px dotted var(--line-hi); transform: translateY(-3px); }
:where(body[data-page="allocation"]) .hv-rows li b { min-width: 34px; text-align: right; font-weight: 600; color: var(--txt-2); font-variant-numeric: tabular-nums; }
:where(body[data-page="allocation"]) .hv-rows li.is-zero { opacity: .35; }
:where(body[data-page="allocation"]) .hv-rows .swatch { width: 8px; height: 8px; }

:where(body[data-page="allocation"]) .hv-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-top: var(--s-4, 16px);
    background: var(--line-2);
    border: 1px solid var(--line-2);
}
:where(body[data-page="allocation"]) .hv-stat { min-width: 0; padding: 10px var(--s-3, 12px); background: var(--panel); }
:where(body[data-page="allocation"]) .hv-stat .hud-k { white-space: nowrap; letter-spacing: .06em; }
:where(body[data-page="allocation"]) .hv-stat .hud-num { display: block; margin-top: var(--s-1, 6px); font-size: var(--t-17, 17px); }

:where(body[data-page="allocation"]) .al-legend-note {
    margin: var(--s-4, 16px) 0 0;
    font-family: var(--f-cjk);
    font-size: var(--t-12, 12px);
    line-height: 1.7;
    color: var(--txt-6);
}

/* ============ PREVIOUS-QUARTER REVIEW ============
   Public, deliberately conservative: direction and verdict only, no return
   figures. The detailed version stays in the pipeline archive. */
:where(body[data-page="allocation"]) .rv-table { margin-top: var(--s-4, 16px); border: 1px solid var(--line); background: var(--panel); }
:where(body[data-page="allocation"]) .rv-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.6fr) 86px;
    gap: var(--s-4, 16px);
    align-items: start;
    padding: var(--s-3, 12px) var(--s-4, 16px);
    border-top: 1px solid var(--line-3);
}
:where(body[data-page="allocation"]) .rv-row:first-child { border-top: 0; }
:where(body[data-page="allocation"]) .rv-head { background: var(--bg-2); border-bottom: 1px solid var(--line); }
:where(body[data-page="allocation"]) .rv-head span { font-family: var(--f-mono); font-size: var(--t-10, 10px); letter-spacing: .12em; color: var(--txt-5); }
:where(body[data-page="allocation"]) .rv-asset { font-family: var(--f-mono); font-size: var(--t-12, 12px); letter-spacing: .04em; color: var(--txt-2); }
:where(body[data-page="allocation"]) .rv-call { font-family: var(--f-mono); font-size: var(--t-11, 11px); line-height: 1.6; color: var(--txt-4); }
:where(body[data-page="allocation"]) .rv-out { margin: 0; font-family: var(--f-cjk); font-size: var(--t-13, 13px); line-height: 1.7; color: var(--txt-3); }
:where(body[data-page="allocation"]) .rv-chip {
    justify-self: start;
    padding: 3px 8px;
    border: 1px solid var(--line-hi);
    font-family: var(--f-mono);
    font-weight: 600;
    font-size: var(--t-10, 10px);
    letter-spacing: .12em;
}
:where(body[data-page="allocation"]) .rv-right { color: var(--up); border-color: var(--up); }
:where(body[data-page="allocation"]) .rv-wrong { color: var(--down); border-color: var(--down); }
:where(body[data-page="allocation"]) .rv-mixed { color: var(--txt-3); }

@media (max-width: 899px) {
    :where(body[data-page="allocation"]) .hv-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    :where(body[data-page="allocation"]) .rv-head { display: none; }
    :where(body[data-page="allocation"]) .rv-row { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-1, 6px) var(--s-3, 12px); }
    :where(body[data-page="allocation"]) .rv-call { grid-column: 1 / -1; }
    :where(body[data-page="allocation"]) .rv-out { grid-column: 1 / -1; }
    :where(body[data-page="allocation"]) .rv-chip { grid-row: 1; grid-column: 2; }
}

/* ============ WITHIN.ASSET — segment views behind each rating (Q4 2026) ============
   Generated by build_house_view.py from each scorecard row's "tilts". ---- */
:where(body[data-page="allocation"]) .wa-intro { margin-bottom: var(--s-5, 20px); }
:where(body[data-page="allocation"]) .wa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4, 16px); }
:where(body[data-page="allocation"]) .wa-panel {
    min-width: 0;
    padding: var(--s-4, 16px) var(--s-5, 20px) var(--s-2, 9px);
    background: var(--panel);
    border: 1px solid var(--line);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
:where(body[data-page="allocation"]) .wa-head {
    display: flex;
    align-items: center;
    gap: var(--s-2, 9px);
    padding-bottom: var(--s-3, 12px);
    border-bottom: 1px solid var(--line-2);
}
:where(body[data-page="allocation"]) .wa-name {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: var(--t-17, 17px);
    color: var(--txt);
}
:where(body[data-page="allocation"]) .wa-head .rating-chip { margin-left: auto; }
:where(body[data-page="allocation"]) .wa-list { list-style: none; margin: 0; padding: 0; }
:where(body[data-page="allocation"]) .wa-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 4px var(--s-3, 12px);
    padding: var(--s-3, 12px) 0;
    border-top: 1px solid var(--line-3);
}
:where(body[data-page="allocation"]) .wa-row:first-child { border-top: 0; }
:where(body[data-page="allocation"]) .wa-stance {
    grid-row: 1 / span 2;
    font-family: var(--f-mono);
    font-weight: 600;
    font-size: var(--t-10, 10px);
    letter-spacing: .1em;
    line-height: 1.7;
    white-space: nowrap;
}
:where(body[data-page="allocation"]) .wa-prefer .wa-stance { color: var(--up); }
:where(body[data-page="allocation"]) .wa-neutral .wa-stance { color: var(--txt-5); }
:where(body[data-page="allocation"]) .wa-avoid .wa-stance { color: var(--down); }
:where(body[data-page="allocation"]) .wa-seg {
    font-family: var(--f-cjk);
    font-weight: 700;
    font-size: var(--t-14, 14px);
    line-height: 1.4;
    color: var(--txt-2);
}
:where(body[data-page="allocation"]) .wa-note {
    margin: 0;
    font-family: var(--f-cjk);
    font-size: var(--t-13, 13px);
    line-height: 1.7;
    color: var(--txt-4);
}
@media (max-width: 1199px) {
    :where(body[data-page="allocation"]) .wa-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
    :where(body[data-page="allocation"]) .wa-row { grid-template-columns: minmax(0, 1fr); }
    :where(body[data-page="allocation"]) .wa-stance { grid-row: auto; }
}

/* ============ MACRO CARDS ============ */
:where(body[data-page="allocation"]) .al-cards {
    display: grid;
    gap: var(--s-4, 16px);
}

:where(body[data-page="allocation"]) .al-card-h {
    margin: 0 0 var(--s-3, 12px);
    font-family: var(--f-cjk);
    font-weight: 700;
    font-size: var(--t-17, 17px);
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    color: var(--txt-2);
    text-shadow: none;
}

/* ============ WHAT CHANGED ============ */
:where(body[data-page="allocation"]) .diff-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line-3);
    border: 1px solid var(--line-3);
}

:where(body[data-page="allocation"]) .diff-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: var(--s-3, 12px);
    align-items: start;
    padding: var(--s-4, 16px);
    background: var(--panel);
    border-left: 2px solid transparent;
}

:where(body[data-page="allocation"]) .diff-item p {
    margin: 0;
    font-family: var(--f-cjk);
    font-size: var(--t-14, 14px);
    line-height: 1.85;
    letter-spacing: normal;
    color: var(--txt-4);
}
:where(body[data-page="allocation"]) .diff-item strong { color: var(--txt-2); }

:where(body[data-page="allocation"]) .diff-item .arrow {
    font-size: var(--t-13, 13px);
    line-height: 1.85;
    color: var(--txt-5);
}

/* scoped to .diff-item so these never collide with .data-table .up/.down */
:where(body[data-page="allocation"]) .diff-item.up   { border-left-color: var(--up); }
:where(body[data-page="allocation"]) .diff-item.down { border-left-color: var(--down); }
:where(body[data-page="allocation"]) .diff-item.up .arrow   { color: var(--up); }
:where(body[data-page="allocation"]) .diff-item.down .arrow { color: var(--down); }
:where(body[data-page="allocation"]) .diff-item.up p,
:where(body[data-page="allocation"]) .diff-item.down p { color: var(--txt-3); }

/* ============ DISCLAIMER & SOURCES ============ */
:where(body[data-page="allocation"]) .al-disclaimer { padding: var(--s-5, 20px); }

:where(body[data-page="allocation"]) .al-sources {
    margin: var(--s-4, 16px) 0 0;
    font-family: var(--f-cjk);
    font-size: var(--t-12, 12px);
    line-height: 1.8;
    color: var(--txt-6);
}
:where(body[data-page="allocation"]) .al-sources-k {
    display: block;
    margin-bottom: var(--s-1, 6px);
    font-family: var(--f-mono-cjk);
    font-size: var(--t-10, 10px);
    font-weight: 600;
    letter-spacing: .16em;
    color: var(--txt-5);
}

/* ---- telemetry: four long values. Left to flex-shrink they all truncate at
        once, so the cells stop shrinking and the least load-bearing one is
        dropped first. Same treatment as the Global Daily page (BRIEF §4.13);
        scoped here because the component is shared with Today, which feeds
        it three short values. ---- */
@media (max-width: 1239px) {
    :where(body[data-page="allocation"]) .cf-telemetry .cf-tm-cell { flex: 0 0 auto; }
    :where(body[data-page="allocation"]) .cf-telemetry .cf-tm-cell:nth-child(4) { display: none; }
    :where(body[data-page="allocation"]) .cf-telemetry .cf-tm-cell:nth-child(3) { border-right: none; }
}

@media (max-width: 899px) {
    :where(body[data-page="allocation"]) .cf-telemetry .cf-tm-cell:nth-child(n+3) { display: none; }
    :where(body[data-page="allocation"]) .cf-telemetry .cf-tm-cell:nth-child(2) {
        flex: 0 1 auto;
        min-width: 0;
        border-right: none;
    }
}

/* ---- 1100+: three macro cards side by side. Wrapped in min-width so it can
        never leak down into the stacked layout (BRIEF §4.14). ---- */
@media (min-width: 1100px) {
    :where(body[data-page="allocation"]) .al-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- below 1100: the index stops being a rail and becomes a wrapping row
        of anchors above the content (DOM order unchanged, `order` moves it) ---- */
@media (max-width: 1099px) {
    :where(body[data-page="allocation"]) .al-body { grid-template-columns: minmax(0, 1fr); }
    :where(body[data-page="allocation"]) .al-rail {
        order: -1;
        position: static;
        top: auto;
    }
    :where(body[data-page="allocation"]) .al-toc {
        border-left: none;
        border-top: 1px solid var(--line-3);
        border-bottom: 1px solid var(--line-3);
        padding: var(--s-3, 12px) 0;
    }
    :where(body[data-page="allocation"]) .al-toc ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0 var(--s-5, 20px);
    }
    :where(body[data-page="allocation"]) .al-toc a {
        border-left: none;
        border-bottom: 2px solid transparent;
        margin-left: 0;
        padding-left: 0;
    }
    :where(body[data-page="allocation"]) .al-toc a.is-current { border-bottom-color: var(--cyan); }
}

/* ---- below 900: the band labels come off. The narrowest segment that still
        carries one is 12%, which is 43px on a 390px phone — not enough for
        "GLD 12%" at 11px. The legend carries every segment anyway. ---- */
@media (max-width: 899px) {
        :where(body[data-page="allocation"]) .score-row {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--s-3, 12px);
    }
    :where(body[data-page="allocation"]) .score-rate {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--s-3, 12px);
    }
}

@media (max-width: 599px) {
    :where(body[data-page="allocation"]) .page-title { font-size: var(--t-32, 32px); }
    }


/* ---------- blog : E7 ARCHIVE INDEX (2026-09-03) ----------
   Replaces the whole E5a-folded blog layer: blog-specific-styles.css plus the
   two inline <style> blocks that E5a parked here (.blog-post / .blog-list /
   .pagination / .no-posts / .db-* / details.archive / the centred .page-title).
   Per PLAN section 6 E5 ("重排完某一頁 = 順手清走佢喺 E5a 段嗰嚿舊規則") the old
   rules are deleted rather than left behind — pages/views-and-blogs.html is the
   only document with data-page="blog", so nothing else can reach them.
   ⚠️ The generated article pages carry data-page="post" and are served by the
   separate "E5.5 · ARTICLE PAGE" section; the 2026-08-29 comment claiming the
   nav rule below also serves content/posts/* was already wrong then — that rule
   is scoped to data-page="blog" and only this page matches it.

   design_v3 README section 7 has no spec for this page, which is why E5 skipped
   it. The structure was settled with the user on 2026-09-03: an ARCHIVE index
   whose subject is every daily brief, grouped by month, with the finished 2025
   essay series behind a fold. Breakpoints are the system ones (1199/899/599);
   the old 768px query is retired with the rules it styled. */

/* This page is built from published JSON at runtime. A section whose data
   cannot be read stays out of the document, so the guard has to beat the
   display rules that follow (Constitution A2). */
:where(body[data-page="blog"]) .ar-sec[hidden],
:where(body[data-page="blog"]) .cf-telemetry[hidden] { display: none; }

/* ---- page head ---- */
:where(body[data-page="blog"]) .ar-head { padding: var(--s-9, 44px) 0 var(--s-7, 32px); }

:where(body[data-page="blog"]) .ar-kicker {
    display: flex;
    align-items: center;
    gap: var(--s-3, 12px);
    margin: 0 0 var(--s-4, 16px);
}

:where(body[data-page="blog"]) .ar-kicker-note {
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-10, 10px);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--txt-5);
}

:where(body[data-page="blog"]) .ar-title {
    font-family: var(--f-cjk);
    font-weight: 900;
    font-size: var(--t-40, 40px);
    line-height: 1.24;
    color: var(--txt);
    margin: 0 0 var(--s-3, 12px);
    text-align: left;
}

:where(body[data-page="blog"]) .ar-sub {
    font-family: var(--f-cjk);
    font-size: var(--t-14, 14px);
    line-height: 1.8;
    color: var(--txt-4);
    margin: 0;
    max-width: 62ch;
}

/* ---- section rhythm ---- */
:where(body[data-page="blog"]) .ar-sec { padding: 0 0 var(--s-8, 36px); }
:where(body[data-page="blog"]) .ar-sec--last { padding-bottom: var(--s-9, 44px); }

/* ---- LATEST: the newest brief, promoted out of the grid ---- */
:where(body[data-page="blog"]) a.ar-lead {
    display: block;
    text-decoration: none;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-left: 2px solid var(--acid);
    border-radius: 8px;
    padding: var(--s-6, 26px) var(--s-7, 32px);
    transition: border-color .25s, transform .25s, box-shadow .25s;
}

:where(body[data-page="blog"]) a.ar-lead:hover {
    border-color: var(--cyan);
    border-left-color: var(--acid);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 214, 196, .25);
}

:where(body[data-page="blog"]) .ar-lead-date {
    display: block;
    font-family: var(--f-mono-cjk);
    font-size: var(--t-10, 10px);
    letter-spacing: .1em;
    color: var(--cyan);
}

:where(body[data-page="blog"]) .ar-lead-title {
    display: block;
    font-family: var(--f-cjk);
    font-weight: 900;
    font-size: var(--t-26, 26px);
    line-height: 1.3;
    color: var(--txt);
    margin: var(--s-2, 9px) 0 var(--s-3, 12px);
}

:where(body[data-page="blog"]) .ar-lead-preview {
    display: block;
    font-family: var(--f-cjk);
    font-size: var(--t-17, 17px);
    line-height: 1.9;
    color: var(--txt-3);
}

:where(body[data-page="blog"]) .ar-lead-cta {
    display: inline-block;
    margin-top: var(--s-4, 16px);
    font-family: var(--f-mono-cjk);
    font-weight: 600;
    font-size: var(--t-11, 11px);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--acid);
}

/* ---- card grid ---- */
:where(body[data-page="blog"]) .ar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--s-4, 16px);
    margin: 0 0 var(--s-6, 26px);
}

:where(body[data-page="blog"]) a.ar-card {
    display: block;
    text-decoration: none;
    background: var(--panel);
    border: 1px solid rgba(0, 214, 196, .18);
    border-radius: 8px;
    padding: var(--s-5, 20px);
    transition: border-color .25s, transform .25s, box-shadow .25s;
}

:where(body[data-page="blog"]) a.ar-card:hover {
    border-color: var(--cyan);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 214, 196, .25);
}

:where(body[data-page="blog"]) .ar-card-date {
    display: block;
    font-family: var(--f-mono-cjk);
    font-size: var(--t-10, 10px);
    letter-spacing: .1em;
    color: var(--cyan);
}

:where(body[data-page="blog"]) .ar-card-title {
    display: block;
    font-family: var(--f-cjk);
    font-weight: 700;
    font-size: var(--t-17, 17px);
    line-height: 1.45;
    color: var(--txt-2);
    margin: var(--s-1, 6px) 0 var(--s-2, 9px);
}

:where(body[data-page="blog"]) .ar-card-preview {
    display: block;
    font-family: var(--f-cjk);
    font-size: var(--t-13, 13px);
    line-height: 1.7;
    color: var(--txt-4);
}

/* ---- folds: month groups and the 2025 essay archive ----
   Both reuse .section-head so a fold's header is the same object as an open
   section's header — the only difference is the caret. */
:where(body[data-page="blog"]) .ar-month,
:where(body[data-page="blog"]) .ar-fold {
    border-top: 1px solid var(--line-2);
}

:where(body[data-page="blog"]) .ar-month > summary,
:where(body[data-page="blog"]) .ar-fold > summary {
    cursor: pointer;
    list-style: none;
    padding: var(--s-4, 16px) 0;
}

:where(body[data-page="blog"]) .ar-month > summary::-webkit-details-marker,
:where(body[data-page="blog"]) .ar-fold > summary::-webkit-details-marker { display: none; }

/* .section-head carries a 16px bottom margin for stacked sections; inside a
   summary the padding above already provides the rhythm. */
:where(body[data-page="blog"]) summary .section-head { margin: 0; }

:where(body[data-page="blog"]) .ar-caret {
    flex: 0 0 auto;
    font-family: var(--f-mono);
    font-size: var(--t-11, 11px);
    color: var(--txt-5);
    transition: transform .2s;
}

:where(body[data-page="blog"]) .ar-caret::before { content: '\25B8'; }
:where(body[data-page="blog"]) details[open] > summary .ar-caret { transform: rotate(90deg); }

:where(body[data-page="blog"]) .ar-month > summary:hover .sh-label,
:where(body[data-page="blog"]) .ar-fold > summary:hover .sh-label { color: var(--cyan); }

:where(body[data-page="blog"]) .ar-month > summary:focus-visible,
:where(body[data-page="blog"]) .ar-fold > summary:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

:where(body[data-page="blog"]) .ar-fold-sub {
    font-family: var(--f-cjk);
    font-size: var(--t-13, 13px);
    line-height: 1.8;
    color: var(--txt-4);
    margin: 0 0 var(--s-4, 16px);
}

/* ---- narrow ---- */
@media (max-width: 899px) {
    :where(body[data-page="blog"]) .ar-head { padding: var(--s-7, 32px) 0 var(--s-6, 26px); }
    :where(body[data-page="blog"]) .ar-title { font-size: var(--t-32, 32px); }
    :where(body[data-page="blog"]) a.ar-lead { padding: var(--s-5, 20px) var(--s-5, 20px); }
    :where(body[data-page="blog"]) .ar-lead-title { font-size: var(--t-21, 21px); }
}

@media (max-width: 599px) {
    :where(body[data-page="blog"]) .ar-title { font-size: var(--t-26, 26px); }
    :where(body[data-page="blog"]) .ar-grid { grid-template-columns: 1fr; }
    :where(body[data-page="blog"]) .ar-lead-preview { font-size: var(--t-14, 14px); }
}

/* Nav active state (E2, 2026-08-27) — pages/views-and-blogs.html.
   Pure CSS: the components are injected with innerHTML, so a <script>
   inside components/nav.html would never run. Loading this sheet IS the
   signal that you are on this page. See components.css "Shell — header + nav". */
:where(body[data-page="blog"]) header nav ul li a[href$="/pages/views-and-blogs.html"] {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* ============================================================
   E8 · ABOUT PAGE (2026-09-03) — pages/about.html

   Replaces the whole E5a-folded about layer: about-specific-styles.css plus
   the one-line inline <style> E5a parked here (.story-container /
   .story-header / .timeline-section and its :hover + :nth-child(odd) flip /
   .timeline-image / .timeline-content / the centred .page-title).
   Per PLAN section 6 E5 ("重排完某一頁 = 順手清走佢喺 E5a 段嗰嚿舊規則") the old
   rules are deleted rather than left behind — pages/about.html is the only
   document with data-page="about", so nothing else can reach them, and the
   .timeline-* / .story-* class names appear nowhere else in the repo outside
   assets/css/archive/ (which only the three unlinked archive/content-posts/
   files load).

   design_v3 README section 7 has no spec for this page, which is why E5
   skipped it five times. The structure was settled with the user on
   2026-09-03: the five career chapters as file cards, each headed by its own
   .section-head (CH.01–CH.05 + era/place), with the image column on the same
   side every time. The pre-E8 page alternated sides with :nth-child(odd),
   which zig-zagged the reading order.

   SCOPE - three passes with the user, same day:
     pass 1  a THE SITE block (.lead-callout + four tiles) and a telemetry
             strip fed at runtime from /content/daily/index.json. Rejected:
             this page is the author's background and personal brand, not
             another surface for the daily feed. Both gone; the telemetry
             strip is static bio and the page fetches nothing.
     pass 2  a Chinese 900 h1 plus a Chinese standfirst. Rejected: the h1 read
             badly and is not what the rest of the site does (daily / crypto /
             allocation all carry an English headline), and the standfirst was
             copy the author would rather write himself. The author's own
             English headline is the h1 again.
     pass 3  the pre-E8 alternating image sides and panel-per-chapter are
             KEPT - the user judged that layout the more interesting one. So
             what E8 changes is the furniture, not the shape: the E5 shell
             (hazard + telemetry), a .section-head per chapter (CH.01-CH.05 +
             era/place), the type ladder, sentence case instead of base.css's
             blanket uppercase, and --ac-crypto (the purple hover glow the E
             series has been retiring) replaced by the cyan the rest of the
             site uses.
   Breakpoints are the system ones (1199/899/599); the old 768px query is
   retired with the rules it styled.
   ============================================================ */

/* ---- page head ---- */
:where(body[data-page="about"]) .ab-head { padding: var(--s-9, 44px) 0 var(--s-7, 32px); }

:where(body[data-page="about"]) .ab-kicker {
    display: flex;
    align-items: center;
    gap: var(--s-3, 12px);
    margin: 0 0 var(--s-4, 16px);
}

:where(body[data-page="about"]) .ab-kicker-note {
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-10, 10px);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--txt-5);
}

/* The author's own headline. base.css gives h1 cyan + uppercase + a 1.5rem
   bottom margin; all three are reset here (BRIEF section 4.10 — every new
   heading resets colour and text-transform explicitly). Sentence case is
   deliberate: the pre-E8 page inherited base.css's blanket uppercase, which
   set a headline with an apostrophe and a hyphen in all caps. */
:where(body[data-page="about"]) .ab-title {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: var(--t-40, 40px);
    line-height: 1.24;
    letter-spacing: .01em;
    color: var(--txt);
    text-transform: none;
    text-align: left;
    margin: 0;
}

/* ---- section rhythm ---- */
:where(body[data-page="about"]) .ab-sec { padding: 0 0 var(--s-8, 36px); }
:where(body[data-page="about"]) .ab-sec--last { padding-bottom: var(--s-9, 44px); }

/* ---- credential chips ---- */
:where(body[data-page="about"]) .ab-creds {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2, 9px);
    margin: var(--s-5, 20px) 0 0;
}

/* ---- PROFILE: one panel per chapter, image side alternating ----
   The pre-E8 page put each chapter in a panel and flipped the row with
   :nth-child(odd); that selector counted .story-header as child 1, so the
   flip was one off from the article count. Here the articles are addressed
   directly, so CH.02 and CH.04 are the reversed ones — the same visual
   rhythm the page has always had. */
:where(body[data-page="about"]) .ab-ch {
    margin: 0 0 var(--s-6, 26px);
    transition: border-color .25s, transform .25s, box-shadow .25s;
}

:where(body[data-page="about"]) .ab-ch:last-of-type { margin-bottom: 0; }

/* the pre-E8 hover was a 15px --ac-crypto glow; the purple accent is being
   retired with the pages that used it, so this is the cyan every other card
   on the site uses (E7 .ar-card). */
:where(body[data-page="about"]) .ab-ch:hover {
    border-color: var(--cyan);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 214, 196, .25);
}

/* The figure column keeps the pre-E8 500px (user call, 2026-09-03): the five
   images are the page, not illustration. It steps down once before the layout
   stacks, because 500px inside a 900px viewport leaves the prose 296px. */
:where(body[data-page="about"]) .ab-ch-body {
    display: grid;
    grid-template-columns: 500px minmax(0, 1fr);
    gap: var(--s-7, 32px);
    align-items: center;
}

:where(body[data-page="about"]) .ab-ch:nth-of-type(even) .ab-fig { order: 2; }

:where(body[data-page="about"]) .ab-fig {
    border: 1px solid var(--cyan);
    border-radius: 0.25rem;
    overflow: hidden;
}

:where(body[data-page="about"]) .ab-fig img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .3s ease;
}

:where(body[data-page="about"]) .ab-fig:hover img { transform: scale(1.04); }

:where(body[data-page="about"]) .ab-ch-title {
    font-family: var(--f-display-cjk);
    font-weight: 700;
    font-size: var(--t-21, 21px);
    line-height: 1.35;
    color: var(--cyan);
    text-transform: none;
    margin: 0 0 var(--s-3, 12px);
}

:where(body[data-page="about"]) .ab-p {
    font-family: var(--f-cjk);
    font-size: var(--t-17, 17px);
    line-height: 1.9;
    color: var(--txt-3);
    margin: 0 0 var(--s-3, 12px);
}

:where(body[data-page="about"]) .ab-p:last-child { margin-bottom: 0; }

/* ---- narrow ---- */
@media (max-width: 1199px) {
    :where(body[data-page="about"]) .ab-ch-body { grid-template-columns: 380px minmax(0, 1fr); }
}

@media (max-width: 899px) {
    /* stacked: the flip would put CH.02's and CH.04's image BELOW their text,
       so the image leads every chapter on a narrow screen (the pre-E8 page
       did the same by switching both rows to flex-direction: column). */
    :where(body[data-page="about"]) .ab-ch:nth-of-type(even) .ab-fig { order: 0; }
    :where(body[data-page="about"]) .ab-head { padding: var(--s-7, 32px) 0 var(--s-6, 26px); }
    :where(body[data-page="about"]) .ab-title { font-size: var(--t-32, 32px); }
    :where(body[data-page="about"]) .ab-ch-body {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--s-5, 20px);
    }
    :where(body[data-page="about"]) .ab-fig { max-width: 500px; }
    :where(body[data-page="about"]) .ab-ch-title { font-size: var(--t-17, 17px); }
    :where(body[data-page="about"]) .ab-p { font-size: var(--t-14, 14px); }
}

@media (max-width: 599px) {
    :where(body[data-page="about"]) .ab-title { font-size: var(--t-26, 26px); }
    /* .section-head drops its trailing note on a phone, which is right for a
       count but wrong here: CH.03's note is the only place HSBC and BMO are
       named outside the prose. Wrap it onto its own line instead of hiding it. */
    :where(body[data-page="about"]) .ab-ch .section-head { flex-wrap: wrap; }
    :where(body[data-page="about"]) .ab-ch .section-head .sh-note {
        display: block;
        flex: 1 0 100%;
        white-space: normal;
        margin-top: var(--s-1, 6px);
    }
}

/* Nav active state (E2, 2026-08-27; re-homed on body[data-page] by E5a;
   CARRIED ACROSS by E8 — clearing the E5a block would have taken it away
   silently, which is how E5.3 once shipped a page with no active nav item).
   Pure CSS: the components are injected with innerHTML, so a <script> inside
   components/nav.html would never run. */
:where(body[data-page="about"]) header nav ul li a[href$="/pages/about.html"] {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}


/* ---------- disclaimer : disclaimer-specific-styles.css ---------- */
/* disclaimer-specific-styles.css */
:where(body[data-page="disclaimer"]) .disclaimer-section {
    background: var(--panel);
    border: 1px solid var(--ac-crypto);
    border-radius: 0.25rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

:where(body[data-page="disclaimer"]) .disclaimer-section h1 {
    color: var(--cyan);
    font-family: var(--f-display-cjk);
    font-size: var(--t-26);
    margin-bottom: 1.5rem;
}

:where(body[data-page="disclaimer"]) .disclaimer-section p {
    color: var(--txt-2);
    line-height: 1.8;
    font-size: var(--t-14);
    margin-bottom: 1.5rem;
}

:where(body[data-page="disclaimer"]) .privacy-section {
    background: var(--panel);
    border: 1px solid var(--acid);
    border-radius: 0.25rem;
    padding: 2rem;
}

:where(body[data-page="disclaimer"]) .privacy-section h1 {
    color: var(--acid);
    font-family: var(--f-display-cjk);
    font-size: var(--t-26);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {

    :where(body[data-page="disclaimer"]) .disclaimer-section,
:where(body[data-page="disclaimer"]) .privacy-section {
        padding: 1rem;
    }

    :where(body[data-page="disclaimer"]) .disclaimer-section h1,
:where(body[data-page="disclaimer"]) .privacy-section h1 {
        font-size: var(--t-21);
    }

}


/* ============================================================
   E5.5 · ARTICLE PAGE (2026-08-29) — design_v3 README §7.5
   content/posts/ pages, generated by sync.js. Reading mode: the shell
   stays, the page chrome withdraws.

   This section REPLACES the article half of the E5a blog block above.
   That block was shared by pages/views-and-blogs.html (data-page="blog")
   and the generated article pages (data-page="post"), so it could not be
   cleared wholesale the way E5.1–E5.4 cleared theirs — clearing it would
   have restyled the listing page, which is not in E5.5's scope. It was
   split instead: "blog" kept every rule verbatim, "post" comes here.

   Retired with the old article markup: .blog-post (and its :hover, which
   lifted the whole article 2px and threw a cyan box-shadow round it) ·
   .blog-title · .blog-meta · .blog-category · .blog-date · .blog-content
   and its twenty-odd descendant rules · .page-title (the three-layer glow
   + titlePulseBlog animation; README §11 — never put glow on text) ·
   .blog-list · .pagination · .no-posts — none of which the article page
   ever had markup for beyond the first six. The 47-line inline <style>
   sync.js used to emit is gone with them (Constitution C2 stage two:
   the last generator-owned page <style> on the site).

   TWO BARE ELEMENT SELECTORS came out of that block (BRIEF §4.17 — the
   family that has now bitten this project eight times). Both are kept
   here deliberately, because dropping them would change the injected
   shell on this page only:
     * a:hover { text-shadow: none } — base.css gives EVERY link a 5px
       acid hover glow, so this one bare rule is what keeps the header
       nav, the social icons and the footer links glow-free on an article
       page. Removing it would light them up here and nowhere else.
     * h1–h6 { text-shadow: none } — base.css puts a cyan glow on h1 and
       an acid glow on h2. The shell has no headings, so this one only
       reaches page content, but the reset is still required (BRIEF §4.10).
   E6 (2026-08-29) removed those base.css glows, so both rules went with them
   in that same commit — see the note further down where they used to sit.
   ============================================================ */

/* Nav active state (E2, 2026-08-27; re-homed on body[data-page] by E5a;
   CARRIED ACROSS by E5.5) — an article is part of DAILY BRIEF & ARCHIVE,
   so it lights the same nav item as pages/views-and-blogs.html. It used to
   ride on the shared blog selector; splitting the block would have taken
   it away silently (BRIEF §4.15 — E5.3 shipped a page with no active nav
   that way). Pure CSS: the components are injected with innerHTML, so a
   <script> inside components/nav.html would never run. */
:where(body[data-page="post"]) header nav ul li a[href$="/pages/views-and-blogs.html"] {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* E6 (2026-08-29): the two shell-reaching resets described in the header
   comment (a:hover and h1-h6, both text-shadow:none) were removed here in the
   same commit that removed the base.css glows they existed to cancel. Neither
   side can move without the other (BRIEF section 4.19). */

:where(body[data-page="post"]) .pd-panel[hidden] { display: none; }


/* ---- telemetry: three short cells (DATE / READ / CATEGORY). Left to
        flex-shrink they truncate together below the full container
        (BRIEF §4.13), so they stop shrinking here too. Below 600px the
        component's own rule keeps the first two — CATEGORY is still on
        screen as the kicker chip, so nothing is lost. ---- */
@media (max-width: 1239px) {
    :where(body[data-page="post"]) .cf-telemetry .cf-tm-cell { flex: 0 0 auto; }
    :where(body[data-page="post"]) .cf-telemetry .cf-tm-wide { flex: 0 1 auto; min-width: 0; }
}

@media (max-width: 599px) {
    :where(body[data-page="post"]) .cf-telemetry .cf-tm-cell:nth-child(2) { border-right: none; }
}


/* ---- 2px reading progress bar (README §7.5), pinned under the header.
        Fixed, so it adds nothing to any ancestor's scrollWidth; z-index
        stays below the header's 1000. Below 900px the nav drops into the
        tab strip inside the header, so the bar moves down by its 44px. ---- */
:where(body[data-page="post"]) .pd-progress {
    position: fixed;
    top: var(--header-h, 56px);
    left: 0;
    right: 0;
    height: 2px;
    background: var(--line-2);
    z-index: 900;
    pointer-events: none;
}

:where(body[data-page="post"]) .pd-progress > i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--acid);
}

@media (max-width: 899px) {
    :where(body[data-page="post"]) .pd-progress { top: calc(var(--header-h, 56px) + 44px); }
}


/* ---- shell: one reading column, 296px rail beside it at full width ----
        The rail only appears once the container is at its 1240px maximum;
        anything narrower stacks it under the article, which is also what
        README §7.5 asks for on mobile. */
:where(body[data-page="post"]) .pd-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-8, 36px);
    align-items: start;
    margin-top: var(--s-7, 32px);
}

@media (min-width: 1240px) {
    :where(body[data-page="post"]) .pd-shell {
        grid-template-columns: minmax(0, 1fr) 296px;
    }
}

:where(body[data-page="post"]) .pd-main { min-width: 0; }


/* ---- headline block ---- */
:where(body[data-page="post"]) .pd-head { margin: 0 0 var(--s-6, 26px); }

:where(body[data-page="post"]) .pd-kicker { margin: 0 0 var(--s-4, 16px); }

/* README §7.5 asks for 42px; 42 is not on the §5 ladder, so it snaps to
   --t-40 (the E3/E4 precedent for README values off their own ladder). */
:where(body[data-page="post"]) .pd-title {
    font-family: var(--f-cjk);
    font-weight: 900;
    font-size: var(--t-40, 40px);
    line-height: 1.26;
    color: var(--txt);
    text-transform: none;
    text-shadow: none;
    animation: none;
    margin: 0;
    text-wrap: balance;
}

:where(body[data-page="post"]) .pd-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2, 9px);
    margin: var(--s-3, 12px) 0 0;
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-11, 11px);
    line-height: 1.4;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-5);
}

:where(body[data-page="post"]) .pd-by-sep { color: var(--line-hi); }

/* lead = the post's own Notion Summary. --t-17 is the .lead-callout size
   already; README's 19px is off the ladder and snaps to it. */
:where(body[data-page="post"]) .pd-lead {
    margin: 0 0 var(--s-7, 32px);
    max-width: 66ch;
}

:where(body[data-page="post"]) .pd-lead p {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}


/* ---- body: 62ch reading column ---- */
:where(body[data-page="post"]) .pd-body {
    max-width: 62ch;
    font-family: var(--f-cjk);
    font-size: var(--t-17, 17px);
    line-height: 1.9;
    color: var(--txt-3);
    border-top: 1px solid var(--line);
    padding-top: var(--s-7, 32px);
}

/* The Notion posts carry their own line breaks INSIDE a single markdown
   paragraph (the lines that begin "•"), so those newlines are content, not
   formatting — pre-wrap has to stay or the bullets collapse into a blob.
   It sits on the text blocks rather than on the container, which is where
   the retired inline sheet had it: on the container it also turned the
   indentation between tags into blank line boxes. */
:where(body[data-page="post"]) .pd-body p,
:where(body[data-page="post"]) .pd-body li {
    font-family: var(--f-cjk);
    font-size: var(--t-17, 17px);
    line-height: 1.9;
    color: var(--txt-3);
    white-space: pre-wrap;
    text-wrap: pretty;
}

:where(body[data-page="post"]) .pd-body p { margin: 0 0 var(--s-6, 26px); }
:where(body[data-page="post"]) .pd-body > *:last-child { margin-bottom: 0; }

:where(body[data-page="post"]) .pd-body strong { color: var(--txt-2); font-weight: 700; }

/* README §7.5 sub-headings: 24px 900 — snapped to --t-26 / --t-21. */
:where(body[data-page="post"]) .pd-body h2 {
    font-family: var(--f-cjk);
    font-weight: 900;
    font-size: var(--t-26, 26px);
    line-height: 1.35;
    color: var(--txt);
    margin: var(--s-8, 36px) 0 var(--s-4, 16px);
    scroll-margin-top: calc(var(--header-h, 56px) + var(--s-5, 20px));
}

:where(body[data-page="post"]) .pd-body h3 {
    font-family: var(--f-cjk);
    font-weight: 700;
    font-size: var(--t-21, 21px);
    line-height: 1.4;
    color: var(--txt-2);
    margin: var(--s-7, 32px) 0 var(--s-3, 12px);
    scroll-margin-top: calc(var(--header-h, 56px) + var(--s-5, 20px));
}

:where(body[data-page="post"]) .pd-body h4,
:where(body[data-page="post"]) .pd-body h5,
:where(body[data-page="post"]) .pd-body h6 {
    font-family: var(--f-cjk);
    font-weight: 700;
    font-size: var(--t-17, 17px);
    line-height: 1.5;
    color: var(--txt-2);
    margin: var(--s-6, 26px) 0 var(--s-3, 12px);
}

:where(body[data-page="post"]) .pd-body ul,
:where(body[data-page="post"]) .pd-body ol {
    margin: 0 0 var(--s-6, 26px);
    padding-left: var(--s-6, 26px);
}

:where(body[data-page="post"]) .pd-body li { margin: 0 0 var(--s-3, 12px); }
:where(body[data-page="post"]) .pd-body li::marker { color: var(--txt-5); }

:where(body[data-page="post"]) .pd-body a {
    color: var(--cyan);
    text-decoration: none;
    text-shadow: none;
    border-bottom: 1px solid var(--line-hi);
}

:where(body[data-page="post"]) .pd-body a:hover {
    color: var(--cyan-hover);
    border-bottom-color: var(--cyan);
    text-shadow: none;
}

/* README §7.5 pull-quote: acid bar + acid tint, weight 500. 20px snaps
   to --t-21. marked() renders "> " as a blockquote, so this is the shape
   a Notion post gets by writing one. */
:where(body[data-page="post"]) .pd-body blockquote {
    margin: var(--s-7, 32px) 0;
    border-left: 3px solid var(--acid);
    background: var(--acid-tint);
    padding: var(--s-5, 20px) var(--s-6, 26px);
    font-size: var(--t-21, 21px);
    line-height: 1.7;
    font-weight: 500;
    color: var(--txt-2);
}

:where(body[data-page="post"]) .pd-body blockquote p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    color: inherit;
}

:where(body[data-page="post"]) .pd-body code {
    font-family: var(--f-mono-cjk);
    font-size: var(--t-14, 14px);
    background: var(--panel-3);
    border: 1px solid var(--line);
    padding: 1px 5px;
}

:where(body[data-page="post"]) .pd-body pre {
    margin: 0 0 var(--s-6, 26px);
    padding: var(--s-4, 16px);
    background: var(--panel-3);
    border: 1px solid var(--line);
    overflow-x: auto;
}

:where(body[data-page="post"]) .pd-body pre code {
    background: none;
    border: none;
    padding: 0;
}

:where(body[data-page="post"]) .pd-body img { max-width: 100%; height: auto; }

:where(body[data-page="post"]) .pd-body hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: var(--s-7, 32px) 0;
}


/* ---- disclaimer footnote ---- */
:where(body[data-page="post"]) .pd-note {
    margin-top: var(--s-8, 36px);
    max-width: 62ch;
}

:where(body[data-page="post"]) .pd-note .section-head { margin-bottom: var(--s-3, 12px); }

:where(body[data-page="post"]) .pd-note p {
    margin: 0;
    font-family: var(--f-cjk);
    font-size: var(--t-13, 13px);
    line-height: 1.8;
    color: var(--txt-5);
}

/* the link gets its own line so it can be a real 44px target without
   inflating the sentence above it (BRIEF §4.16) */
:where(body[data-page="post"]) .pd-note-link { margin-top: var(--s-1, 6px); }

:where(body[data-page="post"]) .pd-note a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--cyan);
    text-shadow: none;
}


/* ---- right rail ---- */
:where(body[data-page="post"]) .pd-rail {
    display: flex;
    flex-direction: column;
    gap: var(--s-6, 26px);
    min-width: 0;
}

@media (min-width: 1240px) {
    :where(body[data-page="post"]) .pd-rail {
        position: sticky;
        top: calc(var(--header-h, 56px) + var(--s-6, 26px));
    }
}

:where(body[data-page="post"]) .pd-toc-list,
:where(body[data-page="post"]) .pd-rel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 44px comes from the flex box, not from padding: at --t-11 a padded link
   still lands around 30px (BRIEF §4.16). */
:where(body[data-page="post"]) .pd-toc-item a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0 0 var(--s-3, 12px);
    border-left: 2px solid var(--line);
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-11, 11px);
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--txt-5);
    text-decoration: none;
    text-shadow: none;
    transition: color .15s ease, border-color .15s ease;
}

:where(body[data-page="post"]) .pd-toc-item--sub a { padding-left: var(--s-5, 20px); }

:where(body[data-page="post"]) .pd-toc-item a:hover {
    color: var(--cyan);
    border-left-color: var(--cyan);
    text-shadow: none;
}

:where(body[data-page="post"]) .pd-toc-item a[aria-current="true"] {
    color: var(--acid);
    border-left-color: var(--acid);
}

:where(body[data-page="post"]) .pd-rel-item + .pd-rel-item {
    border-top: 1px solid var(--line-2);
}

:where(body[data-page="post"]) .pd-rel-item a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
    padding: var(--s-3, 12px) 0;
    text-decoration: none;
    text-shadow: none;
}

:where(body[data-page="post"]) .pd-rel-meta {
    font-family: var(--f-mono-cjk);
    font-weight: 500;
    font-size: var(--t-10, 10px);
    line-height: 1.4;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-5);
}

:where(body[data-page="post"]) .pd-rel-title {
    margin-top: 4px;
    font-family: var(--f-cjk);
    font-weight: 700;
    font-size: var(--t-14, 14px);
    line-height: 1.5;
    color: var(--txt-2);
    transition: color .15s ease;
}

:where(body[data-page="post"]) .pd-rel-item a:hover .pd-rel-title { color: var(--cyan); }

/* the shared focus ring (components.css §6 head) does not know these
   selectors, so they opt in here */
:where(body[data-page="post"]) .pd-toc-item a:focus-visible,
:where(body[data-page="post"]) .pd-rel-item a:focus-visible,
:where(body[data-page="post"]) .pd-body a:focus-visible,
:where(body[data-page="post"]) .pd-note a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}


@media (max-width: 899px) {
    :where(body[data-page="post"]) .pd-shell {
        gap: var(--s-7, 32px);
        margin-top: var(--s-6, 26px);
    }
    /* README §7.5 mobile headline 29px — between two ladder steps; 32 down
       to 900px, 26 on a phone. */
    :where(body[data-page="post"]) .pd-title { font-size: var(--t-32, 32px); }
    :where(body[data-page="post"]) .pd-body { max-width: none; }
    :where(body[data-page="post"]) .pd-note { max-width: none; }
    :where(body[data-page="post"]) .pd-body blockquote { font-size: var(--t-17, 17px); }
}

@media (max-width: 599px) {
    :where(body[data-page="post"]) .pd-title { font-size: var(--t-26, 26px); }
    :where(body[data-page="post"]) .pd-body { padding-top: var(--s-6, 26px); }
    :where(body[data-page="post"]) .pd-body h2 { font-size: var(--t-21, 21px); }
    :where(body[data-page="post"]) .pd-body h3 { font-size: var(--t-17, 17px); }
}
