@font-face {
    font-family: "Lineal";
    src: url("/assets/LinealVF.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Compagnon";
    src: url("/assets/Compagnon-Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Compagnon";
    src: url("/assets/Compagnon-LightItalic.otf") format("opentype");
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Compagnon";
    src: url("/assets/Compagnon-Roman.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Compagnon";
    src: url("/assets/Compagnon-Medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Compagnon";
    src: url("/assets/Compagnon-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.page.article,
.basket-dock,
.basket-tray,
.forage-pop {
    font-family: "Compagnon", Georgia, serif;
}

.article {
    max-width: 680px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.topbar a {
    color: var(--ink);
    text-decoration: none;
}

.topbar .back::before {
    content: "← ";
}

.topbar .handle {
    color: var(--muted);
    font-weight: 400;
}

.kicker {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.title {
    margin: 6px 0 0;
    font-family: "Lineal", "Compagnon", system-ui, sans-serif;
    font-size: clamp(40px, 9vw, 72px);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.standfirst {
    margin: 0;
    font-size: clamp(17px, 2.6vw, 19px);
    line-height: 1.55;
    font-style: italic;
    color: #333;
}

.dialogue {
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-size: clamp(16px, 2.4vw, 18px);
    line-height: 1.6;
}

.figure {
    margin: 0;
}

.figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px dashed var(--border);
}

.figure figcaption {
    margin-top: 8px;
    font-size: 13px;
    font-style: italic;
    color: var(--muted);
}

.line {
    margin: 0;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    align-items: baseline;
}

.who {
    margin: 0;
    justify-self: end;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    white-space: nowrap;
}

@media (max-width: 520px) {
    .who {
        justify-self: start;
    }
}

.line--neal .who {
    color: var(--ink);
}

@media (max-width: 520px) {
    .line {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

.stage {
    margin: 0;
    font-style: italic;
    color: #777;
}

.rule {
    border: 0;
    border-top: 1px dashed var(--border);
    width: 100%;
    margin: 6px 0;
}

.colophon {
    margin: 0;
    font-style: italic;
    font-size: clamp(16px, 2.4vw, 18px);
    line-height: 1.6;
    color: #333;
}

.colophon a {
    color: var(--ink);
}

.fullbleed {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
}

.video {
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.media-band {
    background: whitesmoke;
    padding: clamp(28px, 5vw, 52px) clamp(20px, 5vw, 56px);
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.media-band .inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 2.5vw, 28px);
}

.media-band .head h2 {
    margin: 0;
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.media-band .head .lead {
    margin: 6px 0 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: clamp(10px, 1.4vw, 16px);
}

.rec {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 124px;
    padding: 18px 16px;
    background: #fff;
    border: 1px dashed var(--border);
}

.rec .name {
    font-weight: 700;
    font-size: clamp(16px, 2.2vw, 19px);
    line-height: 1.15;
}

.rec .note {
    margin-top: auto;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.35;
}

.rec--link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.rec--link:hover {
    background: whitesmoke;
}

.rec .watch {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 1px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(10px, 1.4vw, 16px);
}

.video-cell {
    margin: 0;
}

.video-cell figcaption {
    margin-top: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.video-cell figcaption .name {
    color: var(--ink);
    font-weight: 700;
}

/* ---- named section beats (replace bare hr) ---- */
.beat {
    display: flex;
    align-items: baseline;
    gap: 12px;
    border-top: 1px dashed var(--border);
    padding-top: 14px;
}

.beat__num {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.beat__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---- pull quotes ---- */
.pullquote {
    margin: 8px 0;
}

.pullquote blockquote {
    margin: 0;
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.pullquote figcaption {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

/* ---- footnotes (in-joke definitions) ---- */
.fn {
    position: relative;
    font-size: 0.7em;
    font-weight: 700;
    line-height: 0;
    color: var(--muted);
    cursor: help;
    padding: 0 0.15em;
    vertical-align: super;
    border: 0;
    background: none;
}

.fn:hover,
.fn.is-open {
    color: var(--ink);
}

.fn__pop {
    display: none;
    position: absolute;
    left: 50%;
    top: 1.4em;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    z-index: 30;
    padding: 10px 12px;
    background: #fff;
    border: 1px dashed var(--border);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
    color: #333;
    vertical-align: baseline;
    white-space: normal;
    cursor: default;
}

.fn.is-open .fn__pop,
.fn:hover .fn__pop {
    display: block;
}

.fn__pop .fn__label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---- margin asides (gutter on desktop, inline on mobile) ---- */
.block {
    position: relative;
}

.aside {
    margin: 16px 0 0;
    padding: 12px 14px;
    border: 1px dashed var(--border);
    background: whitesmoke;
    font-size: 13px;
    line-height: 1.5;
}

.aside__label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.aside p {
    margin: 0;
    color: #333;
}

.aside img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 8px;
    border: 1px dashed var(--border);
    background: #fff;
}

@media (min-width: 1080px) {
    .aside {
        position: absolute;
        top: 0;
        left: 100%;
        width: 220px;
        margin: 0 0 0 40px;
        padding: 12px 0 0;
        border: 0;
        border-top: 1px dashed var(--border);
        background: none;
    }

    .aside--left {
        left: auto;
        right: 100%;
        margin: 0 40px 0 0;
        text-align: right;
    }
}

/* food cards: just a centered image; info revealed on hover */
.rec--img {
    position: relative;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0;
    min-height: clamp(120px, 16vw, 150px);
    padding: 0;
    background: none;
    border: 0;
    outline: none;
}

.rec__cut {
    width: 100%;
    height: clamp(90px, 12vw, 120px);
    object-fit: contain;
    object-position: center;
}

.rec__info {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: max-content;
    max-width: 95%;
    padding: 8px 12px;
    background: #fff;
    border: 1px dashed var(--border);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.rec--img:hover .rec__info,
.rec--img:focus-visible .rec__info,
.rec--img:focus-within .rec__info {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rec--img .note {
    margin-top: 0;
}

/* ---- draggable affordance ---- */
[draggable="true"] {
    cursor: grab;
}

[draggable="true"]:active {
    cursor: grabbing;
}

.is-dragging {
    opacity: 0.5;
}

/* ---- the forage basket dock ---- */
.basket-dock {
    position: fixed;
    top: clamp(12px, 2.5vw, 22px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: clamp(84px, 12vw, 116px);
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    text-align: center;
    mix-blend-mode: difference;
    -webkit-tap-highlight-color: transparent;
}

.basket-dock img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-user-drag: none;
    user-select: none;
    transition: transform 0.18s ease;
}

.basket-dock.is-over img {
    transform: scale(1.12) rotate(-3deg);
}

.basket-dock__count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}

.basket-dock__hint {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

/* little +1 flourish when something is foraged */
.forage-pop {
    position: fixed;
    z-index: 60;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
    pointer-events: none;
    animation: forage-rise 0.7s ease forwards;
}

@keyframes forage-rise {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-28px);
    }
}

/* collected tray, expands on basket click */
.basket-tray {
    position: fixed;
    top: clamp(108px, 15vw, 150px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: min(280px, 76vw);
    max-height: 50vh;
    overflow-y: auto;
    display: none;
    padding: 16px;
    background: #fff;
    border: 1px dashed var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.basket-tray.is-open {
    display: block;
}

.basket-tray__head {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.basket-tray__empty {
    margin: 0;
    font-size: 13px;
    font-style: italic;
    color: var(--muted);
}

.basket-tray__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.basket-tray__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    line-height: 1.35;
}

.basket-tray__item img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
    border: 1px dashed var(--border);
    background: #fff;
}

/* squiggle wobble (keyframes from squiggle.css) on article visuals */
.rec:hover,
.basket-dock:hover img,
.basket-dock.is-over img {
    animation: squiggle-card 0.34s steps(1) infinite;
}

@media (prefers-reduced-motion: reduce) {

    .rec:hover,
    .basket-dock:hover img,
    .basket-dock.is-over img,
    .forage-pop {
        animation: none;
    }
}