html {
    scroll-behavior: smooth;
}

.home {
    flex: 1 0 auto;
}

/* ------------------------------------------------------------------
   Scene layers (hero and finale). The art is a 2400x900 canvas with the
   logical 1600x900 in the middle; --s is "pixels per logical unit".
   Geometry shared with dev/hero/gen_hero.py: sun r 320, far ridge at
   y 700 (hides the lower quarter of the disc), letterbox edge at y 790.
   ------------------------------------------------------------------ */
/* Each layer box is the viewport plus a little overscan for the pointer
   parallax, never wider than the art; object-fit then resolves to exactly
   --s because the box is 900*s tall. */
.scene-layer {
    --lw: min(100% + 96px, 2400 * var(--s));
    position: absolute;
    left: 50%;
    bottom: 0;
    width: var(--lw);
    max-width: none;
    height: calc(900 * var(--s));
    margin-left: calc(var(--lw) / -2);
    object-fit: cover;
    object-position: 50% 100%;
    pointer-events: none;
    user-select: none;
}

/* The sun (and the clouds drawn across it) can be smaller than the hills:
   --sk is its own scale, pivoting on the far ridge so a quarter stays hidden. */
.layer-sun,
.layer-clouds {
    --lw: min(100% + 96px, 2400 * var(--sk));
    bottom: calc(200 * (var(--s) - var(--sk)));
    height: calc(900 * var(--sk));
}

.scene-sky {
    position: absolute;
    inset: 0;
}

/* ------------------------------------------------------------------
   Hero: a poster. Title over the top of the disc, rider on the hill,
   letterbox with the call to action.
   ------------------------------------------------------------------ */
.hero {
    --hw: 100vw;
    --hh: max(560px, min(100svh, 1180px));
    --nav: var(--navbar-height, 64px);
    --gap: clamp(14px, calc(var(--hh) * .03), 40px);
    --kick: 72px;
    --fix: 0px;
    --bar: clamp(104px, calc(var(--hh) * .135), 150px);
    --fs: clamp(56px, min(calc(var(--hw) * .105), calc(var(--hh) * .17)), 190px);
    --ground: 790;
    --scene-h: min(var(--hh), calc(var(--hw) * 1.4));
    --s: max(calc(var(--scene-h) / 900), calc(var(--hw) * 1.06 / 2400));
    --drop: calc((900 - var(--ground)) * var(--s) - var(--bar));
    --ridge-y: calc(var(--hh) - 200 * var(--s) + var(--drop));
    --R: calc(min(320 * var(--s), var(--hw) * .46, (var(--ridge-y) - var(--nav) - var(--gap) - var(--kick) - var(--fs) * .19) / 1.5) - var(--fix) / 1.5);
    --sk: calc(var(--R) / 320);
    --sun-top: calc(var(--ridge-y) - 1.5 * var(--R));
    --sy: 0;
    --mx: 0;
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    max-height: 1180px;
    overflow: hidden;
    background: #000;
    isolation: isolate;
    container-type: size;
}

@supports (width: 1cqw) {
    .hero {
        --hw: 100cqw;
        --hh: 100cqh;
    }
}

.hero-scene {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--scene-h);
    transform: translate3d(0, var(--drop), 0);
}

/* Darkness over the whole picture; only the intro lifts it. */
.hero-scene::after {
    content: '';
    position: absolute;
    inset: calc(-1 * var(--hh)) 0 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
}

/* The sky reaches above the scene box (portrait screens show sky over it). */
.hero .scene-sky {
    top: calc(-1 * var(--hh));
    background:
        radial-gradient(circle calc(var(--R) * 1.75) at 50% calc(100% - 200 * var(--s) - var(--R)), rgba(140, 9, 20, .2), rgba(140, 9, 20, 0)),
        linear-gradient(to top, #2a0308 0, #640811 calc(200 * var(--s)), #3c050b calc(330 * var(--s)), #170104 calc(500 * var(--s)), #040000 calc(680 * var(--s)), #000 calc(800 * var(--s)));
}

.hero .scene-layer {
    transform: translate3d(calc(var(--mx) * var(--px, 0px)), calc(var(--sy) * var(--py, 0) * 1px), 0);
    will-change: transform;
}

.hero .layer-sun {
    --py: .62;
    --px: -4px;
}

.hero .layer-clouds {
    --py: .56;
    --px: -7px;
}

.hero .layer-far {
    --py: .4;
    --px: -10px;
}

.hero .layer-mid {
    --py: .26;
    --px: -16px;
}

.hero .layer-near {
    --py: .12;
    --px: -24px;
}

.hero .layer-front {
    --py: 0;
    --px: -36px;
}

.hero-dust {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-grain {
    position: absolute;
    inset: -96px;
    background: url('../img/grain.png') 0 0 / 96px 96px;
    opacity: .9;
    pointer-events: none;
    animation: grain 1s steps(6) infinite;
}

.hero.is-away .hero-grain {
    animation-play-state: paused;
}

@keyframes grain {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-37px, 22px);
    }

    40% {
        transform: translate(41px, -18px);
    }

    60% {
        transform: translate(-19px, -43px);
    }

    80% {
        transform: translate(28px, 35px);
    }
}

/* Title card: the baseline of the last title line sits .58em below the top
   of the disc (line box ends .71em below it), so that line is printed over
   the red. Lino: baseline .77em under the top of a .9 line box. */
.hero-card {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--hh) - var(--sun-top) - var(--fs) * .71);
    z-index: 2;
    padding: 0 var(--gutter);
    transform: translate3d(0, calc(var(--sy) * -.42px), 0);
    opacity: calc(1 - var(--sy) / 560);
}

.hero-over {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin: 0 0 14px;
}

.hero-year {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--ink);
    font: 400 22px/1 var(--font-title);
    letter-spacing: .32em;
}

.hero-year::before,
.hero-year::after {
    content: '';
    width: clamp(36px, 7vw, 110px);
    height: 1px;
    background: var(--ink-dim);
    opacity: .7;
}

.hero-year::before {
    margin-right: .32em;
}

.hero-lead {
    max-width: 52ch;
    color: var(--ink-dim);
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: .015em;
    text-align: center;
    text-wrap: balance;
}

.hero-title {
    max-width: none;
    font-size: var(--fs);
    line-height: .9;
    letter-spacing: .01em;
}

/* Letterbox: black band under the picture, place on the left, way in on the right. */
.letterbox {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    background: #000;
}

.letterbox-bottom {
    bottom: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 24px;
    height: var(--bar);
    padding: 0 clamp(16px, 3vw, 44px);
    border-top: 1px solid rgba(244, 241, 234, .1);
}

.hero-place {
    justify-self: start;
    display: grid;
    gap: 8px;
    margin: 0;
}

.hero-place-name {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font: 400 22px/1 var(--font-title);
    letter-spacing: .04em;
}

.hero-place-sub {
    color: var(--ink-dim);
    font-size: 11.5px;
    line-height: 1;
    letter-spacing: .3em;
    text-transform: uppercase;
}

.hero-next {
    justify-self: center;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding-top: 6px;
    color: var(--ink-dim);
    font-size: 11.5px;
    line-height: 1;
    letter-spacing: .3em;
    text-indent: .3em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color .15s;
}

.hero-next::after {
    content: '';
    width: 1px;
    height: 24px;
    background: currentColor;
}

.hero-next:hover {
    color: var(--ink);
}

.hero-cta {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.4vw, 32px);
}

.hero-apply {
    min-height: 54px;
    padding: 5px 38px 0;
    font-size: 22px;
    white-space: nowrap;
}

@media (min-width: 1100px) {
    .letterbox-bottom {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }
}

/* ------------------------------------------------------------------
   Chapters
   ------------------------------------------------------------------ */
.chapter {
    width: min(var(--page-wide), 100% - 2 * var(--gutter));
    margin: 0 auto;
    padding: var(--space-section) 0 0;
    scroll-margin-top: var(--navbar-height);
}

.chapter-head {
    margin: 0 0 clamp(52px, 7vw, 92px);
}

.chapter-title {
    margin: 0;
    color: var(--ink);
    font: 400 clamp(44px, 6.6vw, 90px)/.95 var(--font-title);
    letter-spacing: .015em;
    text-wrap: balance;
}

.chapter-head .title-card-rule {
    margin-bottom: 0;
}

/* Chapter I: the way in, drawn as a route on a map. */
.trail {
    --step-pad: clamp(22px, 3vw, 48px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.trail-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding-right: var(--step-pad);
}

.trail-num {
    margin: 0 0 14px -2px;
    color: var(--ink);
    font: 400 clamp(56px, 5.6vw, 80px)/.8 var(--font-title);
    transition: opacity .8s ease, transform .9s var(--ease-film);
}

.trail-route {
    position: relative;
    display: block;
    align-self: stretch;
    height: 24px;
    margin: 0 calc(-1 * var(--step-pad)) 26px 0;
}

.trail-mark {
    position: absolute;
    top: 50%;
    left: 1px;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    background: var(--ink);
    transform: rotate(45deg);
    transition: opacity .6s ease;
}

.trail-line {
    position: absolute;
    inset: 0 12px 0 28px;
    overflow: hidden;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M2 12C46 6 88 17 136 11S236 5 286 13S366 16 398 11' fill='none' stroke='%23f4f1ea' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round' stroke-dasharray='9 7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

.trail-step:nth-child(2) .trail-line {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M2 11C52 17 92 6 152 10S252 16 312 10S372 7 398 12' fill='none' stroke='%23f4f1ea' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round' stroke-dasharray='9 7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

.trail-step:nth-child(3) .trail-line {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M2 12C34 7 92 16 162 12S262 6 322 12S382 14 398 10' fill='none' stroke='%23f4f1ea' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round' stroke-dasharray='9 7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

/* The line is "drawn" by sliding a black cover off it (transform only). */
.trail-line::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--bg);
    transform: translateX(101%);
    transition: transform 1.25s var(--ease-film);
}

.trail-end .trail-mark {
    left: -8px;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    background: none;
    transform: none;
}

.trail-end .trail-mark::before,
.trail-end .trail-mark::after {
    content: '';
    position: absolute;
    top: 11px;
    left: -3px;
    width: 36px;
    height: 8px;
    background: var(--stroke-red);
    transform: rotate(45deg);
}

.trail-end .trail-mark::after {
    transform: rotate(-45deg) scaleX(-1);
}

.trail-title {
    margin: 0 0 12px;
    color: var(--ink);
    font: 400 clamp(26px, 2.4vw, 32px)/1.05 var(--font-title);
    letter-spacing: .03em;
}

.trail-text {
    flex: 1;
    max-width: 30ch;
    margin: 0 0 10px;
    color: var(--ink-dim);
    font-size: 17px;
    line-height: 1.6;
    text-wrap: pretty;
}

.trail.reveal-ready:not(.is-visible) .trail-line::after {
    transform: none;
    transition: none;
}

.trail.reveal-ready:not(.is-visible) .trail-num {
    opacity: 0;
    transform: translateY(14px);
    transition: none;
}

.trail.reveal-ready:not(.is-visible) .trail-mark {
    opacity: 0;
    transition: none;
}

.trail-step:nth-child(2) .trail-num,
.trail-step:nth-child(2) .trail-mark {
    transition-delay: .55s;
}

.trail-step:nth-child(3) .trail-num,
.trail-step:nth-child(3) .trail-mark {
    transition-delay: 1.1s;
}

.trail-step:nth-child(4) .trail-num,
.trail-step:nth-child(4) .trail-mark {
    transition-delay: 1.65s;
}

.trail-step:nth-child(1) .trail-line::after {
    transition-delay: .15s;
}

.trail-step:nth-child(2) .trail-line::after {
    transition-delay: .7s;
}

.trail-step:nth-child(3) .trail-line::after {
    transition-delay: 1.25s;
}

/* Chapter II: a sheet of the local paper. */
.gazette {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 4.4vw, 64px) clamp(28px, 4.6vw, 68px) clamp(36px, 5vw, 76px);
}

.gazette-head {
    text-align: center;
}

.gazette-name {
    margin: clamp(10px, 1.4vw, 18px) 0 clamp(6px, 1vw, 12px);
    color: var(--paper-ink);
    font: 400 clamp(50px, 9.6vw, 136px)/.86 var(--font-title);
    letter-spacing: .01em;
}

.gazette-line {
    display: flex;
    justify-content: space-between;
    gap: 6px 24px;
    margin: 0;
    padding: 11px 2px 10px;
    border-bottom: 1px solid var(--paper-line);
    color: var(--paper-ink-dim);
    font-size: 12.5px;
    line-height: 1.3;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.gazette-top {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    padding: clamp(26px, 3.2vw, 40px) 0 clamp(30px, 3.4vw, 44px);
    border-bottom: 3px solid var(--paper-ink);
}

.gz {
    min-width: 0;
}

.gz-title {
    margin: 0 0 12px;
    color: var(--paper-ink);
    font: 400 clamp(23px, 2.2vw, 29px)/1.06 var(--font-title);
    letter-spacing: .02em;
    text-wrap: balance;
}

.gz p {
    margin: 0;
    color: var(--paper-ink);
    font-size: 16.5px;
    line-height: 1.6;
    text-wrap: pretty;
}

.gz-lead {
    padding-right: clamp(22px, 3vw, 44px);
    border-right: 1px solid var(--paper-line);
}

.gz-lead .gz-title {
    margin-bottom: 22px;
    font-size: clamp(36px, 4.8vw, 64px);
    line-height: .96;
}

.gz-figure {
    margin: 0 0 24px;
}

.gz-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.gz-figure figcaption {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--paper-line);
    color: var(--paper-ink-dim);
    font-size: 13.5px;
    line-height: 1.4;
    letter-spacing: .02em;
}

.gz-cols {
    columns: 2;
    column-gap: clamp(24px, 3vw, 40px);
    column-rule: 1px solid var(--paper-line);
}

.gz-cols p {
    font-size: 17px;
    line-height: 1.62;
}

.gz-cols p + p {
    margin-top: 14px;
}

.gz-cols p:first-child::first-letter {
    float: left;
    margin: 6px 10px 0 -2px;
    color: var(--paper-ink);
    font: 400 82px/.74 var(--font-title);
}

.gz-wanted {
    display: grid;
    align-content: start;
    padding-left: clamp(22px, 3vw, 44px);
}

.wanted {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: clamp(26px, 2.8vw, 36px) clamp(16px, 2vw, 26px) clamp(28px, 3vw, 38px);
    border: 4px solid var(--paper-ink);
    text-align: center;
}

.wanted::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid var(--paper-ink);
    pointer-events: none;
}

.wanted-title {
    margin: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--paper-ink);
    color: var(--paper-ink);
    font: 400 clamp(48px, 5vw, 74px)/.86 var(--font-title);
    letter-spacing: .02em;
}

.gz .wanted-who {
    color: var(--paper-ink);
    font: 400 clamp(21px, 2vw, 25px)/1.12 var(--font-title);
    letter-spacing: .03em;
    text-wrap: balance;
}

.gz .wanted-text {
    max-width: 28ch;
    font-size: 16px;
}

.gz .wanted-reward {
    display: grid;
    gap: 4px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--paper-line);
    color: var(--paper-ink);
    font: 400 20px/1.15 var(--font-title);
    letter-spacing: .03em;
}

.wanted-reward-label {
    color: var(--red);
    font-size: clamp(32px, 3.2vw, 42px);
    line-height: 1;
    letter-spacing: .05em;
}

.gazette-news {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gazette-news .gz {
    padding: clamp(22px, 2.6vw, 32px) clamp(18px, 2.4vw, 32px) clamp(4px, 1vw, 10px);
}

@media (min-width: 901px) {
    .gazette-news .gz:nth-child(3n + 1) {
        padding-left: 0;
    }

    .gazette-news .gz:nth-child(3n) {
        padding-right: 0;
    }

    .gazette-news .gz:not(:nth-child(3n + 1)) {
        border-left: 1px solid var(--paper-line);
    }

    .gazette-news .gz:nth-child(n + 4) {
        border-top: 1px solid var(--paper-line);
    }

    .gazette-news .gz:nth-child(-n + 3) {
        padding-bottom: clamp(22px, 2.6vw, 32px);
    }
}

.gz .gz-price {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--paper-line);
    font: 400 18px/1.35 var(--font-title);
    letter-spacing: .03em;
}

.gz-price span {
    color: var(--paper-gold);
    white-space: nowrap;
}

/* ------------------------------------------------------------------
   Finale: the same country a little later. The sun is almost down.
   ------------------------------------------------------------------ */
.finale {
    --fw: 100vw;
    position: relative;
    display: grid;
    justify-items: center;
    margin-top: var(--space-section);
    padding: clamp(24px, 4vw, 56px) var(--gutter) 0;
    overflow: hidden;
    container-type: inline-size;
}

@supports (width: 1cqw) {
    .finale {
        --fw: 100cqw;
    }
}

.finale-card {
    position: relative;
    z-index: 2;
}

.finale-card .btn-row {
    margin-top: 38px;
}

.finale-alt {
    margin-top: 14px;
}

.finale-scene {
    --s: max(clamp(.5px, calc(var(--fw) / 1700), 1.15px), calc(var(--fw) * 1.06 / 2400));
    --sk: var(--s);
    position: relative;
    justify-self: stretch;
    height: calc(440 * var(--s));
    margin: 0 calc(-1 * var(--gutter));
}

.finale-scene .scene-sky {
    background: linear-gradient(to top, #120103 0, #4c070f calc(200 * var(--s)), #240306 calc(232 * var(--s)), #080001 calc(290 * var(--s)), #000 calc(360 * var(--s)));
}

/* Only the top arc is left above the hills, the rider stands against it.
   The clip keeps the sunk disc from showing below the ground line. */
.finale-scene .layer-sun {
    translate: 0 calc(384 * var(--sk));
    clip-path: inset(0 0 calc(404 * var(--sk)) 0);
}

/* ------------------------------------------------------------------
   Intro: darkness, the sun comes up from behind the ridge, the sky
   warms, the title is printed, then the overline and the letterbox.
   Any input skips it (site.js adds .intro-skip).
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
    html.js:not(.intro-skip) .hero-scene::after {
        animation: intro-dark 1.5s cubic-bezier(.3, .2, .3, 1) .05s both;
    }

    html.js:not(.intro-skip) .hero .scene-sky,
    html.js:not(.intro-skip) .hero-dust {
        animation: intro-fade 1.9s ease-out .25s both;
    }

    html.js:not(.intro-skip) .hero .layer-sun {
        animation: intro-sunrise 2.1s cubic-bezier(.36, .06, .18, 1) both;
    }

    html.js:not(.intro-skip) .hero .layer-clouds {
        animation: intro-fade 1.1s ease 1.05s both;
    }

    html.js:not(.intro-skip) .hero-title {
        animation: intro-print 1.05s var(--ease-film) .95s both;
    }

    html.js:not(.intro-skip) .hero-over {
        animation: intro-drop .8s var(--ease-film) 1.45s both;
    }

    html.js:not(.intro-skip) .letterbox-bottom > * {
        animation: intro-fade .7s ease 1.7s both;
    }
}

@keyframes intro-fade {
    from {
        opacity: 0;
    }
}

@keyframes intro-dark {
    from {
        opacity: 1;
    }
}

@keyframes intro-sunrise {
    from {
        translate: 0 calc(var(--R) * 1.62);
    }
}

@keyframes intro-print {
    from {
        opacity: 0;
        translate: 0 .14em;
    }
}

@keyframes intro-drop {
    from {
        opacity: 0;
        translate: 0 -10px;
    }
}

/* ------------------------------------------------------------------
   Smaller screens
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
    .letterbox-bottom {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .hero-next {
        display: none;
    }

    .trail {
        grid-template-columns: minmax(0, 1fr);
        max-width: 620px;
        margin: 0 auto;
    }

    .trail-step {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        align-items: start;
        padding: 0 0 48px;
    }

    .trail-step > * {
        grid-column: 2;
    }

    .trail-num {
        margin: 0 0 12px;
        font-size: 58px;
    }

    .trail-step > .trail-route {
        position: absolute;
        grid-column: auto;
        top: 0;
        bottom: 0;
        left: 0;
        width: 24px;
        height: auto;
        margin: 0;
    }

    .trail-mark {
        top: 22px;
        left: 6px;
        margin-top: 0;
    }

    .trail-line {
        inset: 48px 0 6px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 400' preserveAspectRatio='none'%3E%3Cpath d='M12 2C6 46 17 88 11 136S5 236 13 286S16 366 11 398' fill='none' stroke='%23f4f1ea' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round' stroke-dasharray='9 7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    }

    .trail-step:nth-child(2) .trail-line {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 400' preserveAspectRatio='none'%3E%3Cpath d='M11 2C17 52 6 92 10 152S16 252 10 312S7 372 12 398' fill='none' stroke='%23f4f1ea' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round' stroke-dasharray='9 7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    }

    .trail-step:nth-child(3) .trail-line {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 400' preserveAspectRatio='none'%3E%3Cpath d='M12 2C7 34 16 92 12 162S6 262 12 322S14 382 10 398' fill='none' stroke='%23f4f1ea' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round' stroke-dasharray='9 7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    }

    .trail-line::after {
        transform: translateY(101%);
    }

    .trail-end .trail-mark {
        top: 16px;
        left: -3px;
    }

    .trail-text {
        max-width: 46ch;
    }

    .gazette-top {
        grid-template-columns: minmax(0, 1fr);
    }

    .gz-lead {
        padding-right: 0;
        border-right: 0;
    }

    .gz-wanted {
        justify-items: center;
        margin-top: clamp(28px, 5vw, 40px);
        padding: clamp(28px, 5vw, 40px) 0 0;
        border-top: 1px solid var(--paper-line);
    }

    .wanted {
        width: min(100%, 440px);
    }

    .gazette-news {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gazette-news .gz,
    .gazette-news .gz:nth-child(-n + 3) {
        padding: clamp(22px, 3vw, 30px) clamp(16px, 3vw, 28px);
        border-top: 1px solid var(--paper-line);
        border-left: 0;
    }

    .gazette-news .gz:nth-child(-n + 2) {
        border-top: 0;
    }

    .gazette-news .gz:nth-child(odd) {
        padding-left: 0;
    }

    .gazette-news .gz:nth-child(even) {
        padding-right: 0;
        border-left: 1px solid var(--paper-line);
    }
}

@media (max-width: 640px) {
    .hero {
        --bar: 150px;
        --kick: 104px;
        --ground: 856;
        --fs: clamp(50px, calc(var(--hw) * .17), 84px);
    }

    .hero-lead {
        max-width: 30ch;
        font-size: 17px;
    }

    .hero-year {
        font-size: 20px;
    }

    .letterbox-bottom {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            'apply apply'
            'place alt';
        align-content: center;
        row-gap: 14px;
        padding-block: 16px;
    }

    .hero-cta {
        display: contents;
    }

    .hero-apply {
        grid-area: apply;
        width: 100%;
    }

    .hero-alt {
        grid-area: alt;
    }

    .hero-place {
        grid-area: place;
        gap: 0;
    }

    .hero-place-name {
        padding: 0;
        border: 0;
        font-size: 19px;
    }

    .hero-place-sub,
    .hero-next {
        display: none;
    }

    .gazette-line {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        letter-spacing: .18em;
    }

    .gz-cols {
        columns: 1;
    }

    .gazette-news {
        grid-template-columns: minmax(0, 1fr);
    }

    .gazette-news .gz,
    .gazette-news .gz:nth-child(n) {
        padding: 22px 0;
        border-left: 0;
        border-top: 1px solid var(--paper-line);
    }

    .gazette-news .gz:first-child {
        border-top: 0;
    }

    .gazette-news .gz:last-child {
        padding-bottom: 0;
    }
}

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

    .hero-grain {
        animation: none;
    }

    .hero .scene-layer,
    .hero-card {
        transform: none;
    }

    .hero-card {
        opacity: 1;
    }

    .trail-num,
    .trail-mark,
    .trail-line::after {
        transition: none;
    }
}
