/* =========================================================
   NEXT PAYCHECK — shared styles (guides, FAQ, blog, contact, home)
   The app's 2026 design system (DesignSystem/Tokens + Assets.xcassets/DS):
   flat surfaces on a mint ground, SF Pro for everything, Instrument Serif
   only for Pork's voice. Follows the system appearance like the app does:
   Light is the shipping mint palette, Dark is the black, metric-forward look.
   Served with a 1-year immutable cache (see _headers): bump the
   ?v= query on every <link> to this file when you change it.
   ========================================================= */
:root {
    color-scheme: light dark;

    /* Grounds and surfaces */
    --ground: #D9E9D6;
    --surface: #FBF6EC;
    --surface-2: #F2EBDD;
    --surface-3: #EADFCC;
    --surface-hover: #FFFBF4;

    /* Text: --text-4 is for placeholders and decoration only */
    --text: #1B1410;
    --text-2: #33271F;
    --text-3: #4E3F33;
    --text-4: #6B5A4A;

    /* Semantic accents: money still yours, money gone, time */
    --safe: #2F5239;
    --safe-tint: #DDE6CF;
    --on-safe: #FBF6EC;
    --burn: #8F2A1C;
    --burn-text: #8A2516;
    --burn-tint: #F2D6CE;
    --runway: #6B4510;
    --runway-tint: #F3E4C6;
    --pending: #C78A2E;

    /* Controls */
    --primary: #1B1410;
    --on-primary: #FBF6EC;

    /* Chrome */
    --divider: rgba(27, 20, 16, 0.22);
    --hairline: rgba(27, 20, 16, 0.11);
    --bar-bg: rgba(217, 233, 214, 0.86);
    --bezel: #1B1410;
    --device-shadow: rgba(30, 50, 35, 0.32);
    --sheet-shadow: rgba(27, 20, 16, 0.18);
    --invert-bg: #1B1410;
    --invert-text: #FBF6EC;
    --invert-text-2: rgba(251, 246, 236, 0.78);
    --invert-tile: rgba(251, 246, 236, 0.09);

    /* Pork: the mascot and his voice, never a UI state */
    --pork: #E8A6C2;
    --pork-light: #F5C9DA;
    --pork-deep: #B86687;
    --pork-ink: #1B1410;
    --pork-text: #7E2C50;

    /* Paywall hero gradient */
    --hero-a: rgba(232, 166, 194, 0.85);
    --hero-b: rgba(63, 107, 76, 0.30);
    --hero-base: #F5C9DA;
    --hero-text: #1B1410;
    --hero-text-2: #33271F;

    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    --serif: "Instrument Serif", ui-serif, Georgia, serif;

    --pad-x: clamp(16px, 5vw, 80px);
    --max: 1200px;
    --r-card: 22px;
    --r-tile: 16px;
    --r-field: 15px;
    --r-sheet: 26px;
    --r-small: 11px;
    --t: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ground: #000000;
        --surface: #141416;
        --surface-2: #1C1C1F;
        --surface-3: #26262A;
        --surface-hover: #1C1C1F;

        --text: #FFFFFF;
        --text-2: #C8C8CE;
        --text-3: #B4B4BC;
        --text-4: #8E8E96;

        --safe: #A6FF00;
        --safe-tint: rgba(166, 255, 0, 0.14);
        --on-safe: #0A0E00;
        --burn: #FA114F;
        --burn-text: #FF7A9C;
        --burn-tint: rgba(250, 17, 79, 0.15);
        --runway: #00FFF6;
        --runway-tint: rgba(0, 255, 246, 0.10);
        --pending: #E0A02E;

        --primary: #A6FF00;
        --on-primary: #0A0E00;

        --divider: rgba(255, 255, 255, 0.2);
        --hairline: rgba(255, 255, 255, 0.1);
        --bar-bg: rgba(0, 0, 0, 0.78);
        --bezel: #1C1C1F;
        --device-shadow: rgba(0, 0, 0, 0.9);
        --sheet-shadow: rgba(0, 0, 0, 0.7);
        --invert-bg: #1C1C1F;
        --invert-text: #FFFFFF;
        --invert-text-2: #C8C8CE;
        --invert-tile: rgba(255, 255, 255, 0.06);

        --pork: #FF8FB8;
        --pork-light: #FFC7DC;
        --pork-deep: #C4517A;
        --pork-ink: #17090F;
        --pork-text: #FF8FB8;

        --hero-a: rgba(250, 17, 79, 0.42);
        --hero-b: rgba(0, 255, 246, 0.22);
        --hero-base: #2A0716;
        --hero-text: rgba(255, 255, 255, 0.94);
        --hero-text-2: #C8C8CE;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--ground);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
::selection { background: var(--pork-light); color: var(--pork-ink); }
:focus-visible { outline: 2px solid var(--safe); outline-offset: 3px; border-radius: 6px; }

.skip {
    position: absolute; inset-inline-start: 12px; top: -48px; z-index: 100;
    background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 999px;
    font-size: 14px; font-weight: 600; transition: top .2s var(--t);
}
.skip:focus { top: 12px; }

/* Pork's voice */
.voice { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px var(--pad-x);
    background: var(--bar-bg);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--hairline);
}
.nav__brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.nav__brand-mark { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.nav__links { display: inline-flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.nav__links a { transition: color .2s var(--t); white-space: nowrap; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--safe); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.nav__cta {
    display: inline-flex; align-items: center; min-height: 38px; padding: 0 17px; border-radius: 999px;
    background: var(--primary); color: var(--on-primary) !important;
    font-weight: 600; font-size: 14.5px; transition: opacity .2s var(--t);
}
.nav__cta:hover { opacity: .85; }
@media (max-width: 860px) { .nav__hide-md { display: none; } }
@media (max-width: 560px) {
    .nav { padding: 10px 16px; gap: 10px; }
    .nav__links { gap: 14px; font-size: 14px; }
    .nav__hide-sm { display: none; }
    .nav__brand span { display: none; }
}

/* ---------- Language picker and "also available in" bar (markup from _build/i18n/localize.py) ---------- */
.lang-picker { position: relative; }
.lang-picker__btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 36px; padding: 0 10px; border-radius: 999px;
    list-style: none; cursor: pointer; white-space: nowrap; user-select: none;
    transition: background .2s var(--t), color .2s var(--t);
}
.lang-picker__btn::-webkit-details-marker { display: none; }
.lang-picker__btn::after {
    content: ''; width: 6px; height: 6px; margin: -3px 2px 0;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform .2s var(--t);
}
.lang-picker[open] > .lang-picker__btn::after { transform: translateY(3px) rotate(-135deg); }
.lang-picker__btn:hover, .lang-picker[open] > .lang-picker__btn { background: var(--surface-2); color: var(--text); }
.lang-picker img { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px var(--hairline); flex: none; }
.lang-picker__list {
    position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60;
    width: 264px; max-height: min(72vh, 540px); overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 6px; list-style: none;
    background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-tile);
    box-shadow: 0 22px 44px -18px var(--sheet-shadow);
}
.nav__links .lang-picker__list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text); font-size: 15px; }
.lang-picker__list small { margin-inline-start: auto; color: var(--text-3); font-size: 12.5px; }
.nav__links .lang-picker__list a:hover { background: var(--surface-2); }
.nav__links .lang-picker__list a[aria-current="true"] { background: var(--safe-tint); font-weight: 600; }
@media (max-width: 560px) {
    .lang-picker { position: static; }
    .lang-picker__name { display: none; }
    .lang-picker__btn { padding: 0 6px; gap: 6px; }
    .lang-picker__list { inset-inline: 12px; top: calc(100% + 6px); width: auto; }
}
/* Small phones: room for the longer nav labels in some languages */
@media (max-width: 360px) {
    .nav { gap: 8px; }
    .nav__links { gap: 10px; font-size: 13.5px; }
    .nav__cta { padding-inline: 12px; }
    .lang-picker__btn { padding: 0 4px; gap: 4px; }
}
.lang-bar {
    position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 14px;
    padding: 10px 56px; background: var(--invert-bg); color: var(--invert-text); font-size: 14.5px; line-height: 1.4; text-align: center;
}
.lang-bar p { margin: 0; }
.lang-bar a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lang-bar button {
    position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border: 0; border-radius: 999px; background: none; color: inherit;
    font-size: 24px; line-height: 1; cursor: pointer;
}
.lang-bar button:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Buttons ---------- */
/* The App Store badge keeps Apple's black badge look in both appearances. */
.badge-appstore {
    display: inline-flex; align-items: center; gap: 9px;
    min-height: 54px; padding-block: 0; padding-inline: 15px 20px; border-radius: 13px;
    background: #000; color: #fff; border: 1px solid #A6A6A6;
    font-size: 14px; font-weight: 600;
    transition: opacity .2s var(--t);
}
.badge-appstore:hover { opacity: .85; }
.badge-appstore svg { flex-shrink: 0; }
.badge-appstore__caption { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.badge-appstore__caption small { font-weight: 500; font-size: 10.5px; letter-spacing: 0.01em; opacity: 0.9; }
.badge-appstore__caption strong { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.text-link { color: var(--runway); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: gap .25s var(--t); }
.text-link:hover { gap: 10px; }
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
    border-radius: 999px; border: 1.5px solid var(--divider); background: transparent; color: var(--text);
    font-size: 15px; font-weight: 600; cursor: pointer; transition: opacity .2s var(--t);
}
.btn-ghost:hover { opacity: .7; }

/* ---------- Eyebrow (section label) ---------- */
.eyebrow {
    font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.5;
    color: var(--safe); display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
}
.eyebrow::before { content: ''; width: 24px; height: 2px; border-radius: 2px; background: currentColor; flex-shrink: 0; }

/* ---------- Pills (status, streak, tags) ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 650; line-height: 1.3; letter-spacing: .01em; white-space: nowrap;
    background: var(--surface-3); color: var(--text-2);
}
.pill svg { width: 12px; height: 12px; flex-shrink: 0; }
.pill--safe { background: var(--safe-tint); color: var(--safe); }
.pill--burn { background: var(--burn-tint); color: var(--burn-text); }
.pill--runway { background: var(--runway-tint); color: var(--runway); }
.pill--pending::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--pending); }
.pill--pork { background: var(--pork); color: var(--pork-ink); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pill--plus { background: var(--safe); color: var(--on-safe); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; vertical-align: 2px; }

/* ---------- Device frame for app screenshots ---------- */
.device { border-radius: 15% / 7%; border: 7px solid var(--bezel); background: var(--surface); overflow: hidden; box-shadow: 0 28px 56px -26px var(--device-shadow); }
.device img, .device video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 13.5px; color: var(--text-3); margin: 0 0 clamp(20px, 3vw, 30px); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: '/'; margin-inline-end: 6px; color: var(--text-4); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Article ---------- */
.post { max-width: 780px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--pad-x) 0; }
.post__title { font-weight: 800; font-size: clamp(36px, 5.6vw, 56px); line-height: 1.03; letter-spacing: -0.04em; margin: 0 0 18px; }
.post__title em, .hub-head h1 em, .card__title em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--pork-text); letter-spacing: -0.01em; }
.post__dek { font-size: clamp(18px, 2.2vw, 20.5px); color: var(--text-2); line-height: 1.5; margin: 0 0 26px; }
.post__meta {
    display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap;
    font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums;
    border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
    padding: 13px 0; margin: 0 0 clamp(28px, 4vw, 40px);
}
.post__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-4); }

.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-weight: 700; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.03em; line-height: 1.12; margin-top: 1.7em; scroll-margin-top: 90px; }
.prose h3 { font-weight: 700; font-size: clamp(19px, 2.3vw, 21px); letter-spacing: -0.015em; line-height: 1.25; margin-top: 1.6em; scroll-margin-top: 90px; }
.prose p, .prose li { font-size: 18px; line-height: 1.68; }
.prose p { margin: 0; }
.prose > * + p { margin-top: 1.2em; }
.prose ul, .prose ol { padding-inline-start: 1.2em; margin-bottom: 0; }
.prose li { margin: 0.45em 0; }
.prose li::marker { color: var(--text-3); font-weight: 600; }
.prose strong { font-weight: 650; }
.prose a { color: var(--runway); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-thickness: 2.5px; }
.prose blockquote { margin: 1.6em 0; padding: 20px 24px; background: var(--surface); border-radius: var(--r-tile); }
.prose blockquote p { font-size: 20px; font-weight: 600; line-height: 1.42; letter-spacing: -0.015em; }
/* A quote with a Pork attribution is Pork talking: his voice is Instrument Serif. */
.prose blockquote:has(cite) p { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 29px); line-height: 1.2; letter-spacing: -0.005em; }
.prose blockquote cite { display: block; margin-top: 12px; font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.num { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Quick answer */
.answer { background: var(--surface); border-radius: var(--r-tile); padding: 20px 22px; margin: 0 0 clamp(28px, 4vw, 40px); }
.answer__label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--safe); margin: 0 0 8px; }
.answer p { font-size: 18px; line-height: 1.65; margin: 0; }

/* Table of contents */
.toc { background: var(--surface-2); border-radius: var(--r-tile); padding: 16px 22px; margin: 0 0 clamp(28px, 4vw, 40px); }
.toc__label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.toc ol { margin: 0; padding-inline-start: 1.3em; columns: 2 240px; column-gap: 32px; }
.toc li { font-size: 15.5px; margin: 5px 0; break-inside: avoid; }
.toc li::marker { color: var(--text-3); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--runway); text-decoration: underline; text-underline-offset: 3px; }

/* Callouts */
.callout { border-radius: var(--r-tile); padding: 18px 20px; background: var(--safe-tint); }
.callout p, .callout li { font-size: 16.5px; line-height: 1.6; }
.callout > * + * { margin-top: .6em; }
.callout__title { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0; color: var(--safe); }
.callout--warn { background: var(--burn-tint); }
.callout--warn .callout__title { color: var(--burn-text); }
.callout--pork { background: var(--pork-light); color: var(--pork-ink); }
.callout--pork .callout__title { color: var(--pork-ink); }

/* App how-to */
.app-how { margin-top: 2em !important; background: var(--surface); border-radius: var(--r-card); padding: clamp(22px, 3.4vw, 34px); }
.app-how__grid { display: grid; grid-template-columns: 1fr 210px; gap: 28px; align-items: start; }
@media (max-width: 680px) { .app-how__grid { grid-template-columns: 1fr; } .app-how__shot { max-width: 220px; margin: 0 auto; } }
.app-how h2 { margin-top: 0 !important; }
.app-how__shot { margin: 0; border-radius: 15% / 7%; border: 6px solid var(--bezel); overflow: hidden; background: var(--surface-2); box-shadow: 0 22px 44px -24px var(--device-shadow); }
.app-how__shot img { width: 100%; height: auto; }
.steps { list-style: none; counter-reset: step; padding: 0 !important; margin: 18px 0 0; }
.steps > li { counter-increment: step; position: relative; padding-inline-start: 44px; margin: 0 0 16px; }
.steps > li::before {
    content: counter(step); position: absolute; inset-inline-start: 0; top: 2px;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: var(--on-primary);
    font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; display: grid; place-items: center;
}
.steps > li strong { display: block; font-size: 18px; letter-spacing: -0.015em; }

/* Tables (also used for printable templates) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-tile); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: start; padding: 12px 15px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.prose th { font-weight: 700; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.template td { height: 44px; }
.template--form th { white-space: normal; width: 40%; text-transform: none; font-size: 14.5px; font-weight: 600; letter-spacing: 0; color: var(--text-2); }
.box-col { width: 54px; text-align: center !important; }
.print-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; min-height: 44px;
    padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--divider); background: transparent;
    font-weight: 600; font-size: 15px; color: var(--text); cursor: pointer; transition: opacity .2s var(--t);
}
.print-btn:hover { opacity: .7; }

/* Printable sections */
.printable { border-radius: var(--r-card); padding: clamp(20px, 3vw, 30px); background: var(--surface); }
.printable h2 { margin-top: 0 !important; }
.printable p + p { margin-top: .8em; }
.printable__hint { font-size: 14px !important; color: var(--text-3); }
.checks { list-style: none; padding: 0 !important; margin: 10px 0 0; columns: 2 220px; column-gap: 28px; }
.checks li { break-inside: avoid; display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; margin: 0; border-bottom: 1px solid var(--hairline); font-size: 16.5px; line-height: 1.4; }
.checks li::before { content: ''; width: 16px; height: 16px; border: 1.5px solid var(--text-3); border-radius: 5px; flex-shrink: 0; margin-top: 2px; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.calendar span { aspect-ratio: 1; border-radius: var(--r-small); background: var(--surface-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 5px 7px; color: var(--text-3); }

/* Key takeaways */
.keypoints { background: var(--surface-2); border-radius: var(--r-tile); padding: 20px 22px 18px; }
.keypoints__title { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.keypoints li { font-size: 16.5px; }

/* Page-level FAQ */
.faq-mini { border-top: 1px solid var(--hairline); }
.faq-mini details { border-bottom: 1px solid var(--hairline); }
.faq-mini summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-mini summary::-webkit-details-marker { display: none; }
.faq-mini summary::after { content: '+'; font-size: 24px; font-weight: 400; color: var(--text-3); line-height: 1; transition: transform .25s var(--t); }
.faq-mini details[open] summary::after { transform: rotate(45deg); }
.faq-mini details > div { padding: 0 0 18px; }
.faq-mini details p { font-size: 16.5px; line-height: 1.65; color: var(--text-2); }

/* Sources & disclaimer */
.sources { border-top: 1px solid var(--hairline); padding-top: 18px; }
.sources__title { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.sources ol { padding-inline-start: 1.2em; }
.sources li { font-size: 14.5px; line-height: 1.55; color: var(--text-2); margin: 6px 0; }
.sources a { color: var(--text-2); }
.disclaimer { font-size: 14px !important; line-height: 1.6 !important; color: var(--text-3); border-top: 1px solid var(--hairline); padding-top: 18px; }

/* Article CTA: the paywall's hero gradient */
.cta-box {
    margin: clamp(40px, 6vw, 64px) 0 0; padding: clamp(26px, 4vw, 42px);
    background:
        radial-gradient(circle 320px at 22% 12%, var(--hero-a), transparent),
        radial-gradient(circle 300px at 84% 82%, var(--hero-b), transparent),
        var(--hero-base);
    color: var(--hero-text); border-radius: var(--r-sheet);
    display: grid; grid-template-columns: auto 1fr; gap: 22px 26px; align-items: center;
}
.cta-box__icon { width: 72px; height: 72px; border-radius: 17px; }
.cta-box h2 { font-weight: 800; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.035em; line-height: 1.08; margin: 0 0 8px; }
.cta-box p { color: var(--hero-text-2); margin: 0 0 18px; font-size: 16px; line-height: 1.55; max-width: 50ch; }
.cta-box .cta-box__fine { font-size: 13px; margin: 14px 0 0; color: var(--hero-text-2); }
@media (max-width: 560px) { .cta-box { grid-template-columns: 1fr; } }

/* Related links */
.related { max-width: 780px; margin: clamp(48px, 7vw, 80px) auto 0; padding: 0 var(--pad-x); }
.related__title { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.related a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; font-size: 19px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; padding: 16px 0; border-bottom: 1px solid var(--hairline); transition: color .2s var(--t); }
.related a:first-of-type { border-top: 1px solid var(--hairline); }
.related a:hover { color: var(--runway); }
.related a em { font-style: normal; }
.related a span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }

/* ---------- Hubs ---------- */
.hub-head { max-width: var(--max); margin: 0 auto; padding: clamp(36px, 7vw, 96px) var(--pad-x) clamp(28px, 4vw, 48px); }
.hub-head h1 { font-weight: 800; font-size: clamp(42px, 7.4vw, 88px); line-height: .96; letter-spacing: -0.045em; margin: 0 0 18px; max-width: 16ch; }
.hub-head p:not(.eyebrow) { font-size: clamp(17px, 1.5vw, 19px); color: var(--text-2); max-width: 62ch; margin: 0; line-height: 1.6; }
.hub-section { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x) clamp(40px, 6vw, 72px); }
.hub-section__title { font-weight: 700; font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.03em; margin: 0 0 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: clamp(14px, 2vw, 20px); }
.card {
    display: flex; flex-direction: column; background: var(--surface);
    border-radius: var(--r-card); padding: clamp(22px, 3vw, 28px);
    transition: background-color .2s var(--t);
}
.card:hover { background: var(--surface-hover); }
.card .eyebrow { margin-bottom: 12px; font-size: 11px; color: var(--text-3); }
.card .eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: var(--pork); }
.card__title { font-weight: 700; font-size: clamp(21px, 2.2vw, 23px); line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 10px; }
.card__excerpt { color: var(--text-2); font-size: 15.5px; line-height: 1.58; margin: 0 0 18px; }
.card__arrow { margin-top: auto; font-weight: 600; font-size: 14.5px; color: var(--runway); display: inline-flex; gap: 8px; align-items: center; transition: gap .25s var(--t); }
.card:hover .card__arrow { gap: 12px; }
.card__meta { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; margin: 0 0 14px; }

/* FAQ hub list */
.qa-list { max-width: 880px; margin: 0 auto; padding: 0 var(--pad-x) clamp(48px, 7vw, 88px); }
.qa-group + .qa-group { margin-top: clamp(36px, 5vw, 56px); }
.qa-group__title { font-weight: 700; font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.03em; margin: 0 0 8px; }
.qa { border-bottom: 1px solid var(--hairline); padding: 20px 0; }
.qa h3 { font-weight: 650; font-size: 19px; letter-spacing: -0.015em; line-height: 1.3; margin: 0 0 8px; }
.qa h3 a:hover { color: var(--runway); }
.qa p { color: var(--text-2); font-size: 16.5px; line-height: 1.62; margin: 0 0 10px; max-width: 74ch; }

/* ---------- Footer ---------- */
.footer { background: var(--surface-2); padding: clamp(48px, 6vw, 72px) var(--pad-x) 36px; margin-top: clamp(56px, 8vw, 104px); }
.footer__grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 0.8fr; gap: 36px 40px; }
@media (max-width: 960px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand p { color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 14px 0 20px; max-width: 38ch; }
.footer__social { display: flex; gap: 10px; margin-top: 18px; }
.footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--surface); color: var(--text-2); transition: color .2s var(--t), background .2s var(--t); }
.footer__social a:hover { color: var(--text); background: var(--surface-3); }
.footer__col h2 { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin: 4px 0 14px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 14.5px; line-height: 1.4; color: var(--text-2); transition: color .2s var(--t); }
.footer__col a:hover { color: var(--text); }
.footer__disclaimer { max-width: var(--max); margin: 40px auto 0; padding-top: 22px; border-top: 1px solid var(--hairline); font-size: 13px; line-height: 1.6; color: var(--text-3); }
.footer__bottom { max-width: var(--max); margin: 14px auto 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.footer__bottom a { color: var(--text-2); }
.footer__bottom a:hover { color: var(--text); }

/* ---------- Calculators ---------- */
.calc { background: var(--surface); border-radius: var(--r-card); padding: clamp(20px, 3vw, 30px); }
.calc h2 { margin-top: 0 !important; }
.calc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 16px; }
@media (max-width: 560px) { .calc__grid { grid-template-columns: 1fr; } }
.calc label { display: flex; flex-direction: column; gap: 4px; padding: 11px 14px 12px; border-radius: var(--r-field); background: var(--surface-2); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); line-height: 1.35; }
.calc label:focus-within { box-shadow: inset 0 0 0 1.5px var(--safe); }
.calc input, .calc select { font-family: var(--sans); font-size: 18px; font-weight: 600; text-transform: none; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--text); background: transparent; border: 0; border-radius: 0; padding: 2px 0 0; width: 100%; }
.calc input::placeholder { color: var(--text-4); }
.calc input:focus, .calc select:focus { outline: none; }
.calc__full { grid-column: 1 / -1; }
.calc__out { margin-top: 18px; padding: 20px 22px; border-radius: var(--r-tile); background: var(--safe-tint); }
.calc__out.is-over { background: var(--burn-tint); }
.calc__out .calc__big { font-size: clamp(42px, 6.4vw, 64px); font-weight: 800; letter-spacing: -0.05em; line-height: .95; font-variant-numeric: tabular-nums; margin: 0 0 8px !important; }
.calc__out.is-over .calc__big { color: var(--burn-text); }
.calc__out p { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--text-2); }
.calc__out p + p { margin-top: 6px; }
.calc__note { font-size: 14px !important; color: var(--text-3); margin-top: 12px !important; }

/* ---------- Other languages and scripts ---------- */
body { overflow-wrap: break-word; }
html:is(:lang(de), :lang(nl), :lang(fi), :lang(sv), :lang(da), :lang(no), :lang(ru), :lang(pl), :lang(cs)) :is(h1, h2, h3, p, li, td, th) { hyphens: auto; }
html:lang(ko) body { word-break: keep-all; }
/* Tight tracking breaks joined scripts (Arabic, Devanagari) and crowds CJK and Thai */
html:is(:lang(ar), :lang(he), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) * { letter-spacing: normal !important; }
/* Room for stacked marks and taller glyphs in display type */
html:is(:lang(ar), :lang(hi), :lang(th), :lang(vi), :lang(ja), :lang(ko), :lang(zh)) :is(h1, h2, h3, blockquote) { line-height: 1.3; }
/* These scripts have no italics: keep emphasis upright */
html:is(:lang(ar), :lang(he), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) :is(em, i) { font-style: normal; }
[dir="rtl"] .mail__arrow { transform: scaleX(-1); }
[dir="rtl"] .mail:hover .mail__arrow { transform: scaleX(-1) translateX(6px); }
/* Instrument Serif is Latin only */
html:lang(ru) { --serif: ui-serif, Georgia, serif; }
html:lang(vi) { --serif: ui-serif, "Times New Roman", serif; }
html:is(:lang(ar), :lang(he), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) { --serif: var(--sans); }
@media print { .lang-bar { display: none !important; } }

/* ---------- Print (templates): always the Light palette, no fills ---------- */
@media print {
    :root {
        --ground: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #eee;
        --text: #1B1410; --text-2: #33271F; --text-3: #4E3F33; --text-4: #6B5A4A;
        --hairline: #bbb; --divider: #999; --safe: #2F5239; --runway: #6B4510;
    }
    .nav, .footer, .cta-box, .related, .crumbs, .print-btn, .skip, .toc, .no-print { display: none !important; }
    body { background: #fff; font-size: 12pt; }
    .post { max-width: none; padding: 0; }
    .table-wrap { overflow: visible; }
    .prose table { font-size: 10.5pt; }
    .prose th, .prose td { border: 1px solid #999; }
    .template td { height: 34px; }
    a { text-decoration: none !important; color: inherit !important; }
    body.printing .post > :not(.prose),
    body.printing .prose > :not(.print-target) { display: none !important; }
    body.printing .printable { padding: 0; }
    .checks li { font-size: 11pt; padding: 4px 0; }
    .checks li::before { border-color: #555; }
    .calendar span { border: 1px solid #999; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
