@font-face {
    font-family: Merriweather;
    src: url('assets/fonts/Merriweather-400.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: Merriweather;
    src: url('assets/fonts/Merriweather-700.ttf') format('truetype');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'DM Mono';
    src: url('assets/fonts/DMMono-400.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
:root {
    color-scheme: light dark;
    /* Core palette. Dark values come from the app design system
       (Projects/App/Sources/DesignSystem/Resources/Colors.xcassets). */
    --cream: #f8eedf;
    --paper: #fff7ed;
    --ink: #2c2a22;
    --muted: #665f50;
    --orange: #c86637;
    --rust: #873b1b;
    --green: #e0ecc6;
    --forest: #3f4d2e;
    --rule: #bdb19a;
    /* Role tokens. Light values match the literals they replaced. */
    --rule-soft: #dcd2c1;
    --surface-warm: #ead8bf;
    --card-bg: #f8eedf;
    --card-rule: #c3c6ae;
    --screen-bg: #f4ead7;
    --screen-rule: #c3b597;
    --skip-bg: #2c2a22;
    --skip-fg: #ffffff;
    --opening-warm: #f9e9d8;
    --opening-cool: #eaf0d9;
    --phone-body: #2c2a22;
    --phone-shadow: #493c231a;
    --button-fill: #873b1b;
    --button-fill-hover: #693013;
    --button-label: #fff7ed;
    --result-bg: #e0ecc6;
    --olive-body: #435033;
    --olive-frame: #ceddad;
    --olive-bar: #60713c;
    --olive-rule: #a5b28b;
    --olive-tint-soft: #e7ecd7;
    --peach-band: #f5dac0;
    --peach-frame: #edc5a5;
    --peach-text: #754522;
    --peach-rule: #b78f70;
    --neutral-frame: #e7e1c9;
    --closing-bg: #3f4d2e;
    --closing-fg: #f8eedf;
    --closing-eyebrow: #d1dfb3;
    --closing-soft: #e2e9d5;
    --button-light-fill: #f8eedf;
    --button-light-fill-hover: #e3eccd;
    --button-light-label: #3f4d2e;
    --serif: Merriweather, Georgia, serif;
    --mono: 'DM Mono', ui-monospace, monospace;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
/* Dark tokens apply when the system asks for dark and the visitor has not
   pinned light, or when the visitor has pinned dark. Both blocks carry the
   same values; the attribute block comes last so an explicit choice wins. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* Organic/Neutral/Olive/Orange dark ramps from the app's Colors.xcassets. */
        --cream: #1c1915;
        --paper: #2e2b25;
        --ink: #f0e9dc;
        --muted: #dcd3c4;
        --orange: #e79059;
        --rust: #f6a06b;
        --green: #272e1b;
        --forest: #e1eecc;
        --rule: #82796a;
        --rule-soft: #645c50;
        --surface-warm: #2c2721;
        --card-bg: #2c2721;
        --card-rule: #645c50;
        --screen-bg: #201e1d;
        --screen-rule: #645c50;
        --skip-bg: #f0e9dc;
        --skip-fg: #1c1915;
        --opening-warm: #251c14;
        --opening-cool: #1f1e17;
        --phone-body: #201e1d;
        --phone-shadow: #0d0b0980;
        --button-fill: #e79059;
        --button-fill-hover: #f6a06b;
        --button-label: #2e1607;
        --result-bg: #3d472b;
        --olive-body: #ccdbb2;
        --olive-frame: #3d472b;
        --olive-bar: #aebf92;
        --olive-rule: #728157;
        --olive-tint-soft: #232619;
        --peach-band: #402310;
        --peach-frame: #643312;
        --peach-text: #ffc6a5;
        --peach-rule: #8c491a;
        --neutral-frame: #474238;
        --closing-bg: #3d472b;
        --closing-fg: #f0e9dc;
        --closing-eyebrow: #ccdbb2;
        --closing-soft: #e1eecc;
        --button-light-fill: #e1eecc;
        --button-light-fill-hover: #ccdbb2;
        --button-light-label: #272e1b;
    }
}
:root[data-theme="dark"] {
    /* Organic/Neutral/Olive/Orange dark ramps from the app's Colors.xcassets. */
    --cream: #1c1915;
    --paper: #2e2b25;
    --ink: #f0e9dc;
    --muted: #dcd3c4;
    --orange: #e79059;
    --rust: #f6a06b;
    --green: #272e1b;
    --forest: #e1eecc;
    --rule: #82796a;
    --rule-soft: #645c50;
    --surface-warm: #2c2721;
    --card-bg: #2c2721;
    --card-rule: #645c50;
    --screen-bg: #201e1d;
    --screen-rule: #645c50;
    --skip-bg: #f0e9dc;
    --skip-fg: #1c1915;
    --opening-warm: #251c14;
    --opening-cool: #1f1e17;
    --phone-body: #201e1d;
    --phone-shadow: #0d0b0980;
    --button-fill: #e79059;
    --button-fill-hover: #f6a06b;
    --button-label: #2e1607;
    --result-bg: #3d472b;
    --olive-body: #ccdbb2;
    --olive-frame: #3d472b;
    --olive-bar: #aebf92;
    --olive-rule: #728157;
    --olive-tint-soft: #232619;
    --peach-band: #402310;
    --peach-frame: #643312;
    --peach-text: #ffc6a5;
    --peach-rule: #8c491a;
    --neutral-frame: #474238;
    --closing-bg: #3d472b;
    --closing-fg: #f0e9dc;
    --closing-eyebrow: #ccdbb2;
    --closing-soft: #e1eecc;
    --button-light-fill: #e1eecc;
    --button-light-fill-hover: #ccdbb2;
    --button-light-label: #272e1b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 1rem/1.8 var(--serif); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--rust); outline-offset: 6px; }
p { margin: 0 0 1.3rem; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; }
.wrap { width: min(1180px, calc(100% - 6rem)); margin-inline: auto; }
.skip-link { position: absolute; top: -8rem; left: 1rem; z-index: 10; padding: .8rem 1.2rem; background: var(--skip-bg); color: var(--skip-fg); }
.skip-link:focus { top: 1rem; }
.opening { background: linear-gradient(125deg, var(--opening-warm), var(--cream) 50%, var(--opening-cool)); }
.header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 2.1rem; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; flex-direction: column; flex: 0 0 auto; font-size: 1.22rem; font-weight: 700; line-height: 1.4; text-decoration: none; }
.brand-rule { width: 2rem; height: 3px; margin-top: .4rem; background: var(--orange); }
.header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.8rem; }
.nav-link { font: .875rem/1.5 var(--mono); text-decoration: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 1.05rem 1.5rem; border: 1px solid var(--button-fill); border-radius: 5px; background: var(--button-fill); color: var(--button-label); font: 1rem/1.5 var(--mono); text-decoration: none; transition: background .2s; }
.button:hover { background: var(--button-fill-hover); }
.button-small { font-size: .875rem; padding: .75rem 1rem; gap: 1rem; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: .65rem .9rem; border: 1px solid var(--muted); border-radius: 5px; background: transparent; color: inherit; font: .8125rem/1.5 var(--mono); letter-spacing: .045em; text-transform: uppercase; cursor: pointer; transition: background .2s, border-color .2s; }
.theme-toggle:hover { border-color: var(--rust); background: var(--surface-warm); }
.theme-toggle:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
.theme-dial { flex: 0 0 auto; width: .8rem; height: .8rem; border: 1px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%); }
.theme-toggle[data-theme-next="light"] .theme-dial { background: linear-gradient(270deg, currentColor 0 50%, transparent 50% 100%); }
.eyebrow { font: .875rem/1.7 var(--mono); letter-spacing: .055em; text-transform: uppercase; color: var(--rust); }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4rem; align-items: center; padding-block: 4.5rem 4rem; }
.hero h1 { font-size: clamp(3.4rem, 5.5vw, 5.25rem); line-height: 1.13; letter-spacing: -.055em; margin-block: 1.7rem 1.8rem; }
.hero h1 em { font-style: normal; color: var(--rust); }
.intro { font-size: 1.15rem; line-height: 1.85; }
.hero-detail { max-width: 31rem; color: var(--muted); line-height: 1.85; margin-bottom: 1.9rem; }
.micro { font: .8125rem/1.65 var(--mono); color: var(--muted); margin: 1.1rem 0 0; }
.hero-visual { padding: 1.5rem 1.8rem 1.2rem; border-radius: 12rem 12rem .5rem .5rem; background: var(--surface-warm); }
.screen-header { display: flex; gap: 1rem; justify-content: space-between; padding: 1.2rem .2rem 1.4rem; font: .75rem/1.6 var(--mono); color: var(--forest); text-align: center; }
.phone { width: min(100%, 300px); margin-inline: auto; border: 3px solid var(--orange); padding: 4px; border-radius: 38px; background: var(--phone-body); box-shadow: 0 20px 35px var(--phone-shadow); overflow: hidden; }
.phone img { border-radius: 30px; }
.hero-visual figcaption, .app-figure figcaption { margin-top: 1.2rem; text-align: center; font: .75rem/1.7 var(--mono); color: var(--muted); }
.opening-rule { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; padding-block: 1.5rem; border-block: 1px solid var(--rule); font: .875rem/1.7 var(--mono); }
.opening-rule a { text-decoration: none; }
.opening-rule a:hover { text-decoration: underline; }
.plan { padding-block: 6.5rem 7rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 5rem; }
.chapter { margin-right: 1.25rem; }
h2 { font-size: clamp(2.3rem, 3.7vw, 3.8rem); line-height: 1.2; letter-spacing: -.045em; margin-block: 1.3rem 1.8rem; }
.section-copy { max-width: 32rem; }
.section-copy > p:not(.eyebrow):not(.lead) { color: var(--muted); }
.lead { font-size: 1.16rem; line-height: 1.9; }
.plan-example { padding: 2rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; }
.plan-example figcaption { font-size: .75rem; margin-bottom: 1rem; }
.calculation { margin: 0; }
.calculation > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--rule-soft); }
.calculation dt { font: .875rem/1.6 var(--mono); color: var(--muted); }
.calculation dd { margin: 0; white-space: nowrap; font-size: clamp(1.6rem, 2.7vw, 2.6rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.3; }
.calculation dd span { font: .875rem/1.4 var(--mono); letter-spacing: 0; }
.calculation .result { margin: .8rem -.9rem 0; padding: 1rem .9rem; border: 0; background: var(--result-bg); color: var(--forest); border-radius: 4px; }
.calculation .result dt { color: var(--forest); }
.example-note { margin: 1.2rem 0 0; color: var(--muted); font: .8125rem/1.7 var(--mono); }
.margin-section { padding-block: 6rem; background: var(--green); }
.margin-intro { text-align: center; margin-bottom: 4rem; }
.margin-intro h2 { font-size: clamp(2.3rem, 4.3vw, 4.4rem); }
.margin-intro h2 span { color: var(--forest); }
.margin-intro .eyebrow { color: var(--forest); }
.feature-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 6rem; }
.app-figure { padding: 2.5rem 2rem 1.5rem; background: var(--olive-frame); border-radius: .5rem; }
.app-figure .phone { width: min(100%, 318px); }
.app-figure figcaption { color: var(--forest); }
.section-copy h3 { font-size: clamp(1.8rem, 2.5vw, 2.5rem); line-height: 1.35; letter-spacing: -.035em; margin-bottom: 1.6rem; }
.margin-copy > p:not(.eyebrow) { color: var(--olive-body); }
.margin-copy .eyebrow { color: var(--forest); }
.margin-breakdown { margin-block: 2.5rem 1.4rem; }
.time-bar { display: flex; gap: 5px; height: 1.8rem; }
.time-needed { flex: 3; background: var(--orange); border-radius: 4px 0 0 4px; }
.time-spare { flex: 1; background: var(--olive-bar); border-radius: 0 4px 4px 0; }
.time-labels { display: flex; justify-content: space-between; gap: 1rem; margin-top: .8rem; font: .875rem/1.8 var(--mono); }
.time-labels span { display: flex; flex-direction: column; }
.time-labels span:last-child { text-align: right; }
.time-labels strong { font-weight: 400; font-size: 1.1rem; }
.board-note { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--olive-rule); }
.board-note p { margin: .6rem 0 0; color: var(--olive-body); }
.recovery-section { padding-block: 7rem; background: var(--peach-band); }
.recovery-row { gap: 5rem; }
.recovery-section h2 em { color: var(--rust); font-style: normal; }
.recovery-figure { background: var(--peach-frame); }
.recovery-figure figcaption { color: var(--peach-text); }
.choices { margin: 2rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.choices > div { border-top: 1px solid var(--peach-rule); padding-top: 1rem; }
.choices dt { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.choices dd { margin: 0; font-size: .9375rem; line-height: 1.85; color: var(--muted); }
.section-copy .choice-note { color: var(--rust) !important; font: .875rem/1.8 var(--mono); }
.section-copy .recovery-example { padding-left: 1.2rem; border-left: 3px solid var(--orange); color: var(--peach-text) !important; }
.door-section { padding-block: 6rem; background: var(--paper); }
.door-figure { background: var(--neutral-frame); }
.section-copy .kit-note { color: var(--forest) !important; font: .875rem/1.9 var(--mono); margin-top: 2rem; }
.learning-section { padding-block: 6rem; background: var(--olive-tint-soft); }
.learning-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 5rem; margin-bottom: 3rem; }
.learning-summary > p:last-child { color: var(--muted); }
.learning-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.learning-card { display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--card-rule); border-radius: 6px; overflow: hidden; }
.learning-card-copy { padding: 2rem 2rem .8rem; }
.learning-card h3 { margin: 0 0 1.1rem; font-size: clamp(1.8rem, 2.8vw, 2.6rem); line-height: 1.35; letter-spacing: -.035em; }
.learning-card-copy > p:last-child { color: var(--muted); }
.learning-card figure { margin-top: auto; }
.screen-detail { display: block; overflow: hidden; aspect-ratio: 1170 / 1400; margin: 0 1.4rem; border: 1px solid var(--screen-rule); border-radius: 5px; background: var(--screen-bg); }
.screen-detail:focus-visible { outline-offset: 3px; }
.screen-detail img { width: 100%; max-width: none; border-radius: 0; }
.audit-detail img { transform: translateY(-30%); }
.proposal-detail img { transform: translateY(-13.5%); }
.learning-card figcaption { padding: 1.2rem 1.5rem 1.5rem; color: var(--muted); font: .75rem/1.8 var(--mono); }
.learning-footnote { max-width: 54rem; margin: 1.7rem auto 0; color: var(--muted); text-align: center; font: .8125rem/1.9 var(--mono); }
.closing { padding-block: 5.5rem; background: var(--closing-bg); color: var(--closing-fg); }
.closing-inner { display: flex; align-items: center; justify-content: space-between; gap: 4rem; }
.closing .eyebrow { color: var(--closing-eyebrow); }
.closing h2 { margin-bottom: 1.5rem; }
.closing p:last-child { margin-bottom: 0; }
.closing-action { max-width: 22rem; }
.closing-action > p { font: 1rem/1.9 var(--mono); margin-bottom: 1.5rem; color: var(--closing-soft); }
.button-light { background: var(--button-light-fill); border-color: var(--button-light-fill); color: var(--button-light-label); }
.button-light:hover { background: var(--button-light-fill-hover); }
.closing a:focus-visible { outline-color: var(--closing-fg); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 2.5rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; font: .875rem/1.7 var(--mono); }
@media (min-width: 1500px) { .hero { padding-block: 5rem; } }
@media (max-width: 1050px) {
    .wrap { width: calc(100% - 3rem); }
    .hero { gap: 2.5rem; }
    .hero-visual { padding-inline: 1rem; }
    .plan { gap: 2.5rem; }
    .plan-example { padding: 1.5rem; }
    .header nav { gap: 1.2rem; }
    .feature-row, .recovery-row { gap: 3rem; }
    .app-figure { padding-inline: 1rem; }
    .closing-inner { gap: 2rem; }
    .learning-intro { gap: 3rem; }
    .learning-card-copy { padding: 1.5rem 1.5rem .5rem; }
}
@media (max-width: 760px) {
    .wrap { width: calc(100% - 2.5rem); }
    .header { padding-block: 1.4rem; gap: 1rem; }
    .brand { font-size: 1.05rem; }
    .header .nav-link { display: none; }
    .header nav { gap: .8rem; }
    .theme-toggle { padding: .65rem; }
    .theme-toggle [data-theme-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .button-small { padding: .65rem .8rem; font-size: .8125rem; gap: .7rem; }
    .hero { grid-template-columns: 1fr; gap: 2.7rem; padding-block: 3rem; }
    .hero h1 { font-size: clamp(3.25rem, 11.5vw, 4.9rem); letter-spacing: -.06em; }
    .hero-copy { max-width: 35rem; }
    .hero-visual { width: min(100%, 380px); justify-self: center; padding: 1.5rem 1.7rem; }
    .opening-rule { justify-content: center; text-align: center; font-size: .8125rem; gap: .5rem 1.2rem; }
    .plan { grid-template-columns: 1fr; padding-block: 4rem; gap: 2rem; }
    h2 { font-size: clamp(2.25rem, 8.7vw, 3.5rem); }
    .plan-example { padding: 1.5rem; }
    .calculation dd { font-size: 2rem; }
    .margin-section { padding-block: 4rem; }
    .margin-intro { text-align: left; margin-bottom: 2.5rem; }
    .margin-intro h2 { font-size: clamp(2.1rem, 8vw, 3.5rem); }
    .feature-row { grid-template-columns: 1fr; gap: 2.5rem; }
    .margin-copy { grid-row: 1; }
    .app-figure { width: min(100%, 380px); justify-self: center; padding: 1.8rem 1.3rem 1.2rem; }
    .recovery-section { padding-block: 4rem; }
    .door-section, .learning-section { padding-block: 4rem; }
    .door-copy { grid-row: 1; }
    .learning-intro, .learning-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .learning-intro { margin-bottom: 2rem; }
    .learning-intro h2 { margin-bottom: 0; }
    .learning-card { width: min(100%, 480px); justify-self: center; }
    .screen-detail { margin-inline: 1rem; }
    .learning-footnote { text-align: left; }
    .closing { padding-block: 4rem; }
    .closing-inner { flex-direction: column; align-items: flex-start; gap: 2rem; }
    .closing-action { max-width: 100%; }
    .closing .button { gap: .8rem; font-size: .875rem; padding-inline: 1rem; }
    .footer { align-items: flex-start; flex-direction: column; gap: 1.4rem; }
}
@media (max-width: 380px) {
    .wrap { width: calc(100% - 2rem); }
    .header { flex-wrap: wrap; }
    .hero h1 { font-size: 3.2rem; }
    .plan-example { padding: 1.15rem; }
    .calculation dt { font-size: .8125rem; }
    .calculation dd { font-size: 1.65rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .theme-toggle { display: none; }
}
