:root {
    --paper: #f4efe6;
    --paper-deep: #ebe3d7;
    --paper-light: #fbf8f2;
    --ink: #1c2420;
    --ink-soft: #56605a;
    --green: #1d5a49;
    --green-dark: #123c31;
    --rust: #a44d34;
    --line: rgba(28, 36, 32, 0.18);
    --line-strong: rgba(28, 36, 32, 0.35);
    --gh-font-heading: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --gh-font-body: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
    --serif: var(--gh-font-heading);
    --sans: var(--gh-font-body);
    --shell: min(1160px, calc(100vw - 48px));
    --reading: min(760px, calc(100vw - 48px));
    --shadow: 0 18px 50px rgba(50, 40, 25, 0.07);
}

/* ============================================================
   KARAT APP, SEARCH LANDINGS, AND THREE-STAGE FUNNEL
   WHY: one visual system now connects education, the working plan, and the
   optional author question without disguising separate jobs as one CTA.
   ============================================================ */

.home-karat,
.karat-stage-strip,
.karat-section {
    padding: clamp(64px, 8vw, 104px) 0;
    border-top: 1px solid var(--line);
}

.home-karat {
    position: relative;
    overflow: hidden;
    color: #fff8e9;
    background:
        radial-gradient(circle at 84% 12%, rgba(240, 211, 142, 0.14), transparent 34%),
        linear-gradient(145deg, #090806 0%, #15120d 55%, #0c0a08 100%);
    border-top-color: #493d28;
    border-bottom: 1px solid #493d28;
}

.home-karat-grid,
.karat-hero-grid,
.karat-chart-layout,
.karat-proof-grid,
.karat-answer-grid,
.karat-calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 7vw, 96px);
    align-items: center;
}

.home-karat-grid {
    position: relative;
    z-index: 1;
}

.home-karat h2,
.karat-section h2,
.karat-stage-strip h2,
.karat-app-card h2,
.contact-karat-transition h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(34px, 4.8vw, 58px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.home-karat-copy > p:not(.eyebrow) {
    max-width: 620px;
    margin: 24px 0;
    color: #ede2c8;
    font-size: 18px;
    line-height: 1.65;
}

.home-karat .eyebrow {
    color: #f0d38e;
}

.home-karat-actions {
    display: flex;
    margin-top: 30px;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
}

.home-karat .karat-primary-action {
    min-height: 52px;
    padding: 14px 22px;
    border-color: #f0d38e;
    color: #0c0a08;
    background: #f0d38e;
    box-shadow: 0 7px 0 #6c5939;
    font-size: 15px;
}

.home-karat .karat-primary-action:hover {
    border-color: #ffe4a6;
    color: #0c0a08;
    background: #ffe4a6;
    box-shadow: 0 4px 0 #6c5939;
}

.home-karat-secondary {
    padding: 7px 1px 5px;
    border-bottom: 1px solid #b7a77f;
    color: #fff8e9;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.home-karat-secondary:hover {
    border-bottom-color: var(--paper-light);
}

.home-karat-copy > .home-karat-trust {
    margin: 22px 0 0;
    color: #c8b991;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.home-karat figure {
    margin: 0;
    padding: 13px;
    border: 1px solid #c9953f;
    background: #15120d;
    box-shadow: 20px 20px 0 #493d28;
}

.home-karat figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1365 / 530;
    object-fit: contain;
}

.home-karat figure figcaption {
    margin: 11px 3px 1px;
    color: #ede2c8;
    font-size: 12px;
    line-height: 1.45;
}

.karat-stage-strip {
    background: var(--paper-light);
}

.karat-section-heading {
    max-width: 820px;
    margin-bottom: 46px;
}

.karat-stage-list {
    display: grid;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
    list-style: none;
}

.karat-stage-list li {
    position: relative;
    min-height: 270px;
    padding: 34px 34px 30px;
    border-right: 1px solid var(--line);
}

.karat-stage-list li:last-child {
    border-right: 0;
}

.karat-stage-number {
    position: absolute;
    top: 24px;
    right: 24px;
    color: rgba(29, 90, 73, 0.16);
    font-family: var(--serif);
    font-size: 66px;
    line-height: 1;
}

.karat-stage-list p:not(.eyebrow) {
    position: relative;
    max-width: 270px;
    min-height: 86px;
    margin: 38px 0 24px;
    color: var(--ink-soft);
}

.karat-stage-list a {
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 750;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.guide-karat-wrap {
    margin-top: 68px;
}

.karat-app-card,
.quiz-karat-step {
    padding: clamp(28px, 5vw, 48px);
    border-top: 4px solid var(--green);
    background: rgba(221, 232, 225, 0.58);
}

.karat-app-card h2,
.quiz-karat-step h3 {
    max-width: 640px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(30px, 4vw, 45px);
    font-weight: 550;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.karat-app-card > p:not(.eyebrow),
.quiz-karat-step > p:not(.eyebrow) {
    max-width: 650px;
    margin: 20px 0;
    color: var(--ink-soft);
}

.karat-app-card small {
    display: block;
    margin-top: 14px;
    color: var(--ink-soft);
}

.quiz-karat-step {
    margin-top: 30px;
}

.contact-karat-transition {
    margin-bottom: 68px;
    padding: 36px 38px;
    border-left: 4px solid var(--green);
    background: rgba(221, 232, 225, 0.56);
}

.contact-karat-transition h2 {
    font-size: clamp(34px, 4vw, 52px);
}

.contact-karat-transition > p:not(.eyebrow) {
    max-width: 760px;
    margin: 20px 0;
    color: var(--ink-soft);
}

.karat-hero,
.karat-intent-hero {
    padding: 56px 0 clamp(72px, 9vw, 128px);
    border-bottom: 1px solid var(--line);
}

.karat-hero .breadcrumbs,
.karat-intent-hero .breadcrumbs {
    margin-bottom: clamp(28px, 4vw, 44px);
}

.karat-hero-grid {
    grid-template-columns: minmax(0, 0.84fr) minmax(480px, 1.16fr);
}

.karat-hero h1,
.karat-intent-hero h1 {
    max-width: 940px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(48px, 6.3vw, 82px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.97;
}

/* WHY: Keep Karat's primary action inside a 1280×800 or 360×668 first
   viewport while retaining the full search-intent heading and explanation. */
.karat-main .karat-hero h1 {
    font-size: clamp(44px, 5vw, 64px);
    line-height: 1;
}

/* WHY: Karat's old cream/green landing looked like a separate product from
   the onyx-and-gold app reached by its CTA. The public promise and the working
   surface now share one high-contrast visual identity without recoloring the
   surrounding MaxedMoney site. */
.karat-main .karat-hero {
    color: #fff8e9;
    background:
        radial-gradient(circle at 84% 10%, rgba(240, 211, 142, 0.13), transparent 33%),
        linear-gradient(145deg, #090806 0%, #15120d 58%, #0c0a08 100%);
    border-bottom-color: #493d28;
}

.karat-main .karat-hero .breadcrumbs,
.karat-main .karat-hero .breadcrumbs a,
.karat-main .karat-hero .text-action {
    color: #c8b991;
}

.karat-main .karat-hero .eyebrow {
    color: #f0d38e;
}

.karat-main .karat-hero-copy {
    color: #ede2c8;
}

.karat-main .karat-trust-line {
    color: #c8b991;
}

.karat-main .karat-product-shot {
    border-color: #c9953f;
    background: #15120d;
    box-shadow: 22px 22px 0 #493d28;
}

.karat-main .karat-product-shot figcaption {
    color: #ede2c8;
}

.karat-hero-copy,
.karat-intent-hero .karat-narrow > p:not(.eyebrow, .karat-trust-line) {
    max-width: 730px;
    margin: 28px 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: clamp(20px, 2vw, 25px);
    line-height: 1.45;
}

.karat-main .karat-hero-copy {
    margin: 20px 0;
    font-size: clamp(18px, 1.55vw, 21px);
    line-height: 1.4;
}

.karat-actions {
    display: flex;
    margin-top: 28px;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.karat-main .karat-actions {
    margin-top: 20px;
}

.karat-trust-line {
    margin: 18px 0 0;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 650;
}

.karat-product-shot {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line-strong);
    background: var(--paper-light);
    box-shadow: 22px 22px 0 var(--paper-deep);
}

.karat-product-shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1365 / 530;
    object-fit: contain;
}

.karat-product-shot figcaption,
.karat-data-figure figcaption {
    margin-top: 12px;
    color: var(--ink-soft);
    font-size: 12px;
}

.karat-narrow {
    max-width: 910px;
}

.karat-section-deep {
    background: var(--paper-deep);
}

.karat-how-list {
    display: grid;
    margin: 42px 0 0;
    padding: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    counter-reset: karat-how;
    list-style: none;
}

.karat-how-list li {
    min-height: 150px;
    padding: 30px 28px;
    border-top: 1px solid var(--line-strong);
    border-right: 1px solid var(--line);
    counter-increment: karat-how;
}

.karat-how-list li:last-child {
    border-right: 0;
}

.karat-how-list li::before {
    display: block;
    margin-bottom: 24px;
    color: var(--rust);
    content: "0" counter(karat-how);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.karat-feature-grid,
.karat-tool-grid,
.karat-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
    border-left: 1px solid var(--line);
}

.karat-feature-grid article,
.karat-tool-grid a,
.karat-mini-grid > div {
    min-height: 230px;
    padding: 34px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(251, 248, 242, 0.34);
}

.karat-feature-grid article > span,
.karat-tool-grid a > span {
    color: var(--rust);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.karat-feature-grid h3,
.karat-tool-grid h2,
.karat-mini-grid h2,
.karat-example-card h2 {
    margin: 42px 0 12px;
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 550;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.karat-feature-grid p,
.karat-tool-grid p,
.karat-mini-grid p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15px;
}

.karat-chart-layout {
    align-items: start;
}

.karat-chart-layout h2,
.karat-proof-grid h2,
.karat-answer-grid h2 {
    font-size: clamp(36px, 4.5vw, 56px);
}

.karat-chart-layout > div > p:not(.eyebrow),
.karat-proof-grid > div > p:not(.eyebrow),
.karat-answer-grid > div > p:not(.eyebrow) {
    color: var(--ink-soft);
}

.karat-data-figure {
    margin: 0;
}

.karat-data-figure img {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--paper-light);
}

.karat-proof-section {
    color: var(--paper-light);
    background: var(--green-dark);
}

.karat-proof-section .eyebrow {
    color: #d78c72;
}

.karat-proof-section p:not(.eyebrow) {
    color: rgba(251, 248, 242, 0.74);
}

.karat-intent-hero .button-link {
    margin-top: 8px;
}

.karat-answer-grid {
    align-items: start;
}

.karat-check-list {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line-strong);
    list-style: none;
}

.karat-check-list li {
    display: grid;
    padding: 24px 0;
    grid-template-columns: minmax(180px, 0.62fr) minmax(0, 1fr);
    gap: 24px;
    border-bottom: 1px solid var(--line);
}

.karat-check-list span {
    color: var(--ink-soft);
}

.karat-example-card,
.karat-formula-card,
.karat-calculator,
.karat-calculator-result {
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid var(--line-strong);
    background: var(--paper-light);
    box-shadow: 14px 14px 0 rgba(28, 36, 32, 0.08);
}

.karat-example-card dl,
.karat-calculator-result dl {
    margin: 0;
}

.karat-example-card dl > div,
.karat-calculator-result dl > div {
    display: flex;
    padding: 16px 0;
    justify-content: space-between;
    gap: 22px;
    border-bottom: 1px solid var(--line);
}

.karat-example-card dd,
.karat-calculator-result dd {
    margin: 0;
    font-weight: 750;
    text-align: right;
}

.karat-formula-card {
    box-shadow: none;
}

.karat-formula {
    margin: 34px 0;
    padding: 28px 0;
    border-block: 1px solid var(--line-strong);
    color: var(--green-dark);
    font-family: var(--serif);
    font-size: clamp(26px, 4vw, 46px);
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.karat-mini-grid {
    margin-top: 42px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.karat-mini-grid > div {
    min-height: 190px;
}

.karat-mini-grid h2 {
    margin-top: 0;
    font-size: 28px;
}

.karat-calculator-layout {
    align-items: stretch;
}

.karat-calculator {
    display: grid;
    gap: 22px;
    box-shadow: none;
}

.karat-field {
    display: grid;
    gap: 8px;
}

.karat-field label {
    font-size: 14px;
    font-weight: 750;
}

.karat-input-prefix,
.karat-input-suffix {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    border: 1px solid var(--line-strong);
    background: white;
}

.karat-input-suffix {
    grid-template-columns: minmax(0, 1fr) auto;
}

.karat-input-prefix span,
.karat-input-suffix span {
    padding: 0 16px;
    color: var(--ink-soft);
    font-weight: 750;
}

.karat-input-prefix input,
.karat-input-suffix input {
    width: 100%;
    padding: 14px 0;
    border: 0;
    color: var(--ink);
    background: transparent;
    font-variant-numeric: tabular-nums;
}

.karat-input-prefix input:focus,
.karat-input-suffix input:focus {
    outline: 0;
}

.karat-input-prefix:focus-within,
.karat-input-suffix:focus-within {
    outline: 3px solid rgba(29, 90, 73, 0.18);
    border-color: var(--green);
}

.karat-calculator-status {
    min-height: 24px;
    margin: 0;
    color: var(--rust);
    font-size: 14px;
    font-weight: 650;
}

.karat-calculator-result {
    align-self: stretch;
    border-top: 5px solid var(--rust);
    box-shadow: none;
}

.karat-calculator-result dd {
    color: var(--green-dark);
    font-family: var(--serif);
    font-size: 28px;
    font-variant-numeric: tabular-nums;
}

.karat-calculator-result > p:last-child {
    margin-top: 30px;
    color: var(--ink-soft);
    font-size: 13px;
}

.karat-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.karat-tool-grid a {
    color: inherit;
    text-decoration: none;
    transition: background 150ms ease, transform 150ms ease;
}

.karat-tool-grid a:hover {
    background: var(--paper-light);
    transform: translateY(-2px);
}

@media (max-width: 920px) {
    .home-karat-grid,
    .karat-hero-grid,
    .karat-chart-layout,
    .karat-proof-grid,
    .karat-answer-grid,
    .karat-calculator-layout {
        grid-template-columns: 1fr;
    }

    .karat-hero-grid {
        gap: 58px;
    }

    .karat-product-shot {
        box-shadow: 14px 14px 0 var(--paper-deep);
    }

    .home-karat-grid {
        gap: 50px;
    }

    .karat-stage-list,
    .karat-how-list {
        grid-template-columns: 1fr;
    }

    .karat-stage-list li,
    .karat-how-list li {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .karat-stage-list p:not(.eyebrow) {
        min-height: 0;
    }
}

@media (max-width: 700px) {
    .home-karat,
    .karat-stage-strip,
    .karat-section {
        padding: 54px 0;
    }

    .karat-hero,
    .karat-intent-hero {
        padding: 30px 0 60px;
    }

    .karat-hero .breadcrumbs,
    .karat-intent-hero .breadcrumbs {
        margin-bottom: 24px;
    }

    .karat-hero h1,
    .karat-intent-hero h1 {
        font-size: clamp(42px, 13vw, 62px);
    }

    .karat-main .karat-hero h1 {
        font-size: clamp(38px, 11vw, 50px);
    }

    .karat-main .karat-hero-copy {
        margin: 18px 0;
        font-size: 18px;
        line-height: 1.38;
    }

    .karat-main .karat-actions {
        margin-top: 18px;
    }

    .home-karat-grid {
        gap: 38px;
    }

    .home-karat-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .home-karat .karat-primary-action {
        width: 100%;
    }

    .home-karat-secondary {
        align-self: flex-start;
    }

    .home-karat figure {
        padding: 9px;
        box-shadow: 10px 10px 0 rgba(2, 20, 16, 0.7);
    }

    .karat-feature-grid,
    .karat-tool-grid,
    .karat-mini-grid {
        grid-template-columns: 1fr;
    }

    .karat-feature-grid article,
    .karat-tool-grid a,
    .karat-mini-grid > div {
        min-height: 0;
        padding: 28px 24px;
    }

    .karat-check-list li {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .karat-stage-list li {
        padding-inline: 20px;
    }

    .karat-example-card,
    .karat-formula-card,
    .karat-calculator,
    .karat-calculator-result,
    .contact-karat-transition {
        padding: 26px 20px;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* WHY: Component display rules must never override the quiz's native state. */
[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.62), transparent 27rem),
        radial-gradient(circle at 82% 30%, rgba(156, 125, 84, 0.07), transparent 32rem),
        var(--paper);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.22;
    background-image: repeating-linear-gradient(
        0deg,
        transparent 0,
        transparent 3px,
        rgba(60, 49, 34, 0.025) 4px
    );
}

a {
    color: inherit;
}

img,
svg {
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

::selection {
    color: var(--paper-light);
    background: var(--green);
}

:focus-visible {
    outline: 3px solid var(--rust);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    color: white;
    background: var(--green-dark);
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-shell {
    width: var(--shell);
    margin-inline: auto;
}

.reading-shell {
    width: var(--reading);
}

.narrow-shell {
    max-width: 820px;
    margin-inline: auto;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    width: 100%;
    height: 3px;
    pointer-events: none;
}

.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--rust);
    transform: scaleX(0);
    transform-origin: left;
}

.site-header {
    position: relative;
    z-index: 40;
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    min-height: 82px;
    align-items: center;
    gap: 20px;
}

.site-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.site-wordmark > span:last-child {
    color: #c9953f;
    background: linear-gradient(105deg, #8f621f 0%, #d7ad54 28%, #fff0b1 48%, #c18b2d 68%, #8a5b1b 100%);
    background-size: 180% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 0 rgba(255, 244, 197, 0.12);
    transition: background-position 220ms ease;
}

.site-wordmark:hover > span:last-child,
.site-wordmark:focus-visible > span:last-child {
    background-position: 100% 0;
}

.wordmark-mark {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #e0b861;
    color: #17271f;
    background: linear-gradient(135deg, #83571a 0%, #f5da83 48%, #b77d21 100%);
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255, 248, 214, 0.8), 0 4px 12px rgba(121, 82, 24, 0.18);
    font-size: 13px;
}

.site-menu {
    display: flex;
    margin-left: auto;
    align-items: center;
    gap: 28px;
}

.site-menu a {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.site-menu a:hover {
    color: var(--green);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-karat-button {
    display: inline-flex;
    min-height: 44px;
    padding: 9px 13px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #c9953f;
    color: #fff8e9;
    background: #0c0a08;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1;
    text-decoration: none;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.header-karat-button:hover {
    color: #0c0a08;
    background: #f0d38e;
    transform: translateY(-1px);
}

.header-karat-short {
    display: none;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 9px;
    border: 0;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
}

.menu-toggle i,
.menu-toggle i::after {
    display: block;
    width: 18px;
    height: 1px;
    content: "";
    background: currentColor;
}

.menu-toggle i::after {
    transform: translateY(5px);
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--rust);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.home-hero {
    padding: clamp(64px, 8vw, 104px) 0 clamp(68px, 8vw, 112px);
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
    gap: clamp(52px, 8vw, 112px);
    align-items: center;
}

.hero-copy h1 {
    max-width: 840px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(54px, 6.5vw, 86px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.hero-intro {
    max-width: 650px;
    margin: 30px 0 28px;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.42;
}

.hero-actions,
.quiz-invite-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.button-link {
    display: inline-flex;
    min-height: 48px;
    padding: 12px 19px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green-dark);
    color: var(--paper-light);
    background: var(--green-dark);
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.button-link:hover {
    color: var(--green-dark);
    background: transparent;
    transform: translateY(-1px);
}

.button-link-rust {
    border-color: var(--rust);
    background: var(--rust);
}

.button-link-rust:hover {
    color: var(--rust);
}

.plain-button {
    padding: 6px 2px;
    border: 0;
    border-bottom: 1px solid currentColor;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
    font-size: 14px;
}

.text-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 3px;
    color: var(--green-dark);
    border-bottom: 1px solid var(--green);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.text-action span {
    transition: transform 150ms ease;
}

.text-action:hover span {
    transform: translateX(4px);
}

.hero-copy .text-action:hover span {
    transform: translateY(3px);
}

.question-panel {
    padding: 24px 0 0;
    border-top: 1px solid var(--line-strong);
}

.question-panel h2 {
    margin: 0 0 12px;
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.question-panel nav {
    display: grid;
}

.question-panel a {
    display: grid;
    padding: 14px 0;
    grid-template-columns: 1fr auto;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
}

.question-panel a:hover {
    color: var(--green);
}

.question-panel a:hover span {
    transform: translateX(3px);
}

.topic-strip {
    padding: 64px 0 70px;
    background: rgba(235, 227, 215, 0.48);
    border-bottom: 1px solid var(--line);
}

.section-heading {
    display: flex;
    margin-bottom: 42px;
    align-items: end;
    justify-content: space-between;
    gap: 48px;
}

.section-heading h2,
.archive-hero h1,
.author-hero h1,
.error-page h1 {
    max-width: 780px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(39px, 5vw, 64px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.03;
}

.section-heading > p {
    max-width: 390px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 16px;
}

.section-heading.compact {
    display: block;
}

.section-heading.compact h2 {
    font-size: clamp(32px, 4vw, 48px);
}

.topic-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.topic-links a {
    min-height: 112px;
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(251, 248, 242, 0.42);
    text-decoration: none;
}

.topic-links span,
.topic-links small {
    display: block;
}

.topic-links span {
    font-family: var(--serif);
    font-size: 23px;
    letter-spacing: -0.02em;
}

.topic-links small {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.45;
}

.topic-links a:hover {
    color: var(--paper-light);
    background: var(--green);
}

.topic-links a:hover small {
    color: rgba(255, 255, 255, 0.72);
}

.quiz-callout {
    padding: 56px 0 60px;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 248, 242, 0.46);
}

.quiz-callout-inner,
.source-strip-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: clamp(42px, 8vw, 100px);
    align-items: center;
}

.quiz-callout h2,
.source-strip h2,
.quiz-result h2,
.quiz-source-list h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(34px, 4.5vw, 54px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.quiz-callout-inner > div:last-child > p {
    max-width: 58ch;
    margin: 0 0 22px;
    color: var(--ink-soft);
}

.library-section,
.archive-list {
    padding: 96px 0 112px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
}

.article-card {
    border-bottom: 1px solid var(--line);
}

.article-card:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.article-card-link {
    display: flex;
    min-height: 330px;
    padding: clamp(28px, 4.6vw, 52px);
    flex-direction: column;
    text-decoration: none;
}

.article-card-meta {
    display: flex;
    margin-bottom: 30px;
    justify-content: space-between;
    gap: 20px;
    color: var(--rust);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.article-card-meta time {
    color: var(--ink-soft);
    letter-spacing: 0.02em;
    text-transform: none;
}

.article-card h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(29px, 3.2vw, 44px);
    font-weight: 500;
    letter-spacing: -0.036em;
    line-height: 1.05;
}

.article-card p {
    max-width: 520px;
    margin: 20px 0 26px;
    color: var(--ink-soft);
    font-size: 15px;
}

.read-link {
    margin-top: auto;
    color: var(--green);
    font-size: 13px;
    font-weight: 750;
}

.article-card-link:hover {
    background: rgba(251, 248, 242, 0.72);
}

.article-card-link:hover .read-link span {
    display: inline-block;
    transform: translateX(4px);
}

.empty-library {
    grid-column: 1 / -1;
    padding: 64px 0;
    color: var(--ink-soft);
}

.empty-library a {
    color: var(--green);
    text-underline-offset: 3px;
}

.library-more {
    display: table;
    margin: 42px auto 0;
    padding-bottom: 3px;
    color: var(--green);
    border-bottom: 1px solid currentColor;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.source-strip {
    padding: 54px 0 60px;
    border-top: 1px solid var(--line);
    background: var(--paper-deep);
}

.source-strip-inner {
    align-items: start;
}

.source-strip h2 {
    font-size: clamp(30px, 4vw, 45px);
}

.source-strip p {
    max-width: 58ch;
    margin: 0 0 18px;
    color: var(--ink-soft);
}

.quiz-invite {
    width: min(620px, calc(100vw - 30px));
    max-height: calc(100vh - 30px);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    background: var(--paper-light);
    box-shadow: 0 30px 100px rgba(18, 28, 24, 0.28);
}

.quiz-invite::backdrop {
    background: rgba(18, 28, 24, 0.54);
    backdrop-filter: blur(3px);
}

.quiz-invite-card {
    position: relative;
    padding: clamp(34px, 6vw, 54px);
}

.quiz-invite-card h2 {
    max-width: 520px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(38px, 6vw, 58px);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 1;
}

.quiz-invite-card > p:not(.eyebrow) {
    max-width: 54ch;
    margin: 24px 0 28px;
    color: var(--ink-soft);
    font-size: 17px;
}

.quiz-invite-close {
    position: absolute;
    top: 16px;
    right: 18px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 0;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
    font-size: 27px;
    line-height: 1;
}

.quiz-page-header {
    padding: 58px 0 70px;
    border-bottom: 1px solid var(--line);
}

.quiz-page-header h1 {
    max-width: 800px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(50px, 7vw, 82px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.quiz-page-header > div > p:not(.eyebrow) {
    max-width: 65ch;
    margin: 28px 0 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: clamp(20px, 2.2vw, 25px);
}

.quiz-workspace {
    padding: 68px 0 84px;
    border-bottom: 1px solid var(--line);
    background: rgba(235, 227, 215, 0.42);
}

.quiz-start,
.finance-quiz,
.quiz-result {
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--line-strong);
    background: var(--paper-light);
    box-shadow: var(--shadow);
}

.quiz-start {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.quiz-start p {
    margin: 0;
    color: var(--ink-soft);
}

.quiz-progress-row {
    display: grid;
    margin-bottom: 38px;
    grid-template-columns: auto minmax(140px, 1fr);
    gap: 24px;
    align-items: center;
}

.quiz-progress-row p {
    margin: 0;
    color: var(--rust);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quiz-progress-track {
    height: 3px;
    overflow: hidden;
    background: var(--paper-deep);
}

.quiz-progress-track span {
    display: block;
    width: 12.5%;
    height: 100%;
    background: var(--green);
    transition: width 180ms ease;
}

.quiz-form-message {
    min-height: 1.5em;
    margin: 0 0 12px;
    color: var(--rust);
    font-size: 14px;
    font-weight: 700;
}

.quiz-question {
    padding: 0;
    margin: 0;
    border: 0;
}

.quiz-question legend {
    max-width: 24ch;
    margin-bottom: 28px;
    font-family: var(--serif);
    font-size: clamp(29px, 4.2vw, 42px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.quiz-question > label {
    display: grid;
    padding: 15px 16px;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    border-top: 1px solid var(--line);
    cursor: pointer;
    font-size: 16px;
}

.quiz-question > label:last-of-type {
    border-bottom: 1px solid var(--line);
}

.quiz-question > label:hover,
.quiz-question > label:has(input:checked) {
    background: var(--paper-deep);
}

.quiz-question input {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    accent-color: var(--green);
}

.quiz-explanation {
    margin-top: 26px;
    padding: 22px 24px;
    border-left: 4px solid var(--green);
    background: rgba(235, 227, 215, 0.54);
}

.quiz-question.is-incorrect .quiz-explanation {
    border-left-color: var(--rust);
}

.quiz-explanation p {
    margin: 0 0 12px;
}

.quiz-explanation p:last-of-type {
    color: var(--ink-soft);
}

.quiz-source,
.quiz-source-list a {
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    text-underline-offset: 3px;
}

.quiz-controls {
    display: flex;
    margin-top: 30px;
    justify-content: flex-end;
}

.quiz-result:focus {
    outline: 0;
}

.quiz-score {
    margin: 22px 0 8px;
    color: var(--green-dark);
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 600;
}

.quiz-result > p:not(.eyebrow, .quiz-score) {
    color: var(--ink-soft);
}

.quiz-privacy-note {
    padding: 12px 14px;
    border: 1px solid var(--line);
    font-size: 13px;
}

.quiz-review {
    margin: 38px 0 34px;
}

.quiz-review > h3 {
    margin: 0 0 20px;
    font-family: var(--serif);
    font-size: 30px;
    letter-spacing: -0.03em;
}

.quiz-review-item {
    padding: 24px 0;
    border-top: 1px solid var(--line);
}

.quiz-review-item h4 {
    margin: 0;
    font-family: var(--serif);
    font-size: 21px;
    line-height: 1.3;
}

.quiz-review-item > p {
    margin: 8px 0 0;
    color: var(--rust);
    font-size: 13px;
    font-weight: 700;
}

.quiz-review-item.is-correct > p {
    color: var(--green);
}

.quiz-review-item .quiz-explanation {
    margin-top: 16px;
}

.quiz-source-list {
    padding: 72px 0 86px;
}

.quiz-source-list h2 {
    font-size: clamp(34px, 4.5vw, 50px);
}

.quiz-source-list ul {
    padding: 0;
    margin: 34px 0 0;
    list-style: none;
}

.quiz-source-list li {
    padding: 13px 0;
    border-top: 1px solid var(--line);
}

.quiz-source-list li:last-child {
    border-bottom: 1px solid var(--line);
}

.archive-hero,
.author-hero,
.error-page {
    padding: 90px 0 96px;
    border-bottom: 1px solid var(--line);
}

.archive-hero p:not(.eyebrow),
.author-hero p:not(.eyebrow),
.error-page p:not(.eyebrow) {
    max-width: 650px;
    margin: 26px 0 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 22px;
}

.pagination-wrap {
    margin-top: 44px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.guide-header {
    padding: 58px 0 66px;
    border-bottom: 1px solid var(--line);
}

.breadcrumbs {
    display: flex;
    margin-bottom: 62px;
    align-items: center;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 12px;
}

.breadcrumbs a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.guide-header h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(47px, 7vw, 80px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.guide-deck {
    margin: 28px 0 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: clamp(21px, 2.5vw, 27px);
    line-height: 1.42;
}

.guide-byline {
    display: grid;
    margin-top: 46px;
    padding: 17px 0;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    gap: 20px;
    color: var(--ink-soft);
    font-size: 12px;
}

.guide-byline div {
    display: grid;
    gap: 2px;
}

.guide-byline div > span:first-child {
    color: var(--rust);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guide-byline a {
    color: var(--ink);
    font-weight: 650;
}

.guide-body {
    padding-top: 62px;
    padding-bottom: 90px;
}

.gh-content {
    font-family: var(--serif);
    font-size: clamp(18px, 1.65vw, 21px);
    line-height: 1.72;
}

.gh-content > * {
    max-width: 100%;
}

.gh-content > :first-child {
    margin-top: 0;
    color: var(--ink);
    font-size: 1.14em;
    font-weight: 600;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.032em;
    line-height: 1.15;
}

.gh-content h2 {
    margin: 2.5em 0 0.7em;
    padding-top: 0.75em;
    border-top: 1px solid var(--line);
    font-size: clamp(31px, 4vw, 44px);
}

.gh-content h3 {
    margin: 2em 0 0.6em;
    font-size: clamp(24px, 3vw, 31px);
}

.gh-content h4 {
    margin: 1.8em 0 0.5em;
    font-size: 21px;
}

.gh-content p,
.gh-content ul,
.gh-content ol {
    margin: 0 0 1.35em;
}

.gh-content li + li {
    margin-top: 0.45em;
}

.gh-content a {
    color: var(--green);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.gh-content a:hover {
    color: var(--rust);
}

.gh-content blockquote {
    margin: 2em 0;
    padding: 22px 28px;
    border: 0;
    border-left: 4px solid var(--rust);
    background: rgba(235, 227, 215, 0.58);
    font-size: 1.02em;
    font-style: italic;
}

.gh-content table {
    width: 100%;
    margin: 2.3em 0;
    border-collapse: collapse;
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.45;
}

.gh-content th,
.gh-content td {
    padding: 15px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.gh-content th {
    color: var(--paper-light);
    background: var(--green-dark);
    font-size: 11px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.gh-content tbody tr:nth-child(even) {
    background: rgba(251, 248, 242, 0.52);
}

.gh-content hr {
    margin: 3em 0;
    border: 0;
    border-top: 1px solid var(--line-strong);
}

.gh-content sup {
    color: var(--rust);
    font-family: var(--sans);
    font-size: 0.65em;
}

.gh-content .kg-width-wide {
    width: min(1000px, calc(100vw - 48px));
    max-width: none;
    margin-right: 50%;
    margin-left: 50%;
    transform: translateX(-50%);
}

.gh-content .kg-width-full {
    width: 100vw;
    max-width: none;
    margin-right: 50%;
    margin-left: 50%;
    transform: translateX(-50%);
}

/* WHY: Ghost's editor can add images, GIFs, galleries, video, and embeds.
   These cards must stay legible and responsive without authors writing CSS. */
.gh-content figure {
    margin: 2.4em 0;
}

.gh-content img,
.gh-content .kg-gallery-image img,
.gh-content .kg-bookmark-thumbnail img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.gh-content .kg-image-card img,
.gh-content .kg-video-card video,
.gh-content .kg-embed-card iframe {
    border: 1px solid var(--line);
    background: var(--paper-light);
}

.gh-content figcaption,
.gh-content .kg-card figcaption {
    max-width: 68ch;
    margin: 11px auto 0;
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.gh-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gh-content .kg-gallery-row {
    display: flex;
    gap: 8px;
}

.gh-content .kg-gallery-image {
    min-width: 0;
    margin: 0;
}

.gh-content .kg-video-container,
.gh-content .kg-embed-card {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gh-content .kg-video-card video {
    display: block;
    width: 100%;
    height: auto;
}

.gh-content .kg-embed-card iframe {
    display: block;
    width: 100%;
    min-height: min(62vw, 520px);
}

.gh-content .kg-audio-card,
.gh-content .kg-file-card,
.gh-content .kg-bookmark-card {
    margin: 2em 0;
    border: 1px solid var(--line-strong);
    background: var(--paper-light);
    box-shadow: var(--shadow);
    font-family: var(--sans);
}

.gh-content .kg-bookmark-container {
    display: flex;
    min-height: 148px;
    color: var(--ink);
    text-decoration: none;
}

.gh-content .kg-bookmark-content {
    min-width: 0;
    padding: 22px;
    flex: 1;
}

.gh-content .kg-bookmark-title {
    font-weight: 750;
}

.gh-content .kg-bookmark-description,
.gh-content .kg-bookmark-metadata {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.45;
}

.gh-content .kg-bookmark-thumbnail {
    width: min(34%, 220px);
    flex: 0 0 auto;
}

.gh-content .kg-bookmark-thumbnail img {
    height: 100%;
    object-fit: cover;
}

.gh-content .kg-file-card-container,
.gh-content .kg-audio-card {
    padding: 20px;
}

.guide-footer {
    padding: 0 0 92px;
}

.editorial-note {
    padding: 30px;
    border: 1px solid var(--line);
    background: rgba(251, 248, 242, 0.62);
    box-shadow: var(--shadow);
}

.editorial-note > p:not(.eyebrow) {
    margin: 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 17px;
}

.editorial-links {
    display: flex;
    margin-top: 20px;
    gap: 24px;
    font-size: 13px;
    font-weight: 700;
}

.editorial-links a,
.quiet-contact a {
    color: var(--green);
    text-underline-offset: 3px;
}

.quiet-contact {
    margin: 30px 0 0;
    color: var(--ink-soft);
    font-size: 14px;
    text-align: center;
}

.related-guides {
    padding: 84px 0 100px;
    border-top: 1px solid var(--line);
    background: rgba(235, 227, 215, 0.4);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line-strong);
}

.related-grid .article-card {
    border-right: 1px solid var(--line);
}

.related-grid .article-card-link {
    min-height: 300px;
    padding: 30px;
}

.related-grid .article-card h2 {
    font-size: 30px;
}

.page-header {
    padding-bottom: 50px;
}

.page-template .guide-body {
    min-height: 40vh;
}

.contact-hero {
    padding: 58px 0 74px;
    border-bottom: 1px solid var(--line);
}

.contact-shell {
    max-width: 920px;
}

.contact-hero .breadcrumbs {
    margin-bottom: 54px;
}

.contact-hero h1 {
    max-width: 900px;
    margin: 14px 0 0;
    font-family: var(--serif);
    font-size: clamp(45px, 6.7vw, 76px);
    font-weight: 500;
    letter-spacing: -0.052em;
    line-height: 1;
}

.contact-hero > .contact-shell > p:last-child {
    max-width: 700px;
    margin: 28px 0 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: clamp(20px, 2.4vw, 26px);
    line-height: 1.45;
}

.contact-section {
    padding: 72px 0 96px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    gap: clamp(50px, 8vw, 110px);
    align-items: start;
}

.contact-form {
    display: grid;
    gap: 24px;
}

.contact-field {
    display: grid;
    gap: 9px;
}

.contact-field label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 750;
}

.contact-field label span {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 500;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    color: var(--ink);
    background: rgba(255, 253, 248, 0.82);
    font: inherit;
}

.contact-field textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.5;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: 3px solid rgba(29, 90, 73, 0.18);
    border-color: var(--green);
}

.contact-field small {
    color: var(--ink-soft);
    font-size: 12px;
}

.contact-warning {
    margin: 2px 0 0;
    padding: 16px 18px;
    border-left: 3px solid var(--rust);
    color: var(--ink-soft);
    background: rgba(235, 227, 215, 0.48);
    font-size: 13px;
}

.contact-consent {
    align-items: flex-start;
}

.contact-form > .button-link {
    justify-self: start;
}

.contact-form-status {
    min-height: 22px;
    margin: -4px 0 0;
    color: var(--rust);
    font-size: 14px;
    font-weight: 650;
}

.contact-form-status.is-success {
    color: var(--green);
}

.contact-expectation {
    padding: 30px;
    border-top: 4px solid var(--green);
    background: rgba(235, 227, 215, 0.42);
}

.contact-expectation h2 {
    margin: 12px 0 0;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.contact-expectation p:not(.eyebrow) {
    margin: 18px 0 0;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.6;
}

.site-footer {
    color: rgba(251, 248, 242, 0.76);
    background: #17201c;
}

.footer-grid {
    display: grid;
    padding: 72px 0 66px;
    grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(110px, 0.7fr)) minmax(150px, 0.85fr);
    gap: 38px;
}

.footer-wordmark {
    color: var(--paper-light);
}

.footer-note {
    max-width: 310px;
    margin: 20px 0 0;
    font-family: var(--serif);
    font-size: 16px;
}

.footer-nav,
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
}

.footer-nav p,
.footer-contact p {
    margin: 0 0 8px;
    color: #e79a72;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-nav a,
.footer-contact a {
    text-decoration: none;
}

.footer-nav a:hover,
.footer-contact a:hover {
    color: var(--paper-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-base {
    display: flex;
    padding: 19px 0 24px;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 11px;
}

.error-page {
    min-height: 62vh;
}

.error-page .text-action {
    margin-top: 30px;
}

@media (max-width: 900px) {
    .hero-grid,
    .quiz-callout-inner,
    .source-strip-inner {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        gap: 52px;
    }

    .question-panel {
        max-width: 620px;
    }

    .topic-links {
        grid-template-columns: repeat(3, 1fr);
    }

    .guide-byline {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-grid .article-card {
        border-right: 0;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid > div:first-child,
    .footer-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    :root {
        --shell: min(100% - 30px, 1160px);
        --reading: min(100% - 30px, 760px);
    }

    .gh-content .kg-gallery-row {
        flex-direction: column;
    }

    .gh-content .kg-bookmark-container {
        flex-direction: column;
    }

    .gh-content .kg-bookmark-thumbnail {
        width: 100%;
        max-height: 220px;
    }

    .gh-content .kg-embed-card iframe {
        min-height: 56vw;
    }

    body {
        font-size: 16px;
    }

    .header-inner {
        min-height: 70px;
        gap: 10px;
    }

    .site-wordmark {
        font-size: 18px;
    }

    .wordmark-mark {
        width: 27px;
        height: 27px;
    }

    .header-actions {
        margin-left: auto;
        gap: 9px;
    }

    .header-karat-button {
        min-height: 44px;
        padding: 8px 11px;
    }

    .header-karat-long {
        display: none;
    }

    .header-karat-short {
        display: inline;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-menu {
        position: absolute;
        top: 70px;
        right: 0;
        left: 0;
        display: none;
        padding: 16px 15px 22px;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--line-strong);
        background: var(--paper);
        box-shadow: 0 16px 24px rgba(30, 30, 20, 0.08);
    }

    .site-menu[data-open="true"] {
        display: flex;
    }

    .site-menu a {
        padding: 12px;
        border-bottom: 1px solid var(--line);
    }

    .home-hero {
        padding: 60px 0 72px;
    }

    .contact-hero {
        padding: 44px 0 58px;
    }

    .contact-hero .breadcrumbs {
        margin-bottom: 42px;
    }

    .contact-section {
        padding: 52px 0 72px;
    }

    .contact-expectation {
        padding: 24px;
    }

    .hero-copy h1 {
        font-size: clamp(49px, 15vw, 68px);
    }

    .hero-intro {
        margin-top: 26px;
        font-size: 21px;
    }

    .question-panel {
        margin-top: 2px;
    }

    .topic-strip,
    .quiz-callout,
    .library-section,
    .archive-list,
    .source-strip {
        padding: 68px 0 76px;
    }

    .section-heading {
        display: block;
        margin-bottom: 32px;
    }

    .section-heading > p {
        margin-top: 20px;
    }

    .topic-links {
        grid-template-columns: 1fr;
    }

    .topic-links a,
    .topic-links a:first-child {
        min-height: 0;
        border: 1px solid var(--line);
    }

    .topic-links small {
        margin-top: 8px;
    }

    .quiz-callout-inner,
    .source-strip-inner {
        gap: 28px;
    }

    .quiz-invite-card {
        padding: 44px 24px 30px;
    }

    .quiz-invite-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .quiz-invite-actions .button-link {
        width: 100%;
    }

    .quiz-invite-actions .plain-button {
        align-self: center;
    }

    .quiz-page-header {
        padding: 42px 0 54px;
    }

    .quiz-workspace {
        padding: 42px 0 58px;
    }

    .quiz-start {
        align-items: stretch;
        flex-direction: column;
    }

    .quiz-progress-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .quiz-question legend {
        max-width: none;
    }

    .quiz-controls .button-link {
        width: 100%;
    }

    .quiz-source-list {
        padding: 58px 0 68px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-card:nth-child(odd) {
        border-right: 0;
    }

    .article-card-link {
        min-height: 290px;
        padding: 32px 2px;
    }

    .archive-hero,
    .author-hero,
    .error-page {
        padding: 68px 0 72px;
    }

    .guide-header {
        padding: 36px 0 45px;
    }

    .breadcrumbs {
        margin-bottom: 42px;
        overflow: hidden;
        white-space: nowrap;
    }

    .guide-header h1 {
        font-size: clamp(43px, 13vw, 61px);
    }

    .guide-byline {
        margin-top: 35px;
        grid-template-columns: 1fr 1fr;
        row-gap: 18px;
    }

    .guide-body {
        padding-top: 44px;
        padding-bottom: 70px;
        overflow: hidden;
    }

    .gh-content {
        font-size: 18px;
    }

    .gh-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .editorial-note {
        padding: 24px 20px;
    }

    .editorial-links {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .related-guides {
        padding: 66px 0 74px;
    }

    .related-grid .article-card-link {
        padding: 30px 2px;
    }

    .footer-grid {
        padding: 56px 0 48px;
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

    .footer-contact {
        grid-column: 1 / -1;
    }

    .footer-base {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 440px) {
    .site-wordmark > span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Streamlined publication homepage */
.site-search-button {
    display: inline-flex;
    padding: 7px 0;
    align-items: center;
    gap: 7px;
    border: 0;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
}

.site-search-button svg,
.home-search svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.site-search-button:hover {
    color: var(--green);
}

.home-hero {
    padding: clamp(64px, 8vw, 96px) 0 clamp(58px, 7vw, 82px);
}

.home-hero-inner {
    max-width: 900px;
}

.home-hero-inner h1 {
    max-width: 820px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(52px, 7vw, 78px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.home-hero-inner .hero-intro {
    max-width: 680px;
    margin-bottom: 34px;
}

.home-search {
    display: grid;
    width: min(700px, 100%);
    min-height: 62px;
    padding: 12px 14px 12px 18px;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    background: var(--paper-light);
    box-shadow: 0 10px 32px rgba(50, 40, 25, 0.045);
    cursor: pointer;
    text-align: left;
}

.home-search:hover {
    color: var(--ink);
    border-color: var(--green);
}

.home-search small {
    padding: 7px 10px;
    color: var(--green-dark);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 750;
}

.home-library {
    padding-top: 72px;
    padding-bottom: 80px;
}

.simple-heading {
    margin-bottom: 30px;
}

.simple-heading h2 {
    font-size: clamp(36px, 4.6vw, 54px);
}

.home-library .article-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-library .article-card:nth-child(odd) {
    border-right: 0;
}

.home-library .article-card:not(:nth-child(3n)) {
    border-right: 1px solid var(--line);
}

.home-library .article-card-link {
    min-height: 280px;
    padding: 30px;
}

.home-library .article-card h2 {
    font-size: clamp(25px, 2.4vw, 34px);
}

.home-library .article-card p {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.55;
}

.topic-strip {
    padding: 64px 0 70px;
}

.topic-links a {
    min-height: 104px;
}

.quiz-callout {
    padding: 62px 0 68px;
}

.quiz-callout h2 {
    max-width: 520px;
}

.quiz-invite {
    width: min(560px, calc(100vw - 30px));
}

.quiz-invite-card h2 {
    font-size: clamp(35px, 5vw, 50px);
}

/* Two-part money check */
.quiz-start {
    align-items: end;
}

.quiz-start > div {
    max-width: 470px;
}

.quiz-start-label {
    color: var(--rust) !important;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.quiz-start h2 {
    margin: 6px 0 10px;
    font-family: var(--serif);
    font-size: clamp(34px, 5vw, 48px);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.quiz-start > div > p:last-child {
    margin: 0;
}

.profile-quiz,
.money-report {
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--line-strong);
    background: var(--paper-light);
    box-shadow: var(--shadow);
    scroll-margin-top: 12px;
}

.quiz-question,
.profile-question {
    min-width: 0;
}

.quiz-question legend,
.profile-question legend {
    max-width: 26ch;
    margin-bottom: 28px;
    font-family: var(--serif);
    font-size: clamp(28px, 4.2vw, 41px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.profile-question {
    padding: 0;
    margin: 0;
    border: 0;
}

.profile-question > label:not([for]) {
    display: grid;
    padding: 15px 16px;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    border-top: 1px solid var(--line);
    cursor: pointer;
    font-size: 16px;
}

.profile-question > label:not([for]):last-of-type {
    border-bottom: 1px solid var(--line);
}

.profile-question > label:not([for]):hover,
.profile-question > label:not([for]):has(input:checked) {
    background: var(--paper-deep);
}

.profile-question input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    accent-color: var(--green);
}

.profile-question-hint {
    max-width: 58ch;
    margin: -12px 0 24px;
    color: var(--ink-soft);
    font-size: 14px;
}

.profile-number-question > label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.profile-number-question > label span {
    font-weight: 400;
}

.profile-number-question > input,
.money-input {
    width: min(360px, 100%);
}

.profile-number-question > input,
.money-input input,
.report-email-fields input {
    min-height: 54px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    background: white;
}

.money-input {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    border: 1px solid var(--line-strong);
    background: white;
}

.money-input span {
    padding-left: 15px;
    color: var(--ink-soft);
}

.money-input input {
    width: 100%;
    border: 0;
}

.quiz-review-details {
    margin: 28px 0 36px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.quiz-review-details summary {
    padding: 16px 0;
    color: var(--green);
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
}

.quiz-review-details .quiz-review {
    margin: 0;
}

.quiz-next-part {
    padding: 30px;
    border-left: 4px solid var(--rust);
    background: var(--paper-deep);
}

.quiz-next-part h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(29px, 4vw, 38px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.quiz-next-part > p:not(.eyebrow) {
    margin: 14px 0 22px;
    color: var(--ink-soft);
}

.money-report > h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(38px, 5vw, 56px);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1;
}

.path-card {
    margin: 30px 0 40px;
    padding: 24px 26px;
    border-left: 4px solid var(--green);
    background: var(--paper-deep);
}

.path-card h3,
.projection-title,
.report-email-card h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(27px, 3.6vw, 38px);
    font-weight: 550;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.path-card p {
    margin: 12px 0 0;
    color: var(--ink-soft);
}

.projection-table-wrap {
    margin-top: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.projection-table {
    width: 100%;
    min-width: 510px;
    border-collapse: collapse;
    font-size: 14px;
}

.projection-table th,
.projection-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
}

.projection-table thead th {
    color: var(--paper-light);
    background: var(--green-dark);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.projection-table th:first-child {
    text-align: left;
}

.projection-table tbody tr:nth-child(even) {
    background: rgba(235, 227, 215, 0.46);
}

.projection-note {
    margin: 14px 0 0;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.5;
}

.report-email-card {
    margin-top: 46px;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--line-strong);
    background: rgba(251, 248, 242, 0.8);
}

.report-email-card > p:not(.eyebrow, .report-privacy) {
    max-width: 62ch;
    margin: 16px 0 24px;
    color: var(--ink-soft);
}

.report-email-fields {
    display: grid;
    gap: 7px;
}

.report-email-fields label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.report-email-fields input {
    width: 100%;
}

.consent-check {
    display: grid;
    margin: 16px 0 20px;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    color: var(--ink-soft);
    font-size: 13px;
}

.consent-check input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--green);
}

.form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.report-privacy {
    margin: 18px 0 0;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.5;
}

.report-form-status {
    min-height: 1.5em;
    margin: 14px 0 0;
    color: var(--rust);
    font-size: 13px;
    font-weight: 700;
}

.report-form-status.is-success {
    color: var(--green);
}

.button-link:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.report-restart {
    display: table;
    margin: 28px auto 0;
}

@media (max-width: 900px) {
    .home-library .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-library .article-card:not(:nth-child(3n)) {
        border-right: 0;
    }

    .home-library .article-card:nth-child(odd) {
        border-right: 1px solid var(--line);
    }
}

@media (max-width: 700px) {
    .site-search-button {
        width: 100%;
        padding: 12px;
        border-bottom: 1px solid var(--line);
    }

    .home-hero {
        padding: 52px 0 58px;
    }

    .home-hero-inner h1 {
        font-size: clamp(45px, 13vw, 60px);
    }

    .home-hero-inner .hero-intro {
        margin: 22px 0 26px;
        font-size: 20px;
    }

    .home-search {
        min-height: 58px;
        padding-left: 14px;
    }

    .home-search small {
        display: none;
    }

    .home-library,
    .topic-strip,
    .quiz-callout {
        padding: 54px 0 60px;
    }

    .home-library .article-grid {
        grid-template-columns: 1fr;
    }

    .home-library .article-card:nth-child(odd) {
        border-right: 0;
    }

    .home-library .article-card-link {
        min-height: 0;
        padding: 26px 2px 30px;
    }

    .home-library .article-card h2 {
        font-size: 29px;
    }

    .quiz-invite {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
    }

    .quiz-invite-card {
        padding-top: 42px;
    }

    .quiz-page-header h1 {
        font-size: clamp(42px, 12vw, 58px);
    }

    .quiz-page-header > div > p:not(.eyebrow) {
        font-size: 19px;
    }

    .finance-quiz,
    .profile-quiz {
        padding: 0 20px 28px;
        scroll-margin-top: 0;
    }

    .quiz-result,
    .money-report {
        padding: 26px 20px;
    }

    .projection-table-wrap {
        overflow-x: visible;
    }

    .projection-table {
        min-width: 0;
        table-layout: fixed;
        font-size: 12px;
    }

    .projection-table th,
    .projection-table td {
        padding: 12px 4px;
    }

    .projection-table th:first-child {
        width: 42px;
    }

    .projection-table thead th {
        font-size: 9px;
        letter-spacing: 0.02em;
    }

    .quiz-progress-row {
        position: sticky;
        top: 0;
        z-index: 3;
        margin: 0 -20px 24px;
        padding: 16px 20px 14px;
        grid-template-columns: 1fr;
        gap: 9px;
        border-bottom: 1px solid var(--line);
        background: var(--paper-light);
    }

    .quiz-form-message {
        min-height: 1.4em;
        margin-bottom: 10px;
    }

    .quiz-question legend,
    .profile-question legend {
        font-size: clamp(27px, 8vw, 34px);
    }

    .quiz-question > label,
    .profile-question > label:not([for]) {
        padding: 14px 10px;
    }

    .quiz-explanation {
        padding: 20px 18px;
    }

    .quiz-next-part {
        padding: 24px 20px;
    }

    .path-card {
        padding: 22px 18px;
    }

    .report-email-card {
        margin-right: -4px;
        margin-left: -4px;
        padding: 24px 18px;
    }

    .report-email-card .button-link {
        width: 100%;
    }
}

/* ============================================================
   REFINEMENT LAYER (theme-impl)
   Structural mobile/short-answer/byline (IMPLEMENTATION-SPECS Spec 2), new
   components (Guides hub, Ask Zach card, TOC, calculator, hero chips), and the
   VISUAL-REFINEMENT TOP-5 + safe nice-to-haves. These rules come LAST on purpose:
   same-selector refinements win by source order; the Ghost-accent lock wins via
   !important. Color law: GREEN = action/links/structure, RUST = the editor's pen
   (labels, section/source/figure numbers, warnings). No third accent, squared
   corners stay squared, transitions <=150ms, reduced-motion already neutralized above.
   ============================================================ */

/* WHY (visual TOP 1): the Ghost admin accent ships as hot pink (#FF1A75) injected inline in
   {{ghost_head}}, which in this layout renders AFTER style.css and would win source order. The brand
   accent is the forest green; !important makes this win regardless of order and keeps the injected
   search/Portal/button UI on-brand even if the admin setting is reverted. Distinct from the native
   `accent-color` on checkboxes/radios (already --green). Root-cause fix is the admin setting; flagged. */
:root {
    --ghost-accent-color: #1d5a49 !important;
}

/* WHY (Spec 2.3): one-line byline supersedes the 4-cell grid above. The grid was ~140px of metadata
   before the answer on mobile; one flex line reclaims it and reads like a newspaper byline. Green
   author link signals a link you can follow to the author page (color law). */
.guide-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.4;
}

.guide-byline a {
    color: var(--green);
    font-weight: 650;
    text-underline-offset: 3px;
}

/* WHY (Spec 2.4): the first paragraph is already the editorial short answer. A restrained rust rule
   (the existing blockquote motif) names it as THE answer and, with 2.2/2.3, lands it inside the first
   mobile viewport. Scoped to guides (post-template) so legal/about/calculator intros are untouched. */
body.post-template .gh-content > p:first-of-type {
    font-size: clamp(19px, 2.2vw, 22px);
    line-height: 1.5;
    font-weight: 600;
    color: var(--ink);
    padding-left: 16px;
    border-left: 3px solid var(--rust);
    margin-bottom: 1.4em;
}

/* WHY (Spec 2.6): hero question chips give a first-time mobile reader an immediate tappable
   "what to read" without typing a search. Squared analog pills to match the ledger system; >=44px tap. */
.chips-eyebrow {
    margin: 26px 0 10px;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid var(--line);
    background: var(--paper-light);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color 150ms ease, color 150ms ease;
}

.hero-chip:hover {
    border-color: var(--green);
    color: var(--green-dark);
}

/* WHY (Spec 1): merged Guides hub. Compact hero (one-line intro per Spec 2.5) so the first section's
   cards sit near the fold; situation sections read as edited chapters separated by a hairline rule. */
.hub-hero {
    padding: 64px 0 40px;
}

.hub-intro {
    margin-top: 20px;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: clamp(19px, 2vw, 22px);
    line-height: 1.5;
}

.hub-intro p {
    margin: 0;
}

.hub-intro a {
    color: var(--green);
    text-underline-offset: 3px;
}

.hub-sections {
    padding: 8px 0 48px;
}

.hub-section {
    padding: 44px 0;
    border-top: 1px solid var(--line);
}

.hub-section:first-child {
    padding-top: 20px;
    border-top: 0;
}

.hub-section-head {
    max-width: 640px;
    margin-bottom: 28px;
}

.hub-section-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.hub-deck {
    margin: 10px 0 0;
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.5;
}

/* WHY: a lone guide fills the row as a lead instead of leaving a half-empty ledger cell (no dead
   space); multi-card sections keep the 2-up ruled grid. */
.hub-grid .article-card:only-child {
    grid-column: 1 / -1;
    border-right: 0;
}

/* WHY: an unfilled section is truly :empty (grid whitespace is trimmed in the template), so hide the
   bare ruled box and show the calm "more coming" line instead. */
.hub-grid:empty {
    display: none;
}

.hub-empty {
    display: none;
    margin: 0;
    padding: 18px 0 0;
    color: var(--ink-soft);
    font-size: 15px;
}

.hub-grid:empty + .hub-empty {
    display: block;
}

/* WHY (Spec 1.6 / FC-1..FC-3): the Ask Zach card reuses the editorial-note analog look (cream, hairline),
   never a bright button. One calm card per surface; the insurance variant carries a rust top rule to read
   as slightly more present where buying intent is highest, still inside the design bar. */
.ask-zach {
    padding: 0 0 8px;
}

.hub-ask-zach {
    padding: 0;
    margin-bottom: 28px;
}

.ask-zach-card {
    padding: 28px 30px;
    border: 1px solid var(--line);
    background: rgba(251, 248, 242, 0.62);
    box-shadow: var(--shadow);
}

.ask-zach-card.is-insurance {
    border-top: 3px solid var(--rust);
    background: rgba(235, 227, 215, 0.5);
}

.ask-zach-heading {
    margin: 6px 0 0;
    font-family: var(--serif);
    font-size: clamp(23px, 2.6vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.ask-zach-body {
    max-width: 60ch;
    margin: 12px 0 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.55;
}

.ask-zach-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-bottom: 3px;
    color: var(--green-dark);
    border-bottom: 1px solid var(--green);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.ask-zach-link span {
    transition: transform 150ms ease;
}

.ask-zach-link:hover span {
    transform: translateX(4px);
}

.ask-zach-reassure {
    margin: 16px 0 0;
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 13px;
}

/* WHY (item 8): auto "On this page" jump list for long guides. Native <details> = collapsible,
   keyboard accessible, no library. Square, rust marker in the editor's-pen register; site.js opens it
   on wider screens and only reveals it when a guide has 3+ H2s. */
.guide-toc {
    margin: 0 0 34px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-family: var(--sans);
}

.guide-toc > summary {
    padding: 14px 0;
    color: var(--green);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.04em;
    list-style: none;
}

.guide-toc > summary::-webkit-details-marker {
    display: none;
}

.guide-toc > summary::before {
    content: "+";
    display: inline-block;
    width: 1.2em;
    color: var(--rust);
    font-weight: 750;
}

.guide-toc[open] > summary::before {
    content: "\2212";
}

.guide-toc ol {
    margin: 0;
    padding: 0 0 16px;
    list-style: none;
    counter-reset: toc;
}

.guide-toc li {
    padding: 6px 0;
    counter-increment: toc;
    border-top: 1px solid var(--line);
}

.guide-toc li::before {
    content: counter(toc, decimal-leading-zero);
    margin-right: 12px;
    color: var(--rust);
    font-size: 12px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.guide-toc a {
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
    text-underline-offset: 3px;
}

.guide-toc a:hover {
    color: var(--green);
    text-decoration: underline;
}

/* WHY (item 9): compound-growth calculator, on-brand and accessible. Squared inputs, green = action
   (active preset, focus, slider), rust = the small annotation labels. Big tabular result number. */
.calc-intro {
    margin-bottom: 34px;
}

.calc {
    display: grid;
    gap: 28px;
    padding: clamp(24px, 4vw, 34px);
    border: 1px solid var(--line-strong);
    background: var(--paper-light);
    box-shadow: var(--shadow);
}

.calc-field {
    display: grid;
    gap: 10px;
}

.calc-label {
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 750;
}

.calc-rate-value {
    color: var(--green-dark);
    font-variant-numeric: tabular-nums;
}

.calc-money-input {
    display: grid;
    width: min(320px, 100%);
    grid-template-columns: auto 1fr;
    align-items: center;
    border: 1px solid var(--line-strong);
    background: white;
}

.calc-money-input span {
    padding-left: 15px;
    color: var(--ink-soft);
}

.calc-money-input input {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.calc-hint {
    margin: 0;
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.5;
}

.calc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.calc-preset {
    min-width: 56px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    background: var(--paper);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.calc-preset:hover {
    border-color: var(--green);
}

.calc-preset.is-active {
    color: var(--paper-light);
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.calc-rate-presets {
    margin-top: 4px;
}

.calc input[type="range"] {
    width: 100%;
    accent-color: var(--green);
}

.calc-results {
    margin-top: 30px;
    padding: clamp(24px, 4vw, 34px);
    border: 1px solid var(--line-strong);
    border-top: 3px solid var(--green);
    background: rgba(235, 227, 215, 0.42);
}

.calc-projected {
    margin: 6px 0 0;
}

.calc-projected-num {
    color: var(--green-dark);
    font-family: var(--serif);
    font-size: clamp(40px, 7vw, 64px);
    font-weight: 600;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.calc-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.calc-breakdown-cell {
    display: grid;
    gap: 4px;
}

.calc-bd-label {
    color: var(--rust);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calc-bd-num {
    color: var(--ink);
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.calc-note {
    margin: 22px 0 0;
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.55;
}

.calc-card-wrap {
    margin-top: 34px;
}

.calc-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin: 18px 0 0;
}

.calc-card-links .ask-zach-link {
    margin-top: 0;
}

/* WHY (visual TOP 2): the numbered primary-source list is the site's strongest trust and anti-AI
   signal. Treating it as a published reference book's back-matter (ruled rows, hanging tabular ordinal
   in the rust editor's-pen color, the title as the actionable green link) makes the superpower visible.
   Serif body -> sans for the apparatus = "this is reference data." Zero markup change. */
.gh-content h2#sources {
    font-size: clamp(26px, 3.2vw, 34px);
}

.gh-content h2#sources + ol {
    margin: 1.6em 0 0;
    padding: 0;
    list-style: none;
    counter-reset: source;
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
}

.gh-content h2#sources + ol > li {
    position: relative;
    padding: 15px 0 15px 3.4rem;
    counter-increment: source;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
}

.gh-content h2#sources + ol > li:last-child {
    border-bottom: 1px solid var(--line);
}

.gh-content h2#sources + ol > li::before {
    content: counter(source);
    position: absolute;
    top: 15px;
    left: 0;
    width: 2.4rem;
    color: var(--rust);
    text-align: right;
    font-size: 13px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.gh-content h2#sources + ol > li a {
    color: var(--green);
    font-weight: 600;
    text-underline-offset: 3px;
}

.gh-content h2#sources + ol > li a:hover {
    color: var(--rust);
}

/* WHY (visual TOP 3): a reference on money must read as data. Tabular lining figures make every digit
   share one width so columns of dollars, percentages, and dates align to a common rhythm. The decorative
   ledger-gradient companion is intentionally omitted to keep table numbers at full contrast (readability). */
.gh-content table,
.projection-table,
.quiz-score,
.money-report,
.guide-byline time,
.article-card-meta time {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* WHY (visual TOP 4): a field guide numbers its plates and sections. A small rust section number above
   each H2 (eyebrow register) turns a warm article into an annotated reference and aids scanning, a print
   convention templates do not produce. Scoped to guides (post-template); #sources excluded so back-matter
   is not numbered as a chapter; H3s deliberately left un-numbered to avoid over-formalizing. */
body.post-template .guide-body .gh-content {
    counter-reset: plate figure;
}

body.post-template .guide-body .gh-content h2:not(#sources) {
    counter-increment: plate;
}

body.post-template .guide-body .gh-content h2:not(#sources)::before {
    content: counter(plate, decimal-leading-zero);
    display: block;
    margin-bottom: 0.35em;
    color: var(--rust);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.14em;
    font-variant-numeric: tabular-nums;
}

body.post-template .gh-content figure.kg-image-card {
    counter-increment: figure;
}

body.post-template .gh-content figure.kg-image-card figcaption::before {
    content: "Fig. " counter(figure) "  ";
    color: var(--rust);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

/* WHY (visual TOP 4): mat the chart plate on paper (border already set on .kg-image-card img above). */
.gh-content .kg-image-card img {
    padding: 18px;
}

/* WHY (visual TOP 5A): a uniform card grid is a classic AI tell. Promoting the first guide in a tag or
   author archive to a full-width lead gives the ledger an edited-front-page rhythm; the border reset
   reconciles the odd/even rule for a full-width row. The home library and the situation hub are left as
   deliberate compositions (the hub is already de-templated into six edited sections). */
.archive-list .article-grid > .article-card:first-child {
    grid-column: 1 / -1;
    border-right: 0;
}

.archive-list .article-grid > .article-card:first-child h2 {
    max-width: 20ch;
    font-size: clamp(38px, 4.6vw, 56px);
}

.archive-list .article-grid > .article-card:first-child .article-card-link {
    min-height: 240px;
}

/* WHY (visual TOP 5B): number the topic index so it reads as a reference book's contents, not a
   feature-card grid. Cheapest de-templating; no layout change. */
.topic-links {
    counter-reset: topic;
}

.topic-links a {
    position: relative;
    counter-increment: topic;
}

.topic-links a::before {
    content: counter(topic, decimal-leading-zero);
    position: absolute;
    top: 14px;
    right: 16px;
    color: var(--rust);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

.topic-links a:hover::before {
    color: rgba(255, 255, 255, 0.6);
}

/* WHY (nice-to-have 6): once citations are real <sup><a href="#source-N">N</a></sup>, they become
   quiet clickable reference marks in the rust register; the jumped-to source row highlights. CSS-only,
   inert until content adopts the convention. */
.gh-content sup a {
    color: var(--rust);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.gh-content sup a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gh-content h2#sources + ol > li:target {
    background: rgba(235, 227, 215, 0.6);
}

/* WHY (nice-to-have 8): Ghost's callout/button cards ship with a pastel fill, an emoji slot, and an
   accent-colored button. Pre-styling them into the ruled paper system means an author can drop one in
   and it stays on-brand: no emoji, no pink, hairline + rust rule like the editorial notes. */
.gh-content .kg-callout-card {
    margin: 2em 0;
    padding: 20px 24px;
    border: 0;
    border-left: 4px solid var(--rust);
    border-radius: 0;
    background: rgba(235, 227, 215, 0.58);
    font-family: var(--serif);
}

.gh-content .kg-callout-emoji {
    display: none;
}

.gh-content .kg-btn-accent {
    border-radius: 0;
    color: var(--paper-light);
    background: var(--green-dark);
}

/* WHY (nice-to-have 9): a key-number callout on Ghost's alternate blockquote surfaces one decisive
   figure as a scannable anchor: large tabular numeral, rust hairline, no italics (avoids the unearned
   italics tell). It is honest (a real number), the opposite of a fake stat counter. */
.gh-content blockquote.kg-blockquote-alt {
    padding: 18px 0 0;
    border-left: 0;
    border-top: 2px solid var(--rust);
    background: transparent;
    font-style: normal;
    font-size: clamp(24px, 3.4vw, 34px);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

/* WHY (nice-to-have 10): opening quotation marks hang into the margin so the text edge stays optically
   straight, a fine book-typography detail. Progressive: supported in Safari today, harmless elsewhere. */
.gh-content blockquote {
    hanging-punctuation: first;
}

/* WHY (nice-to-have 10): the colophon is the single most "a human made this" print artifact available. */
.footer-colophon {
    padding: 0 0 24px;
}

.colophon {
    margin: 0;
    color: rgba(251, 248, 242, 0.55);
    font-family: var(--serif);
    font-size: 12px;
    font-style: italic;
}

/* WHY: Ghost sanitizes the inline overflow wrapper from article HTML. Without
   a theme-owned replacement, a 1200px sourced chart is compressed below 240px
   on a phone and its evidence labels become decorative noise. The JS owner
   marks only local /assets/charts/ figures, so ordinary wide images keep their
   responsive behavior. The caption and swipe cue stay pinned while the chart
   itself moves, preserving context at both ends. */
@media (max-width: 900px) {
    body.post-template .gh-content figure[data-scroll-chart="true"] {
        overflow-x: auto;
        padding-bottom: 4px;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    body.post-template .gh-content figure[data-scroll-chart="true"]::before {
        position: sticky;
        left: 0;
        display: block;
        box-sizing: border-box;
        width: calc(100vw - 48px);
        padding: 0 0 10px;
        color: var(--green-dark);
        content: "Swipe to read the full chart →";
        font-family: var(--sans);
        font-size: 12px;
        font-weight: 750;
        letter-spacing: 0.03em;
    }

    body.post-template .gh-content figure[data-scroll-chart="true"] > img {
        width: 1000px;
        min-width: 1000px;
        max-width: none;
    }

    body.post-template .gh-content figure[data-scroll-chart="true"] > figcaption {
        position: sticky;
        left: 0;
        width: calc(100vw - 48px);
        max-width: calc(100vw - 48px);
        margin-right: 0;
        margin-left: 0;
    }

    body.post-template .gh-content figure[data-scroll-chart="true"]:focus-visible {
        outline: 3px solid var(--rust);
        outline-offset: 3px;
    }
}

/* WHY (Spec 2.2/2.3 + visual section 6): mobile refinements. Later same-selector rules win, so the H1
   clamp and byline sizing override the earlier mobile block; figures and the source gutter tighten so
   charts stay large and long source titles wrap under the ordinal, not into it. */
@media (max-width: 700px) {
    .guide-header h1 {
        font-size: clamp(30px, 8vw, 44px);
    }

    .guide-byline {
        margin-top: 20px;
        font-size: 13px;
    }

    .hub-hero {
        padding: 44px 0 28px;
    }

    .hub-section {
        padding: 34px 0;
    }

    .gh-content .kg-image-card img {
        padding: 12px;
    }

    .gh-content h2#sources + ol > li {
        padding-left: 2.9rem;
    }

    .calc {
        padding: 22px 18px;
    }

    .calc-results {
        padding: 24px 18px;
    }

    .calc-breakdown {
        gap: 20px;
    }
}
