/* Aubersa — stylesheet entry point.
 *
 * This file contains imports and nothing else. Every rule in the built
 * stylesheet lives in one of the partials below, and the cascade is the
 * import order, so do not reorder these lines casually.
 *
 * Order: tokens -> base -> components -> layouts.
 * Add a new file to the correct group and register it here.
 */

/* Design tokens — the single place any colour, font, or measurement is decided. */
/* Aubersa — base design tokens (light theme).
 *
 * This is the re-skin surface. The subject matter of the diary is undecided,
 * so the palette below is deliberately a PLACEHOLDER: changing these values
 * re-skins the entire site. No component may hardcode a colour, font family,
 * or spacing value — everything references a token defined here.
 *
 * Only colour tokens are redefined in tokens/_dark.css. Everything else
 * (type, space, motion) is theme-independent and lives only here.
 */

:root {
    /* ---------------------------------------------------------------------
     * Type — families
     *
     * Newsreader carries body and display; it is self-hosted (see
     * base/_fonts.css) and is a variable font, so weight is a continuum.
     * UI chrome uses the system sans stack: no webfont, no extra weight.
     * ------------------------------------------------------------------- */
    --font-body: "Newsreader", Iowan Old Style, Charter, Georgia, "Times New Roman", serif;
    --font-display: var(--font-body);
    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    /* ---------------------------------------------------------------------
     * Type — weights
     *
     * Newsreader is variable across 200–800. Body sits at 400; headings stay
     * restrained, because a journal does not shout.
     * ------------------------------------------------------------------- */
    --weight-light: 300;
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* ---------------------------------------------------------------------
     * Type — fluid modular scale
     *
     * Ratio ~1.25 (major third). Each step is a clamp() that interpolates
     * between a phone viewport (~360px) and a desktop one (~1280px), so there
     * are no breakpoint jumps in the type. --step-0 is body copy.
     * ------------------------------------------------------------------- */
    --step--2: clamp(0.694rem, 0.671rem + 0.10vw, 0.75rem);
    --step--1: clamp(0.833rem, 0.792rem + 0.18vw, 0.9375rem);
    --step-0: clamp(1rem, 0.935rem + 0.29vw, 1.1719rem);
    --step-1: clamp(1.2rem, 1.101rem + 0.44vw, 1.4648rem);
    --step-2: clamp(1.44rem, 1.293rem + 0.65vw, 1.8311rem);
    --step-3: clamp(1.728rem, 1.514rem + 0.95vw, 2.2888rem);
    --step-4: clamp(2.0736rem, 1.769rem + 1.36vw, 2.8610rem);
    --step-5: clamp(2.4883rem, 2.061rem + 1.90vw, 3.5763rem);

    /* ---------------------------------------------------------------------
     * Type — rhythm
     *
     * --measure is the hard constraint on the reading column. --leading is
     * the base line height for body copy; headings and UI use the tighter
     * values so they do not drift apart from their own descenders.
     *
     * The `ch` unit is the advance of the digit zero, which in Newsreader is
     * 0.566em — about 25% wider than the average lowercase glyph. So `ch` is
     * NOT "characters": 68ch measured out at ~90 characters per line, well
     * past the 45-75 comfortable range. 51ch resolves to ~68 real characters,
     * which is the spec figure. Retune these together if the body face ever
     * changes, and measure the result rather than trusting the unit.
     * ------------------------------------------------------------------- */
    --measure: 51ch;
    --measure-wide: 63ch;
    --measure-narrow: 39ch;
    --leading: 1.7;
    --leading-tight: 1.2;
    --leading-snug: 1.4;
    --scale-ratio: 1.25;
    --tracking-tight: -0.011em;
    --tracking-normal: 0;
    --tracking-wide: 0.02em;
    --tracking-caps: 0.08em;

    /* ---------------------------------------------------------------------
     * Colour — light theme (placeholder palette)
     *
     * --paper   page ground
     * --surface raised ground: cards, wells, the age gate panel
     * --ink     primary text        (contrast on --paper: ~15.9:1)
     * --ink-muted secondary text    (contrast on --paper: ~5.2:1, AA body)
     * --rule    hairlines and borders — never used for text
     * --accent  the one restrained accent: links, focus ring, marks
     * ------------------------------------------------------------------- */
    --paper: #faf8f4;
    --surface: #f3efe8;
    --ink: #1c1a17;
    --ink-muted: #6b645a;
    --rule: #ded7cb;
    --accent: #8a5a3c;
    --accent-hover: #6f462e;

    /* Derived colour roles. Components reference these, not the raw palette,
     * wherever the intent is semantic rather than literal. */
    --selection-bg: color-mix(in srgb, var(--accent) 18%, transparent);
    --selection-ink: var(--ink);
    --overlay: color-mix(in srgb, var(--paper) 96%, var(--ink));
    --shade: color-mix(in srgb, var(--ink) 6%, transparent);
    --link: var(--accent);
    --link-hover: var(--accent-hover);
    --link-underline: color-mix(in srgb, var(--accent) 40%, transparent);
    --focus-ring: var(--accent);

    /* ---------------------------------------------------------------------
     * Space — a 4px-derived scale, expressed in rem so it respects the user's
     * root font size. Use these for margin, padding, and gap. Nothing else.
     * ------------------------------------------------------------------- */
    --space-3xs: 0.25rem;
    --space-2xs: 0.5rem;
    --space-xs: 0.75rem;
    --space-s: 1rem;
    --space-m: 1.5rem;
    --space-l: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4.5rem;
    --space-3xl: 7rem;
    --space-4xl: 10rem;

    /* Fluid section spacing — the vertical breathing room between major
     * blocks, which needs to shrink harder on phones than the type does. */
    --space-section: clamp(3rem, 2rem + 5vw, 7rem);
    --space-gutter: clamp(1.25rem, 0.8rem + 2.2vw, 2.5rem);

    /* ---------------------------------------------------------------------
     * Layout — the container widths every template composes against.
     *
     * --content-width is an alias of --measure, not an independent value.
     * They were separate tokens that happened to disagree by ~50px, which put
     * four different left edges on the site (post body, feed, tag page, About
     * page). Aliasing makes drift impossible: retune --measure and every
     * template follows. Note this inherits --measure's `ch` unit, so it
     * resolves against the font-size of whatever element consumes it — always
     * body copy in practice.
     * ------------------------------------------------------------------- */
    --content-width: var(--measure);
    --content-width-wide: 62rem;
    --content-width-full: 80rem;

    /* ---------------------------------------------------------------------
     * Lines & shape
     *
     * Hairlines carry all the structure this design has. Radius is
     * deliberately near-zero: this is a journal, not an app. Never raise it
     * above 3px, and never add a drop shadow.
     * ------------------------------------------------------------------- */
    --rule-width: 1px;
    --rule-width-thick: 2px;
    --radius: 2px;
    --radius-lg: 3px;

    /* ---------------------------------------------------------------------
     * Motion — understated, and fully removable under
     * prefers-reduced-motion (see base/_reset.css).
     * ------------------------------------------------------------------- */
    --transition: 200ms ease;
    --transition-slow: 400ms ease;
    --ease: cubic-bezier(0.2, 0, 0.2, 1);

    /* ---------------------------------------------------------------------
     * Atmosphere — an optional background layer applied to the page ground.
     * Defaults to none. A future skin may set this to a subtle repeating
     * data-URI texture or a very low-contrast gradient wash.
     *
     * Consumed as `background-image` on body (base/_reset.css) and on
     * .age-gate (components/_age-gate.css). There is deliberately no
     * companion opacity token: a background-image has no opacity channel, so
     * one would have to be faked with a dedicated pseudo-element layer that
     * does not exist. Bake the transparency into the image itself — an RGBA
     * data-URI, or a gradient with alpha stops.
     * ------------------------------------------------------------------- */
    --texture: none;

    /* ---------------------------------------------------------------------
     * Stacking — every z-index in the theme comes from this list, so the
     * layering order is readable in one place.
     * ------------------------------------------------------------------- */
    --z-base: 0;
    --z-raised: 10;
    --z-nav: 100;
    --z-overlay: 500;
    --z-age-gate: 1000;
    --z-skip-link: 1100;
}
/* Aubersa — dark theme tokens.
 *
 * Only COLOUR tokens are redefined here. Type, space, motion, and shape are
 * theme-independent and stay in tokens/_base.css.
 *
 * Three states have to resolve correctly:
 *   1. No stored preference  -> follow the OS via prefers-color-scheme.
 *   2. data-theme="dark"     -> dark, even when the OS says light.
 *   3. data-theme="light"    -> light, even when the OS says dark.
 *
 * The media query is therefore guarded with :not([data-theme="light"]) so an
 * explicit light choice is never overridden, and the [data-theme="dark"]
 * block repeats the palette so an explicit dark choice wins on a light OS.
 * The inline <head> script in default.hbs stamps data-theme before paint.
 *
 * Contrast on --paper #131211: --ink ~14.8:1, --ink-muted ~6.4:1, both AA.
 */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #131211;
        --surface: #1c1a18;
        --ink: #e8e4dc;
        --ink-muted: #9a9186;
        --rule: #302c27;
        --accent: #c98f6a;
        --accent-hover: #dda882;

        --selection-bg: color-mix(in srgb, var(--accent) 26%, transparent);
        --selection-ink: var(--ink);
        --overlay: color-mix(in srgb, var(--paper) 94%, var(--ink));
        --shade: color-mix(in srgb, var(--ink) 8%, transparent);
        --link: var(--accent);
        --link-hover: var(--accent-hover);
        --link-underline: color-mix(in srgb, var(--accent) 45%, transparent);
        --focus-ring: var(--accent);
    }
}

:root[data-theme="dark"] {
    --paper: #131211;
    --surface: #1c1a18;
    --ink: #e8e4dc;
    --ink-muted: #9a9186;
    --rule: #302c27;
    --accent: #c98f6a;
    --accent-hover: #dda882;

    --selection-bg: color-mix(in srgb, var(--accent) 26%, transparent);
    --selection-ink: var(--ink);
    --overlay: color-mix(in srgb, var(--paper) 94%, var(--ink));
    --shade: color-mix(in srgb, var(--ink) 8%, transparent);
    --link: var(--accent);
    --link-hover: var(--accent-hover);
    --link-underline: color-mix(in srgb, var(--accent) 45%, transparent);
    --focus-ring: var(--accent);
}

/* Tell the UA which form controls and scrollbars to paint, in all three
 * states, so native chrome does not sit at odds with the page. */
:root {
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

:root[data-theme="light"] {
    color-scheme: light;
}

/* Base — reset, webfonts, and the element-level typography defaults. */
/* Aubersa — reset.
 *
 * A small modern reset. It normalises the box model, removes the default
 * margins the typography layer wants to own, makes media behave, hands the
 * page font down to form controls, and defines the one focus style used
 * everywhere. It sets no colours or fonts of its own beyond tokens.
 *
 * Owner: scaffold. base/_typography.css owns everything expressive.
 */

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

/* The typography layer sets its own vertical rhythm; start from zero. */
body,
h1, h2, h3, h4, h5, h6,
p,
figure,
blockquote,
dl,
dd,
pre {
    margin: 0;
}

ul[role="list"],
ol[role="list"] {
    list-style: none;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
         text-size-adjust: 100%;
    /* Anchor links and the skip link should not land under the nav. */
    scroll-padding-top: var(--space-xl);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    background-color: var(--paper);
    background-image: var(--texture);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* The document shell from default.hbs. No component or layout file owns these
 * two, so they are set once here: a single column that fills the viewport and
 * lets <main> absorb the leftover height, which keeps the footer on the bottom
 * edge of short pages (404, an empty feed) instead of floating mid-screen. */
.gh-viewport {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}

.gh-main {
    /* min-width guards the flex item against wide content (code blocks,
     * tables) forcing the whole page to scroll sideways. */
    flex: 1 0 auto;
    min-width: 0;
}

img,
picture,
video,
canvas,
svg,
iframe {
    display: block;
    max-width: 100%;
}

img,
video {
    height: auto;
}

svg {
    fill: currentColor;
}

/* Form controls do not inherit type by default. Make them. */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

a {
    color: var(--link);
}

table {
    border-collapse: collapse;
    width: 100%;
}

hr {
    border: 0;
    border-top: var(--rule-width) solid var(--rule);
}

::-moz-selection {
    background-color: var(--selection-bg);
    color: var(--selection-ink);
}

::selection {
    background-color: var(--selection-bg);
    color: var(--selection-ink);
}

/* One focus style, everywhere. Keyboard users see it; pointer users do not.
 * Never remove the outline without replacing it. */
:focus-visible {
    outline: var(--rule-width-thick) solid var(--focus-ring);
    outline-offset: 3px;
    border-radius: var(--radius);
}

/* Browsers that support :focus-visible should not double up on :focus. */
:focus:not(:focus-visible) {
    outline: none;
}

/* Visually hidden but available to assistive technology. Used by the skip
 * link, form labels, and icon-only buttons. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Motion is decoration here, never information. Remove all of it on request. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* Aubersa — webfonts.
 *
 * Newsreader, self-hosted. Two files only: the variable upright and the
 * variable italic, latin subset. That is 123KB of woff2 total and it covers
 * every weight from 200 to 800, so there are no further requests as the
 * design uses more of the range.
 *
 * The files are copied out of node_modules by `npm run fonts` (which runs
 * automatically before `npm run build`) into assets/fonts/. Do not commit a
 * change to the filenames without updating both that script and the preload
 * link in default.hbs.
 *
 * Source: @fontsource-variable/newsreader (SIL Open Font License 1.1).
 * unicode-range matches fontsource's latin subset exactly.
 *
 * Owner: scaffold.
 */

@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/newsreader-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/newsreader-latin-wght-italic.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Aubersa — typography.
 *
 * Owner: typography agent.
 *
 * Two jobs:
 *
 *   1. Element-level defaults for the whole document — the type the reader
 *      meets before any component has an opinion.
 *   2. `.gh-content`, the prose stylesheet. Everything the Ghost editor can
 *      emit is styled here: headings, paragraphs, quotes, lists, figures,
 *      rules, code, footnotes, and the full Koenig card set.
 *
 * The reading column is a grid, not a max-width. A prose element sits in the
 * `main` track (the measure); a wide card spans `wide`; a full-bleed card
 * spans `full`. That is the only way content escapes the measure, and it
 * keeps every breakout optically centred on the same axis.
 *
 * Vertical rhythm is one rule — `> * + *` — with a per-element `--flow`
 * expressed in `em`, so spacing scales with the size of the thing being
 * spaced. Headings therefore open more air than paragraphs without anyone
 * hardcoding a number.
 *
 * Tokens only. No colour, family, or measurement is invented here.
 */

/* ==========================================================================
 * 1. Document defaults
 * ========================================================================== */

body {
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-weight: var(--weight-normal);
    line-height: var(--leading);
    letter-spacing: var(--tracking-normal);
    font-optical-sizing: auto;
    font-variant-ligatures: common-ligatures contextual;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: var(--weight-medium);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5 { font-size: var(--step-0); }
h6 { font-size: var(--step--1); }

p {
    text-wrap: pretty;
}

strong,
b {
    font-weight: var(--weight-semibold);
}

em,
i {
    font-style: italic;
}

small {
    font-size: var(--step--1);
}

/* Superscripts and subscripts must not open the line they sit on. */
sup,
sub {
    font-size: 0.72em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup { top: -0.45em; }
sub { bottom: -0.22em; }

abbr[title] {
    -webkit-text-decoration: underline dotted;
            text-decoration: underline dotted;
    text-underline-offset: 0.18em;
    cursor: help;
}

mark {
    background-color: var(--selection-bg);
    color: var(--selection-ink);
    padding: 0.05em 0.15em;
}

code,
kbd,
samp,
pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

/* ==========================================================================
 * 2. The reading canvas
 *
 * `.gh-canvas` is the bare grid, for template chrome that must align with the
 * prose (entry headers, entry navigation). `.gh-content` is the same grid
 * plus the prose rules that follow.
 * ========================================================================== */

.gh-canvas,
.gh-content {
    --canvas-main: min(var(--measure), 100% - var(--space-gutter) * 2);
    --canvas-wide: minmax(0, calc((var(--content-width-wide) - var(--measure)) / 2));
    --canvas-full: minmax(var(--space-gutter), 1fr);

    display: grid;
    grid-template-columns:
        [full-start] var(--canvas-full)
        [wide-start] var(--canvas-wide)
        [main-start] var(--canvas-main) [main-end]
        var(--canvas-wide) [wide-end]
        var(--canvas-full) [full-end];
}

.gh-canvas > *,
.gh-content > * {
    grid-column: main;
    min-width: 0;
}

.gh-canvas > .gh-canvas-wide,
.gh-content > .kg-width-wide {
    grid-column: wide;
}

.gh-canvas > .gh-canvas-full,
.gh-content > .kg-width-full {
    grid-column: full;
}

/* ==========================================================================
 * 3. Prose — the body of an entry
 * ========================================================================== */

.gh-content {
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading);
    color: var(--ink);
    font-variant-numeric: oldstyle-num proportional-nums;
}

/* Vertical rhythm. Every element declares the space it wants above itself. */
.gh-content > * {
    --flow: 1.35em;
}

.gh-content > * + * {
    margin-top: var(--flow);
}

/* Hyphenation earns its keep only when the line is short. */
@media (max-width: 40em) {
    .gh-content > p,
    .gh-content > ul,
    .gh-content > ol,
    .gh-content > blockquote {
        hyphens: auto;
    }
}

/* --------------------------------------------------------------------------
 * 3.1 Headings inside prose
 *
 * Sizes step down from the entry title, which is set in layouts/_post.css.
 * A heading opens more space above it than a paragraph does, and the element
 * that follows a heading closes right up under it — the standard optical
 * pairing that makes a section read as one unit.
 * -------------------------------------------------------------------------- */

.gh-content > h1,
.gh-content > h2,
.gh-content > h3,
.gh-content > h4,
.gh-content > h5,
.gh-content > h6 {
    --flow: 1.5em;
    color: var(--ink);
}

.gh-content > h1 { font-size: var(--step-3); }
.gh-content > h2 { font-size: var(--step-2); }
.gh-content > h3 { font-size: var(--step-1); }

.gh-content > h4 {
    font-size: var(--step-0);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-normal);
}

.gh-content > h5 {
    font-size: var(--step--1);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
}

.gh-content > h6 {
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
}

.gh-content > :is(h1, h2, h3, h4, h5, h6) + * {
    --flow: 0.65em;
}

/* Ghost gives every prose heading an id for deep linking. */
.gh-content > :is(h1, h2, h3, h4, h5, h6) > a {
    color: inherit;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
 * 3.2 Links
 *
 * A hairline underline set below the baseline, in a tint of the accent so it
 * reads as texture rather than as a box. On hover the underline takes the
 * link's own colour and firms up.
 * -------------------------------------------------------------------------- */

.gh-content a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 0.055em;
    text-decoration-color: var(--link-underline);
    text-underline-offset: 0.17em;
    -webkit-text-decoration-skip: ink;
            text-decoration-skip-ink: auto;
    transition:
        color var(--transition),
        text-decoration-color var(--transition);
}

.gh-content a:hover {
    color: var(--link-hover);
    text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
 * 3.3 Lists
 * -------------------------------------------------------------------------- */

.gh-content ul,
.gh-content ol {
    padding-left: 1.35em;
}

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

.gh-content li::marker {
    color: var(--ink-muted);
}

.gh-content ul ul,
.gh-content ul ol,
.gh-content ol ol,
.gh-content ol ul {
    margin-top: 0.45em;
}

.gh-content ul ul {
    list-style-type: circle;
}

.gh-content dl {
    display: grid;
    grid-template-columns: auto 1fr;
    -moz-column-gap: var(--space-m);
         column-gap: var(--space-m);
    row-gap: var(--space-2xs);
}

.gh-content dt {
    font-weight: var(--weight-semibold);
}

.gh-content dd {
    color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
 * 3.4 Quotations
 *
 * A hairline in the margin, not a grey box. The opening quotation mark hangs
 * into that margin so the first line of the quote stays optically flush with
 * the rest of the column.
 * -------------------------------------------------------------------------- */

.gh-content blockquote {
    --flow: 1.6em;
    padding-left: var(--space-m);
    border-left: var(--rule-width-thick) solid var(--rule);
    font-style: italic;
    color: var(--ink);
    hanging-punctuation: first last;
}

@supports not (hanging-punctuation: first) {
    .gh-content blockquote > p:first-child {
        text-indent: -0.42em;
    }
}

.gh-content blockquote p + p {
    margin-top: 1em;
}

.gh-content blockquote cite,
.gh-content blockquote footer {
    display: block;
    margin-top: var(--space-2xs);
    font-family: var(--font-ui);
    font-style: normal;
    font-size: var(--step--1);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
}

.gh-content blockquote cite::before,
.gh-content blockquote footer::before {
    content: "— ";
}

/* The editor's alternate quote style — a pull quote. No rule, larger, set
 * off by air above and below and by a short accent mark. */
.gh-content blockquote.kg-blockquote-alt {
    --flow: 2em;
    padding-left: 0;
    border-left: 0;
    text-indent: 0;
    font-size: var(--step-1);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
}

.gh-content blockquote.kg-blockquote-alt::before {
    content: "";
    display: block;
    width: var(--space-l);
    height: var(--rule-width-thick);
    margin-bottom: var(--space-m);
    background-color: var(--accent);
}

/* --------------------------------------------------------------------------
 * 3.5 Figures and captions
 * -------------------------------------------------------------------------- */

.gh-content figure {
    --flow: 2em;
}

.gh-content figure img {
    max-width: 100%;
    margin-inline: auto;
    border-radius: var(--radius);
}

.gh-content figcaption,
.gh-content .kg-card figcaption {
    max-width: var(--measure-narrow);
    margin: var(--space-s) auto 0;
    padding: 0 var(--space-2xs);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
    text-align: center;
    text-wrap: pretty;
}

/* A caption link has to be findable without hovering it. It used to be
 * --ink-muted on --ink-muted with a --rule underline at 1.35:1, which is the
 * same colour as its surroundings and no perceivable underline — nothing but
 * hover distinguished it (WCAG 1.4.1). The underline now inherits the text
 * colour and the ink shifts to the accent, so it is marked twice over. */
.gh-content figcaption a {
    color: var(--link);
    text-decoration-color: currentColor;
}

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

/* --------------------------------------------------------------------------
 * 3.6 Section break
 *
 * A short centred rule rather than a full-width divider: a pause in the
 * writing, not a partition in the page.
 * -------------------------------------------------------------------------- */

.gh-content hr {
    --flow: 2.5em;
    width: var(--space-2xl);
    margin-inline: auto;
    margin-bottom: 1.15em;
    border: 0;
    border-top: var(--rule-width) solid var(--rule);
}

.gh-content hr + * {
    --flow: 0;
}

/* --------------------------------------------------------------------------
 * 3.7 Code
 * -------------------------------------------------------------------------- */

.gh-content :not(pre) > code {
    padding: 0.12em 0.35em;
    background-color: var(--surface);
    border: var(--rule-width) solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    word-break: break-word;
}

.gh-content pre {
    --flow: 1.8em;
    padding: var(--space-m);
    background-color: var(--surface);
    border: var(--rule-width) solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    overflow-x: auto;
    -moz-tab-size: 4;
      -o-tab-size: 4;
         tab-size: 4;
}

.gh-content pre code {
    padding: 0;
    background: none;
    border: 0;
    font-size: inherit;
    white-space: pre;
}

.gh-content kbd {
    padding: 0.1em 0.4em;
    background-color: var(--surface);
    border: var(--rule-width) solid var(--rule);
    border-bottom-width: var(--rule-width-thick);
    border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
 * 3.8 Tables
 *
 * Horizontal hairlines only. A table narrower than the measure keeps its
 * natural width; a wider one scrolls inside itself rather than forcing the
 * page sideways.
 * -------------------------------------------------------------------------- */

.gh-content table {
    --flow: 1.8em;
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums lining-nums;
}

.gh-content th,
.gh-content td {
    padding: var(--space-2xs) var(--space-s);
    border-bottom: var(--rule-width) solid var(--rule);
    text-align: left;
    vertical-align: top;
}

.gh-content th {
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    border-bottom-width: var(--rule-width-thick);
}

.gh-content tbody tr:last-child td {
    border-bottom: 0;
}

/* --------------------------------------------------------------------------
 * 3.9 Drop cap
 *
 * Opt-in, via the `enable_drop_caps` theme setting. Only ever the first
 * paragraph of an entry, and only when the entry opens with a paragraph.
 * `initial-letter` does this properly where it exists; the float is the
 * fallback everywhere else.
 * -------------------------------------------------------------------------- */

.gh-content.has-drop-cap > p:first-child::first-letter {
    float: left;
    font-family: var(--font-display);
    font-weight: var(--weight-normal);
    font-size: 3.35em;
    line-height: 0.8;
    padding-top: 0.06em;
    padding-right: 0.07em;
    color: var(--ink);
}

@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
    .gh-content.has-drop-cap > p:first-child::first-letter {
        float: none;
        font-size: inherit;
        line-height: inherit;
        padding: 0;
        margin-right: 0.08em;
        -webkit-initial-letter: 3;
        initial-letter: 3;
    }
}

/* --------------------------------------------------------------------------
 * 3.10 Footnotes
 * -------------------------------------------------------------------------- */

.gh-content .footnote-ref a {
    text-decoration: none;
    padding: 0 0.1em;
}

.gh-content .footnote-ref a:hover {
    text-decoration: underline;
}

.gh-content .footnotes {
    --flow: 2.5em;
    padding-top: var(--space-m);
    border-top: var(--rule-width) solid var(--rule);
    font-size: var(--step--1);
    color: var(--ink-muted);
}

.gh-content .footnotes hr {
    display: none;
}

.gh-content .footnotes-list,
.gh-content .footnotes ol {
    padding-left: 1.2em;
}

.gh-content .footnote-item p,
.gh-content .footnotes li p {
    margin: 0;
}

.gh-content .footnote-backref {
    text-decoration: none;
    margin-left: 0.35em;
}

/* ==========================================================================
 * 4. Koenig cards
 *
 * Ghost ships functional CSS for several of these (card_assets is on). What
 * follows is the theme's opinion on top of it: hairlines instead of shadows,
 * tokens instead of Ghost's defaults, and the same restraint as the prose.
 * ========================================================================== */

.gh-content > .kg-card {
    --flow: 2em;
}

.gh-content > .kg-width-full {
    --flow: 2.6em;
}

.gh-content > .kg-width-full + *:not(.kg-width-full) {
    --flow: 2.6em;
}

/* A card introduced by a heading belongs to that heading. */
.gh-content > :is(h1, h2, h3, h4, h5, h6) + .kg-card {
    --flow: 0.9em;
}

/* --- Image ---------------------------------------------------------------- */

.gh-content .kg-image-card .kg-image {
    margin-inline: auto;
    border-radius: var(--radius);
}

.gh-content > .kg-width-wide .kg-image {
    width: 100%;
}

.gh-content > .kg-width-full .kg-image {
    width: 100%;
    border-radius: 0;
}

/* --- Gallery -------------------------------------------------------------- */

.gh-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    margin-inline: auto;
    width: 100%;
}

.gh-content .kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: var(--space-2xs);
}

.gh-content .kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    border-radius: var(--radius);
}

/* --- Embed, audio, video -------------------------------------------------- */

.gh-content .kg-embed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.gh-content .kg-embed-card iframe {
    max-width: 100%;
}

.gh-content .kg-audio-card,
.gh-content .kg-video-card {
    border-radius: var(--radius);
    overflow: hidden;
}

.gh-content .kg-audio-card {
    border: var(--rule-width) solid var(--rule);
    background-color: var(--surface);
}

.gh-content .kg-audio-title,
.gh-content .kg-video-title {
    font-family: var(--font-display);
    font-weight: var(--weight-medium);
    color: var(--ink);
}

/* --- Bookmark ------------------------------------------------------------- */

.gh-content .kg-bookmark-card {
    width: 100%;
}

/* The `.kg-bookmark-card` ancestor is load-bearing, not decoration. Ghost
 * injects cards.min.css (package.json `card_assets: true`) AFTER the theme
 * stylesheet, and it carries
 *   .kg-bookmark-card a.kg-bookmark-container { background: #fff }
 * at specificity (0,2,1) — identical to a bare `.gh-content
 * a.kg-bookmark-container`. On a tie the later sheet wins, so the card kept a
 * hardcoded white ground in dark mode and its title went white-on-white.
 * Qualifying with the card class takes us to (0,3,1) and wins outright.
 * Do not simplify these selectors. */
.gh-content .kg-bookmark-card .kg-bookmark-container,
.gh-content .kg-bookmark-card a.kg-bookmark-container {
    display: flex;
    align-items: stretch;
    min-height: 0;
    color: var(--ink);
    text-decoration: none;
    border: var(--rule-width) solid var(--rule);
    border-radius: var(--radius);
    background-color: var(--paper);
    transition: border-color var(--transition);
}

.gh-content .kg-bookmark-card a.kg-bookmark-container:hover {
    border-color: var(--accent);
    color: var(--ink);
    text-decoration: none;
}

.gh-content .kg-bookmark-content {
    flex-grow: 1;
    padding: var(--space-m);
    order: 0;
    min-width: 0;
}

.gh-content .kg-bookmark-title {
    font-family: var(--font-display);
    font-size: var(--step-0);
    font-weight: var(--weight-medium);
    line-height: var(--leading-snug);
    color: var(--ink);
}

.gh-content .kg-bookmark-description {
    margin-top: var(--space-2xs);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh-content .kg-bookmark-metadata {
    margin-top: var(--space-s);
    font-family: var(--font-ui);
    font-size: var(--step--2);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
}

.gh-content .kg-bookmark-icon {
    width: 1.1em;
    height: 1.1em;
    margin-right: var(--space-2xs);
}

.gh-content .kg-bookmark-thumbnail {
    order: 1;
    flex: 0 0 33%;
    min-width: 33%;
}

.gh-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    border-radius: 0 var(--radius) var(--radius) 0;
}

@media (max-width: 34em) {
    .gh-content .kg-bookmark-container,
    .gh-content a.kg-bookmark-container {
        flex-direction: column;
    }

    .gh-content .kg-bookmark-thumbnail {
        order: -1;
        flex-basis: auto;
        min-width: 0;
        /* Crops the thumbnail rather than letting it dominate the card. */
        max-height: 12rem;
    }

    .gh-content .kg-bookmark-thumbnail img {
        border-radius: var(--radius) var(--radius) 0 0;
    }
}

/* --- Callout -------------------------------------------------------------- */

.gh-content .kg-callout-card {
    display: flex;
    gap: var(--space-s);
    padding: var(--space-m);
    background-color: var(--surface);
    border-left: var(--rule-width-thick) solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.gh-content .kg-callout-emoji {
    flex: 0 0 auto;
    line-height: var(--leading-snug);
}

.gh-content .kg-callout-text {
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    color: var(--ink);
}

.gh-content .kg-callout-card-accent {
    background-color: var(--shade);
}

.gh-content .kg-callout-card-accent a {
    color: var(--link);
}

/* --- Toggle --------------------------------------------------------------- */

.gh-content .kg-toggle-card {
    padding: var(--space-m);
    border: var(--rule-width) solid var(--rule);
    border-radius: var(--radius);
}

.gh-content .kg-toggle-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-s);
}

.gh-content .kg-toggle-heading-text {
    font-family: var(--font-display);
    font-size: var(--step-0);
    font-weight: var(--weight-medium);
    line-height: var(--leading-snug);
    color: var(--ink);
}

.gh-content .kg-toggle-card-icon {
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    color: var(--ink-muted);
    transition: transform var(--transition);
}

.gh-content .kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-card-icon {
    transform: rotate(-90deg);
}

.gh-content .kg-toggle-content {
    margin-top: var(--space-s);
    font-size: var(--step--1);
    color: var(--ink-muted);
}

.gh-content .kg-toggle-content > * + * {
    margin-top: var(--space-s);
}

/* --- Button --------------------------------------------------------------- */

.gh-content .kg-button-card {
    display: flex;
}

.gh-content .kg-button-card.kg-align-center {
    justify-content: center;
}

.gh-content .kg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 44px: the minimum comfortable target size, not a design value. */
    min-height: 2.75rem;
    padding: var(--space-2xs) var(--space-m);
    background-color: transparent;
    border: var(--rule-width) solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    text-decoration: none;
    transition:
        background-color var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.gh-content .kg-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--paper);
    text-decoration: none;
}

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

.gh-content .kg-header-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-s);
    padding: var(--space-xl) var(--space-gutter);
    background-color: var(--surface);
    text-align: center;
}

.gh-content .kg-header-card-header {
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: var(--weight-medium);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
}

.gh-content .kg-header-card-subheader {
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
}

/* --- Product, NFT, file --------------------------------------------------- */

.gh-content .kg-product-card-container,
.gh-content .kg-nft-card-container,
.gh-content .kg-file-card-container {
    border: var(--rule-width) solid var(--rule);
    border-radius: var(--radius);
    background-color: var(--paper);
}

.gh-content .kg-product-card-container {
    padding: var(--space-m);
}

.gh-content .kg-product-card-title,
.gh-content .kg-nft-card-title,
.gh-content .kg-file-card-title {
    font-family: var(--font-display);
    font-size: var(--step-0);
    font-weight: var(--weight-medium);
    color: var(--ink);
}

.gh-content .kg-product-card-description,
.gh-content .kg-file-card-caption {
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
}

.gh-content .kg-product-card-button,
.gh-content a.kg-product-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 44px: the minimum comfortable target size, not a design value. */
    min-height: 2.75rem;
    padding: var(--space-2xs) var(--space-m);
    background-color: transparent;
    border: var(--rule-width) solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    text-decoration: none;
    transition:
        background-color var(--transition),
        color var(--transition);
}

.gh-content a.kg-product-card-button:hover {
    background-color: var(--accent);
    color: var(--paper);
}

.gh-content .kg-nft-card-container {
    overflow: hidden;
}

.gh-content .kg-nft-metadata {
    padding: var(--space-m);
}

.gh-content .kg-nft-card-author,
.gh-content .kg-nft-creator,
.gh-content .kg-file-card-metadata,
.gh-content .kg-file-card-filesize {
    font-family: var(--font-ui);
    font-size: var(--step--2);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
}

.gh-content .kg-file-card-container {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    padding: var(--space-m);
    text-decoration: none;
    transition: border-color var(--transition);
}

.gh-content a.kg-file-card-container:hover {
    border-color: var(--accent);
}

.gh-content .kg-file-card-icon {
    flex: 0 0 auto;
    color: var(--ink-muted);
}

/* Components — reusable pieces of chrome, each owning one partial. */
/* Aubersa — site navigation (partials/site-nav.hbs).
 *
 * Owner: chrome agent
 *
 * The masthead is the least important thing on the page and is styled to say
 * so: one hairline, quiet UI type, no background of its own, no shadow. It
 * also carries the three pieces of chrome shared with the footer, the theme
 * toggle, and the pagination — the skip link, the icon sizing, and the icon
 * button — because this is the first component file in the cascade.
 *
 * Breakpoint: 50em. The disclosure script in site-nav.hbs listens to
 * matchMedia('(max-width: 50em)') — the identical query string, not a pixel
 * equivalent, because 50em is only 800px at a 16px root size. Change both
 * together, and keep them in `em`.
 */

/* ---------------------------------------------------------------------------
 * Skip link — the first focusable element on every page. Parked off-screen
 * until focused, then it lands in the top-left corner as a plain panel.
 * ------------------------------------------------------------------------- */
.skip-link {
    position: absolute;
    top: var(--space-2xs);
    left: var(--space-2xs);
    z-index: var(--z-skip-link);
    padding: var(--space-2xs) var(--space-s);
    border: var(--rule-width) solid var(--rule);
    border-radius: var(--radius);
    background-color: var(--surface);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    text-decoration: none;
    transform: translateY(calc(-100% - var(--space-s)));
}

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

/* ---------------------------------------------------------------------------
 * Icons — inline SVG partials under partials/icons/. They are stroked, not
 * filled, so the reset's blanket `svg { fill: currentColor }` has to be undone
 * here. Anything that genuinely needs a solid shape opts back in with
 * .icon-solid (the dot in the feed mark).
 * ------------------------------------------------------------------------- */
.icon {
    width: var(--space-m);
    height: var(--space-m);
    fill: none;
    stroke: currentColor;
}

.icon .icon-solid {
    fill: currentColor;
    stroke: none;
}

/* ---------------------------------------------------------------------------
 * Icon button — the one control shape used by the search trigger, the theme
 * toggle, and the mobile menu button.
 * ------------------------------------------------------------------------- */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xs);
    border-radius: var(--radius);
    color: var(--ink-muted);
    transition: color var(--transition);
}

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

/* ---------------------------------------------------------------------------
 * Masthead
 * ------------------------------------------------------------------------- */
.site-nav {
    position: relative;
    z-index: var(--z-nav);
    border-bottom: var(--rule-width) solid var(--rule);
    padding: var(--space-s) var(--space-gutter);
}

.site-nav-inner {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    width: 100%;
    max-width: var(--content-width-wide);
    margin-inline: auto;
}

/* Site name. Set in the display face at a size just above body copy — present,
 * not promotional. */
.site-nav-title {
    flex: 0 1 auto;
    min-width: 0;
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-decoration: none;
    transition: color var(--transition);
}

.site-nav-title:hover {
    color: var(--accent);
}

.site-nav-logo {
    max-height: var(--space-l);
    width: auto;
}

/* Primary navigation. Ghost renders `{{navigation}}` as
 * <ul class="nav"><li class="nav-{slug} [nav-current]"><a>…</a></li></ul>. */
.site-nav-menu {
    flex: 1 1 auto;
}

.site-nav-menu .nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-m);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav-menu .nav a {
    font-family: var(--font-ui);
    font-size: var(--step--1);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
    text-decoration: none;
    transition: color var(--transition);
}

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

.site-nav-menu .nav-current a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-decoration-thickness: var(--rule-width);
    text-underline-offset: 0.25em;
}

/* Controls sit hard right at every width. */
.site-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3xs);
    margin-left: auto;
}

/* The burger is a mobile-only affordance; the close glyph replaces it while
 * the disclosure is open. */
.site-nav-burger {
    display: none;
}

.site-nav-burger-close {
    display: none;
}

.site-nav.is-nav-open .site-nav-burger-open {
    display: none;
}

.site-nav.is-nav-open .site-nav-burger-close {
    display: block;
}

@media (max-width: 50em) {
    .site-nav-inner {
        flex-wrap: wrap;
        gap: var(--space-2xs);
    }

    .site-nav-burger {
        display: inline-flex;
    }

    /* Closed: removed from the layout and from the tab order, which is what
     * the button's aria-expanded="false" is promising. */
    .site-nav-menu {
        display: none;
        flex: 1 0 100%;
        order: 3;
    }

    .site-nav.is-nav-open .site-nav-menu {
        display: block;
        padding-top: var(--space-s);
        padding-bottom: var(--space-2xs);
    }

    /* Stacked, with room for a thumb. */
    .site-nav.is-nav-open .nav {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .site-nav-menu .nav a {
        font-size: var(--step-0);
    }
}
/* Aubersa — site footer (partials/site-footer.hbs).
 *
 * Owner: chrome agent
 *
 * The end of the page, not a second homepage: secondary navigation, one line
 * of attribution, and the feed. Same hairline and same quiet UI type as the
 * masthead, so the two read as a matched pair of margins around the writing.
 */

.site-footer {
    margin-top: var(--space-section);
    border-top: var(--rule-width) solid var(--rule);
    padding: var(--space-xl) var(--space-gutter) var(--space-2xl);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    color: var(--ink-muted);
}

.site-footer-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    width: 100%;
    max-width: var(--content-width-wide);
    margin-inline: auto;
}

/* Ghost renders `{{navigation type="secondary"}}` as
 * <ul class="nav"><li class="nav-{slug}"><a>…</a></li></ul>. */
.site-footer-menu .nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-m);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: var(--ink-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.site-footer a:hover {
    color: var(--ink);
}

/* Attribution and feed share a line on anything wider than a phone, and stack
 * without fuss below that. */
.site-footer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-xs) var(--space-m);
}

.site-footer-copyright {
    margin: 0;
    letter-spacing: var(--tracking-wide);
}

.site-footer-feed {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3xs);
    letter-spacing: var(--tracking-wide);
}

/* The feed mark sits beside small type, so it is scaled down from the chrome
 * default and nudged onto the text's baseline. */
.site-footer-feed .icon {
    width: var(--space-s);
    height: var(--space-s);
    transform: translateY(0.1em);
}
/* Aubersa — light / dark switch (partials/theme-toggle.hbs).
 *
 * Owner: chrome agent
 *
 * The button shows the theme it will switch TO: a moon while the page is
 * light, a sun while it is dark. Which glyph is visible is decided entirely in
 * CSS, mirroring the four states in tokens/_dark.css —
 *
 *   1. no stored choice, OS light   -> moon   (the bare :root rule below)
 *   2. no stored choice, OS dark    -> sun    (the prefers-color-scheme block)
 *   3. data-theme="light"           -> moon   (the guard in that block)
 *   4. data-theme="dark"            -> sun    (the explicit attribute rule)
 *
 * so it is right on the first frame, before any script runs. Only the
 * accessible name is left to assets/js/theme-toggle.js.
 */

.theme-toggle-sun {
    display: none;
}

.theme-toggle-moon {
    display: flex;
}

/* State 2 — following an OS that is dark, and not overridden to light. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle-sun {
        display: flex;
    }

    :root:not([data-theme="light"]) .theme-toggle-moon {
        display: none;
    }
}

/* State 4 — chosen dark, whatever the OS says. */
:root[data-theme="dark"] .theme-toggle-sun {
    display: flex;
}

:root[data-theme="dark"] .theme-toggle-moon {
    display: none;
}
/* Aubersa — full-screen 18+ interstitial (partials/age-gate.hbs, assets/js/age-gate.js).
 *
 * Owner: age-gate agent
 *
 * The correctness requirement outranks the styling: gated content must not be
 * visible for a single frame. Three things enforce that, in order of when they
 * take effect:
 *
 *   1. default.hbs stamps .age-gate-pending on <html> before first paint, and
 *      the rules below hide .gh-viewport off that class — so the content is
 *      already hidden when the very first frame is painted.
 *   2. The gate itself is a fixed, fully OPAQUE cover. Not a scrim, not a
 *      blur: the ground is --paper, exactly like the page behind it.
 *   3. assets/js/age-gate.js releases the class only after a confirmation.
 *
 * .gh-viewport is hidden with `visibility`, not `display`, deliberately: the
 * layout agents own its display value and this file must not clobber it.
 */

/* ---------------------------------------------------------------------------
 * The hold on the page while the gate is up.
 * ------------------------------------------------------------------------- */

html.age-gate-pending .gh-viewport {
    visibility: hidden;
}

/* The skip link lives outside .gh-viewport, so it is hidden separately —
 * otherwise it would sit in the tab order ahead of a trapped dialog. */
html.age-gate-pending .skip-link {
    visibility: hidden;
}

/* Nothing behind the gate may scroll. Written with :has() and without a
 * fallback on purpose: in a browser that cannot resolve it the rule is simply
 * dropped, which loses the scroll lock but never the cover. */
html.age-gate-pending:has(.age-gate) {
    overflow: hidden;
}

/* When the gate is switched off in theme settings the partial renders nothing,
 * yet <html> still carries the pre-paint class. Give the content straight back
 * rather than waiting on the JS fallback that handles older browsers. */
html.age-gate-pending:not(:has(.age-gate)) .gh-viewport {
    visibility: visible;
}

html.age-gate-pending:not(:has(.age-gate)) .skip-link {
    visibility: visible;
}

/* ---------------------------------------------------------------------------
 * The interstitial.
 *
 * Hidden by default so a confirmed visitor never sees it between parse and
 * script execution. The <noscript> block in default.hbs force-shows it with
 * `display: flex !important`, which is why flex is the visible display value.
 * ------------------------------------------------------------------------- */

.age-gate {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-age-gate);
    align-items: center;
    justify-content: center;
    padding: var(--space-gutter);
    background-color: var(--paper);
    background-image: var(--texture);
    color: var(--ink);
    overflow-y: auto;
    overscroll-behavior: contain;
}

html.age-gate-pending .age-gate {
    display: flex;
}

/* margin:auto rather than a lone align-items:center, so a panel taller than a
 * short viewport stays scrollable instead of overflowing past the top edge. */
.age-gate__panel {
    margin: auto;
    width: 100%;
    max-width: var(--measure-narrow);
}

.age-gate__site {
    margin: 0 0 var(--space-m);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--ink-muted);
}

.age-gate__title {
    margin: 0 0 var(--space-s);
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
}

.age-gate__statement {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading);
    color: var(--ink);
    text-wrap: pretty;
}

/* ---------------------------------------------------------------------------
 * Actions.
 * ------------------------------------------------------------------------- */

.age-gate__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-l);
    padding-top: var(--space-l);
    border-top: var(--rule-width) solid var(--rule);
}

.age-gate__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) var(--space-m);
    border: var(--rule-width) solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.age-gate__action--confirm {
    flex: 1 1 auto;
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--paper);
}

/* The border is this button's only boundary, so it is drawn in --ink-muted
 * rather than --rule: hairline colour would fail the 3:1 non-text contrast
 * requirement in WCAG 1.4.11. */
.age-gate__action--leave {
    flex: 0 1 auto;
    background-color: transparent;
    border-color: var(--ink-muted);
    color: var(--ink);
}

.age-gate__note {
    margin: var(--space-m) 0 0;
    font-family: var(--font-ui);
    font-size: var(--step--2);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
}

@media (hover: hover) {
    .age-gate__action--confirm:hover {
        background-color: var(--accent-hover);
        border-color: var(--accent-hover);
    }

    .age-gate__action--leave:hover {
        border-color: var(--ink);
        background-color: var(--shade);
    }
}

/* ---------------------------------------------------------------------------
 * Motion.
 *
 * The cover itself is never animated — it must be opaque on frame one. Only
 * the panel inside it settles, and only when motion is welcome.
 * ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    html.age-gate-pending .age-gate__panel {
        animation: age-gate-enter var(--transition-slow) var(--ease) both;
    }
}

@keyframes age-gate-enter {
    from {
        opacity: 0;
        transform: translateY(var(--space-2xs));
    }

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

/* Narrow phones: stack the actions so neither label wraps mid-word. */
@media (max-width: 26rem) {
    .age-gate__actions {
        flex-direction: column;
        align-items: stretch;
    }
}
/* Aubersa — entry summary card used in feeds (partials/post-card.hbs).
 *
 * The card is one link and nothing else: no button, no chevron, no border box.
 * Structure comes from a single hairline above each entry and from the space
 * around it. The date leads, because in a journal the date is the title of the
 * day and the headline is only its subject.
 *
 * Variants:
 *   .post-card--has-image   a feature image exists and is rendered
 *   .post-card--compact     archive listing: date and title on one line
 *
 * Tokens only. No colour, font family, or spacing literal belongs here.
 */

.post-card {
    position: relative;
    padding-block: var(--space-xl);
    border-top: var(--rule-width) solid var(--rule);
}

/* The first card sits directly under the feed heading and does not need a
 * hairline to separate it from anything. */
.post-card:first-child {
    border-top: 0;
    padding-block-start: var(--space-m);
}

.post-card__body {
    max-width: var(--measure);
}

/* ---------------------------------------------------------------------------
 * Feature image
 *
 * Optional by definition, so nothing in the card's layout may depend on it.
 * It is decorative here — the title link carries the accessible name — and is
 * kept to a shallow letterbox so an image never outweighs the writing.
 * ------------------------------------------------------------------------- */

.post-card__figure {
    margin-block-end: var(--space-m);
    max-width: var(--measure);
    overflow: hidden;
    border-radius: var(--radius);
    background-color: var(--surface);
}

.post-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    -o-object-fit: cover;
       object-fit: cover;
    transition: opacity var(--transition-slow);
}

.post-card:hover .post-card__image,
.post-card:focus-within .post-card__image {
    opacity: 0.88;
}

/* ---------------------------------------------------------------------------
 * Date
 * ------------------------------------------------------------------------- */

.post-card__date {
    display: block;
    margin-block-end: var(--space-2xs);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* ---------------------------------------------------------------------------
 * Title
 *
 * The link's ::after covers the whole card, so the entire block is clickable
 * while there is still exactly one anchor and one tab stop. Tags are rendered
 * with autolink="false" in the partial precisely so nothing has to fight this
 * overlay for pointer events.
 * ------------------------------------------------------------------------- */

.post-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    text-wrap: balance;
}

.post-card__link {
    color: var(--ink);
    text-decoration: none;
    transition: color var(--transition);
}

.post-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.post-card__link:hover {
    color: var(--accent);
}

/* Baseline focus ring: drawn around the words. Always present, so a browser
 * without :has() still shows something. */
.post-card__link:focus-visible {
    outline: var(--rule-width-thick) solid var(--focus-ring);
    outline-offset: 3px;
    border-radius: var(--radius);
}

/* Where :has() exists, promote the ring to the whole card, which is what the
 * overlay actually made clickable. */
@supports selector(:has(*)) {
    .post-card__link:focus-visible {
        outline: none;
    }

    .post-card:has(.post-card__link:focus-visible) {
        outline: var(--rule-width-thick) solid var(--focus-ring);
        outline-offset: var(--space-2xs);
        border-radius: var(--radius);
    }
}

/* ---------------------------------------------------------------------------
 * Excerpt
 * ------------------------------------------------------------------------- */

.post-card__excerpt {
    margin-block-start: var(--space-xs);
    max-width: var(--measure-narrow);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading);
    color: var(--ink-muted);
}

/* ---------------------------------------------------------------------------
 * Meta row — visibility, tags, reading time
 *
 * Items are separated by a thin middot drawn with ::before, so the separator
 * disappears automatically whenever an item is absent.
 * ------------------------------------------------------------------------- */

.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2xs);
    margin-block-start: var(--space-s);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
}

/* --ink-muted, matching the meta text it separates. --rule is 1.35:1 and the
 * middot simply vanishes, so "Notebooks · 2 min read" reads as one run with a
 * gap in it; --rule is for hairlines, never for text. */
.post-card__meta-item + .post-card__meta-item::before {
    content: "\00B7";
    margin-inline-end: var(--space-2xs);
    color: var(--ink-muted);
}

.post-card__locked {
    letter-spacing: var(--tracking-wide);
    color: var(--accent);
}

/* ---------------------------------------------------------------------------
 * Compact variant — the archive listing
 *
 * Date and title share a line once there is room for both; below that they
 * stack, and the date keeps its own line rather than wrapping mid-phrase.
 * ------------------------------------------------------------------------- */

.post-card--compact {
    padding-block: var(--space-m);
}

.post-card--compact .post-card__title {
    font-size: var(--step-0);
    line-height: var(--leading-snug);
}

.post-card--compact .post-card__meta {
    margin-block-start: var(--space-3xs);
}

@media (min-width: 34rem) {
    .post-card--compact .post-card__body {
        display: grid;
        grid-template-columns: 9rem 1fr;
        -moz-column-gap: var(--space-m);
             column-gap: var(--space-m);
        align-items: baseline;
        max-width: var(--measure-wide);
    }

    .post-card--compact .post-card__date {
        margin-block-end: 0;
        text-align: end;
    }

    .post-card--compact .post-card__meta {
        grid-column: 2;
    }
}
/* Aubersa — older / newer navigation (partials/pagination.hbs).
 *
 * Rendered by the {{pagination}} helper at the foot of a paged listing. Three
 * slots on one line: newer, position, older. The outer slots keep their space
 * even when there is nowhere to go, so the position marker stays centred and
 * the row does not jump between pages.
 *
 * Disabled slots are <span>s, not anchors, so they are already unfocusable;
 * the styling below only has to make that legible.
 *
 * Tokens only.
 */

.pagination {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-s);
    max-width: var(--measure-wide);
    margin-block-start: var(--space-section);
    padding-block-start: var(--space-m);
    border-top: var(--rule-width) solid var(--rule);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
}

.pagination__link {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-2xs);
    color: var(--ink-muted);
    text-decoration: none;
    letter-spacing: var(--tracking-wide);
    transition: color var(--transition);
}

a.pagination__link:hover {
    color: var(--accent);
}

/* Nothing in that direction. Kept in the flow for balance and muted so it
 * reads as absent rather than as an option — but muted with --ink-muted, not
 * --rule. --rule is 1.35:1 against the page, which is not "quiet", it is
 * invisible to anyone with low vision; the token is documented as hairlines
 * only, never text. The absence is carried by the missing underline and the
 * missing hover, not by making the words unreadable. */
.pagination__link.is-disabled {
    color: var(--ink-muted);
    cursor: default;
}

.pagination__arrow {
    font-family: var(--font-body);
    line-height: 1;
}

/* The arrow alone is the whole control on a phone: the words would force the
 * three slots to wrap into a column and cost more height than they are worth. */
.pagination__label {
    display: none;
}

@media (min-width: 30rem) {
    .pagination__label {
        display: inline;
    }
}

.pagination__position {
    font-variant-numeric: tabular-nums;
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
    white-space: nowrap;
}
/* Aubersa — email capture (partials/newsletter.hbs).
 *
 * A quiet well at the foot of an entry or a listing: one hairline-bounded
 * block on the raised surface, one line of explanation, one field, one button.
 *
 * State classes .loading / .success / .error / .invalid are put on the FORM by
 * Ghost's members script. Everything below reacts to them; nothing sets them.
 *
 * Tokens only.
 */

/* post.hbs renders this partial as a bare block straight into <main>, with no
 * .gh-canvas around it, so the well has to seat itself. This is the
 * --canvas-main formula from base/_typography.css spelled out, which puts the
 * block on exactly the same vertical axis as the entry it follows. Do not
 * reduce it to max-width: a bare max-width leaves the block flush at x=0 and
 * puts the input and button against the screen edge on a phone. */
.newsletter {
    width: min(var(--measure), 100% - var(--space-gutter) * 2);
    margin-inline: auto;
    margin-block-start: var(--space-section);
    padding: var(--space-l) var(--space-gutter);
    background-color: var(--surface);
    border: var(--rule-width) solid var(--rule);
    border-radius: var(--radius);
}

.newsletter__heading {
    margin: 0;
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--ink-muted);
}

.newsletter__note {
    margin-block: var(--space-2xs) 0;
    max-width: var(--measure-narrow);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading);
    color: var(--ink);
}

/* ---------------------------------------------------------------------------
 * Form
 *
 * Field and button share a row once there is room; below that they stack full
 * width, which is the only sane target size on a phone.
 * ------------------------------------------------------------------------- */

.newsletter__form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    margin-block-start: var(--space-m);
}

.newsletter__input {
    flex: 1 1 14rem;
    min-width: 0;
    padding: var(--space-2xs) var(--space-xs);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    color: var(--ink);
    background-color: var(--paper);
    /* --ink-muted, not --rule. This is a control boundary, so WCAG 1.4.11
     * wants 3:1 against both the field's own fill and the well behind it;
     * --rule manages 1.35:1 and 1.25:1, which is nothing. --ink-muted is
     * 5.10:1 light / 5.59:1 dark. The well's own hairline stays --rule
     * because that one is decoration, not a control. */
    border: var(--rule-width) solid var(--ink-muted);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}

.newsletter__input::-moz-placeholder {
    color: var(--ink-muted);
    opacity: 1;
}

.newsletter__input::placeholder {
    color: var(--ink-muted);
    opacity: 1;
}

.newsletter__input:hover {
    border-color: var(--ink);
}

.newsletter__button {
    flex: 0 0 auto;
    position: relative;
    padding: var(--space-2xs) var(--space-m);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-wide);
    color: var(--paper);
    background-color: var(--accent);
    border: var(--rule-width) solid var(--accent);
    border-radius: var(--radius);
    transition: background-color var(--transition), border-color var(--transition);
}

.newsletter__button:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Only one of the two labels is ever in flow. The idle label is removed
 * outright while loading so the button does not change width. */
.newsletter__button-label--loading {
    display: none;
}

.newsletter__form.loading .newsletter__button-label {
    display: none;
}

.newsletter__form.loading .newsletter__button-label--loading {
    display: inline;
}

.newsletter__form.loading .newsletter__button,
.newsletter__form.success .newsletter__button {
    pointer-events: none;
    opacity: 0.65;
}

.newsletter__form.loading .newsletter__input,
.newsletter__form.success .newsletter__input {
    pointer-events: none;
    opacity: 0.65;
}

/* ---------------------------------------------------------------------------
 * Messages
 *
 * Both live in the DOM at all times so assistive technology has a region to
 * announce into; visibility is what changes.
 * ------------------------------------------------------------------------- */

.newsletter__message {
    flex: 1 0 100%;
    margin: 0;
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
}

.newsletter__message:empty {
    display: none;
}

.newsletter__message--error {
    color: var(--accent);
}

.newsletter__message--error:not(:empty) {
    margin-block-start: var(--space-2xs);
}

.newsletter__message--success {
    display: none;
    color: var(--ink-muted);
}

.newsletter__form.success .newsletter__message--success {
    display: block;
    margin-block-start: var(--space-2xs);
}

/* Ghost marks a malformed address without ever sending a request. */
.newsletter__form.invalid .newsletter__input,
.newsletter__form.error .newsletter__input {
    border-color: var(--accent);
}
/* Aubersa — search.
 *
 * WHAT WE CONTROL AND WHAT WE DO NOT
 *
 * Ghost's search is Sodo Search, a separate React app injected by
 * {{ghost_head}}. It mounts into #sodo-search-root and ships its own compiled
 * stylesheet, loaded after ours and written against its own generated class
 * names. Those class names are build artefacts of Ghost, not a public API, so
 * this file deliberately does not target them: a rule written against them
 * would break silently on the next Ghost release, which is worse than being
 * unstyled.
 *
 * So the split is:
 *
 *   Ours       the trigger button in the site chrome (below), and the stacking
 *              position of the mount point so the modal is never trapped under
 *              the nav.
 *   Ghost's    the modal itself — panel, input, result rows, keyboard hints.
 *              Its one tunable is the publication's accent colour, set in
 *              Ghost admin under Settings -> Design -> Brand. Set that to the
 *              value of --accent for the chosen skin and the modal will sit in
 *              the same family as the rest of the site. There is no way to
 *              make it follow the theme toggle: Sodo Search reads the OS
 *              colour scheme, not our data-theme attribute.
 *
 * The trigger: Ghost opens search when a click lands on any element carrying
 * data-ghost-search. Both selectors below are honoured so the markup can use
 * the attribute alone (which is what makes it work) and the class only for
 * clarity.
 *
 * Both are excluded when the trigger already carries .icon-button. That class
 * is the shared control shape owned by components/_nav.css, and this file is
 * imported after it, so an unscoped [data-ghost-search] rule would quietly
 * win and give the search button different padding, a different hover colour
 * and a different icon size from the theme toggle sitting next to it.
 *
 * Tokens only.
 */

.search-toggle:not(.icon-button),
[data-ghost-search]:not(.icon-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xs);
    padding: var(--space-3xs) var(--space-2xs);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
    background: none;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--transition);
}

.search-toggle:not(.icon-button):hover,
[data-ghost-search]:not(.icon-button):hover {
    color: var(--accent);
}

/* Icon-only triggers still need a comfortable target. */
.search-toggle:not(.icon-button) svg,
[data-ghost-search]:not(.icon-button) svg {
    width: 1.125em;
    height: 1.125em;
}

/* The mount point is a bare div until the app boots. Give it a stacking
 * position now so the modal cannot appear beneath the site nav, and make sure
 * it never occupies layout space while empty. */
#sodo-search-root {
    position: relative;
    z-index: var(--z-overlay);
}

#sodo-search-root:empty {
    display: none;
}

/* Layouts — per-template composition only. */
/* Aubersa — home / latest entries layout (index.hbs).
 *
 * Composition only. This file owns the reading column and the two feed
 * headers; it does not style the entries themselves (components/_post-card.css)
 * or the pager (components/_pagination.css).
 *
 * The rhythm between entries belongs to the card, not to the feed: .post-card
 * separates itself with a hairline and --space-xl of padding on each side of
 * it, and .post-card:first-child drops that hairline. So the feed adds no gap
 * of its own — a gap here would push the hairlines away from the entries they
 * divide. Anything added to the feed must keep the cards as direct children,
 * or that :first-child rule stops matching.
 */

/* ---------------------------------------------------------------------------
 * The column
 *
 * Every block on the page shares one measure: the reading column plus a
 * gutter on each side, so the masthead, the entries, and the pager all line
 * up on the same two vertical edges at every viewport.
 * ------------------------------------------------------------------------ */

.masthead,
.feed-header,
.feed,
.feed-pagination {
    width: 100%;
    max-width: calc(var(--content-width) + (var(--space-gutter) * 2));
    margin-inline: auto;
    padding-inline: var(--space-gutter);
}

/* .feed-page itself is left unstyled on purpose: it is a hook, not a box.
 * The space below the last entry is already the sum of the card's bottom
 * padding and the site footer's --space-section top margin, and adding a
 * third contribution here would only push the footer off the fold. */

/* ---------------------------------------------------------------------------
 * Masthead — page one only
 *
 * Left-aligned rather than centred: a title page would be ceremonial, and
 * this wants to read as the top of a notebook. No rule beneath it — the nav
 * already draws one, and two hairlines in succession is chrome.
 * ------------------------------------------------------------------------ */

.masthead {
    padding-block: var(--space-2xl) var(--space-xl);
}

.masthead-title {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    text-wrap: balance;
}

.masthead-description {
    max-width: var(--measure-narrow);
    margin: var(--space-s) 0 0;
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-style: italic;
    line-height: var(--leading-snug);
    text-wrap: pretty;
}

/* ---------------------------------------------------------------------------
 * Continuation header — page two onwards
 *
 * Quieter than the masthead but still carries the page's <h1>, so the
 * heading order holds up on every paged view.
 * ------------------------------------------------------------------------ */

.feed-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2xs) var(--space-m);
    padding-block: var(--space-2xl) var(--space-m);
    border-block-end: var(--rule-width) solid var(--rule);
}

.feed-header-title {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

.feed-header-meta {
    margin: 0;
    color: var(--ink-muted);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
}

/* ---------------------------------------------------------------------------
 * The feed
 *
 * Deliberately undecorated. A three-hundred word entry and an eight-thousand
 * word entry are separated by the same amount of air, because the separation
 * comes from the card's own padding rather than from anything measured here.
 * ------------------------------------------------------------------------ */

.feed-empty {
    margin: 0;
    padding-block: var(--space-2xl);
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-style: italic;
    line-height: var(--leading);
}

/* ---------------------------------------------------------------------------
 * Pager
 *
 * The wrapper exists only to hold the pager in the same column as everything
 * above it. .pagination brings its own hairline and its own top margin — but
 * that margin assumes it follows content that ends flush, and the last card
 * already contributes --space-xl of bottom padding. Left alone the two
 * compound into a screenful of nothing, so the margin is dropped here and the
 * card's padding does the work.
 * ------------------------------------------------------------------------ */

.feed-pagination .pagination {
    margin-block-start: 0;
}
/* Aubersa — single diary entry (post.hbs).
 *
 * Owner: post agent.
 *
 * The entry header, the feature image, the members paywall, the two
 * neighbouring entries, and the short list of related entries. Everything
 * inside the entry body is styled in base/_typography.css.
 *
 * The header, the entry navigation and the related list sit on `.gh-canvas`,
 * so their text hangs from exactly the same left edge as the prose. That one
 * shared axis is most of what makes the page feel set rather than assembled.
 *
 * Tokens only.
 */

/* ==========================================================================
 * 1. Header
 * ========================================================================== */

.entry-header {
    padding-top: var(--space-section);
    padding-bottom: var(--space-l);
}

/* The date leads. This is a diary: the day is the first fact about an entry.
 * The short accent rule above it is the only ornament on the page. */
.entry-date {
    display: block;
    font-family: var(--font-body);
    font-size: var(--step-1);
    font-weight: var(--weight-normal);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
    font-variant-numeric: oldstyle-num proportional-nums;
}

.entry-date::before {
    content: "";
    display: block;
    width: var(--space-l);
    height: var(--rule-width-thick);
    margin-bottom: var(--space-m);
    background-color: var(--accent);
}

/* The optical pull-back stops the title's left side bearing reading as an
 * indent against the prose below it. */
.entry-title {
    margin-top: var(--space-xs);
    margin-left: -0.03em;
    font-family: var(--font-display);
    font-size: var(--step-4);
    font-weight: var(--weight-medium);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-wrap: balance;
}

.entry-standfirst {
    max-width: var(--measure-narrow);
    margin-top: var(--space-m);
    font-size: var(--step-1);
    font-style: italic;
    line-height: var(--leading-snug);
    color: var(--ink-muted);
    text-wrap: pretty;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-s);
    margin-top: var(--space-l);
    padding: 0;
    list-style: none;
}

.entry-tag {
    display: inline-block;
    padding-block: var(--space-3xs);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-muted);
    transition: color var(--transition);
}

.entry-tag:hover {
    color: var(--accent);
}

.entry-length {
    margin-top: var(--space-2xs);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
}

/* ==========================================================================
 * 2. Feature image
 *
 * Wider than the measure but never full bleed: an entry should still read as
 * a page in a book, not as a magazine spread.
 * ========================================================================== */

.entry-image {
    max-width: var(--content-width-wide);
    margin: var(--space-l) auto var(--space-xl);
    padding-inline: var(--space-gutter);
}

.entry-image img {
    width: 100%;
    border-radius: var(--radius);
}

.entry-image figcaption {
    max-width: var(--measure-narrow);
    margin: var(--space-s) auto 0;
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
    text-align: center;
    text-wrap: pretty;
}

.entry-content {
    padding-bottom: var(--space-xl);
}

/* ==========================================================================
 * 3. Members paywall
 *
 * Rendered only when the entry is gated. Paid tiers are dormant, so this is
 * usually invisible — but it must be as quiet as everything else when it
 * does appear.
 * ========================================================================== */

.entry-locked {
    width: min(var(--content-width), 100% - var(--space-gutter) * 2);
    margin-inline: auto;
    margin-block: var(--space-l) var(--space-xl);
    padding: var(--space-2xl) var(--space-l);
    background-color: var(--surface);
    border: var(--rule-width) solid var(--rule);
    border-radius: var(--radius);
    text-align: center;
}

.entry-locked-title {
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: var(--weight-medium);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-wrap: balance;
}

.entry-locked-text {
    max-width: var(--measure-narrow);
    margin: var(--space-s) auto 0;
    color: var(--ink-muted);
    text-wrap: pretty;
}

.entry-locked-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 44px: the minimum comfortable target size, not a design value. */
    min-height: 2.75rem;
    margin-top: var(--space-l);
    padding: var(--space-2xs) var(--space-l);
    background-color: transparent;
    border: var(--rule-width) solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    text-decoration: none;
    transition:
        background-color var(--transition),
        color var(--transition);
}

.entry-locked-action:hover {
    background-color: var(--accent);
    color: var(--paper);
}

.entry-locked-alt {
    margin-top: var(--space-m);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    color: var(--ink-muted);
}

.entry-locked-alt a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-underline-offset: 0.17em;
    transition:
        color var(--transition),
        text-decoration-color var(--transition);
}

.entry-locked-alt a:hover {
    color: var(--link-hover);
    text-decoration-color: currentColor;
}

/* ==========================================================================
 * 4. Neighbouring entries
 *
 * Two stacked rows rather than two columns: the previous entry sits to the
 * left and the next one to the right, so the direction of travel is legible
 * at any width without a breakpoint.
 * ========================================================================== */

.entry-nav {
    padding-block: var(--space-xl);
}

/* Nothing to show at either end of the archive. */
.entry-nav:not(:has(a)) {
    display: none;
}

.entry-nav-link {
    display: block;
    padding-block: var(--space-m);
    border-top: var(--rule-width) solid var(--rule);
    color: var(--ink);
    text-decoration: none;
    transition: border-color var(--transition);
}

.entry-nav-link:last-of-type {
    border-bottom: var(--rule-width) solid var(--rule);
}

.entry-nav-link:hover {
    border-color: var(--accent);
}

.entry-nav-label {
    display: block;
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--ink-muted);
}

.entry-nav-title {
    display: block;
    margin-top: var(--space-3xs);
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: var(--weight-normal);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-wrap: pretty;
    transition: color var(--transition);
}

.entry-nav-link:hover .entry-nav-title {
    color: var(--accent);
}

.entry-nav-date {
    display: block;
    margin-top: var(--space-3xs);
    font-size: var(--step--1);
    color: var(--ink-muted);
    font-variant-numeric: oldstyle-num proportional-nums;
}

.entry-nav-next {
    text-align: right;
}

/* ==========================================================================
 * 5. Related entries
 * ========================================================================== */

.entry-related {
    padding-block: var(--space-xl) var(--space-section);
}

.entry-related-heading {
    padding-bottom: var(--space-s);
    border-bottom: var(--rule-width) solid var(--rule);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--ink-muted);
}

.entry-related-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.entry-related-item {
    padding-block: var(--space-m);
    border-bottom: var(--rule-width) solid var(--rule);
}

.entry-related-link {
    display: block;
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: var(--weight-normal);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-decoration: none;
    text-wrap: pretty;
    transition: color var(--transition);
}

.entry-related-link:hover {
    color: var(--accent);
}

.entry-related-date {
    display: block;
    margin-top: var(--space-3xs);
    font-size: var(--step--1);
    color: var(--ink-muted);
    font-variant-numeric: oldstyle-num proportional-nums;
}
/* Aubersa — static page layout (page.hbs, custom-wide.hbs).
 *
 * A page is a standing document, not a dated entry: no meta row, no tags, no
 * date. It gets more air above the title, so it reads as something set apart
 * from the chronology — but it shares the site's single reading column. It
 * used to be ~50px wider than a post, which put a fourth left edge on the
 * site; that is now a mistake we cannot make, because --content-width is an
 * alias of --measure (tokens/_base.css).
 *
 * Two custom properties do all the work:
 *   --page-column   the outer canvas — how far a feature image or a full-width
 *                   Koenig card is allowed to spread
 *   --page-measure  the reading column — everything else is held to this
 * On page.hbs the canvas is the measure plus its two gutters, so nothing
 * breaks out. custom-wide.hbs only widens --page-column, which is what makes
 * it the full-bleed variant.
 */

.page-article {
    --page-column: calc(var(--content-width) + var(--space-gutter) * 2);
    --page-measure: var(--content-width);

    max-width: var(--page-column);
    margin-inline: auto;
    padding-inline: var(--space-gutter);
    padding-block: var(--space-section) var(--space-3xl);
}

.page-article--wide {
    --page-column: var(--content-width-full);
}

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

.page-header {
    margin-block-end: var(--space-2xl);
}

/* Everything in the header is held to the reading column and centred inside
 * the canvas; the feature image below opts out. */
.page-header > * {
    max-width: var(--page-measure);
    margin-inline: auto;
}

.page-title {
    font-family: var(--font-display);
    font-size: var(--step-4);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-wrap: balance;
}

.page-excerpt {
    margin-block-start: var(--space-m);
    font-family: var(--font-body);
    font-size: var(--step-1);
    font-weight: var(--weight-normal);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
    max-width: var(--measure-narrow);
    text-wrap: pretty;
}

/* The one element allowed the full canvas. */
.page-feature-image {
    max-width: none;
    margin-block-start: var(--space-xl);
}

.page-feature-image img {
    width: 100%;
    border-radius: var(--radius);
}

.page-feature-image figcaption {
    margin-block-start: var(--space-xs);
    max-width: var(--page-measure);
    margin-inline: auto;
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
}

/* ---------------------------------------------------------------------------
 * Content
 *
 * The element also carries .gh-content, so the Koenig card styling from the
 * post layer applies. These rules only re-seat the column: they are scoped to
 * .page-article so nothing here can leak into an entry.
 * ------------------------------------------------------------------------ */

/* .gh-content is a self-guttering grid: its outer tracks are
 * minmax(--space-gutter, 1fr) and its main track is
 * min(--measure, 100% - --space-gutter * 2). .page-article has already spent
 * that gutter as padding, so left alone the two stack and the prose ends up
 * inset a further gutter from the page title. Zero the grid's own gutter here
 * and let the container keep owning it — the header and the body then resolve
 * to the same column. */
.page-article .page-content {
    --canvas-main: min(var(--page-measure), 100%);
    --canvas-full: minmax(0, 1fr);

    max-width: none;
}

.page-article .page-content > * {
    max-width: var(--page-measure);
    margin-inline: auto;
}

/* Wide and full-width Koenig cards spread to the canvas instead. On page.hbs
 * the canvas equals the measure, so they simply stay put; on custom-wide.hbs
 * they are the reason the template exists. */
.page-article .page-content > .kg-width-wide {
    max-width: min(var(--page-column), var(--content-width-wide));
}

.page-article .page-content > .kg-width-full {
    max-width: var(--page-column);
}

/* A page ends where it ends — no author card, no next/previous, nothing to
 * click on afterwards. The trailing rule is the only closure it gets. */
/* grid-column is not optional here. .page-content is also .gh-content, whose
 * `> *` placement rule uses the universal selector — and `*` never matches a
 * pseudo-element. Without this the ornament is auto-placed into a gutter
 * track, where it renders as a stray hairline in the right margin and
 * overflows the track, pushing the page into horizontal scroll on phones. */
.page-content::after {
    content: "";
    display: block;
    grid-column: main;
    width: var(--space-xl);
    margin-block-start: var(--space-2xl);
    margin-inline: auto;
    border-top: var(--rule-width) solid var(--rule);
}
/* Aubersa — taxonomy archive layout (tag.hbs, author.hbs).
 *
 * Both templates share one shell, because they answer the same question:
 * "which entries belong to this?" The heading states the grouping once and
 * then hands the page to the entries. The cards and the pager style
 * themselves — this file only positions them.
 */

/* One formula for every reading column on the site: the measure plus a gutter
 * on each side. Matches .masthead/.feed (_index.css), .archive (_archive.css)
 * and .page-article (_page.css) exactly, so all four share one left edge. */
.taxonomy {
    max-width: calc(var(--content-width) + var(--space-gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--space-gutter);
    padding-block: var(--space-section) var(--space-3xl);
}

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

.taxonomy-header {
    margin-block-end: var(--space-2xl);
    padding-block-end: var(--space-m);
    border-bottom: var(--rule-width) solid var(--rule);
}

/* "Tagged" / "Written by" — the label that makes the title unambiguous
 * without spending a sentence on it. */
.taxonomy-kicker {
    font-family: var(--font-ui);
    font-size: var(--step--2);
    font-weight: var(--weight-medium);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--ink-muted);
}

.taxonomy-title {
    margin-block-start: var(--space-xs);
    font-family: var(--font-display);
    font-size: var(--step-4);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-wrap: balance;
}

.taxonomy-description {
    margin-block-start: var(--space-m);
    font-family: var(--font-body);
    font-size: var(--step-1);
    line-height: var(--leading-snug);
    color: var(--ink-muted);
    max-width: var(--measure-narrow);
    text-wrap: pretty;
}

.taxonomy-count {
    margin-block-start: var(--space-m);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
    color: var(--ink-muted);
}

/* ---------------------------------------------------------------------------
 * Feed
 *
 * Deliberately no gap. A .post-card carries its own padding-block and a
 * border-top hairline, and drops that hairline on :first-child — a gap here
 * would double the spacing and detach every rule from the card it divides.
 * Cards must stay direct children for that :first-child rule to hold.
 * ------------------------------------------------------------------------ */

.taxonomy-feed {
    display: block;
}

.taxonomy-empty {
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading);
    font-style: italic;
    color: var(--ink-muted);
}
/* Aubersa — full archive grouped by year (page-archive.hbs).
 *
 * A ledger, not a feed: one line per entry, title left, date right, years as
 * quiet section headings. Dense enough that a decade fits in a few screens,
 * loose enough that it is still comfortable to read down.
 */

.archive {
    width: 100%;
    max-width: calc(var(--content-width) + (var(--space-gutter) * 2));
    margin-inline: auto;
    padding-inline: var(--space-gutter);
    /* The foot is deliberately lighter than the head: the site footer already
     * carries --space-section above itself. */
    padding-block: var(--space-2xl) var(--space-xl);
}

/* ---------------------------------------------------------------------------
 * Header — the Ghost page's own title and, if it has one, its body copy.
 * ------------------------------------------------------------------------ */

.archive-title {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    text-wrap: balance;
}

.archive-intro {
    max-width: var(--measure-narrow);
    margin: var(--space-s) 0 0;
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-style: italic;
    line-height: var(--leading-snug);
    text-wrap: pretty;
}

/* Also carries .gh-content, which is a self-guttering grid. .archive has
 * already spent that gutter as padding, so left alone the intro paragraph is
 * inset a further gutter from the "Archive" title above it and the count
 * below it. Zero the grid's own gutter and let the container keep owning it.
 * See the same note in layouts/_page.css. */
.archive-note {
    --canvas-main: min(var(--measure), 100%);
    --canvas-full: minmax(0, 1fr);

    margin-block-start: var(--space-m);
}

/* ---------------------------------------------------------------------------
 * Count — a single restrained line of orientation, set in the UI face so it
 * reads as apparatus rather than as writing.
 * ------------------------------------------------------------------------ */

.archive-count {
    margin: var(--space-m) 0 var(--space-2xl);
    padding-block-end: var(--space-s);
    border-block-end: var(--rule-width) solid var(--rule);
    color: var(--ink-muted);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------
 * Year groups
 * ------------------------------------------------------------------------ */

.archive-year {
    margin-block-start: var(--space-2xl);
}

.archive-year:first-of-type {
    margin-block-start: 0;
}

.archive-year-title {
    margin: 0 0 var(--space-xs);
    color: var(--ink-muted);
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-wide);
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------
 * Rows
 *
 * The whole row is the target. Title and date sit on a shared baseline, so a
 * title that wraps to two lines keeps its date pinned to the first line.
 * ------------------------------------------------------------------------ */

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

.archive-item + .archive-item {
    border-block-start: var(--rule-width) solid var(--rule);
}

.archive-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-m);
    padding-block: var(--space-xs);
    color: var(--ink);
    text-decoration: none;
    transition: color var(--transition);
}

.archive-entry-title {
    min-width: 0;
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading-snug);
    text-wrap: pretty;
}

.archive-date {
    flex: none;
    color: var(--ink-muted);
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

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

.archive-link:hover .archive-entry-title {
    text-decoration: underline;
    text-decoration-thickness: var(--rule-width);
    text-decoration-color: var(--link-underline);
    text-underline-offset: 0.18em;
}

.archive-link:focus-visible {
    outline: var(--rule-width-thick) solid var(--focus-ring);
    outline-offset: var(--space-3xs);
}

.archive-empty {
    margin: 0;
    padding-block: var(--space-2xl);
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-style: italic;
    line-height: var(--leading);
}
/* Aubersa — error layout (error.hbs, and Ghost's 404 which uses it).
 *
 * A dead end should feel like a pause, not an incident. One narrow centred
 * column, a lot of air around it, the status code kept small and grey, and two
 * ways out. No illustration, no apology.
 */

.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    max-width: var(--content-width);
    margin-inline: auto;
    padding-inline: var(--space-gutter);
    padding-block: var(--space-3xl);
    min-height: 60svh;
}

/* The code is diagnostic, not the message — it stays quiet. */
.error-code {
    font-family: var(--font-ui);
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-caps);
    font-variant-numeric: tabular-nums;
    color: var(--ink-muted);
}

.error-title {
    margin-block-start: var(--space-m);
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    text-wrap: balance;
}

.error-note {
    margin-block-start: var(--space-s);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading);
    color: var(--ink-muted);
    max-width: var(--measure-narrow);
    text-wrap: pretty;
}

/* ---------------------------------------------------------------------------
 * Ways out
 * ------------------------------------------------------------------------ */

.error-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-m);
    margin-block-start: var(--space-xl);
    padding-block-start: var(--space-xl);
    border-top: var(--rule-width) solid var(--rule);
    width: 100%;
    max-width: var(--measure-narrow);
}

.error-link {
    font-family: var(--font-ui);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-decoration-thickness: var(--rule-width);
    text-underline-offset: 0.25em;
    transition: color var(--transition), text-decoration-color var(--transition);
}

.error-link:hover,
.error-link:focus-visible {
    color: var(--link-hover);
    text-decoration-color: currentColor;
}
