/* Site 4 · Galley — standalone stylesheet (does not load style.css).
   Heritage-editorial composition: cream paper, ink typography, crimson
   text accents, gold hairlines, a large warm black-and-white photographic
   plate, and a formal neural diagram engraved between name and statement. */

:root {
    --paper: #F6F1E7;
    --paper-deep: #EFE8D9;
    --ink: #1C1114;
    --ink-soft: rgba(28, 17, 20, 0.66);
    --ink-faint: rgba(28, 17, 20, 0.38);
    --hairline: rgba(28, 17, 20, 0.22);
    --crimson: #9E1B32;
    --crimson-bright: #C42C48;
    --gold: #A2823E;
    --gold-soft: rgba(162, 130, 62, 0.55);
    --ghost: rgba(28, 17, 20, 0.10);
    --serif: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
    --text-serif: 'Newsreader', Georgia, serif;
    --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #191014;
        --paper-deep: #120B0E;
        --ink: #F1E8DB;
        --ink-soft: rgba(241, 232, 219, 0.66);
        --ink-faint: rgba(241, 232, 219, 0.4);
        --hairline: rgba(241, 232, 219, 0.24);
        --crimson: #D0435C;
        --crimson-bright: #E0546E;
        --gold: #C3A15C;
        --gold-soft: rgba(195, 161, 92, 0.55);
        --ghost: rgba(241, 232, 219, 0.11);
    }
}
/* Forced theme for testing: /site4?theme=dark|light (JS sets the attribute) */
:root[data-theme="dark"] {
    --paper: #191014;
    --paper-deep: #120B0E;
    --ink: #F1E8DB;
    --ink-soft: rgba(241, 232, 219, 0.66);
    --ink-faint: rgba(241, 232, 219, 0.4);
    --hairline: rgba(241, 232, 219, 0.24);
    --crimson: #D0435C;
    --crimson-bright: #E0546E;
    --gold: #C3A15C;
    --gold-soft: rgba(195, 161, 92, 0.55);
    --ghost: rgba(241, 232, 219, 0.11);
}
:root[data-theme="light"] {
    --paper: #F6F1E7;
    --paper-deep: #EFE8D9;
    --ink: #1C1114;
    --ink-soft: rgba(28, 17, 20, 0.66);
    --ink-faint: rgba(28, 17, 20, 0.38);
    --hairline: rgba(28, 17, 20, 0.22);
    --crimson: #9E1B32;
    --crimson-bright: #C42C48;
    --gold: #A2823E;
    --gold-soft: rgba(162, 130, 62, 0.55);
    --ghost: rgba(28, 17, 20, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { min-height: 100%; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text-serif);
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
}

.site-hero {
    display: flex;
    flex: none;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
}

/* Paper grain */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

/* ---------- Machine-readable scholarship map ---------- */

.machine-profile {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(32px, 6vw, 88px);
    padding: clamp(44px, 7vw, 92px) clamp(24px, 6.5vw, 96px);
    border-top: 1px solid var(--hairline);
    background: var(--paper-deep);
}

.machine-profile-kicker {
    margin-bottom: 12px;
    color: var(--crimson);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.machine-profile h2 {
    max-width: 19ch;
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3.4vw, 3.2rem);
    line-height: 1.02;
}

.machine-profile-intro > p:last-child {
    max-width: 58ch;
    margin-top: 22px;
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.55;
}

.machine-profile a {
    text-decoration-color: var(--gold-soft);
    text-underline-offset: 0.18em;
}

.machine-terms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 34px;
}

.machine-terms > div {
    padding: 15px 0 17px;
    border-top: 1px solid var(--hairline);
}

.machine-terms dt {
    color: var(--crimson);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.machine-terms dd {
    margin-top: 7px;
    color: var(--ink-soft);
    font-size: 0.98rem;
    line-height: 1.42;
}

@media (max-width: 800px) {
    .machine-profile { grid-template-columns: 1fr; }
    .machine-terms { grid-template-columns: 1fr; }
    .machine-profile h2 { max-width: 24ch; }
}

/* ---------- Masthead ---------- */

.masthead {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(10px, 1.8vh, 18px) clamp(24px, 4.4vw, 64px) clamp(9px, 1.4vh, 14px);
    border-bottom: 1px solid var(--hairline);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-soft);
    white-space: nowrap;
}

.brand-seal {
    width: 9px;
    height: 9px;
    background: var(--crimson);
    transform: rotate(45deg);
    flex: none;
}

.masthead-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    column-gap: clamp(14px, 1.8vw, 26px);
    row-gap: 4px;
}

.masthead-nav a {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-soft);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 160ms ease, border-color 160ms ease;
}

.masthead-nav a:hover {
    color: var(--crimson);
    border-bottom-color: var(--crimson);
}

.masthead-nav .nav-ex10 {
    color: var(--crimson);
}

/* ---------- Sheet: split composition ---------- */

.sheet {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 clamp(24px, 4.1vw, 62px);
    overflow: hidden;
}

#inkCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.columns {
    position: relative;
    z-index: 3;
    height: 100%;
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.55fr);
    grid-template-rows: auto minmax(88px, 1fr) auto;
    grid-template-areas:
        "plate copy"
        "plate diagram"
        "plate proof";
    column-gap: clamp(26px, 3.3vw, 52px);
}

/* ---------- Copy (kicker · name · roles · actions) ---------- */

.feature-copy {
    grid-area: copy;
    padding-top: clamp(6px, 1vh, 11px);
    /* Title-page composition: the name block sits centered over the lattice. */
    text-align: center;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--crimson);
    margin-bottom: clamp(8px, 1.2vh, 14px);
}

.kicker::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--crimson);
}

.name {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-weight: 700;
    font-size: clamp(3.5rem, 5.45vw, 5.25rem);
    line-height: 0.92;
    letter-spacing: -0.005em;
    color: var(--ink);
    margin-bottom: clamp(9px, 1.45vh, 16px);
    text-wrap: balance;
}

.name-dot { color: var(--crimson); }

.role {
    font-family: var(--text-serif);
    font-size: clamp(0.94rem, 1.08vw, 1.08rem);
    line-height: 1.28;
    color: var(--ink-soft);
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
}

.role + .role { margin-top: 2px; }

.media-feature {
    display: table;
    max-width: 100%;
    margin: clamp(10px, 1.6vh, 18px) auto 0;
    padding: 9px 14px;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    color: var(--ink);
    text-decoration: none;
}

.media-feature-label {
    display: block;
    margin-bottom: 4px;
    color: var(--crimson);
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.media-feature-title {
    font-family: var(--text-serif);
    font-size: clamp(0.9rem, 1.2vw, 1.08rem);
    line-height: 1.3;
    text-wrap: balance;
}

.media-feature:hover .media-feature-title { color: var(--crimson); }
.media-feature:focus-visible { outline: 2px solid var(--crimson); outline-offset: 4px; }

.cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 26px;
    margin-top: clamp(10px, 1.55vh, 17px);
}

.cta a {
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--crimson);
    padding: 7px 0 5px;
    border-bottom: 1px solid var(--crimson);
    transition: background 160ms ease, color 160ms ease, padding 160ms ease;
}

.cta a:hover {
    background: var(--crimson);
    color: var(--paper);
    padding: 7px 10px 5px;
}

/* ---------- Diagram box (the canvas draws the network here) ---------- */

.diagram {
    grid-area: diagram;
    min-height: 88px;
}

/* ---------- Plate ---------- */

.plate {
    grid-area: plate;
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    min-height: 0;
    padding: clamp(6px, 1vh, 11px) 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.plate-frame {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
    border-radius: clamp(10px, 1.1vw, 18px);
    overflow: hidden;
}

.plate-photo {
    --portrait-zoom: 1;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    position: relative;
    border: 1px solid var(--hairline);
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: clamp(10px, 1.1vw, 18px);
    box-shadow: inset 0 0 0 1px var(--gold-soft);
}

.plate-photo picture {
    display: block;
    height: 100%;
}

.plate-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

.plate-scene.is-current {
    z-index: 1;
    opacity: 1;
}

.plate-scene.is-incoming {
    z-index: 2;
    opacity: 1;
    clip-path: polygon(-12% 0, -4% 0, -14% 100%, -22% 100%);
    transform: scale(1.045) translateX(1.4%);
    filter: sepia(0.3) contrast(1.12) brightness(0.86);
    transition:
        clip-path 1100ms cubic-bezier(0.72, 0, 0.18, 1),
        transform 1500ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 1100ms ease;
}

.plate-scene.is-incoming.is-revealed {
    clip-path: polygon(-12% 0, 112% 0, 102% 100%, -22% 100%);
    transform: scale(1) translateX(0);
    filter: none;
}

.plate-scene[data-scene="hongkong"] img {
    object-position: 49% 50%;
    transform: scale(1.075);
    transform-origin: 47% 49%;
}

.plate-scene[data-scene="weinberg"] img {
    object-position: 20% 35%;
    transform: scale(1.35);
    transform-origin: 28% 32%;
}

.plate-wipe {
    position: absolute;
    z-index: 4;
    top: -10%;
    bottom: -10%;
    left: -48%;
    width: 38%;
    opacity: 0;
    pointer-events: none;
    transform: skewX(-8deg);
    background: linear-gradient(90deg,
        transparent 0%,
        color-mix(in srgb, var(--crimson) 34%, transparent) 42%,
        color-mix(in srgb, var(--gold) 74%, transparent) 52%,
        color-mix(in srgb, var(--paper) 42%, transparent) 58%,
        transparent 100%);
    mix-blend-mode: screen;
}

.plate-photo.is-wiping .plate-wipe {
    animation: plate-wipe 1100ms cubic-bezier(0.72, 0, 0.18, 1) both;
}

@keyframes plate-wipe {
    0% { left: -48%; opacity: 0; }
    14% { opacity: 0.9; }
    82% { opacity: 0.78; }
    100% { left: 112%; opacity: 0; }
}

/* The paper notice sits on the photographic plate and shares the decoder's
   color rhythm through custom properties updated by galley.js. */
.paper-alert {
    --alert-crimson-alpha: 0.09;
    --alert-gold-alpha: 0.05;
    --alert-line-alpha: 0.58;
    position: absolute;
    z-index: 5;
    top: auto;
    bottom: clamp(12px, 2vw, 26px);
    left: clamp(12px, 2vw, 26px);
    width: min(55%, 420px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 18px;
    align-items: center;
    padding: clamp(11px, 1.4vw, 17px) clamp(13px, 1.65vw, 21px);
    color: var(--ink);
    background:
        linear-gradient(125deg,
            rgb(196 44 72 / var(--alert-crimson-alpha)),
            rgb(162 130 62 / var(--alert-gold-alpha))),
        color-mix(in srgb, var(--paper) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
    border-left: 3px solid rgb(196 44 72 / var(--alert-line-alpha));
    border-radius: 2px;
    box-shadow: 0 14px 38px rgba(17, 10, 12, 0.2);
    backdrop-filter: blur(9px) saturate(0.8);
    -webkit-backdrop-filter: blur(9px) saturate(0.8);
    text-decoration: none;
    overflow: hidden;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.plate.is-transitioning .paper-alert {
    animation: plate-alert-shift 1100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.plate.is-transitioning figcaption {
    animation: plate-caption-shift 1100ms ease both;
}

@keyframes plate-alert-shift {
    0%, 100% { opacity: 1; transform: translateY(0); }
    36% { opacity: 0; transform: translateY(8px); }
    58% { opacity: 0; transform: translateY(-8px); }
}

@keyframes plate-caption-shift {
    0%, 100% { opacity: 1; transform: translateY(0); }
    38%, 58% { opacity: 0; transform: translateY(4px); }
}

.paper-alert::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
}

.paper-alert-label,
.paper-alert-title,
.paper-alert-arrow {
    position: relative;
    z-index: 1;
}

.paper-alert-label {
    grid-column: 1;
    font-family: var(--mono);
    font-size: clamp(0.62rem, 0.8vw, 0.76rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.19em;
    text-transform: uppercase;
    color: var(--crimson);
}

.paper-alert-title {
    grid-column: 1;
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2vw, 1.92rem);
    font-weight: 700;
    line-height: 1.04;
    text-wrap: balance;
}

.paper-alert-arrow {
    grid-column: 2;
    grid-row: 1 / 3;
    font-family: var(--mono);
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    color: var(--crimson);
    transition: transform 180ms ease;
}

.paper-alert:hover,
.paper-alert:focus-visible {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 18px 44px rgba(17, 10, 12, 0.28);
    outline: none;
}

.paper-alert:hover .paper-alert-arrow,
.paper-alert:focus-visible .paper-alert-arrow {
    transform: translate(2px, -2px);
}

.plate img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(var(--portrait-zoom));
    transform-origin: center;
}

.plate figcaption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: clamp(6px, 0.9vh, 9px);
    text-align: center;
}

.cap-orn {
    width: 7px;
    height: 7px;
    background: var(--gold);
    transform: rotate(45deg);
    margin-bottom: 1px;
}

.cap-title {
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.cap-sub {
    font-family: var(--text-serif);
    font-style: italic;
    font-size: 0.96rem;
    color: var(--ink-soft);
}

/* ---------- Proof (statement) ---------- */

.proof {
    grid-area: proof;
    padding-bottom: clamp(8px, 1.5vh, 16px);
}

.rule-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--hairline);
    padding-top: 7px;
    margin-bottom: clamp(6px, 0.9vh, 10px);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

#tokenStatus { color: var(--crimson); }

.statement {
    font-family: var(--text-serif);
    font-style: italic;
    font-optical-sizing: auto;
    font-weight: 450;
    font-size: clamp(1.12rem, 1.45vw, 1.42rem);
    line-height: 1.32;
    color: var(--ink);
    text-wrap: pretty;
}

.statement .w {
    transition: color 700ms ease, text-shadow 700ms ease;
}

.statement .w.ghost {
    color: var(--ghost);
    transition: color 300ms ease;
}

.statement .w.just {
    color: var(--crimson-bright);
    transition: none;
}

.statement.is-wiping .w {
    transition: color 420ms ease, text-shadow 420ms ease;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 18px;
    margin-top: clamp(6px, 0.9vh, 10px);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
}

#seqStatus { color: var(--ink-soft); text-align: right; white-space: nowrap; margin-left: auto; }

.machine {
    white-space: nowrap;
    color: var(--paper);
}

.machine a {
    color: var(--paper);
    text-decoration: none;
    border-bottom: 1px solid var(--paper);
}

.machine a:hover { color: var(--paper); border-bottom-color: var(--paper); }

/* ---------- Candidate annotation (follows the caret) ---------- */

.annotation {
    position: absolute;
    z-index: 4;
    display: none;
    flex-direction: column;
    gap: 2px;
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    padding: 6px 9px 7px;
    border-left: 1px solid var(--crimson);
    pointer-events: none;
    white-space: nowrap;
}

.annotation.on { display: flex; }

.ann-row { display: flex; justify-content: space-between; gap: 16px; }

.ann-row.is-lead { color: var(--crimson); font-weight: 500; }

/* ---------- Responsive ---------- */

@media (min-width: 901px) and (max-width: 1100px) {
    .sheet { padding-inline: 28px; }

    .columns {
        grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
        column-gap: 24px;
    }

    .name { font-size: clamp(3.55rem, 6.6vw, 4.5rem); }
    .kicker { font-size: 0.68rem; }
    .role { font-size: 0.9rem; }
    .statement { font-size: 1.07rem; }
    .machine { white-space: normal; }
    .plate-photo { aspect-ratio: 16 / 9; }
}

@media (min-width: 901px) and (max-height: 700px) {
    .masthead-nav a, .brand { font-size: 0.72rem; }
    .feature-copy { padding-top: 8px; }
    .kicker { margin-bottom: 6px; }
    .name { font-size: clamp(3.25rem, 5.1vw, 4.4rem); margin-bottom: 7px; }
    .role { font-size: 0.86rem; line-height: 1.16; }
    .cta { margin-top: 7px; }
    .cta a { font-size: 0.7rem; padding-block: 4px; }
    .statement { font-size: 1.02rem; line-height: 1.22; }
    .rule-row, .meta-row { font-size: 0.64rem; }
    .plate figcaption { margin-top: 4px; }
    .cap-sub { font-size: 0.82rem; }
}

@media (min-width: 1101px) and (max-height: 700px) {
    .plate-photo { aspect-ratio: 1.36; }
}

@media (max-width: 1100px) {
    .masthead {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 8px 16px 7px;
    }

    .brand { font-size: 0.7rem; gap: 8px; }

    .masthead-nav {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 14px;
        overflow-x: auto;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    .masthead-nav::-webkit-scrollbar { display: none; }
    .masthead-nav a { flex: none; font-size: 0.64rem; letter-spacing: 0.11em; }

    .sheet { padding: 0 16px; }

    .columns {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(110px, 1fr) clamp(62px, 10.5vh, 90px) auto;
        grid-template-areas:
            "copy"
            "plate"
            "diagram"
            "proof";
    }

    .feature-copy { padding-top: 0; }
    .kicker { font-size: 0.62rem; margin-bottom: 4px; }
    .kicker::before { width: 20px; }
    .name { font-size: clamp(2.1rem, 9.3vw, 2.7rem); line-height: 1; margin-bottom: 5px; }
    .name br { display: none; }
    .role { font-size: clamp(0.73rem, 2.6vw, 0.88rem); line-height: 1.12; max-width: 58ch; }
    .role + .role { margin-top: 1px; }
    .cta { gap: 8px 22px; margin-top: 6px; }
    .cta a { font-size: 0.62rem; padding: 3px 0 2px; }
    .media-feature { margin-top: 8px; padding: 6px 8px; }
    .media-feature-label { font-size: 0.55rem; margin-bottom: 2px; }

    .plate {
        width: 100%;
        height: 100%;
        min-height: 0;
        justify-self: center;
        padding: 5px 0 3px;
        justify-content: stretch;
    }

    .plate-frame { flex: 1 1 auto; min-height: 0; display: flex; }
    .plate-photo { --portrait-zoom: 1; flex: none; width: 100%; aspect-ratio: 16 / 9; }
    .plate img { object-position: center; }
    .paper-alert {
        top: auto;
        bottom: 8px;
        left: 8px;
        width: min(72%, 320px);
        gap: 1px 10px;
        padding: 8px 10px 8px 11px;
        border-left-width: 2px;
        backdrop-filter: blur(7px) saturate(0.8);
        -webkit-backdrop-filter: blur(7px) saturate(0.8);
    }
    .paper-alert-label { font-size: 0.5rem; letter-spacing: 0.14em; }
    .paper-alert-title { font-size: clamp(0.98rem, 4vw, 1.22rem); }
    .paper-alert-arrow { font-size: 0.88rem; }
    .plate figcaption { flex: none; gap: 1px; margin-top: 3px; }
    .cap-orn { width: 5px; height: 5px; }
    .cap-title { font-size: 0.55rem; letter-spacing: 0.14em; }
    .cap-sub { font-size: 0.72rem; line-height: 1; }

    .diagram { min-height: 62px; }
    .proof { padding-bottom: 5px; }
    .rule-row { padding-top: 4px; margin-bottom: 3px; font-size: 0.53rem; letter-spacing: 0.11em; }
    .statement { font-size: clamp(0.82rem, 3.3vw, 1.02rem); line-height: 1.15; }
    .meta-row { margin-top: 3px; font-size: 0.53rem; line-height: 1.15; }
    .machine { white-space: normal; }
    .annotation { font-size: 0.58rem; padding: 4px 6px; }
}

@media (max-width: 1100px) and (max-height: 700px) {
    .masthead { padding-block: 6px 5px; gap: 3px; }
    .brand { font-size: 0.63rem; }
    .masthead-nav a { font-size: 0.57rem; }
    .feature-copy { padding-top: 3px; }
    .kicker { display: none; }
    .name { font-size: clamp(1.82rem, 8.2vw, 2.15rem); margin-bottom: 2px; }
    .role { display: none; }
    .role:first-of-type { display: block; font-size: 0.68rem; line-height: 1.05; }
    .cta { margin-top: 3px; }
    .cta a { font-size: 0.55rem; }
    .columns { grid-template-rows: auto minmax(120px, 1fr) 58px auto; }
    .cap-sub { display: none; }
    .cap-title { font-size: 0.49rem; }
    .rule-row { font-size: 0.47rem; }
    .statement { font-size: clamp(0.72rem, 3vw, 0.86rem); line-height: 1.08; }
    .meta-row { font-size: 0.47rem; }
    #seqStatus { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .statement .w, .statement .w.ghost, .statement .w.just,
    .statement.is-wiping .w { transition: none; }
    .paper-alert, .paper-alert-arrow { transition: none; }
    .plate-scene, .plate-wipe, .plate.is-transitioning .paper-alert,
    .plate.is-transitioning figcaption { transition: none; animation: none; }
}
