/* The long read about the Polymarket and Binance hacks of 29–30 October 2026
   (/p/binance-polymarket-hacks, resources/views/blog/hacks). A plain static stylesheet, no Vite entry.
   Everything is scoped under .hx-page: the site still loads Bootstrap and its old global stylesheet
   (which centres every h2 and paints blockquotes). Built on the S-1 long read's layout. */

.hx-body,
.hx-page {
    --paper: #f5f4f0;
    --paper-2: #fdfcfa;
    --paper-3: #e9e7e1;
    --ink: #15171a;
    --ink-2: #393e46;
    --muted: #666b74;
    --line: #dcd9d1;
    --line-2: #c4c0b5;

    --accent: #b42318;
    --accent-2: #8a1a12;
    --accent-soft: color-mix(in srgb, var(--accent) 9%, var(--paper));
    --accent-ink: #fdfcfa;
    --good: #1c7a4b;
    --good-soft: color-mix(in srgb, var(--good) 11%, var(--paper));
    --warn: #8a5a06;
    --warn-soft: color-mix(in srgb, #c8890f 14%, var(--paper));
    --focus: #2563c9;

    /* timeline tracks */
    --t-pm: #2b62a8;
    --t-bn: #b26a00;
    --t-frz: #1c7a4b;
    --t-mkt: #6a6f78;
    --t-pre: #7a4fb8;

    --font-text: 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --font-ui: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --r: 12px;
    --r-sm: 8px;
    --shadow: 0 1px 2px rgb(30 25 20 / 0.06), 0 10px 26px -16px rgb(30 25 20 / 0.28);
    --top-h: 54px;
    --gutter: 16px;
    --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
    .hx-body,
    .hx-page {
        --paper: #141619;
        --paper-2: #1c1f23;
        --paper-3: #252a30;
        --ink: #ebe8e2;
        --ink-2: #c8c5be;
        --muted: #989ca4;
        --line: #31373e;
        --line-2: #434b55;

        --accent: #f0776b;
        --accent-2: #f59a90;
        --accent-soft: color-mix(in srgb, var(--accent) 13%, var(--paper));
        --accent-ink: #141619;
        --good: #6fcf9a;
        --good-soft: color-mix(in srgb, var(--good) 12%, var(--paper));
        --warn: #e8b85c;
        --warn-soft: color-mix(in srgb, #e8b85c 13%, var(--paper));
        --focus: #8ab0f7;

        --t-pm: #78aef0;
        --t-bn: #e9a93c;
        --t-frz: #6fcf9a;
        --t-mkt: #9a9ea6;
        --t-pre: #b79bf0;

        --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 28px -16px rgb(0 0 0 / 0.75);
    }
}

/* ------------------------------------------------------------------ page */

body.hx-body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
}

.hx-page {
    position: relative;
    min-height: 100svh;
    overflow-x: clip;
    font-family: var(--font-text);
    font-size: 18.5px;
    line-height: 1.68;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-variant-numeric: lining-nums;
}
.hx-page *, .hx-page *::before, .hx-page *::after { box-sizing: border-box; }
:where(.hx-page) p, :where(.hx-page) ul, :where(.hx-page) ol, :where(.hx-page) dl, :where(.hx-page) dd, :where(.hx-page) dt,
:where(.hx-page) figure, :where(.hx-page) blockquote, :where(.hx-page) h1, :where(.hx-page) h2, :where(.hx-page) h3, :where(.hx-page) h4,
:where(.hx-page) table { margin: 0; }
:where(.hx-page) h1, :where(.hx-page) h2, :where(.hx-page) h3, :where(.hx-page) h4 { text-align: left; color: inherit; }
:where(.hx-page) dt { font-weight: inherit; }
:where(.hx-page) a { color: inherit; }
:where(.hx-page) b, :where(.hx-page) strong { font-weight: 650; }
.hx-page :focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.hx-page code { font-family: var(--font-mono); font-size: 0.86em; color: inherit; overflow-wrap: anywhere; }

.hx-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.hx-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 60;
    pointer-events: none;
}
.hx-progress span {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(var(--p, 0));
}

/* ------------------------------------------------------------------ top bar */

.hx-top {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--top-h);
    padding: 0 max(var(--gutter), env(safe-area-inset-left));
    font-family: var(--font-ui);
    font-size: 15px;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.hx-top a { text-decoration: none; }
.hx-top__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.01em; }
.hx-top__brand img { border-radius: 6px; }
.hx-top__sep { color: var(--line-2); }
.hx-top__crumb { color: var(--muted); font-weight: 500; }
.hx-top__crumb:hover { color: var(--ink); }
.hx-top__nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hx-top__doc {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    background: var(--ink);
    color: var(--paper) !important;
}
.hx-top__doc:hover { background: var(--accent); }
.hx-top__short { display: none; }
.hx-top__lang {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
}
.hx-top__lang:hover { border-color: var(--ink); }

@media (max-width: 560px) {
    .hx-top { gap: 8px; font-size: 14px; }
    .hx-top__brand span { display: none; }
    .hx-top__long { display: none; }
    .hx-top__short { display: inline; }
}

/* ------------------------------------------------------------------ hero */

.hx-article { padding-bottom: 32px; }

.hx-hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(36px, 7vw, 88px) var(--gutter) clamp(24px, 4vw, 40px);
}
.hx-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}
.hx-eyebrow::before {
    content: '';
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.hx-hero__title {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: clamp(32px, 5.6vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.03em;
    max-width: 16em;
    text-wrap: balance;
}
.hx-hero__dek {
    margin-top: 24px;
    max-width: 40em;
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.6;
    color: var(--ink-2);
}
.hx-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 22px;
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--muted);
}
.hx-hero__meta span:first-child { color: var(--ink); font-weight: 600; }
.hx-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hx-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 650;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.hx-btn--primary { background: var(--accent); color: var(--accent-ink) !important; }
.hx-btn--primary:hover { background: var(--accent-2); }
.hx-btn--ghost { border: 1.5px solid var(--line-2); }
.hx-btn--ghost:hover { border-color: var(--ink); }

/* ------------------------------------------------------------------ stats */

.hx-stats {
    width: min(1088px, calc(100% - 2 * var(--gutter)));
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border-block: 1px solid var(--line);
}
.hx-stats > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 6px;
    padding: 20px 20px 22px;
    background: var(--paper);
}
.hx-stats dd {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.hx-stats dd small { font-size: 0.5em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.hx-stats dt { font-family: var(--font-ui); font-size: 14px; line-height: 1.4; color: var(--muted); max-width: 22em; }
.hx-stats .is-loss { color: var(--accent); }
.hx-stats .is-frozen { color: var(--good); }
@media (max-width: 900px) { .hx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) {
    .hx-stats > div { padding: 16px 12px 18px; }
    .hx-stats dt { font-size: 13px; }
}

/* ------------------------------------------------------------------ layout */

.hx-layout {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) var(--gutter) 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}
.hx-flow { max-width: var(--measure); min-width: 0; }

.hx-toc {
    position: sticky;
    top: calc(var(--top-h) + 24px);
    font-family: var(--font-ui);
    font-size: 14.5px;
    line-height: 1.35;
}
.hx-toc__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}
.hx-toc ol { list-style: none; padding: 0; border-left: 1px solid var(--line); }
.hx-toc__group {
    margin: 18px 0 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}
.hx-toc__title + .hx-toc__group { margin-top: 0; }
.hx-toc a {
    display: block;
    padding: 6px 0 6px 14px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--muted);
    text-decoration: none;
}
.hx-toc a:hover { color: var(--ink); }
.hx-toc a.is-active { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }

@media (max-width: 980px) {
    .hx-layout { grid-template-columns: minmax(0, 1fr); }
    .hx-flow { max-width: none; }
    .hx-toc {
        position: static;
        padding: 16px 18px;
        border: 1px solid var(--line);
        border-radius: var(--r);
        background: var(--paper-2);
    }
    .hx-toc ol { border-left: 0; columns: 2; column-gap: 24px; }
    .hx-toc__group { margin-top: 14px; }
    .hx-toc a { padding: 4px 0; border-left: 0; margin: 0; }
    .hx-toc a.is-active { color: var(--accent); }
}
@media (max-width: 520px) { .hx-toc ol { columns: 1; } }

/* ------------------------------------------------------------------ sections and text */

.hx-sec { padding-top: clamp(40px, 6vw, 64px); scroll-margin-top: calc(var(--top-h) + 12px); }
.hx-sec > * + * { margin-top: 1.05em; }
.hx-disclaimer--top { margin-bottom: 8px; }

/* the three parts: Binance, Polymarket, my opinion */
.hx-part { padding-top: clamp(56px, 8vw, 96px); scroll-margin-top: calc(var(--top-h) + 12px); }
.hx-disclaimer--top + .hx-part { padding-top: clamp(28px, 4vw, 40px); }
.hx-part__head { padding-top: 20px; border-top: 3px solid var(--ink); }
.hx-part__kicker {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}
.hx-part__title {
    margin-top: 6px;
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.hx-part__lead { margin-top: 16px; font-size: 1.1em; line-height: 1.6; color: var(--ink); }
.hx-part__lead + .hx-part__lead { margin-top: 0.8em; font-size: 1em; color: var(--ink-2); }
.hx-part__head + .hx-sec { padding-top: clamp(32px, 4.5vw, 48px); }
.hx-part__head + .hx-points { margin-top: 28px; }
.hx-sec--appendix { padding-top: clamp(56px, 8vw, 88px); }
.hx-kicker {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
}
.hx-kicker + .hx-sec__title { margin-top: 6px; }
.hx-sec__title {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: clamp(27px, 3.4vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.hx-sec h4 {
    font-family: var(--font-ui);
    font-weight: 750;
    font-size: clamp(20px, 2.2vw, 23px);
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-top: 1.8em;
}
.hx-lead-in { font-size: 1.08em; color: var(--ink); }
.hx-sec p a, .hx-sec li a, .hx-gloss a, .hx-sec td a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.hx-sec p a:hover, .hx-sec li a:hover { color: var(--accent-2); }

.hx-list { padding-left: 1.2em; }
.hx-list li + li { margin-top: 0.5em; }
.hx-list li::marker { color: var(--accent); }

.hx-quote {
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--line-2);
    font-style: italic;
    color: var(--ink-2);
}
.hx-quote cite { display: block; margin-top: 4px; font-family: var(--font-ui); font-style: normal; font-size: 14px; color: var(--muted); }

/* tl;dr */
.hx-tldr {
    padding: 24px 26px 26px;
    border-radius: var(--r);
    background: var(--paper-2);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.hx-tldr__title {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.hx-tldr ul { list-style: none; padding: 0; }
.hx-tldr li { position: relative; padding-left: 26px; }
.hx-tldr li + li { margin-top: 0.8em; }
.hx-tldr li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--accent);
}
.hx-disclaimer { font-family: var(--font-ui); font-size: 14px; line-height: 1.55; color: var(--muted); }

/* notes */
.hx-note {
    padding: 18px 22px 20px;
    border-radius: var(--r);
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
}
.hx-note--warn { background: var(--warn-soft); border-left-color: var(--warn); }
.hx-note--good { background: var(--good-soft); border-left-color: var(--good); }
.hx-note__title {
    font-family: var(--font-ui);
    font-weight: 750;
    font-size: 17px;
    margin-bottom: 6px;
}
.hx-note p + p { margin-top: 0.6em; }
.hx-note p { font-size: 17px; line-height: 1.62; }

/* numbered steps */
.hx-steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.hx-steps > li {
    counter-increment: step;
    position: relative;
    padding: 16px 18px 17px 58px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper-2);
    font-size: 17px;
    line-height: 1.6;
}
.hx-steps > li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 16px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
}
.hx-steps b:first-child { display: block; font-family: var(--font-ui); font-weight: 750; font-size: 17px; margin-bottom: 2px; }
@media (max-width: 520px) {
    .hx-steps > li { padding: 14px 14px 15px 50px; font-size: 16.5px; }
    .hx-steps > li::before { left: 12px; top: 14px; }
}

/* analysis points */
.hx-points { list-style: none; padding: 0; counter-reset: pt; display: grid; gap: 0; border-top: 1px solid var(--line); }
.hx-points > li {
    counter-increment: pt;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 4px 12px;
    padding: 18px 0 20px;
    border-bottom: 1px solid var(--line);
}
.hx-points > li::before {
    content: counter(pt, decimal-leading-zero);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
    padding-top: 3px;
}
.hx-points h3 {
    grid-column: 2;
    font-family: var(--font-ui);
    font-weight: 750;
    font-size: clamp(19px, 2.1vw, 21px);
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.hx-points p { grid-column: 2; font-size: 17px; line-height: 1.62; }
.hx-points p + p { margin-top: 0.6em; }

/* ------------------------------------------------------------------ figures */

.hx-fig {
    margin-top: 1.6em;
    padding: 20px 20px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper-2);
    font-family: var(--font-ui);
}
.hx-sec > .hx-fig + * { margin-top: 1.6em; }
.hx-fig__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; }
.hx-fig__title { font-weight: 750; font-size: 16px; line-height: 1.3; }
.hx-fig__unit { font-size: 13px; color: var(--muted); }
.hx-fig figcaption { margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 520px) {
    .hx-fig { padding: 16px 13px 13px; }
    .hx-tldr { padding: 20px 16px 20px; }
}

/* timeline */
.hx-tl-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-ui); font-size: 13.5px; color: var(--muted); }
.hx-tl-legend li { display: inline-flex; align-items: center; gap: 7px; }
.hx-tl-legend li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--tc); }

.hx-tl { list-style: none; padding: 0; font-family: var(--font-ui); }
.hx-tl__day {
    position: sticky;
    top: var(--top-h);
    z-index: 2;
    margin-top: 22px;
    padding: 8px 0 6px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--paper);
    border-bottom: 1.5px solid var(--ink);
}
.hx-tl__day:first-child { margin-top: 0; }
.hx-tl__ev {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 2px 16px;
    padding: 12px 0 13px;
    border-bottom: 1px dashed var(--line);
}
.hx-tl__ev time {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding-top: 2px;
    white-space: nowrap;
}
.hx-tl__body { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.hx-tl__body::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--tc);
}
.hx-tl__tag {
    display: inline-block;
    margin-right: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tc);
}
.hx-tl__body b { color: var(--ink); font-weight: 650; }
.hx-tl__ev--key .hx-tl__body { color: var(--ink); }
.hx-tl__ev--key .hx-tl__body::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 25%, transparent); }
.t-pm { --tc: var(--t-pm); }
.t-bn { --tc: var(--t-bn); }
.t-frz { --tc: var(--t-frz); }
.t-mkt { --tc: var(--t-mkt); }
.t-pre { --tc: var(--t-pre); }
@media (max-width: 520px) {
    .hx-tl__ev { grid-template-columns: 52px minmax(0, 1fr); gap: 2px 10px; }
    .hx-tl__ev time { font-size: 13px; }
    .hx-tl__body { font-size: 15px; padding-left: 15px; }
}

/* horizontal bars */
.hx-hbars { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 12px; }
.hx-hbars li { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.hx-hbars__who { font-size: 14.5px; line-height: 1.3; }
.hx-hbars__who b { font-weight: 750; }
.hx-hbars__who span { display: block; font-size: 12.5px; color: var(--muted); }
.hx-hbars__track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hx-hbars__bar {
    flex: 0 0 auto;
    height: 18px;
    width: calc(var(--w) * 0.7);
    min-width: 4px;
    border-radius: 3px;
    background: var(--bc, var(--accent));
}
.hx-hbars__bar--range {
    background: linear-gradient(to right, var(--bc, var(--accent)) 0 var(--from), transparent var(--from)),
        repeating-linear-gradient(-45deg, var(--bc, var(--accent)) 0 3px, transparent 3px 7px);
    outline: 1px dashed var(--bc, var(--accent));
    outline-offset: -1px;
}
.hx-hbars__bar--muted { --bc: var(--t-mkt); opacity: 0.75; }
.hx-hbars__bar--frz { --bc: var(--good); }
.hx-hbars__val { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hx-hbars__val small { font-family: var(--font-ui); font-size: 11.5px; font-weight: 500; color: var(--muted); }
.hx-hbars__sum { margin-top: 16px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.hx-hbars__sum b { color: var(--ink); white-space: nowrap; }
@media (max-width: 560px) {
    .hx-hbars li { grid-template-columns: minmax(0, 1fr); }
    .hx-hbars__bar { width: calc(var(--w) * 0.62); }
}

.hx-hbars__extra { padding-top: 12px; border-top: 1px dashed var(--line); }

/* line chart: the SVG stretches, every label is HTML */
.hx-chart {
    position: relative;
    height: clamp(190px, 30vw, 260px);
    margin: 34px 6px 34px 54px;
}
.hx-chart__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hx-chart__grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hx-chart__grid .hx-chart__base { stroke: var(--ink); stroke-width: 1.5; }
.hx-chart__area { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.hx-chart__line { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hx-chart__y, .hx-chart__x { position: absolute; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; line-height: 1; }
.hx-chart__y { right: calc(100% + 8px); transform: translateY(-50%); }
.hx-chart__x { top: calc(100% + 9px); transform: translateX(-50%); }
.hx-chart__x--first { transform: none; }
.hx-chart__ev { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--accent); }
.hx-chart__ev b, .hx-chart__events b {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
}
.hx-chart__ev b { position: absolute; top: -26px; left: -10.75px; }
.hx-chart__dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--ink); }
.hx-chart__label {
    position: absolute;
    padding: 1px 4px;
    border-radius: 4px;
    background: var(--paper-2);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 650;
    color: var(--ink);
    white-space: nowrap;
    line-height: 1.2;
}
.hx-chart__label--start { transform: translate(10px, -50%); }
.hx-chart__label--end { transform: translate(calc(-100% - 10px), -50%); }
.hx-chart__events { list-style: none; padding: 0; margin-top: 4px; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.hx-chart__events li { display: flex; align-items: flex-start; gap: 10px; }
.hx-chart__events b { flex: none; margin-top: -1px; }
.hx-chart__events time { font-family: var(--font-mono); font-weight: 600; color: var(--ink); margin-right: 4px; }
@media (max-width: 520px) {
    .hx-chart { margin-left: 46px; }
    .hx-chart__y, .hx-chart__x { font-size: 10.5px; }
}

/* tables */
.hx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: -2px; padding-inline: 2px; }
.hx-table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 15px; font-family: var(--font-ui); }
.hx-table th, .hx-table td { padding: 9px 10px 9px 0; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
.hx-table thead th { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.hx-table tbody th { font-weight: 650; color: var(--ink); white-space: nowrap; }
.hx-table td { color: var(--ink-2); line-height: 1.45; }
.hx-table td.num, .hx-table th.num { text-align: right; font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-table thead th.num { font-family: var(--font-ui); }
.hx-table .is-loss { color: var(--accent); }
.hx-table .is-up { color: var(--good); }
.hx-table tr.is-key > * { background: var(--accent-soft); }
@media (max-width: 520px) {
    .hx-table { font-size: 14px; }
    .hx-table .hx-opt { display: none; }
}

/* known / unknown */
.hx-gaps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hx-gaps > div { padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); }
.hx-gaps > div:first-child { box-shadow: inset 0 3px 0 var(--good); }
.hx-gaps > div:last-child { box-shadow: inset 0 3px 0 var(--accent); }
.hx-gaps__title { font-family: var(--font-ui); font-weight: 750; font-size: 16px; margin-bottom: 8px; }
.hx-gaps ul { padding-left: 1.15em; font-size: 16px; line-height: 1.55; }
.hx-gaps li + li { margin-top: 0.45em; }
@media (max-width: 640px) { .hx-gaps { grid-template-columns: minmax(0, 1fr); } }

/* glossary */
.hx-gloss { display: grid; gap: 0; border-top: 1px solid var(--line); }
.hx-gloss > div {
    display: grid;
    grid-template-columns: minmax(0, 12em) minmax(0, 1fr);
    gap: 4px 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.hx-gloss dt { font-family: var(--font-ui); font-weight: 750; font-size: 15.5px; }
.hx-gloss dd { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 560px) { .hx-gloss > div { grid-template-columns: minmax(0, 1fr); } }

/* sources */
.hx-sources { padding-left: 1.4em; font-family: var(--font-ui); font-size: 15px; line-height: 1.5; }
.hx-sources li + li { margin-top: 0.45em; }
.hx-sources li::marker { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.hx-sources span { color: var(--muted); }
.hx-sources a { overflow-wrap: anywhere; }

.hx-about {
    font-family: var(--font-ui);
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--muted);
}
.hx-about > * + * { margin-top: 0.7em; }

/* ------------------------------------------------------------------ footer */

.hx-foot {
    margin-top: clamp(48px, 8vw, 96px);
    border-top: 1px solid var(--line);
    background: var(--paper-3);
    font-family: var(--font-ui);
    font-size: 15px;
}
.hx-foot__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px var(--gutter) max(36px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 32px;
}
.hx-foot__title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.hx-foot ul { list-style: none; padding: 0; }
.hx-foot li + li { margin-top: 6px; }
.hx-foot a { text-decoration: none; }
.hx-foot a:hover { color: var(--accent); }
.hx-foot__copy { margin-top: 16px; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) { .hx-foot__inner { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
    .hx-page * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
    .hx-top, .hx-progress, .hx-toc, .hx-hero__cta, .hx-foot { display: none !important; }
    .hx-layout { display: block; }
    .hx-tl__day { position: static; }
}
