/* CreatorOps design system — shared across all pages */

/* Display face: latin subset, self-hosted, no third-party request. */
@font-face {
    font-family: "Fraunces";
    src: url("/assets/fonts/fraunces-latin-var.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Ground tones — three depths give section rhythm without borders */
    --ink: #0e171b;
    --ink-sunk: #0a1216;
    --ink-raised: #142227;
    --ink-lifted: #1a2c32;

    /* Ink on ground */
    --paper: #f2efe8;
    --paper-dim: #9fb2b7;
    --paper-faint: #7c9096;

    --rule: #22353b;
    --rule-strong: #32505a;

    /* One accent, used sparingly: actions and markers only */
    --signal: #e8a33d;
    --signal-bright: #f4bd6b;
    --signal-deep: #c2801f;
    --on-signal: #16110a;

    --w-page: 1140px;
    --w-text: 64ch;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);

    /* Spacing scale */
    --s1: .25rem;
    --s2: .5rem;
    --s3: .75rem;
    --s4: 1rem;
    --s5: 1.5rem;
    --s6: 2rem;
    --s7: 3rem;
    --s8: 4rem;
    --s9: 6rem;

    /* Vertical rhythm for full-width bands */
    --band-y: clamp(3.5rem, 6.5vw, 6rem);

    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 18px;

    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Fluid type scale */
    --t-hero: clamp(2.125rem, 1.6rem + 2.2vw, 3.5rem);
    --t-h2: clamp(1.625rem, 1.35rem + 1.15vw, 2.25rem);
    --t-h3: 1.125rem;
    --t-lede: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
    --t-body: 1.0625rem;
    --t-sm: .9375rem;
    --t-xs: .8125rem;
    --t-price: clamp(2.75rem, 2rem + 3.4vw, 4.25rem);
}

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

/* Sticky header would otherwise cover anchor targets */
html {
    scroll-padding-top: 6rem;
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-ui);
    font-size: var(--t-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

/* Focus ring: one visible treatment everywhere */
:where(a, button, summary, input, textarea, select):focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

.skip-link {
    position: fixed;
    top: var(--s3);
    left: var(--s3);
    z-index: 200;
    background: var(--signal);
    color: var(--on-signal);
    padding: var(--s3) var(--s5);
    border-radius: var(--r-sm);
    font-weight: 650;
    text-decoration: none;
    transform: translateY(-300%);
}

.skip-link:focus {
    transform: none;
}

main:focus {
    outline: none;
}

.container {
    width: min(100% - (2 * var(--gutter)), var(--w-page));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------- Typography ---------- */

h1,
h2 {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 500;
    letter-spacing: -.015em;
    color: var(--paper);
    text-wrap: balance;
}

h1 {
    font-size: var(--t-hero);
    line-height: 1.05;
    margin: 0 0 var(--s5);
}

h2 {
    font-size: var(--t-h2);
    line-height: 1.15;
    margin: 0 0 var(--s4);
}

h3 {
    font-family: var(--font-ui);
    font-size: var(--t-h3);
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -.005em;
    margin: 0 0 var(--s2);
    color: var(--paper);
}

p {
    color: var(--paper-dim);
    margin: 0 0 var(--s4);
    max-width: var(--w-text);
    text-wrap: pretty;
}

p:last-child {
    margin-bottom: 0;
}

strong {
    color: var(--paper);
    font-weight: 650;
}

/* Sentence case with a short rule, not a tracked-out caps label */
.eyebrow {
    font-family: var(--font-ui);
    font-size: var(--t-xs);
    font-weight: 650;
    letter-spacing: .01em;
    text-transform: none;
    color: var(--signal);
    margin: 0 0 var(--s4);
    max-width: none;
    display: flex;
    align-items: center;
    gap: var(--s3);
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--signal);
    flex: none;
}

.lede {
    font-size: var(--t-lede);
    line-height: 1.55;
    color: var(--paper-dim);
    max-width: 54ch;
}

.section-head {
    max-width: 60ch;
    margin-bottom: var(--s7);
}

/* ---------- Bands ---------- */

section {
    padding-block: var(--band-y);
}

.band-sunk {
    background: var(--ink-sunk);
}

/* ---------- Header / navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--ink) 92%, transparent);
    border-bottom: 1px solid var(--rule);
}

@supports (backdrop-filter: blur(8px)) {
    .site-header {
        backdrop-filter: blur(8px);
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--s5);
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -.02em;
    text-decoration: none;
    color: var(--paper);
    white-space: nowrap;
    margin-right: auto;
}

.brand-dot {
    width: .4em;
    height: .4em;
    border-radius: 50%;
    background: var(--signal);
    flex: none;
}

.nav-links {
    display: none;
    align-items: center;
    gap: var(--s6);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--paper-dim);
    font-size: var(--t-sm);
    padding-block: var(--s2);
    border-bottom: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--paper);
    border-bottom-color: var(--signal);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--s3);
}

/* Menu button + native popover: light dismiss and Escape come free */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rule-strong);
    border-radius: var(--r-sm);
    color: var(--paper);
    cursor: pointer;
}

.nav-toggle:hover {
    border-color: var(--paper-faint);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    content: "";
}

.nav-toggle-bars::before {
    transform: translateY(-6px);
}

.nav-toggle-bars::after {
    transform: translateY(4.5px);
}

#nav-menu {
    position: fixed;
    top: 76px;
    right: var(--gutter);
    left: auto;
    bottom: auto;
    width: min(20rem, calc(100vw - (2 * var(--gutter))));
    margin: 0;
    padding: var(--s3);
    background: var(--ink-lifted);
    border: 1px solid var(--rule-strong);
    border-radius: var(--r-md);
    box-shadow: 0 18px 40px rgb(0 0 0 / .45);
    color: var(--paper);
}

#nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#nav-menu a {
    display: block;
    padding: var(--s3) var(--s4);
    border-radius: var(--r-sm);
    text-decoration: none;
    color: var(--paper);
    font-size: var(--t-body);
}

#nav-menu a:hover {
    background: var(--ink-raised);
    color: var(--signal);
}

#nav-menu::backdrop {
    background: rgb(6 10 12 / .5);
}

/* Declared after .nav-toggle / #nav-menu so it wins on source order */
@media (min-width: 900px) {
    .nav-links {
        display: flex;
    }

    .nav-toggle,
    #nav-menu {
        display: none;
    }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    min-height: 48px;
    padding: var(--s3) var(--s6);
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-family: var(--font-ui);
    font-size: var(--t-sm);
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
    .btn {
        transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    }
}

.btn-primary {
    background: var(--signal);
    color: var(--on-signal);
}

.btn-primary:hover {
    background: var(--signal-bright);
}

.btn-primary:active {
    background: var(--signal-deep);
}

.btn-secondary {
    background: transparent;
    color: var(--paper);
    border-color: var(--rule-strong);
}

.btn-secondary:hover {
    border-color: var(--paper-faint);
    background: color-mix(in srgb, var(--paper) 6%, transparent);
}

.btn-sm {
    min-height: 40px;
    padding: var(--s2) var(--s4);
    font-size: var(--t-xs);
}

.btn-lg {
    min-height: 56px;
    padding: var(--s4) var(--s7);
    font-size: var(--t-body);
}

.btn-block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s4);
    margin-top: var(--s6);
}

/* Stack to equal widths rather than letting a long label wrap unevenly */
@media (max-width: 560px) {
    .btn-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-row .btn {
        width: 100%;
    }
}

/* ---------- Hero ---------- */

.hero {
    padding-block: clamp(2.75rem, 5vw, 4.5rem) var(--band-y);
}

.hero-grid {
    display: grid;
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: var(--s9);
    }
}

.hero h1 {
    max-width: 18ch;
}

.hero-note {
    margin-top: var(--s6);
    padding-top: var(--s5);
    border-top: 1px solid var(--rule);
    font-size: var(--t-sm);
    color: var(--paper-dim);
    max-width: 46ch;
}

/* Hero scope panel: real scope, not a product mockup */
.hero-scope {
    border-top: 2px solid var(--signal);
    padding-top: var(--s5);
}

.hero-scope-label {
    font-size: var(--t-xs);
    font-weight: 650;
    color: var(--paper);
    margin: 0 0 var(--s4);
    max-width: none;
}

.hero-scope ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-scope li {
    display: flex;
    align-items: baseline;
    gap: var(--s3);
    padding-block: var(--s3);
    border-top: 1px solid var(--rule);
    font-size: var(--t-sm);
    color: var(--paper);
}

.hero-scope li:first-child {
    border-top: none;
}

.hero-scope li::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--signal);
    flex: none;
    transform: translateY(-2px);
}

/* ---------- Ledger: label + description rows, no cards ---------- */

.ledger {
    border-top: 1px solid var(--rule);
}

.founder { display: flex; align-items: center; gap: var(--s6); margin-bottom: var(--s6); }
.founder img { width: 96px; height: 120px; object-fit: cover; border-radius: var(--r-md); }
.founder h3 { margin-bottom: var(--s1); }
.founder p { margin: 0; }
@media (max-width: 480px) { .founder { align-items: flex-start; } }

.access-note { border-block: 1px solid var(--rule); }
.access-note p { max-width: 70ch; }

.ledger-row {
    display: grid;
    gap: var(--s2) var(--s7);
    padding-block: var(--s5);
    border-bottom: 1px solid var(--rule);
}

@media (min-width: 760px) {
    .ledger-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
        align-items: baseline;
    }
}

.ledger-row h3 {
    margin: 0;
    font-size: var(--t-body);
}

.ledger-row p {
    margin: 0;
    font-size: var(--t-sm);
    max-width: 62ch;
}

/* ---------- Problem list: hairline columns, not a card wall ---------- */

.problem-list {
    display: grid;
    gap: 0 var(--s8);
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--rule);
}

@media (min-width: 760px) {
    .problem-list {
        grid-template-columns: 1fr 1fr;
    }
}

.problem-list li {
    padding-block: var(--s4);
    border-bottom: 1px solid var(--rule);
    color: var(--paper);
    font-size: var(--t-sm);
    line-height: 1.5;
}

.problem-close {
    margin-top: var(--s7);
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-size: var(--t-lede);
    line-height: 1.4;
    color: var(--paper);
    max-width: 46ch;
}

/* ---------- Fit: two differentiated columns ---------- */

.fit-grid {
    display: grid;
    gap: var(--s7);
    border-top: 1px solid var(--rule);
    padding-top: var(--s6);
}

@media (min-width: 820px) {
    .fit-grid {
        grid-template-columns: 1.15fr 1fr;
        gap: var(--s9);
    }

    .fit-col + .fit-col {
        border-left: 1px solid var(--rule);
        padding-left: var(--s9);
    }
}

.fit-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fit-col li {
    position: relative;
    padding-left: var(--s5);
    margin-bottom: var(--s3);
    font-size: var(--t-sm);
    line-height: 1.5;
}

.fit-yes li {
    color: var(--paper);
}

.fit-yes li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .45em;
    width: 9px;
    height: 5px;
    border-left: 2px solid var(--signal);
    border-bottom: 2px solid var(--signal);
    transform: rotate(-45deg);
}

.fit-no li {
    color: var(--paper-dim);
}

.fit-no li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .72em;
    width: 10px;
    height: 1px;
    background: var(--paper-faint);
}

/* ---------- Steps: a real sequence, so numbered ---------- */

.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--s6);
}

@media (min-width: 900px) {
    .steps {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--s5);
    }
}

.steps li {
    counter-increment: step;
    padding-top: var(--s4);
    border-top: 2px solid var(--rule-strong);
}

.steps li::before {
    content: counter(step);
    display: block;
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--signal);
    line-height: 1;
}

.steps h3 {
    margin: var(--s4) 0 var(--s2);
}

.steps p {
    margin: 0;
    font-size: var(--t-sm);
}

/* ---------- Pricing ---------- */

.pricing-layout {
    display: grid;
    gap: var(--s7);
    align-items: start;
}

@media (min-width: 900px) {
    .pricing-layout {
        grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
        gap: var(--s9);
    }
}

/* Standalone (service pages): keep the label/amount pair close enough to read
   as a pair. Inside .pricing-layout the grid column already sets the width. */
.pricing-card {
    background: var(--ink-raised);
    border: 1px solid var(--rule-strong);
    border-radius: var(--r-lg);
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
    max-width: 34rem;
}

.pricing-layout .pricing-card {
    max-width: none;
}

.pricing-card .pricing-notes {
    margin-top: var(--s5);
}

.pricing-card h3 {
    font-size: var(--t-sm);
    font-weight: 650;
    color: var(--paper-dim);
    margin-bottom: var(--s4);
}

.price {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 500;
    font-size: var(--t-price);
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--paper);
    margin: 0;
    max-width: none;
}

.price span {
    font-family: var(--font-ui);
    font-size: var(--t-body);
    font-weight: 400;
    letter-spacing: 0;
    color: var(--paper-dim);
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s4);
    margin-top: var(--s5);
    padding-top: var(--s5);
    border-top: 1px solid var(--rule);
    font-size: var(--t-sm);
    color: var(--paper-dim);
}

.pricing-row strong {
    font-size: var(--t-body);
    white-space: nowrap;
}

.pricing-notes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pricing-notes li {
    padding-block: var(--s4);
    border-bottom: 1px solid var(--rule);
    color: var(--paper-dim);
    font-size: var(--t-sm);
    line-height: 1.55;
}

.pricing-notes li:first-child {
    padding-top: 0;
}

.pricing-notes strong {
    display: block;
    color: var(--paper);
    margin-bottom: var(--s1);
}

/* ---------- Health Check: the one accent-dense moment ---------- */

.hc-band {
    background: var(--ink-raised);
    border-block: 1px solid var(--rule-strong);
}

.hc-grid {
    display: grid;
    gap: var(--s7);
    align-items: start;
}

@media (min-width: 960px) {
    .hc-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        gap: var(--s9);
    }
}

.hc-facts {
    display: grid;
    gap: var(--s5);
    margin: 0;
    border-top: 2px solid var(--signal);
    padding-top: var(--s5);
}

.hc-facts dt {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-size: 1.5rem;
    line-height: 1.1;
    font-weight: 500;
    color: var(--signal);
}

.hc-facts dd {
    margin: var(--s1) 0 0;
    font-size: var(--t-sm);
    color: var(--paper-dim);
}

/* ---------- Credibility ---------- */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2) var(--s4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.tag {
    font-size: var(--t-sm);
    color: var(--paper-dim);
    white-space: nowrap;
}

.tag + .tag::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--rule-strong);
    vertical-align: middle;
    margin-right: var(--s4);
}

/* ---------- FAQ ---------- */

.faq-group {
    margin-bottom: var(--s7);
}

.faq-group:last-child {
    margin-bottom: 0;
}

.faq-group-label {
    font-family: var(--font-ui);
    font-size: var(--t-xs);
    font-weight: 650;
    color: var(--signal);
    margin: 0 0 var(--s3);
    max-width: none;
}

.faq-item {
    border-top: 1px solid var(--rule);
}

.faq-item:last-of-type {
    border-bottom: 1px solid var(--rule);
}

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s5);
    padding-block: var(--s4);
    cursor: pointer;
    font-weight: 600;
    font-size: var(--t-body);
    color: var(--paper);
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    color: var(--signal);
}

.faq-item summary::after {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    border-right: 1.5px solid var(--signal);
    border-bottom: 1.5px solid var(--signal);
    transform: rotate(45deg) translateY(-3px);
}

@media (prefers-reduced-motion: no-preference) {
    .faq-item summary::after {
        transition: transform .18s ease;
    }
}

.faq-item[open] summary::after {
    transform: rotate(225deg) translateY(-1px);
}

.faq-item p {
    margin: 0 0 var(--s5);
    font-size: var(--t-sm);
    max-width: 68ch;
}

.faq-item a {
    color: var(--paper);
    text-decoration-color: var(--signal);
    text-underline-offset: 3px;
}

.faq-item a:hover {
    color: var(--signal);
}

/* ---------- Callout / final CTA ---------- */

.callout {
    display: grid;
    justify-items: center;
    text-align: center;
}

.callout h2 {
    max-width: 22ch;
}

.callout p {
    max-width: 52ch;
}

.callout .btn-row {
    justify-content: center;
}

/* ---------- Cards: kept for inner pages, quiet and used sparingly ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--s5);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.card {
    background: var(--ink-raised);
    border: 1px solid var(--rule);
    border-radius: var(--r-md);
    padding: var(--s6);
}

.band-sunk .card {
    background: var(--ink);
}

.card p {
    font-size: var(--t-sm);
    margin-bottom: 0;
}

.card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--paper-dim);
    font-size: var(--t-sm);
}

.card li {
    margin-bottom: var(--s2);
    line-height: 1.5;
}

.note-box {
    background: var(--ink-raised);
    border-left: 2px solid var(--signal);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: var(--s5);
    margin: var(--s6) 0;
}

.note-box p {
    margin-bottom: 0;
    font-size: var(--t-sm);
}

/* ---------- Inner page hero ---------- */

.page-hero {
    padding-block: clamp(2rem, 4vw, 3.25rem) var(--band-y);
}

.page-hero h1 {
    max-width: 20ch;
}

.breadcrumb {
    font-size: var(--t-sm);
    color: var(--paper-dim);
    margin-bottom: var(--s5);
    max-width: none;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--paper-dim);
    text-decoration: underline;
    text-decoration-color: var(--rule-strong);
    text-underline-offset: 3px;
}

.breadcrumb a:hover {
    color: var(--paper);
    text-decoration: underline;
}

/* ---------- Related services ---------- */

.related {
    display: grid;
    border-top: 1px solid var(--rule);
}

@media (min-width: 760px) {
    .related {
        grid-template-columns: 1fr 1fr;
        column-gap: var(--s8);
    }
}

.related a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s4);
    padding-block: var(--s4);
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: var(--paper);
    font-size: var(--t-sm);
}

.related a:hover {
    color: var(--signal);
}

.related a::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: .5;
}

/* ---------- Prose (legal pages) ---------- */

.prose {
    max-width: 68ch;
}

.prose h2 {
    font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
    margin-top: var(--s8);
    padding-top: var(--s5);
    border-top: 1px solid var(--rule);
    scroll-margin-top: 6rem;
}

.prose p,
.prose ul,
.prose ol {
    color: var(--paper-dim);
    font-size: var(--t-body);
    line-height: 1.7;
    max-width: none;
}

.prose ul,
.prose ol {
    padding-left: 1.25rem;
    margin: 0 0 var(--s4);
}

.prose li {
    margin-bottom: var(--s2);
}

.prose a {
    color: var(--paper);
    text-decoration-color: var(--signal);
    text-underline-offset: 3px;
}

.prose a:hover {
    color: var(--signal);
}

/* Matches .prose so the index and the text it points at share a measure */
.toc {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--s7);
    max-width: 68ch;
    columns: 2;
    column-gap: var(--s7);
}

@media (max-width: 640px) {
    .toc {
        columns: 1;
    }
}

.toc li {
    margin-bottom: var(--s1);
    break-inside: avoid;
}

.toc a {
    display: inline-block;
    padding-block: 4px;
    font-size: var(--t-sm);
    color: var(--paper-dim);
    text-decoration: underline;
    text-decoration-color: var(--rule-strong);
    text-underline-offset: 3px;
}

.toc a:hover {
    color: var(--signal);
    text-decoration-color: var(--signal);
}

/* ---------- Health Check page: form beside its context ---------- */

.hc-layout {
    display: grid;
    gap: var(--s7);
}

@media (min-width: 960px) {
    .hc-layout {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
        gap: var(--s8);
    }

    .hc-aside {
        position: sticky;
        top: 6rem;
        align-self: start;
    }
}

.hc-aside h2 {
    font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
}

.hc-steps {
    list-style: none;
    counter-reset: hcstep;
    margin: 0 0 var(--s6);
    padding: 0;
    border-top: 1px solid var(--rule);
}

.hc-steps li {
    counter-increment: hcstep;
    display: grid;
    grid-template-columns: 1.5rem 1fr;
    gap: var(--s3);
    padding-block: var(--s4);
    border-bottom: 1px solid var(--rule);
}

.hc-steps li::before {
    content: counter(hcstep);
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 600;
    color: var(--signal);
    font-size: var(--t-sm);
    line-height: 1.5;
}

.hc-steps h3 {
    margin: 0 0 var(--s1);
    font-size: var(--t-sm);
}

.hc-steps p {
    margin: 0;
    font-size: var(--t-sm);
}

/* ---------- DeftForm embed frame ---------- */

/* White, not --paper: the embedded form paints its own white background,
   and any other tone leaves a visible ring around the iframe.
   No overflow/height constraint here — the embed grows to whatever height
   DeftForm's script reports, and anything that clips or caps it would hide
   the tail of the longer form pages. */
.form-frame {
    position: relative;
    background: #fff;
    border-radius: var(--r-lg);
    padding: clamp(.75rem, 2vw, 1.25rem);
    min-height: 20rem;
    color: #1c1c1c;
    color-scheme: light;
}

.form-frame .deftform {
    width: 100%;
}

.form-frame .deftform iframe {
    display: block;
    width: 100%;
    max-height: none;
}

.form-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    padding: var(--s6);
    color: #5c5c5c;
    font-size: var(--t-sm);
}

/* Hidden as soon as the embed writes its markup into .deftform */
.form-frame .deftform:not(:empty) ~ .form-loading:not(.form-load-failed) {
    display: none;
}

.form-loading.form-load-failed {
    position: relative;
    inset: auto;
    display: block;
    padding: var(--s-5);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--paper);
}

.form-frame noscript p {
    color: #1c1c1c;
    max-width: none;
    position: relative;
    z-index: 1;
}

.form-aside {
    font-size: var(--t-sm);
    color: var(--paper-dim);
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--ink-sunk);
    border-top: 1px solid var(--rule);
    padding-block: var(--s8) var(--s6);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: var(--s6) var(--s5);
    margin-bottom: var(--s8);
}

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

@media (min-width: 900px) {
    .footer-brand {
        grid-column: auto;
    }
}

.footer-brand p {
    font-size: var(--t-sm);
    color: var(--paper-faint);
    margin: var(--s3) 0 0;
    max-width: 30ch;
}

/* Column labels are h2 so they don't skip a level after the last section heading */
.footer-grid h2 {
    font-family: var(--font-ui);
    font-size: var(--t-xs);
    line-height: 1.4;
    letter-spacing: .01em;
    color: var(--paper-faint);
    font-weight: 650;
    margin: 0 0 var(--s3);
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-grid li {
    margin-bottom: var(--s2);
}

/* Padded to a 24px+ target rather than the bare 18px line box */
.footer-grid a {
    display: inline-block;
    padding-block: 4px;
    text-decoration: none;
    color: var(--paper-dim);
    font-size: var(--t-sm);
}

.footer-grid a:hover {
    color: var(--signal);
}

.footer-bottom {
    border-top: 1px solid var(--rule);
    padding-top: var(--s5);
    display: flex;
    flex-wrap: wrap;
    gap: var(--s3) var(--s6);
    justify-content: space-between;
    color: var(--paper-faint);
    font-size: var(--t-xs);
}
