/* The long read about Anthropic's S-1 (/p/anthropic-ipo-s1, resources/views/blog/anthropic-ipo).
   A plain static stylesheet, no Vite entry. Everything is scoped under .ipo-page: the site still
   loads Bootstrap and its old global stylesheet (which centres every h2 and paints blockquotes). */

.ipo-body,
.ipo-page {
    --paper: #f6f3ec;
    --paper-2: #fffdf8;
    --paper-3: #ece6da;
    --ink: #17191c;
    --ink-2: #3b4048;
    --muted: #6a6f78;
    --line: #ddd5c6;
    --line-2: #c9bfad;

    --accent: #b4512b;
    --accent-2: #8f3d1f;
    --accent-soft: color-mix(in srgb, var(--accent) 11%, var(--paper));
    --accent-ink: #fffdf8;
    --cost: #5d6b7e;
    --cost-soft: color-mix(in srgb, var(--cost) 18%, var(--paper));
    --good: #1c7a4b;
    --bad: #b8332b;
    --warn: #8a5a06;
    --warn-soft: color-mix(in srgb, #c8890f 14%, var(--paper));
    --focus: #2563c9;

    --g-biz: #b4512b;
    --g-ip: #2f6fa8;
    --g-law: #7a4fb8;
    --g-tax: #8a6a12;
    --g-gov: #1f7a72;
    --g-own: #b0365f;

    --c-a: #2f6fa8;
    --c-n: #6a6f78;
    --c-f: #b4512b;
    --c-t: #1f7a72;
    --c-e: #8a6a12;

    --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(40 30 15 / 0.06), 0 10px 26px -16px rgb(40 30 15 / 0.28);
    --top-h: 54px;
    --gutter: 16px;
    --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
    .ipo-body,
    .ipo-page {
        --paper: #16191d;
        --paper-2: #1e2227;
        --paper-3: #262b31;
        --ink: #ece8e0;
        --ink-2: #c9c5bd;
        --muted: #9a9ea6;
        --line: #333a42;
        --line-2: #454d57;

        --accent: #ec8c62;
        --accent-2: #f3a684;
        --accent-soft: color-mix(in srgb, var(--accent) 15%, var(--paper));
        --accent-ink: #16191d;
        --cost: #8e9db2;
        --cost-soft: color-mix(in srgb, var(--cost) 20%, var(--paper));
        --good: #6fcf9a;
        --bad: #f28c82;
        --warn: #e8b85c;
        --warn-soft: color-mix(in srgb, #e8b85c 13%, var(--paper));
        --focus: #8ab0f7;

        --g-biz: #ec8c62;
        --g-ip: #74aee6;
        --g-law: #b79bf0;
        --g-tax: #d9b552;
        --g-gov: #5cc4b8;
        --g-own: #f08bb0;

        --c-a: #74aee6;
        --c-n: #9a9ea6;
        --c-f: #ec8c62;
        --c-t: #5cc4b8;
        --c-e: #d9b552;

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

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

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

.ipo-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;
}
.ipo-page *, .ipo-page *::before, .ipo-page *::after { box-sizing: border-box; }
:where(.ipo-page) p, :where(.ipo-page) ul, :where(.ipo-page) ol, :where(.ipo-page) dl, :where(.ipo-page) dd, :where(.ipo-page) dt,
:where(.ipo-page) figure, :where(.ipo-page) blockquote, :where(.ipo-page) h1, :where(.ipo-page) h2, :where(.ipo-page) h3, :where(.ipo-page) h4,
:where(.ipo-page) table { margin: 0; }
:where(.ipo-page) h1, :where(.ipo-page) h2, :where(.ipo-page) h3, :where(.ipo-page) h4 { text-align: left; color: inherit; }
:where(.ipo-page) dt { font-weight: inherit; }
:where(.ipo-page) a { color: inherit; }
:where(.ipo-page) b, :where(.ipo-page) strong { font-weight: 650; }
.ipo-page :focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.ipo-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;
}

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

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

.ipo-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;
}
.ipo-top a { text-decoration: none; }
.ipo-top__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.01em; }
.ipo-top__brand img { border-radius: 6px; }
.ipo-top__sep { color: var(--line-2); }
.ipo-top__crumb { color: var(--muted); font-weight: 500; }
.ipo-top__crumb:hover { color: var(--ink); }
.ipo-top__nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ipo-top__doc {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    background: var(--ink);
    color: var(--paper) !important;
}
.ipo-top__doc:hover { background: var(--accent); }
.ipo-top__short { display: none; }
.ipo-top__lang {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
}
.ipo-top__lang:hover { border-color: var(--ink); }

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

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

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

.ipo-hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(36px, 7vw, 88px) var(--gutter) clamp(24px, 4vw, 40px);
}
.ipo-eyebrow {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}
.ipo-hero__title {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: clamp(30px, 5.4vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.03em;
    max-width: 18em;
    text-wrap: balance;
}
.ipo-hero__dek {
    margin-top: 24px;
    max-width: 40em;
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.6;
    color: var(--ink-2);
}
.ipo-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 22px;
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--muted);
}
.ipo-hero__meta span:first-child { color: var(--ink); font-weight: 600; }
.ipo-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.ipo-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;
}
.ipo-btn--primary { background: var(--accent); color: var(--accent-ink) !important; }
.ipo-btn--primary:hover { background: var(--accent-2); }
.ipo-btn--ghost { border: 1.5px solid var(--line-2); }
.ipo-btn--ghost:hover { border-color: var(--ink); }

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

.ipo-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);
}
.ipo-stats > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 6px;
    padding: 20px 20px 22px;
    background: var(--paper);
}
.ipo-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;
}
.ipo-stats dd small { font-size: 0.5em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.ipo-stats dt { font-family: var(--font-ui); font-size: 14px; line-height: 1.4; color: var(--muted); max-width: 22em; }
@media (max-width: 900px) { .ipo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) {
    .ipo-stats > div { padding: 16px 12px 18px; }
    .ipo-stats dt { font-size: 13px; }
}

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

.ipo-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;
}
.ipo-flow { max-width: var(--measure); min-width: 0; }

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

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

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

.ipo-sec { padding-top: clamp(40px, 6vw, 64px); scroll-margin-top: calc(var(--top-h) + 12px); }
.ipo-sec:first-child { padding-top: 0; }
.ipo-sec > * + * { margin-top: 1.05em; }
.ipo-kicker {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
}
.ipo-kicker + h2 { margin-top: 6px; }
.ipo-sec h2 {
    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;
}
.ipo-sec h3 {
    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;
}
.ipo-lead-in { font-size: 1.08em; color: var(--ink); }
.ipo-sec p a, .ipo-sec li a, .ipo-gloss a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.ipo-sec p a:hover, .ipo-sec li a:hover { color: var(--accent-2); }

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

/* tl;dr */
.ipo-tldr {
    padding: 24px 26px 26px;
    border-radius: var(--r);
    background: var(--paper-2);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.ipo-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;
}
.ipo-tldr ul { list-style: none; padding: 0; }
.ipo-tldr li { position: relative; padding-left: 26px; }
.ipo-tldr li + li { margin-top: 0.8em; }
.ipo-tldr li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--accent);
}
.ipo-disclaimer { font-family: var(--font-ui); font-size: 14px; color: var(--muted); }

/* reasons */
.ipo-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 1.4em; }
.ipo-reason {
    position: relative;
    padding: 20px 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper-2);
}
.ipo-reason__n {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 13px;
    color: var(--accent-ink);
    background: var(--accent);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.ipo-sec .ipo-reason h3 { margin-top: 12px; font-size: 18px; }
.ipo-reason p:last-child { margin-top: 8px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 640px) { .ipo-reasons { grid-template-columns: minmax(0, 1fr); } }

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

/* small stat list */
.ipo-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ipo-mini > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 4px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    background: var(--paper-2);
    border: 1px solid var(--line);
}
.ipo-mini dd { font-family: var(--font-ui); font-weight: 800; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ipo-mini dt { font-family: var(--font-ui); font-size: 13.5px; line-height: 1.35; color: var(--muted); }

/* net loss breakdown */
.ipo-equation {
    font-family: var(--font-ui);
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper-2);
    overflow: hidden;
}
.ipo-equation > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 18px;
    font-size: 15.5px;
}
.ipo-equation > div + div { border-top: 1px dashed var(--line); }
.ipo-equation span { color: var(--ink-2); }
.ipo-equation b { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ipo-equation__total { background: var(--paper-3); }
.ipo-equation > .ipo-equation__total { border-top: 1.5px solid var(--ink); }
.ipo-equation__total span { color: var(--ink); font-weight: 700; }
.ipo-equation__total b { color: var(--bad); font-size: 17px; }

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

.ipo-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);
}
.ipo-sec > .ipo-fig + * { margin-top: 1.6em; }
.ipo-fig__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; }
.ipo-fig__title { font-weight: 750; font-size: 16px; line-height: 1.3; }
.ipo-fig figcaption { margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

.ipo-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.ipo-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ipo-legend li::before { content: ''; width: 11px; height: 11px; border-radius: 3px; }
.ipo-legend__rev::before { background: var(--accent); }
.ipo-legend__cost::before { background: var(--cost); }

/* column chart */
.ipo-cols {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(4px, 1.6vw, 14px);
    margin-top: 18px;
}
.ipo-col { display: flex; flex-direction: column; min-width: 0; }
.ipo-col__plot {
    position: relative;
    height: clamp(220px, 34vw, 290px);
    padding-top: 22px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    border-bottom: 1.5px solid var(--ink);
    background-image: linear-gradient(to top, var(--line) 1px, transparent 1px);
    background-size: 100% 25%;
}
.ipo-col__bar {
    position: relative;
    width: min(44%, 26px);
    height: var(--h);
    min-height: 2px;
    border-radius: 4px 4px 0 0;
}
.ipo-col__bar--rev { background: var(--accent); }
.ipo-col__bar--cost { background: var(--cost); opacity: 0.85; }
.ipo-col__bar b, .ipo-col__bar i {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.ipo-col__bar b { color: var(--accent); }
.ipo-col__bar i { color: var(--cost); font-weight: 600; }
.ipo-col:last-child .ipo-col__bar i { bottom: auto; top: 6px; color: var(--paper-2); }
.ipo-col__label { margin-top: 8px; text-align: center; font-size: 12.5px; line-height: 1.25; color: var(--muted); }
@media (max-width: 560px) {
    .ipo-col__bar b { font-size: 10.5px; transform: translateX(-30%); }
    .ipo-col__bar i { display: none; }
    .ipo-col__label { font-size: 11px; }
}

/* receipt */
.ipo-receipt__table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 15px; }
.ipo-receipt__table th, .ipo-receipt__table td { padding: 9px 0; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: middle; }
.ipo-receipt__table thead th { font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--ink); }
.ipo-receipt__table tbody th { font-weight: 500; color: var(--ink-2); padding-right: 12px; }
.ipo-receipt__table td { width: 30%; padding-right: 18px; font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ipo-receipt__bar {
    display: block;
    height: 6px;
    width: var(--w);
    min-width: 3px;
    max-width: 100%;
    margin-bottom: 5px;
    border-radius: 3px;
    background: var(--cost);
}
.ipo-receipt__table td + td .ipo-receipt__bar { background: var(--accent); }
.ipo-receipt__table tfoot th { font-weight: 700; color: var(--ink); }
.ipo-receipt__table tfoot tr:first-child > * { border-top: 1.5px solid var(--ink); }
.ipo-receipt__result > * { border-bottom: 0 !important; font-size: 16px; }
.ipo-receipt__table .is-loss { color: var(--bad); }
.ipo-receipt__table .is-gain { color: var(--good); }
@media (max-width: 520px) {
    .ipo-receipt__table { font-size: 14px; }
    .ipo-receipt__table td { width: 27%; }
}

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

/* governance */
.ipo-gov__row + .ipo-gov__row { margin-top: 14px; }
.ipo-gov__row:first-of-type { margin-top: 14px; }
.ipo-gov__label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ipo-split { display: flex; gap: 3px; border-radius: var(--r-sm); overflow: hidden; }
.ipo-split__part {
    flex: 0 0 var(--w);
    min-width: 0;
    padding: 10px 12px 11px;
    font-size: 13.5px;
    line-height: 1.3;
    color: #fff;
}
.ipo-split__part b { display: block; font-size: 17px; font-weight: 800; margin-bottom: 2px; }
.ipo-split__part--t { background: var(--c-t); }
.ipo-split__part--f { background: var(--c-f); }
.ipo-split__part--a { background: var(--c-a); }
@media (prefers-color-scheme: dark) { .ipo-split__part { color: #111418; } }

.ipo-classes { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 8px; }
.ipo-classes li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.ipo-classes b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 16px;
    color: #fff;
}
@media (prefers-color-scheme: dark) { .ipo-classes b { color: #111418; } }
.ipo-classes__a b { background: var(--c-a); }
.ipo-classes__n b { background: var(--c-n); }
.ipo-classes__f b { background: var(--c-f); }
.ipo-classes__t b { background: var(--c-t); }
.ipo-classes__e b { background: var(--c-e); }

/* risk map */
.ipo-riskmap__bar { display: flex; gap: 2px; height: 40px; border-radius: var(--r-sm); overflow: hidden; }
.ipo-riskmap__seg {
    flex: var(--n) 1 0;
    min-width: 22px;
    display: grid;
    place-items: center;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
}
@media (prefers-color-scheme: dark) { .ipo-riskmap__seg { color: #111418; } }
.ipo-riskmap__seg--biz { --gc: var(--g-biz); }
.ipo-riskmap__seg--ip { --gc: var(--g-ip); }
.ipo-riskmap__seg--law { --gc: var(--g-law); }
.ipo-riskmap__seg--tax { --gc: var(--g-tax); }
.ipo-riskmap__seg--gov { --gc: var(--g-gov); }
.ipo-riskmap__seg--own { --gc: var(--g-own); }
.ipo-riskmap__seg { background: var(--gc); }
.ipo-riskmap__legend { list-style: none; padding: 0; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.ipo-riskmap__legend li { display: inline-flex; align-items: center; gap: 6px; }
.ipo-riskmap__legend li::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--gc); }
.ipo-riskmap__legend a { text-decoration: none; }
.ipo-riskmap__legend a:hover { text-decoration: underline; }
.ipo-riskmap__legend span { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

/* ------------------------------------------------------------------ risks */

.ipo-sec h3.ipo-riskgroup {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2.4em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink);
    font-size: clamp(21px, 2.4vw, 25px);
}
.ipo-riskgroup span {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 15px;
}

.ipo-risk {
    margin-top: 18px;
    padding: 22px 22px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper-2);
    scroll-margin-top: calc(var(--top-h) + 12px);
}
.ipo-riskgroup + .ipo-risk { margin-top: 20px; }
.ipo-risk--key { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); box-shadow: inset 4px 0 0 var(--bad); }
.ipo-risk__title {
    font-family: var(--font-ui);
    font-weight: 750;
    font-size: clamp(19px, 2.1vw, 21px);
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.ipo-risk__body { margin-top: 14px; display: grid; gap: 14px; }
.ipo-risk__label {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
.ipo-risk__doc ul { padding-left: 1.1em; font-size: 16.5px; line-height: 1.6; }
.ipo-risk__doc li + li { margin-top: 0.55em; }
.ipo-risk__doc li::marker { color: var(--muted); }
.ipo-risk__plain {
    padding: 14px 16px 16px;
    border-radius: var(--r-sm);
    background: var(--accent-soft);
}
.ipo-risk__plain .ipo-risk__label { color: var(--accent); }
.ipo-risk__plain p:last-child { font-size: 16.5px; line-height: 1.6; }
.ipo-risk__plain a { color: var(--accent); }
.ipo-risk .ipo-fig { background: var(--paper); }
@media (max-width: 520px) {
    .ipo-risk { padding: 18px 14px 16px; }
    .ipo-risk__plain { padding: 12px 13px 14px; }
    .ipo-fig { padding: 16px 13px 13px; }
    .ipo-tldr { padding: 20px 16px 20px; }
    .ipo-risk .ipo-fig { margin-inline: -4px; }
}

/* odd list */
.ipo-odd { list-style: none; padding: 0; display: grid; gap: 10px; }
.ipo-odd li {
    padding: 14px 18px 15px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper-2);
    font-size: 16.5px;
    line-height: 1.58;
}
.ipo-odd b { display: block; font-family: var(--font-ui); font-weight: 750; font-size: 16.5px; margin-bottom: 2px; }

/* all risks */
.ipo-all { border-top: 1px solid var(--line); }
.ipo-all:last-of-type { border-bottom: 1px solid var(--line); }
.ipo-sec > .ipo-all + .ipo-all { margin-top: 0; }
.ipo-all summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 2px;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 17px;
}
.ipo-all summary::-webkit-details-marker { display: none; }
.ipo-all summary::after {
    content: '+';
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 500;
    color: var(--muted);
}
.ipo-all[open] summary::after { content: '−'; }
.ipo-all summary span {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--paper-3);
    color: var(--muted);
}
.ipo-all ol { padding: 0 0 16px 2.6em; font-size: 15.5px; line-height: 1.5; }
.ipo-all li + li { margin-top: 0.4em; }
.ipo-all li::marker { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.ipo-all { scroll-margin-top: calc(var(--top-h) + 12px); }

/* next */
.ipo-gaps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ipo-gaps > div { padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); }
.ipo-gaps__title { font-family: var(--font-ui); font-weight: 750; font-size: 16px; margin-bottom: 8px; }
.ipo-gaps ul, .ipo-gaps ol { padding-left: 1.15em; font-size: 16px; line-height: 1.55; }
.ipo-gaps li + li { margin-top: 0.35em; }
@media (max-width: 640px) { .ipo-gaps { grid-template-columns: minmax(0, 1fr); } }

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

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

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

.ipo-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;
}
.ipo-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;
}
.ipo-foot__title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.ipo-foot ul { list-style: none; padding: 0; }
.ipo-foot li + li { margin-top: 6px; }
.ipo-foot a { text-decoration: none; }
.ipo-foot a:hover { color: var(--accent); }
.ipo-foot__copy { margin-top: 16px; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) { .ipo-foot__inner { grid-template-columns: minmax(0, 1fr); } }

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

@media print {
    .ipo-top, .ipo-progress, .ipo-toc, .ipo-hero__cta, .ipo-foot { display: none !important; }
    .ipo-layout { display: block; }
    .ipo-all { break-inside: avoid; }
    .ipo-all ol { display: block; }
}
