/* --- Fonts: local woff2 only, no third-party request --- */
/* JetBrains Mono: used for small labels and tags (variable, weights 400 to 500) */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
    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: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(fonts/source-sans-3-latin-wght.woff2) format('woff2');
    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: 'Doto';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(fonts/doto-latin-wght.woff2) format('woff2');
}

/* --- Tokens --- */
:root {
    --color-accent: #88c99a;
    /* Accent for the light theme */
    --color-accent-on-light: #35603f;

    --font-board: 'Doto', var(--font-label);
    --board-weight: 700;
    --board-max: 98px;
    --color-board-cell: var(--color-portrait-tile);
    --color-board-char: var(--color-accent);
    --color-transparent: transparent;

    /* Dark theme (default) */
    --color-bg: #0a0f0a;
    --color-portrait-tile: #141c15;
    --color-text: #f2f6f2;
    --color-text-muted: #96ad98;
    --color-line: #253026;
    --color-toggle-track: #253026;
    --color-toggle-knob: #f2f6f2;
    --color-control-border: #6b7f6d;
    /* Tint behind a tag that opens a service page */
    --color-tag-link-bg: #1a2e20;

    /* Light theme values, switched in by [data-theme="light"]: a pastel grey page, not white */
    --light-bg: #e2e5e3;
    --light-portrait-tile: #d3d9d5;
    --light-board-char: var(--color-accent-on-light);
    --light-text: #131c14;
    --light-text-muted: #4a5a4c;
    --light-line: #c3c9c4;
    --light-toggle-track: #cfd5d0;
    --light-toggle-knob: #131c14;
    --light-control-border: #6f7a70;
    --light-tag-link-bg: #c9d9cd;

    --shadow-menu: 0 25px 50px -12px rgba(0, 0, 0, 0.55);

    --font-label: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, 'Cascadia Mono', monospace;
    --font-text: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --gutter: 1rem;
    --ease: 0.3s ease;

    color-scheme: dark;
}

:root[data-theme="light"] {
    --color-accent: var(--color-accent-on-light);
    --color-bg: var(--light-bg);
    --color-portrait-tile: var(--light-portrait-tile);
    --color-board-char: var(--light-board-char);
    --color-text: var(--light-text);
    --color-text-muted: var(--light-text-muted);
    --color-line: var(--light-line);
    --color-toggle-track: var(--light-toggle-track);
    --color-toggle-knob: var(--light-toggle-knob);
    --color-control-border: var(--light-control-border);
    --color-tag-link-bg: var(--light-tag-link-bg);
    color-scheme: light;
}

@media (min-width: 768px) {
    :root {
        --gutter: 1.5rem;
    }
}

/* --- Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 5.5rem;
}

html:not(.js) {
    scroll-padding-top: 8rem;
}

[hidden] {
    display: none !important;
}

body {
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-text);
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

ul {
    list-style: none;
}

svg {
    display: block;
}

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

.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    z-index: 200;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    font-family: var(--font-label);
    font-size: 0.875rem;
    transform: translate(-50%, -300%);
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

/* --- Header: menu button on the left, theme toggle on the right --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 0.75rem var(--gutter);
    background: var(--color-bg);
}

.site-header.is-scrolled {
    border-bottom: 1px solid var(--color-line);
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1536px;
    margin: 0 auto;
}

.menu {
    position: relative;
}

.menu-btn {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    color: var(--color-text-muted);
}

.menu-btn:hover,
.menu-btn[aria-expanded="true"] {
    color: var(--color-text);
}

.menu-btn svg {
    width: 2rem;
    height: 2rem;
}

.menu-btn .icon-close,
.menu-btn[aria-expanded="true"] .icon-open {
    display: none;
}

.menu-btn[aria-expanded="true"] .icon-close {
    display: block;
}

.menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    width: 200px;
    margin: 0.5rem 0 0 1rem;
    padding: 1rem;
    border: 1px solid var(--color-line);
    border-radius: 0.5rem;
    background: var(--color-bg);
    box-shadow: var(--shadow-menu);
}

/* With JavaScript the panel is a drop-down, closed until the button opens it.
   On a short screen it scrolls instead of running off the bottom. */
.js .menu-panel {
    display: none;
    max-height: calc(100vh - 5rem);
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
}

.js .menu-btn[aria-expanded="true"] + .menu-panel {
    display: block;
}

.menu-panel a {
    display: block;
    padding: 0.375rem 0.5rem;
    font-family: var(--font-text);
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.menu-panel a:hover,
.menu-panel a[aria-current] {
    color: var(--color-accent);
}

.menu-lang {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-line);
}

.menu-lang a {
    color: var(--color-text-muted);
}

.theme-toggle {
    position: relative;
    width: 4rem;
    height: 2rem;
    border: 1px solid var(--color-control-border);
    border-radius: 999px;
    background: var(--color-toggle-track);
}

/* hover dims the knob only, so the switch keeps its visible boundary */
.theme-toggle:hover .theme-knob {
    opacity: 0.8;
}

.theme-toggle:focus-visible {
    border-radius: 999px;
}

.theme-knob {
    position: absolute;
    top: calc(0.25rem - 1px);
    left: calc(0.25rem - 1px);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--color-toggle-knob);
    transform: translateX(2rem);
}

[data-theme="light"] .theme-knob {
    transform: translateX(0);
}

/* --- Hero --- */
.hero {
    display: grid;
    justify-items: center;
    /* equal rows above and below keep the lockup at the centre of the screen;
       the top row never gets shorter than the fixed header */
    grid-template-rows: minmax(6rem, 1fr) auto minmax(min-content, 1fr);
    min-height: 100vh;
    min-height: 100svh;
    padding: 0 var(--gutter);
}

.name-block {
    /* The group: portrait tile on the left, the departure board on the right (owner, 2026-11-23).
       Board: 2 rows x 12 cells; the tile is as high as the two rows. One font-size drives everything:
       board 12 x 0.7em + 11 x 0.08em = 9.28em wide, group 1.6em + 0.25em + 9.28em = 11.13em wide. */
    --cell-w: 0.7em;
    --cell-h: 1em;
    --cell-gap: 0.08em;
    --cell-radius: 0.1em;
    --glyph-scale: 0.78;
    --glyph-lift: 0.076em;
    --board-h: calc(2 * var(--cell-h) + var(--cell-gap));
    --portrait-h: var(--board-h);
    --portrait-w: calc(var(--portrait-h) / 1.3);
    --portrait-gap: 0.25em;
    --board-share: 0.8;
    position: relative;
    grid-row: 2;
    display: flex;
    align-items: flex-start;
    gap: var(--portrait-gap);
    font-size: min(var(--board-max), (100vw - 2 * var(--gutter)) * var(--board-share) / 11.13, 15vh);
}

/* Capitals have no tails below the line: no lift needed */
:root[data-name="upper"] .name-block {
    --glyph-lift: 0em;
}

/* The source spells the name "Sven Schlinkmann"; lower case is the owner's choice of 2026-11-23. */
.name {
    display: flex;
    flex-direction: column;
    gap: var(--cell-gap);
    flex: none;
    font-family: var(--font-board);
    font-size: inherit;
    font-weight: var(--board-weight);
    line-height: var(--cell-h);
    text-transform: lowercase;
    color: var(--color-board-char);
}

.name-line {
    display: flex;
    gap: var(--cell-gap);
    justify-content: flex-start;
    white-space: nowrap;
}

/* Preview only: ?name=upper shows SVEN SCHLINKMANN, ?name=title shows Sven Schlinkmann. */
:root[data-name="upper"] .name {
    text-transform: uppercase;
}

:root[data-name="title"] .name {
    text-transform: none;
}

.name .ch {
    /* The letter is 78 % of the board size; sizes are divided by the scale so the cell keeps its size.
       --glyph-lift moves the letter up so tall letters and tails are centred in the cell (measured for Doto). */
    flex: none;
    box-sizing: border-box;
    font-size: calc(var(--glyph-scale) * 1em);
    width: calc(var(--cell-w) / var(--glyph-scale));
    height: calc(var(--cell-h) / var(--glyph-scale));
    padding-bottom: calc(2 * var(--glyph-lift) / var(--glyph-scale));
    line-height: calc((var(--cell-h) - 2 * var(--glyph-lift)) / var(--glyph-scale));
    text-align: center;
    background: var(--color-board-cell);
    border-radius: calc(var(--cell-radius) / var(--glyph-scale));
}

.ch {
    display: block;
}

/* Portrait: a CSS background on a div, never an <img> (project rule).
   A tile with rounded corners (owner, 2026-11-23): the person cut-out portrait-cutout-352.webp on a tone just
   off the page background. It stands to the left of the board on every screen size and is as high as the two rows of cells.
   ?portrait=photo shows the original photo with its own dark background instead (preview only). */
.portrait {
    position: relative;
    flex: none;
    order: -1;
    z-index: 10;
    width: var(--portrait-w);
    height: var(--portrait-h);
    margin-top: 0;
    background-color: var(--color-portrait-tile);
    background-image: url(portrait-cutout-352.webp);
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: cover;
    border-radius: calc(var(--portrait-w) * 0.12);
    transform-origin: 50% 50%;
}

:root[data-portrait="photo"] .portrait {
    background-image: url(portrait-photo-352.webp);
}

@media (max-width: 639.98px) {
    .name-block {
        --board-share: 1;
    }
}

.hero-foot {
    grid-row: 3;
    align-self: end;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0 1.5rem;
}

.tagline {
    max-width: 44rem;
    font-size: clamp(0.9375rem, 0.72rem + 0.9vw, 1.375rem);
    line-height: 1.45;
    text-align: center;
    color: var(--color-text-muted);
}

.tagline:hover {
    color: var(--color-text);
}

.w {
    display: inline-block;
}

.scroll-cue {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    color: var(--color-text-muted);
}

.scroll-cue:hover {
    color: var(--color-text);
}

.scroll-cue svg {
    width: 1.25rem;
    height: 1.25rem;
}

@media (min-width: 768px) {
    .menu-panel {
        width: 240px;
    }

    .menu-panel a {
        font-size: 1.25rem;
    }

    .hero-foot {
        gap: 2rem;
        padding-bottom: 2.5rem;
    }

    .scroll-cue svg {
        width: 2rem;
        height: 2rem;
    }
}

/* --- Page sections --- */
.pillars,
.section,
.site-footer {
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
    border-top: 1px solid var(--color-line);
}

.pillars,
.section {
    padding-block: clamp(4rem, 9vw, 7.5rem);
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    overflow-wrap: anywhere;
}

.pillars {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4rem;
}

@media (min-width: 900px) {
    .pillars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: clamp(2rem, 5vw, 5rem);
    }
}

.eyebrow {
    margin-bottom: 1.5rem;
    font-family: var(--font-label);
    font-size: 0.8125rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
}

.headline {
    font-family: var(--font-text);
    font-weight: 300;
    font-size: clamp(1.375rem, 1rem + 1.9vw, 2.125rem);
    line-height: 1.15;
    letter-spacing: 0;
    color: var(--color-text);
}

.pillar-line {
    margin: 1rem 0 2rem;
    color: var(--color-text-muted);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags li {
    max-width: 100%;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--color-line);
    border-radius: 0.375rem;
    font-family: var(--font-label);
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--color-text);
    overflow-wrap: anywhere;
}

/* Tags that open a service page: green tint, green border and text, and a small arrow, so they stand out at rest */
.tags .tag-link {
    display: grid;
    padding: 0;
    border-color: var(--color-accent);
    background: var(--color-tag-link-bg);
}

.tags .tag-link a {
    display: block;
    padding: 0.375rem 0.625rem;
    border-radius: inherit;
    color: var(--color-accent);
    text-decoration: none;
}

/* The arrow is drawn with borders: no glyph, no file, nothing for a screen reader to read */
.tags .tag-link a::after {
    content: "";
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-left: 0.5em;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: translateY(-0.1em) rotate(45deg);
}

/* Hover and keyboard focus: filled like the contact button */
.tags .tag-link a:hover,
.tags .tag-link a:focus-visible {
    background: var(--color-accent);
    color: var(--color-bg);
}

.tags--quiet li {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 1.125rem;
    font-family: var(--font-label);
    font-size: 0.875rem;
    /* buttons carry the pastel green of the page, never white (owner, 2026-11-23) */
    border: 1px solid var(--color-accent);
    border-radius: 999px;
    color: var(--color-accent);
    background: var(--color-transparent);
}

.btn:hover,
.btn:focus-visible {
    border-color: var(--color-text);
}

.btn--solid {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.btn--solid:hover {
    opacity: 0.85;
}

.about-text {
    max-width: 46rem;
}

.lead {
    font-weight: 300;
    font-size: clamp(1.25rem, 1rem + 1.4vw, 1.75rem);
    line-height: 1.35;
    color: var(--color-text);
}

.about-text p + p {
    margin-top: 1rem;
    color: var(--color-text-muted);
}

.projects {
    list-style: none;
}

.project {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.5rem;
    padding: 1.5rem 0;
}

.project + .project {
    border-top: 1px solid var(--color-line);
}

@media (min-width: 768px) {
    .project {
        grid-template-columns: 10rem 1fr;
        column-gap: 2rem;
    }
}

.project-when {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.project-body {
    min-width: 0;
}

.project-title {
    font-family: var(--font-text);
    font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
    font-weight: 400;
    line-height: 1.3;
    color: var(--color-text);
    overflow-wrap: anywhere;
}

.project-where {
    margin: 0.25rem 0 0.875rem;
    font-size: 1rem;
    color: var(--color-text-muted);
}

.contact-address {
    font-family: var(--font-label);
    font-size: clamp(1rem, 0.9rem + 0.6vw, 1.25rem);
    overflow-wrap: anywhere;
}

.contact-label {
    color: var(--color-text-muted);
}

.contact-buttons,
.contact-links {
    margin-top: 1.25rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-label);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.contact-icon {
    width: 1.125rem;
    height: 1.125rem;
}

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

.contact-link:hover {
    text-decoration: underline;
}

.contact-fallback a {
    color: var(--color-text);
    text-decoration: underline;
}

.js .contact-fallback,
html:not(.js) .contact-actions {
    display: none;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem var(--gutter) 3rem;
    font-family: var(--font-label);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    text-decoration: underline;
}

/* --- Legal pages --- */
.legal,
.service {
    max-width: 46rem;
    margin-inline: auto;
    padding: 7.5rem var(--gutter) 5rem;
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
    line-height: 1.6;
    color: var(--color-text-muted);
    overflow-wrap: anywhere;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}

.legal-back {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.legal-back:hover,
.legal-back:focus-visible {
    color: var(--color-text);
}

.legal h1,
.service h1 {
    font-family: var(--font-text);
    font-weight: 300;
    font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: 0;
    color: var(--color-text);
}

.legal h1 {
    margin-top: 1.5rem;
}

.legal-translation { margin-top: 0.75rem; color: var(--color-text); }

.legal-subtitle {
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}

.legal h2 {
    font-family: var(--font-label);
    font-weight: 400;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.4;
    color: var(--color-accent);
    margin: 3rem 0 1rem;
}

.legal h3 {
    font-family: var(--font-text);
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.4;
    color: var(--color-text);
    margin: 1.75rem 0 0.5rem;
}

.legal p:not(.legal-nav) + p {
    margin-top: 1rem;
}

.legal ul,
.legal ol {
    margin: 0.75rem 0 0.75rem 1.25rem;
    list-style: disc;
}

.legal ol {
    list-style: decimal;
}

.legal li + li {
    margin-top: 0.375rem;
}

.legal a:not(.legal-back) {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.legal strong {
    color: var(--color-text);
    font-weight: 400;
}

@media (max-width: 639.98px) {
    .legal,
    .service {
        padding-top: 6.5rem;
    }
}

html:not(.js) .legal,
html:not(.js) .service {
    padding-top: 8.5rem;
}

/* --- Service pages --- */
.service h1 {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.service-intro {
    margin-top: 1.25rem;
    font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.3125rem);
    line-height: 1.55;
    color: var(--color-text);
}

.service-block {
    margin-top: 3rem;
}

.service-block h2 {
    margin-bottom: 0.75rem;
    font-family: var(--font-text);
    font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
    font-weight: 400;
    color: var(--color-text);
}

.service-list {
    list-style: none;
}

.service-list > li {
    position: relative;
    padding-left: 1.25rem;
}

.service-list > li::before {
    content: "";
    position: absolute;
    top: 0.8em;
    left: 0;
    width: 0.625rem;
    border-top: 2px solid var(--color-accent);
}

.service-list > li + li {
    margin-top: 0.5rem;
}

.service-projects {
    list-style: none;
    font-size: 0.9375em;
    color: var(--color-text-muted);
}

.service-projects > li {
    border-top: 1px solid var(--color-line);
    padding: 0.75rem 0;
}

.service-contact {
    margin-top: 3.5rem;
    border-top: 1px solid var(--color-line);
    padding-top: 2rem;
}

.service-call {
    margin-bottom: 1.5rem;
    font-weight: 300;
    font-size: clamp(1.25rem, 1.05rem + 1vw, 1.625rem);
    line-height: 1.3;
    color: var(--color-text);
}

.service-contact .contact-fallback {
    margin-top: 1rem;
}

.service-intro a,
.service-list a,
.service-projects a,
.service-call a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 0.2em;
}

:is(.service-intro, .service-list, .service-projects, .service-call) a:is(:hover, :focus-visible) {
    color: var(--color-accent);
}

/* --- Without JavaScript: the menu is an always-visible row, nothing needs a click --- */
html:not(.js) .site-nav {
    justify-content: center;
}

html:not(.js) .menu-btn,
html:not(.js) .theme-toggle {
    display: none;
}

html:not(.js) .menu-panel {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.25rem;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
}

html:not(.js) .menu-panel a {
    font-size: 0.8125rem;
    letter-spacing: 0;
}

html:not(.js) .menu-lang {
    margin: 0;
    padding: 0;
    border: 0;
}


/* --- Motion: only for readers who have not asked for less --- */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    .menu-btn,
    .menu-panel a,
    .tagline,
    .scroll-cue {
        transition: color var(--ease);
    }

    .tags .tag-link a {
        transition: background-color var(--ease), color var(--ease);
    }

    .theme-toggle {
        transition: background-color var(--ease);
    }

    .theme-knob {
        transition: transform var(--ease), background-color var(--ease), opacity var(--ease);
    }

    .portrait {
        transition: transform var(--ease);
    }

    .portrait:hover {
        transform: scale(1.1);
    }

    .btn {
        transition: border-color var(--ease);
    }

    @keyframes blur-in {
        from {
            opacity: 0;
            filter: blur(10px);
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            filter: blur(0);
            transform: none;
        }
    }

    @keyframes portrait-in {
        from {
            opacity: 0;
            filter: blur(10px);
            transform: scale(0.9);
        }

        to {
            opacity: 1;
            filter: blur(0);
            transform: none;
        }
    }

    @keyframes menu-in {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }

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

    /* Letter by letter, 100 ms apart; the portrait comes in with the third letter */
    .ch {
        animation: blur-in 0.5s ease-out both;
        animation-delay: calc(var(--i, 0) * 100ms);
    }

    .portrait {
        /* fill backwards only: a kept end state would override the hover scale */
        animation: portrait-in 0.6s ease-out 200ms backwards;
    }

    /* The tagline, in five parts 150 ms apart */
    .w {
        animation: blur-in 0.5s ease-out both;
        animation-delay: calc(var(--i, 0) * 150ms);
    }

    .js .menu-btn[aria-expanded="true"] + .menu-panel {
        animation: menu-in 0.18s ease-out both;
    }

    .ch:nth-child(2), .w:nth-child(2) { --i: 1; }
    .ch:nth-child(3), .w:nth-child(3) { --i: 2; }
    .ch:nth-child(4), .w:nth-child(4) { --i: 3; }
    .ch:nth-child(5), .w:nth-child(5) { --i: 4; }
    .ch:nth-child(6) { --i: 5; }
    .ch:nth-child(7) { --i: 6; }
    .ch:nth-child(8) { --i: 7; }
    .ch:nth-child(9) { --i: 8; }
    .ch:nth-child(10) { --i: 9; }
    .ch:nth-child(11) { --i: 10; }

    /* Split-flap: once the intro has run, the cells only animate while they flip */
    .is-flap-idle .ch { animation: none; }
    .is-flap-idle .ch.is-flipping { animation: flap 70ms ease-in-out; }
    .is-flap-idle .ch.is-flipping-b { animation: flap-b 70ms ease-in-out; }

    @keyframes flap {
        0%, 100% { transform: scaleY(1); }
        50% { transform: scaleY(0.15); }
    }

    @keyframes flap-b {
        0%, 100% { transform: scaleY(1); }
        50% { transform: scaleY(0.15); }
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
