/* ===========[ Tokens ]=================================================== */

:root {
    /* Taken from the mascot: the rust circle, the cream coat, the navy waistcoat, the amber horns */
    --rust: #A35139;
    --rust-bright: #D9775A;
    --pain: #CF8E74;
    --cream: #EEE9DF;
    --navy: #1B2632;
    --amber: #FFB162;
    --horn: #D69452;

    --bg: #121A23;
    --bg-deep: #0E141B;
    --surface: #1B2632;
    --surface-raised: #233142;
    --line: #34465C;

    --ink: #EEE9DF;
    --ink-muted: #B8B1A4;
    --ink-faint: #8A8478;

    --term-bg: #0B1016;
    --term-bar: #18212B;
    --term-ink: #D8D3C8;
    --term-dim: #7C8794;
    --term-user-bg: #141C25;

    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Cascadia Mono", "Cascadia Code", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --gutter: 16px;
    --content-wide: 1200px;
    --content-read: 44rem;
    --radius: 10px;
}

/* ===========[ Base ]===================================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--amber);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--cream);
}

:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
    border-radius: 4px;
}

h1,
h2 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}

h2 {
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
}

p {
    margin: 0 0 1em;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    padding: 8px 14px;
    background: var(--amber);
    color: var(--navy);
    font-weight: 600;
    z-index: 100;
}

.skip-link:focus {
    top: 8px;
}

/* ===========[ Header and footer ]======================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(18, 26, 35, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(52, 70, 92, 0.6);
}

.site-header-inner {
    max-width: var(--content-wide);
    margin: 0 auto;
    padding: 10px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.brand-name {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.header-cta {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.header-cta:hover {
    border-color: var(--amber);
    color: var(--amber);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-deep);
    margin-top: 48px;
}

.site-footer-inner {
    max-width: var(--content-wide);
    margin: 0 auto;
    padding: 32px var(--gutter) 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
    color: var(--ink-muted);
    font-size: 0.95rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--ink);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.footer-published {
    margin: 0 0 0 auto;
    color: var(--ink-faint);
}

/* ===========[ Buttons ]================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font: 600 1rem var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button-primary {
    background: var(--rust);
    color: var(--cream);
    box-shadow: 0 8px 24px -10px rgba(163, 81, 57, 0.8);
}

.button-primary:hover {
    background: #8E4530;
    color: var(--cream);
}

.button-quiet {
    color: var(--ink);
    border-color: var(--line);
}

.button-quiet:hover {
    border-color: var(--amber);
    color: var(--amber);
}

/* ===========[ Hero ]===================================================== */

.hero {
    position: relative;
    max-width: 52rem;
    margin: 0 auto;
    padding: 56px var(--gutter) 72px;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -40px 0 auto;
    height: 520px;
    background: radial-gradient(closest-side, rgba(163, 81, 57, 0.28), rgba(163, 81, 57, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-mascot {
    width: 240px;
    height: 240px;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

.hero-eyebrow {
    margin: 22px 0 10px;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--rust-bright);
}

.hero-title {
    font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem);
    text-wrap: balance;
}

.hero-pairing {
    max-width: 36rem;
    margin: 20px auto 0;
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
    line-height: 1.4;
    color: var(--cream);
    text-wrap: balance;
}

.hero-blurb {
    max-width: 37rem;
    margin: 22px auto 0;
    color: var(--ink-muted);
    text-wrap: pretty;
    text-align: justify;
}

/* The blurb's last line on its own, in full white and with no strokes, so it sums up the rest */
.hero-blurb-last {
    display: block;
    margin-top: 0.6em;
    color: var(--cream);
}

.hero-blurb mark {
    background: none;
    color: var(--cream);
    font-weight: 600;
}

/* A pen stroke under the phrases that say what Mr Fernby does, here and in the sections below: a
   filled SVG shape that starts low, arches up a little through the middle and comes back down,
   thinning at each end, stretched to the phrase's width. Two slightly different shapes alternate so
   they do not look stamped. box-decoration-break gives a phrase that wraps a stroke on each line
   instead of one stroke across the gap. */
.drawn {
    padding-bottom: 0.24em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 60 4.5, 140 4.5, 198 9 C 140 8, 60 8, 2 9 Z' fill='%23FFB162' fill-opacity='0.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0.5em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.drawn-alt {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9.5 C 70 4, 150 5.2, 198 8.6 C 150 7.8, 70 8.4, 2 9.5 Z' fill='%23FFB162' fill-opacity='0.8'/%3E%3C/svg%3E");
}

/* What goes wrong, wherever the page names it, here and in the sections below. The page reads in
   two marks: the amber stroke is what Mr Fernby does, and this is the pain it answers. Kept quieter
   than the stroke on purpose: italic and a muted warm tone, no weight change. Tune --pain to adjust
   every one at once. */
.pain {
    color: var(--pain);
    font-style: italic;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

/* ===========[ The two prompts ]========================================== */

.prompts {
    max-width: var(--content-wide);
    margin: 0 auto;
    padding: 24px var(--gutter) 40px;
}

.section-head {
    text-align: center;
    margin-bottom: 36px;
}

.section-sub {
    max-width: 38rem;
    margin: 6px auto 0;
    color: var(--ink-faint);
    font-size: 1.1rem;
    text-wrap: balance;
}

.prompts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}

.prompt-stage {
    position: relative;
    width: 100%;
    max-width: 50rem;
}

.prompt-cards {
    display: grid;
    gap: 40px;
}

.prompt-card {
    margin: 0;
    min-width: 0;
}

.prompt-card-label,
.prompt-switch-button {
    font: 600 0.78rem var(--font-sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.prompt-card-label {
    margin-bottom: 10px;
    color: var(--ink-faint);
}

.prompt-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

/* Previous and next: chevrons drawn with two borders. On a narrow screen they sit at either end of
   the switch row; with room to spare they move out into the margins beside the window. */
.prompt-nav {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 200ms ease, background-color 200ms ease, transform 200ms ease;
}

.prompt-nav::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-left: 2px solid var(--cream);
    border-bottom: 2px solid var(--cream);
    transition: border-color 200ms ease;
}

.prompt-nav-prev::before {
    transform: translate(-30%, -50%) rotate(45deg);
}

.prompt-nav-next::before {
    transform: translate(-70%, -50%) rotate(-135deg);
}

.prompt-nav-next {
    margin-left: auto;
}

.prompt-nav:hover {
    border-color: var(--amber);
    background: var(--surface-raised);
    transform: scale(1.06);
}

.prompt-nav:hover::before {
    border-color: var(--amber);
}

@media (min-width: 1040px) {
    .prompt-nav {
        position: absolute;
        top: 50%;
        width: 54px;
        height: 54px;
        margin: -27px 0 0;
        box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
    }

    .prompt-nav::before {
        width: 13px;
        height: 13px;
        border-width: 0 0 2.5px 2.5px;
    }

    .prompt-nav-prev {
        left: -84px;
    }

    .prompt-nav-next {
        right: -84px;
    }
}

.prompt-switch[hidden] {
    display: none;
}

.prompt-switch-button {
    padding: 7px 14px;
    background: none;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--ink-faint);
    cursor: pointer;
    transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.prompt-switch-button:hover {
    color: var(--ink);
}

.prompt-switch-button[aria-pressed="true"] {
    color: var(--cream);
    border-color: var(--line);
    background: var(--surface);
}

.prompts-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

/* With script and motion on, the two windows stack in one spot: the one in front plays, then steps
   back and fades while the other comes forward. Without it they simply sit one after the other. */
.prompt-stage.is-staged .prompt-cards {
    gap: 0;
}

.prompt-stage.is-staged .prompt-card {
    grid-area: 1 / 1;
    align-self: start;
    transition: transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 800ms ease, filter 800ms ease;
}

.prompt-stage.is-staged .prompt-card-label {
    display: none;
}

.prompt-stage.is-staged .prompt-card[data-card="short"] {
    margin-top: 48px;
}

.prompt-card.is-front {
    z-index: 2;
    opacity: 1;
    transform: none;
}

.prompt-card.is-back {
    z-index: 1;
    opacity: 0.16;
    transform: translateY(-20px) scale(0.94);
    filter: saturate(0.4);
    pointer-events: none;
}

.prompt-card.is-away {
    z-index: 0;
    opacity: 0;
    transform: translateY(28px);
    pointer-events: none;
}


/* ===========[ Terminal window ]========================================== */

.term {
    background: var(--term-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
    text-align: left;
}

.term-bar {
    display: flex;
    align-items: stretch;
    height: 38px;
    background: var(--term-bar);
}

.term-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 0 8px;
    padding: 0 16px;
    background: var(--term-bg);
    border-radius: 8px 8px 0 0;
    color: var(--ink-muted);
    font: 12px var(--font-sans);
}

.term-tab-icon {
    font: 700 10px var(--font-mono);
    color: var(--term-dim);
}

.term-controls {
    display: flex;
    margin-left: auto;
}

.term-controls span {
    position: relative;
    width: 44px;
}

.term-min::before,
.term-max::before,
.term-close::before,
.term-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
}

.term-min::before {
    width: 10px;
    height: 1px;
    background: var(--term-dim);
    transform: translate(-50%, -50%);
}

.term-max::before {
    width: 9px;
    height: 9px;
    border: 1px solid var(--term-dim);
    transform: translate(-50%, -50%);
}

.term-close::before,
.term-close::after {
    width: 12px;
    height: 1px;
    background: var(--term-dim);
}

.term-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.term-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.term-body {
    padding: 14px 16px 18px;
    font-family: var(--font-mono);
    font-size: clamp(12px, 0.7rem + 0.35vw, 13.5px);
    line-height: 1.55;
    color: var(--term-ink);
    overflow-wrap: anywhere;
}

.term-body p {
    margin: 0;
}

.t-ps {
    color: var(--term-dim);
}

.t-dim {
    color: var(--term-dim);
}

.t-banner {
    margin: 10px 0 14px;
    padding-left: 12px;
    border-left: 2px solid var(--line);
}

.t-banner strong {
    color: var(--cream);
}

.t-user {
    position: relative;
    min-height: 2.6em;
    margin-bottom: 14px;
    padding: 10px 12px 10px 30px;
    background: var(--term-user-bg);
    border: 1px solid #222E3B;
    border-radius: 6px;
}

.t-user::before {
    content: ">";
    position: absolute;
    left: 12px;
    top: 10px;
    color: var(--term-dim);
}

.t-paste p + p {
    margin-top: 0.9em;
}

.t-indent {
    display: block;
    padding-left: 2ch;
    color: #BFC6CF;
}

.t-cursor {
    display: none;
    width: 0.6em;
    height: 1.2em;
    vertical-align: text-bottom;
    background: var(--cream);
    animation: t-blink 1s steps(1) infinite;
}

.t-reply-slot {
    position: relative;
}

.t-agent,
.t-tool,
.t-status {
    position: relative;
    padding-left: 18px;
    margin-top: 8px;
}

.t-agent::before,
.t-tool::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.t-agent {
    color: var(--cream);
}

.t-agent::before {
    background: var(--amber);
}

.t-tool {
    color: var(--term-dim);
}

.t-tool::before {
    background: transparent;
    border: 1px solid var(--term-dim);
}

.t-status {
    font-size: 0.92em;
}

.t-status-warn {
    color: var(--rust-bright);
}

.t-status-ok {
    color: var(--amber);
}

.t-thinking {
    display: none;
    position: absolute;
    left: 0;
    top: 8px;
    padding-left: 18px;
    color: var(--term-dim);
}

/* The dots are revealed by widening the box, so they must never wrap; the terminal's break
   anywhere rule would otherwise stack them one per line while the box is narrow */
.t-thinking::after {
    content: "...";
    display: inline-block;
    width: 3ch;
    overflow: hidden;
    white-space: nowrap;
    overflow-wrap: normal;
    vertical-align: bottom;
    animation: t-dots 1.2s steps(4) infinite;
}

.t-brief {
    margin: 6px 0 0;
    padding-left: 18px;
}

.t-brief div {
    display: grid;
    grid-template-columns: 10ch minmax(0, 1fr);
    gap: 0 1ch;
}

.t-brief dt {
    color: var(--term-dim);
}

.t-brief dd {
    margin: 0;
}

/* ===========[ Terminal animation ]======================================= */

/* Without script, or with reduced motion, the windows show their last frame. The script adds
   is-armed, then reveals each step in turn. */
.term.is-armed [data-step]:not(.is-shown) {
    display: none;
}

.term.is-armed .t-cursor.is-shown {
    display: inline-block;
}

.term.is-armed .t-user:not(.t-user-short) > .t-cursor.is-shown {
    position: absolute;
    left: 30px;
    top: 10px;
}

.term.is-armed .t-paste.is-shown {
    animation: t-paste-in 520ms ease-out both;
}

.term.is-armed .t-agent.is-shown,
.term.is-armed .t-tool.is-shown,
.term.is-armed .t-status.is-shown,
.term.is-armed .t-brief div.is-shown {
    animation: t-line-in 220ms ease-out both;
}

.term.is-thinking .t-thinking {
    display: block;
}

@keyframes t-blink {
    50% {
        opacity: 0;
    }
}

@keyframes t-dots {
    from {
        width: 0;
    }

    to {
        width: 4ch;
    }
}

@keyframes t-paste-in {
    from {
        clip-path: inset(0 0 100% 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes t-line-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ===========[ Running it by hand ]======================================= */

.by-hand {
    max-width: var(--content-wide);
    margin: 0 auto;
    padding: 64px var(--gutter) 24px;
}

.by-hand .section-head h2 {
    font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem);
    text-wrap: balance;
}

/* The name in the amber the command line uses for mrfernby */
.name-accent {
    color: var(--amber);
}

.section-sub code {
    font-family: var(--font-mono);
    font-size: 0.95em;
    color: var(--amber);
}

.by-hand-grid {
    display: grid;
    gap: 24px;
    max-width: 68rem;
    margin: 0 auto;
}

.snippet {
    margin: 0;
    min-width: 0;
}

.snippet figcaption {
    margin-bottom: 8px;
    font: 600 0.78rem var(--font-sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.snippet-box {
    background: var(--term-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.7);
    overflow-x: auto;
}

/* Real output keeps its column alignment, so it never wraps; a narrow screen scrolls inside the box */
.snippet-box pre {
    margin: 0;
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: clamp(11.5px, 0.65rem + 0.3vw, 12.5px);
    line-height: 1.55;
    color: var(--term-ink);
    white-space: pre;
}

.o-cmd {
    color: var(--cream);
    font-weight: 700;
}

.o-head {
    color: var(--amber);
    font-weight: 700;
}

.o-dim {
    color: var(--term-dim);
}

.o-warn {
    color: var(--rust-bright);
}

/* Two columns only where the widest real output line fits without scrolling */
@media (min-width: 1120px) {
    /* The tall box stretches to the bottom of the two beside it, so the columns end level */
    .by-hand-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        align-items: stretch;
    }

    .snippet-tall {
        grid-row: span 2;
        display: flex;
        flex-direction: column;
    }

    .snippet-tall .snippet-box {
        flex: 1 1 auto;
    }
}

/* ===========[ Pillars ]================================================== */

/* A statement between the prompts and the sections, set apart by rules so it does not read as a
   heading missing its section */
.pillars-intro {
    max-width: 50rem;
    margin: 0 auto;
    padding: 72px var(--gutter) 24px;
    text-align: center;
}

.pillars-intro-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 36px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.pillars-intro-line {
    flex: 1 1 22rem;
    max-width: 38rem;
    margin: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.9rem);
    line-height: 1.35;
    color: var(--cream);
    text-wrap: balance;
}

.pillar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding: 56px var(--gutter);
}

.pillar-text {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--content-read);
}

.pillar h2 {
    order: 0;
    margin: 0 0 16px;
    font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
    text-wrap: balance;
}

.pillar-text > .prompt-quote {
    order: 1;
    margin: 0 0 20px;
}

.pillar-text > p {
    order: 2;
}

.pillar p {
    color: var(--ink-muted);
}

.prompt-quote {
    padding: 12px 16px 12px 30px;
    position: relative;
    background: var(--term-bg);
    border: 1px solid #222E3B;
    border-left: 3px solid var(--rust);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--term-ink);
}

.prompt-quote::before {
    content: ">";
    position: absolute;
    left: 12px;
    top: 34px;
    color: var(--term-dim);
}

.prompt-quote p {
    margin: 0;
    color: var(--term-ink);
}

.prompt-quote p + p {
    margin-top: 0.4em;
}

.prompt-quote .prompt-quote-label {
    margin: 0 0 4px -14px;
    font: 600 0.72rem var(--font-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rust-bright);
}

/* What the prompt cost, under the quote itself: the agent's own lines, styled as in the window */
.prompt-quote .prompt-quote-more {
    color: var(--term-dim);
}

.prompt-quote .prompt-quote-tool,
.prompt-quote .prompt-quote-warn {
    position: relative;
    padding-left: 16px;
}

.prompt-quote .prompt-quote-tool {
    color: var(--term-dim);
}

.prompt-quote .prompt-quote-tool::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border: 1px solid var(--term-dim);
    border-radius: 50%;
}

.prompt-quote .prompt-quote-warn {
    margin-top: 0.15em;
    color: var(--rust-bright);
}

@media (min-width: 1180px) {
    .pillar {
        grid-template-columns: minmax(0, 1fr) var(--content-read) minmax(0, 1fr);
        align-items: center;
        column-gap: 48px;
        max-width: var(--content-wide);
        margin: 0 auto;
    }

    .pillar-text {
        grid-column: 2;
        grid-row: 1;
    }
}

/* ===========[ Closer and signup ]======================================== */

.closer {
    max-width: 50rem;
    margin: 0 auto;
    padding: 72px var(--gutter) 56px;
    text-align: center;
}

.closer-line {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem);
    line-height: 1.35;
    color: var(--cream);
    text-wrap: balance;
}

.signup {
    padding: 24px var(--gutter) 40px;
}

.signup-card {
    max-width: 34rem;
    margin: 0 auto;
    padding: 32px clamp(20px, 5vw, 40px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.signup-card h2 {
    margin-bottom: 10px;
}

.signup-card > p {
    color: var(--ink-muted);
}

.signup-form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.field {
    display: grid;
    gap: 6px;
}

.field-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.field-optional {
    font-weight: 400;
    color: var(--ink-faint);
    margin-left: 6px;
}

.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: 1rem var(--font-sans);
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--amber);
}

/* Placeholders: italic and dim, and gone the moment the box has focus */
.field input::placeholder,
.field textarea::placeholder {
    color: var(--ink-faint);
    font-style: italic;
    opacity: 1;
}

.field input:focus::placeholder,
.field textarea:focus::placeholder {
    color: transparent;
}

/* The email box reads like a command line: a prompt mark inside its left edge, typed in the
   terminal's font */
.field-prompt {
    position: relative;
    display: block;
}

.field-prompt::before {
    content: ">";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font: 700 1rem var(--font-mono);
    color: var(--amber);
    pointer-events: none;
}

.field-prompt input {
    padding-left: 34px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.field-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.signup-form .button {
    justify-self: start;
}

.form-status {
    margin: 0;
    min-height: 1.5em;
    color: var(--amber);
}

.signup-done {
    margin: 20px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--amber);
    border-radius: 8px;
    background: var(--bg-deep);
    color: var(--cream);
}

.signup-done:focus {
    outline: none;
}

.signup-form button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.signup-fine {
    margin: 20px 0 0;
    font-size: 0.9rem;
    color: var(--ink-faint);
}

/* ===========[ Legal pages ]============================================== */

.legal {
    max-width: var(--content-read);
    margin: 0 auto;
    padding: 48px var(--gutter) 24px;
}

.legal h1 {
    font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem);
}

.legal h2 {
    margin: 36px 0 12px;
    font-size: 1.4rem;
}

.legal p {
    color: var(--ink-muted);
}

.legal-updated {
    margin-top: 8px;
    color: var(--ink-faint);
    font-size: 0.95rem;
}

/* ===========[ Small screens ]============================================ */

@media (max-width: 600px) {
    .hero {
        padding-top: 36px;
    }

    .hero-mascot {
        width: 180px;
        height: 180px;
    }

    .pillar {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .footer-published {
        margin-left: 0;
    }
}

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

    .t-cursor,
    .t-thinking::after {
        animation: none;
    }
}
