/* ================================================================
   ADVENT 2026 (#4449): "Broadsheet"

   A good newspaper's Christmas quiz: warm paper, ink rules, serif
   numerals, coral used as ink rather than as paint. Composes the real
   tokens; the seasonal ones (--advent-*) live in tokens.css, section 10.
   Mobile first: 375 → 430 → 768 → 1280.

   Three parts: the page and its grid; the door (the leaf, the question,
   the reveal and what follows it); the provision window around the
   reader's own `.celex-card`, which nothing here restyles inside.
   ================================================================ */

.adv-broadsheet {
    background: var(--advent-paper);
    color: var(--ss-dark);
    min-height: 100vh;
}

/* The header is an absolute 80px overlay; the page reserves the space
   (owns-header-clearance). */
.adv-main { padding-top: calc(var(--header-height, 80px) + var(--space-5)); padding-bottom: var(--space-8); }

.adv-wrap { max-width: 34rem; margin: 0 auto; padding: 0 var(--space-4); }
.adv-wrap--narrow { max-width: 30rem; }

/* ---- type ------------------------------------------------------- */
.adv-kicker {
    font-family: var(--font-stack-mono);
    font-size: var(--font-size-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-neutral-500);
    margin: 0 0 var(--space-3);
}
.adv-title {
    font-family: var(--ss-font-serif);
    font-weight: 700;
    font-size: 2.125rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 var(--space-3);
    color: var(--ss-dark);
}
.adv-standfirst {
    font-family: var(--ss-font-serif);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}
.adv-h2 {
    font-family: var(--font-stack-mono);
    font-size: var(--font-size-small);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ss-dark);
    margin: 0 0 var(--space-3);
}
.adv-icon { width: 1em; height: 1em; flex: none; }
.adv-preview {
    font-family: var(--font-stack-mono);
    font-size: var(--font-size-small);
    border: 1px dashed var(--advent-rule);
    padding: var(--space-2) var(--space-3);
    margin: 0 0 var(--space-4);
}
.adv-error {
    margin: var(--space-3) 0 0;
    font-family: var(--ss-font-primary);
    color: var(--lx-danger-fg);
}

/* ---- masthead ---------------------------------------------------- */
.adv-masthead {
    border-top: 3px double var(--advent-rule);
    border-bottom: 1px solid var(--advent-rule);
    padding: var(--space-4) 0 var(--space-5);
    margin-bottom: var(--space-4);
}

/* ---- streak / tally: modest, one line ---------------------------- */
.adv-streak {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    font-family: var(--font-stack-mono);
    font-size: var(--font-size-small);
    color: var(--text-color);
    margin: 0 0 var(--space-4);
}
.adv-streak[hidden] { display: none; }
.adv-streak strong { font-weight: 500; color: var(--ss-dark); }
.adv-streak__days { display: inline-flex; gap: 3px; }
.adv-streak__day { width: 7px; height: 7px; border: 1px solid var(--advent-rule); }
.adv-streak__day--played { background: var(--advent-rule); }
.adv-streak__sep { margin: 0 0.25em; color: var(--color-neutral-400); }

/* ---- the grid ---------------------------------------------------- */
.adv-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--advent-rule);
    border-left: 1px solid var(--advent-rule);
}
.adv-cell {
    position: relative;
    aspect-ratio: 1 / 1.08;
    border-right: 1px solid var(--advent-rule);
    border-bottom: 1px solid var(--advent-rule);
    min-width: 0;
}
.adv-cell__link,
.adv-cell--shut {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: var(--space-2) var(--space-2) var(--space-2) 0.5rem;
    color: inherit;
    text-decoration: none;
}
.adv-cell__link:hover { color: inherit; }
.adv-cell__num {
    font-family: var(--ss-font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
    font-variant-numeric: lining-nums;
}
.adv-cell__act {
    font-family: var(--ss-font-primary);
    font-size: 0.75rem;
    line-height: 1.2;
    color: var(--text-color);
    hyphens: auto;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.adv-cell__act[hidden], .adv-cell__pill[hidden], .adv-cell__mark[hidden] { display: none; }
.adv-cell__mark {
    position: absolute;
    top: 0.5rem;
    right: 0.4rem;
    display: inline-flex;
    font-size: 0.875rem;
    line-height: 1;
}
.adv-cell__mark--right { color: var(--lx-success-fg); }
.adv-cell__mark--wrong { color: var(--lx-danger-fg); }
.adv-cell__mark--missed { color: var(--color-neutral-400); font-family: var(--ss-font-serif); }
.adv-cell__note {
    font-family: var(--font-stack-mono);
    font-size: 0.625rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* opened: a crisp white panel, as if the door has been folded back */
.adv-cell--open { background: var(--lx-surface); }
.adv-cell--missed .adv-cell__num { color: var(--color-neutral-500); }
.adv-cell--open .adv-cell__link:hover { background: var(--advent-mark); }
/* the grid's compact pill sits on the act's own line */
.adv-cell__pill { display: block; margin-top: auto; margin-bottom: 3px; }

/* shut: hatched like an unprinted plate; just the number */
.adv-cell--shut {
    color: var(--color-neutral-500);
    background-image: repeating-linear-gradient(135deg,
        transparent 0 7px,
        color-mix(in srgb, var(--ss-dark) 9%, transparent) 7px 8px);
}
.adv-cell--shut .adv-cell__num { font-weight: 400; }

/* today: the one coral cell. Ink on coral (6:1), never white on coral. */
.adv-cell--today { background: var(--lx-brand); }
.adv-cell--today .adv-cell__num { font-size: 2.5rem; color: var(--ss-dark); }
.adv-cell__today {
    font-family: var(--font-stack-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.adv-cell--today .adv-cell__link:hover { background: var(--lx-brand-strong); color: var(--lx-on-brand); }
/* today's door once answered: an opened cell, ringed in coral */
.adv-cell--is-today { box-shadow: inset 0 0 0 3px var(--lx-brand); }

.adv-footnote {
    font-family: var(--ss-font-serif);
    font-style: italic;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-neutral-500);
    margin: var(--space-4) 0 0;
}

/* ---- focus: visible everywhere, never colour-only ---------------- */
.adv-broadsheet .adv-main a:focus-visible,
.adv-broadsheet .adv-main button:focus-visible,
.adv-inside:focus-visible {
    outline: 3px solid var(--ss-dark);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--advent-paper);
}
.adv-cell__link:focus-visible { outline-offset: -4px; box-shadow: none; }
.adv-inside:focus:not(:focus-visible) { outline: none; }

/* ---- door page ----------------------------------------------------- */
.adv-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    min-height: 44px;
    font-family: var(--font-stack-mono);
    font-size: var(--font-size-small);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ss-dark);
    text-decoration: none;
    margin-bottom: var(--space-2);
}
.adv-back:hover { color: var(--ss-dark); text-decoration: underline; text-underline-offset: 3px; }

/* The open leaf swings out past the card's right edge; clip it at the page
   rather than let it widen the page (clip, not hidden: no scroll container). */
.advent-door-page .adv-main { overflow-x: clip; }

/* One column below desktop: the question, its options (then its verdict), the
   door and its card, the game, then the share line. The
   reveal changes only what is below the verdict: a card can run to thousands
   of pixels, and above the verdict it would push the answer off the screen.
   Both columns' wrappers step aside so their parts can be placed apart. */
.adv-door { --adv-door-h: 15rem; display: grid; gap: var(--space-4); }
.adv-door__frame-col, .adv-door__play-col { display: contents; }
.adv-door__meta, .adv-hook { order: 1; }
.adv-question { order: 2; }
[data-advent-question] { order: 3; }
.adv-recap { order: 4; }
.adv-stage { order: 5; }
.adv-door__game { order: 6; }
.adv-door__share { order: 7; }
.adv-door__streak { order: 9; }
.adv-door__meta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: var(--space-2) var(--space-3);
}
.adv-door__meta .adv-kicker { margin: 0; }

/* The stage holds the inside and the leaf in ONE grid cell, so it is as
   tall as whichever is taller and nothing jumps when the leaf goes. */
.adv-stage {
    display: grid;
    perspective: 1400px;
    perspective-origin: 100% 50%;
}
.adv-stage > * { grid-area: 1 / 1; }

.adv-inside {
    position: relative;
    display: block;
    background: var(--lx-surface);
    border: 1px solid var(--advent-rule);
    padding: var(--space-3);
}
.adv-inside.is-sealed { visibility: hidden; }
/* Sealed and while the door swings, the inside is the height of the door, so
   the question and its answers stay on the first screen; once open it is as
   tall as the provision. */
.adv-door:not(.is-open) .adv-inside { max-height: var(--adv-door-h); overflow: hidden; }
.adv-door.is-opening .adv-inside {
    -webkit-mask-image: linear-gradient(#000 70%, transparent);
    mask-image: linear-gradient(#000 70%, transparent);
}

.adv-leaf {
    position: relative;
    z-index: 1;
    min-height: var(--adv-door-h);
    transform-origin: 100% 50%;
    transform-style: preserve-3d;
    /* no will-change: a promoted layer here composited translucent in Chromium */
}
.adv-leaf[hidden] { display: none; }
.adv-leaf__face {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    gap: var(--space-2);
    padding: var(--space-4) calc(var(--space-4) + 10px) var(--space-4) var(--space-4);
    background: var(--lx-surface);
    border: 1px solid var(--advent-rule);
    /* an inner printed rule, like the door outline on a card calendar */
    box-shadow: inset 0 0 0 6px var(--lx-surface), inset 0 0 0 7px var(--advent-rule);
    backface-visibility: hidden;
}
/* the back of the leaf: plain card, so the open door never shows its number
   mirrored */
.adv-leaf::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--advent-paper-deep);
    border: 1px solid var(--advent-rule);
    transform: rotateY(180deg);
    backface-visibility: hidden;
}
/* the scored hinge on the right edge */
.adv-leaf__face::before {
    content: '';
    position: absolute;
    top: 7px; bottom: 7px; right: 7px;
    width: 10px;
    border-left: 1px dashed var(--advent-rule);
    background: var(--advent-paper-deep);
}
/* the thumb notch on the opening (left) edge */
.adv-leaf__face::after {
    content: '';
    position: absolute;
    left: -1px;
    top: 50%;
    width: 14px;
    height: 28px;
    margin-top: -14px;
    background: var(--advent-paper);
    border: 1px solid var(--advent-rule);
    border-left: 0;
    border-radius: 0 14px 14px 0;
}
.adv-leaf__num {
    font-family: var(--ss-font-serif);
    font-weight: 700;
    font-size: 6.5rem;
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: var(--lx-brand);
    font-variant-numeric: lining-nums;
    padding-left: var(--space-2);
}
/* The hook: the question's setup, in the column with the question (never on
   the leaf, which goes when it opens).
   The setup is the headline; the question under it is the lighter italic
   line it leads to (still the page's h1, which the options are labelled by). */
.adv-hook {
    font-family: var(--ss-font-serif);
    font-weight: 700;
    font-size: 1.375rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ss-dark);
    margin: 0;
}
.adv-door .adv-question {
    font-style: italic;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.45;
    letter-spacing: 0;
    margin-top: calc(-1 * var(--space-2));
}
.adv-leaf__hint {
    font-family: var(--font-stack-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-neutral-500);
    padding-left: var(--space-2);
}

/* The swing: one transform. The leaf swings out past the card's right edge,
   away from the question; once it has swung it goes (advent.js revealDoor).
   No opacity in the full-motion path: a fading 3D layer reads as tracing
   paper, not card. */
.adv-leaf { transition: transform 900ms cubic-bezier(0.5, 0.05, 0.2, 1); }
.adv-door.is-swinging .adv-leaf,
.adv-door.is-open .adv-leaf { transform: rotateY(160deg); pointer-events: none; }

/* the leaf casts a shadow over the inside that lifts as it swings away */
.adv-inside::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(270deg, color-mix(in srgb, var(--ss-dark) 22%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 680ms ease-out;
}
.adv-door.is-opening .adv-inside::after { opacity: 1; }
.adv-door.is-opening.is-swinging .adv-inside::after { opacity: 0; }

/* reduced motion: the leaf cross-fades, nothing turns */
.adv-door.is-reduced .adv-leaf { transition: opacity 200ms linear; }
.adv-door.is-reduced.is-swinging .adv-leaf { transform: none; opacity: 0; }
.adv-door.is-reduced .adv-inside { transition: opacity 200ms linear; }
@media (prefers-reduced-motion: reduce) {
    .adv-leaf { transition: opacity 200ms linear; }
    .adv-door.is-swinging .adv-leaf { transform: none; opacity: 0; }
    .adv-inside::after { transition: none; }
}

.adv-inside__placeholder { display: grid; gap: var(--space-3); }
.adv-proof { display: block; height: 0.75rem; background: var(--lx-surface-inset); }
.adv-proof--short { width: 60%; }
.adv-inside__note { font-family: var(--ss-font-serif); font-style: italic; font-size: 0.875rem; color: var(--color-neutral-500); margin: var(--space-2) 0 0; }

/* ---- the question + three answers -------------------------------- */
.adv-question {
    font-family: var(--ss-font-serif);
    font-weight: 700;
    font-size: 1.375rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ss-dark);
    margin: 0;
}
.adv-question:focus { outline: none; }
.adv-options { display: grid; gap: var(--space-2); }
.adv-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    min-height: 3.5rem;
    padding: 0 var(--space-4) 0 var(--space-3);
    background: var(--lx-surface);
    border: 1px solid var(--advent-rule);
    border-radius: 0;
    color: var(--ss-dark);
    font-family: var(--ss-font-primary);
    font-size: 1.0625rem;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.adv-option:hover:not(:disabled) { background: var(--advent-mark); }
.adv-option:active:not(:disabled) { transform: translateY(1px); }
.adv-option__letter {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--advent-rule);
    border-radius: 50%;
    font-family: var(--font-stack-mono);
    font-size: var(--font-size-small);
    font-weight: 500;
    flex: none;
}
.adv-option__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) 0; }
.adv-option__label { line-height: 1.25; }
.adv-option__tags { display: flex; flex-wrap: wrap; gap: 0.25em 0.75em; }
/* results grow into the rows: the bar is a scaled pseudo-element */
.adv-option::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--lx-surface-inset);
    transform-origin: 0 50%;
    transform: scaleX(calc(var(--pct, 0%) / 100%));
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 200ms;
}
.adv-option:disabled { cursor: default; opacity: 1; color: var(--ss-dark); }
.adv-option.is-law::before { background: var(--advent-mark); }
.adv-option.is-law { border-width: 2px; padding-left: calc(var(--space-3) - 1px); }
.adv-option.is-law .adv-option__letter { background: var(--ss-dark); color: var(--lx-surface); border-color: var(--ss-dark); }
.adv-option.is-mine:not(.is-law) .adv-option__label { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.adv-option.is-sending { opacity: 0.7; }
.adv-option__pct {
    font-family: var(--font-stack-mono);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    min-width: 2.6em;
    text-align: right;
}
.adv-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-family: var(--font-stack-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.adv-tag--law { color: var(--lx-success-fg); }
.adv-tag--miss { color: var(--lx-danger-fg); }
.adv-tag--you { color: var(--text-color); }

/* ---- the verdict, where the options were, once answered ----------- */
.adv-recap:empty { display: none; }
/* The verdict: a badge, then labelled facts in a row, each a small mono label
   over its answer, so "you said" and "the law says" read as facts, not one
   run-on line. How everyone answered is the open disclosure below it. */
.adv-verdict {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-4);
    margin: 0 0 var(--space-2);
}
.adv-verdict__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.3rem 0.7rem 0.3rem 0.55rem;
    border: 1px solid;
    border-radius: 999px;
    font-family: var(--ss-font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.adv-verdict__badge .adv-icon { font-size: 1.05em; }
.adv-verdict--right .adv-verdict__badge {
    color: var(--lx-success-fg); background: var(--lx-success-bg); border-color: var(--lx-success-border);
}
.adv-verdict--wrong .adv-verdict__badge {
    color: var(--lx-danger-fg); background: var(--lx-danger-bg); border-color: var(--lx-danger-border);
}
.adv-verdict__facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin: 0;
}
.adv-verdict__fact { display: grid; gap: 0.1rem; }
/* The reveal line: the answer's punchline, on a line of its own under the facts. */
.adv-verdict__line {
    flex-basis: 100%;
    margin: 0;
    font-family: var(--ss-font-serif);
    font-style: italic;
    font-size: 1.0625rem;
    line-height: 1.45;
    color: var(--ss-dark);
}
.adv-verdict__fact dt {
    font-family: var(--font-stack-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-neutral-500);
}
.adv-verdict__fact dd {
    margin: 0;
    font-family: var(--ss-font-serif);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--ss-dark);
}
.adv-results summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--ss-font-primary);
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    list-style: none;
}
.adv-results summary::-webkit-details-marker { display: none; }
.adv-results summary::after {
    content: '';
    width: 0.4em; height: 0.4em; margin-left: 0.5em;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.15em) rotate(45deg);
}
.adv-results[open] summary::after { transform: translateY(0.1em) rotate(-135deg); }
.adv-results .adv-options { gap: 6px; margin-bottom: var(--space-2); }
.adv-results .adv-option { min-height: 2.75rem; font-size: 0.9375rem; }
.adv-results .adv-option::before { transition: none; }
.adv-results__total { font-family: var(--font-stack-mono); font-size: 0.75rem; color: var(--color-neutral-500); margin: 0 0 var(--space-2); }

/* ---- afterwards: play, share, why, streak ------------------------- */
.adv-door__game:empty, .adv-door__share:empty, .adv-door__streak:empty { display: none; }
.adv-door__game > section, .adv-door__share > section { border-top: 1px solid var(--advent-rule); padding-top: var(--space-4); }
/* inside the verdict, between the reveal line and the tally */
.adv-recap .adv-why { margin: var(--space-5) 0 var(--space-2); }
.adv-why p { font-family: var(--ss-font-serif); font-size: 1rem; line-height: 1.65; margin: 0; }
.adv-door__streak .adv-streak { border-top: 3px double var(--advent-rule); padding-top: var(--space-4); margin: 0; }

.adv-strike__lede { font-family: var(--ss-font-serif); font-size: 1rem; line-height: 1.6; margin: 0 0 var(--space-3); }
.adv-strike__board {
    margin: var(--space-3) 0 0;
    font-family: var(--font-stack-mono);
    font-size: var(--font-size-small);
    color: var(--text-color);
}
.adv-strike__board[hidden] { display: none; }
.adv-strike__board strong { color: var(--ss-dark); font-weight: 500; }
.adv-strike__note { font-family: var(--ss-font-serif); font-style: italic; font-size: 0.875rem; color: var(--color-neutral-500); margin: var(--space-2) 0 0; }

.adv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    min-height: 2.75rem;
    padding: 0 var(--space-4);
    border-radius: 0;
    font-family: var(--ss-font-primary);
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
}
.adv-btn--ink { background: var(--ss-dark); color: var(--lx-surface); border: 1px solid var(--ss-dark); }
.adv-btn--ink:hover { background: var(--lx-brand-strong); border-color: var(--lx-brand-strong); color: var(--lx-on-brand); }
.adv-btn--line { background: var(--lx-surface); color: var(--ss-dark); border: 1px solid var(--advent-rule); }
.adv-btn--line:hover { background: var(--advent-mark); color: var(--ss-dark); }
.adv-btn[disabled] { opacity: 0.6; cursor: default; }

.adv-share__note { font-family: var(--ss-font-serif); font-style: italic; font-size: 0.875rem; color: var(--color-neutral-500); margin: 0 0 var(--space-3); }
.adv-share__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.adv-share__row .adv-btn { white-space: nowrap; padding: 0 var(--space-3); }
/* on a phone the native sheet is the main door out: full width, first */
.adv-share__native { grid-column: 1 / -1; background: var(--ss-dark); color: var(--lx-surface); border-color: var(--ss-dark); }
.adv-share__native:hover { background: var(--lx-brand-strong); border-color: var(--lx-brand-strong); color: var(--lx-on-brand); }
.adv-share__native[hidden] { display: none; }

.adv-shut-page { border-top: 3px double var(--advent-rule); padding-top: var(--space-5); }

/* ================================================================
   The provision window: the reader's `.celex-card`, unchanged, in a frame
   ================================================================ */
.adv-pv {
    --adv-spot-wash: rgba(var(--color-coral-base-rgb), 0.07);
    text-align: left;
}
.adv-pv__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
}
.adv-pv__crumbs {
    font-family: var(--ss-font-primary);
    font-size: 0.8125rem;
    color: var(--lx-text-muted);
    line-height: 1.4;
}
.adv-pv__crumbs a { color: var(--text-color); text-decoration: underline; text-underline-offset: 2px; }
.adv-pv__unavailable { font-family: var(--ss-font-serif); font-style: italic; color: var(--color-neutral-500); margin: 0; }

/* The reader's card carries a bottom margin and a sticky header for a long
   scrolling column; neither means anything in a window. */
.adv-pv__window .celex-card { margin-bottom: 0; }
.adv-pv__window .celex-card .card-header { position: static; }

/* The spotlight and the phrase are PAINT ONLY: background and box-shadow, never
   a margin, padding or weight. The card keeps the reader's exact layout, so the
   reveal and the game played in place on it (strike_out/in_place.js, whose wall
   is laid out in the reader's geometry) are one layout. The wash runs out to the
   card body's edges in shadows. */
.adv-pv .adv-spot {
    background: var(--adv-spot-wash);
    box-shadow:
        -1rem 0 0 0 var(--adv-spot-wash),
        1rem 0 0 0 var(--adv-spot-wash);
}

/* the operative phrase: a fill and an underline, never colour alone, and never
   a change of weight or spacing (either would move the words) */
.adv-pv mark.adv-operative {
    background: rgba(var(--color-coral-base-rgb), 0.22);
    color: inherit;
    padding: 0;
    box-shadow: inset 0 -2px 0 var(--lx-brand);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* collapsed: the answer, a peek of what follows, the rest folded */
.adv-pv--collapsed .celex-card-sub-header-container { display: none; }
.adv-pv--collapsed .adv-rest { display: none !important; }
.adv-pv--collapsed .adv-peek {
    max-height: 3.4em;
    overflow: hidden;
    opacity: 0.45;
    -webkit-mask-image: linear-gradient(#000 20%, transparent);
    mask-image: linear-gradient(#000 20%, transparent);
    pointer-events: none;
}

.adv-pv__more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: calc(-1 * var(--lx-radius-md));
    padding: var(--space-2) var(--space-3);
    background: var(--lx-surface-muted);
    border: 1px solid var(--lx-border);
    border-top: 0;
    border-radius: 0 0 var(--lx-radius-md) var(--lx-radius-md);
    color: var(--text-color);
    font-family: var(--ss-font-primary);
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
    z-index: 0;
}
.adv-pv__more[hidden] { display: none; }
.adv-pv__more::after {
    content: '';
    width: 0.45em;
    height: 0.45em;
    margin-left: 0.6em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.15em) rotate(45deg);
}
.adv-pv__more[aria-expanded='true']::after { transform: translateY(0.1em) rotate(-135deg); }
.adv-pv__more:hover { background: var(--lx-surface-inset); }
.adv-pv__count { margin-left: 0.5em; color: var(--lx-text-muted); font-size: 0.8125rem; }

.adv-pv__read {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    min-height: 44px;
    margin-top: var(--space-2);
    font-family: var(--ss-font-primary);
    font-weight: 700;
    color: var(--lx-brand-fg);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}
.adv-pv__read:hover { color: var(--ss-dark); }

/* definitions are tap targets on a phone; the reader's own colour, untouched */
.adv-pv a.internal-link.definition { cursor: pointer; }

/* ---- under the card: the text's credit and licence --------------- */
.adv-pv__credit {
    margin: var(--space-3) 0 0;
    font-family: var(--ss-font-primary);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--lx-text-muted);
}
.adv-pv__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- the pair: one switch, "Same rule in the UK" -------------------
   Its state is carried by the thumb's position and aria-checked as well as
   the fill, never colour alone. */
.adv-pair { --adv-switch-on: var(--ss-dark); }
.adv-pair__panel[hidden] { display: none; }
.adv-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 44px;
    margin: 0 0 var(--space-2);
    padding: 0 var(--space-3) 0 var(--space-2);
    background: transparent;
    border: 0;
    border-radius: var(--lx-radius-pill);
    font-family: var(--ss-font-primary);
    font-size: 0.9375rem;
    color: var(--ss-dark);
    cursor: pointer;
}
.adv-switch__track {
    position: relative;
    width: 2.5rem;
    height: 1.5rem;
    flex: none;
    border-radius: var(--lx-radius-pill);
    background: var(--lx-surface-inset);
    box-shadow: inset 0 0 0 1px var(--lx-border-strong);
    transition: background-color 160ms ease;
}
.adv-switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(1.5rem - 6px);
    height: calc(1.5rem - 6px);
    border-radius: 50%;
    background: var(--lx-surface);
    box-shadow: var(--lx-shadow-sm);
    transition: transform 160ms ease;
}
.adv-switch[aria-checked='true'] .adv-switch__track { background: var(--adv-switch-on); box-shadow: none; }
.adv-switch[aria-checked='true'] .adv-switch__thumb { transform: translateX(1rem); }
.adv-switch__flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ss-dark) 12%, transparent); }
.adv-switch:hover .adv-switch__label { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .adv-switch__thumb, .adv-switch__track, .adv-option::before { transition: none; }
}

/* The product's pill takes the sans; pin it so the serif frame cannot leak in. */
.advent-page .jurisdiction-pill { font-family: var(--ss-font-primary); }
.jurisdiction-pill.adv-jx-compact {
    padding: 0.1rem 0.4rem;
    gap: 0.3rem;
    font-size: 0.625rem;
    letter-spacing: 0.04em;
}
.jurisdiction-pill.adv-jx-compact .jurisdiction-pill__flag { width: 14px; height: 10px; }

/* ---- 430+: a touch more air ------------------------------------- */
@media (min-width: 400px) {
    .adv-title { font-size: 2.375rem; }
    .adv-cell__num { font-size: 1.625rem; }
}

/* ---- tablet ------------------------------------------------------- */
@media (min-width: 720px) {
    .adv-wrap { max-width: 44rem; padding: 0 var(--space-6); }
    .adv-grid { grid-template-columns: repeat(6, 1fr); }
    .adv-cell__num { font-size: 1.875rem; }
    .adv-cell--today .adv-cell__num { font-size: 3rem; }
    .adv-title { font-size: 3rem; }
    .adv-standfirst { font-size: 1.125rem; max-width: 36rem; }
    .adv-leaf__num { font-size: 8rem; }
    .adv-door { --adv-door-h: 18rem; }
    .adv-inside { padding: var(--space-4); }
}

/* ---- desktop ------------------------------------------------------ */
@media (min-width: 1024px) {
    .adv-wrap { max-width: 68rem; }
    .adv-masthead {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        column-gap: var(--space-8);
        align-items: end;
    }
    .adv-masthead .adv-kicker { grid-column: 1 / -1; }
    .adv-title { font-size: 3.75rem; margin: 0; }
    .adv-grid { grid-template-columns: repeat(8, 1fr); }
    .adv-cell { aspect-ratio: 1 / 1.05; }
    .adv-cell__link, .adv-cell--shut { padding: var(--space-3) var(--space-3) var(--space-3) 0.75rem; }
    .adv-cell__mark { top: 0.75rem; right: 0.6rem; }

    /* ---- desktop: question left, door right -------------------------
       The same areas before and after the answer, so the reveal moves
       nothing: the left column swaps its options for the verdict in place,
       the right column's leaf swings off the card, and the game lands under
       the card, below everything the reader is looking at. */
    .adv-door {
        --adv-door-h: 24rem;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
        grid-template-areas: 'meta frame' 'play frame' 'streak streak';
        grid-template-rows: auto 1fr auto;
        column-gap: var(--space-7);
        row-gap: var(--space-4);
        align-items: start;
    }
    .adv-door__meta { grid-area: meta; }
    .adv-door__play-col { display: grid; grid-area: play; gap: var(--space-4); align-content: start; }
    .adv-door__frame-col { display: block; grid-area: frame; }
    .adv-door__game > section { margin-top: var(--space-5); }
    .adv-door__streak { grid-area: streak; }
    .adv-leaf__num { font-size: 10rem; }
    .adv-hook { font-size: 1.75rem; }
    .adv-question { font-size: 1.75rem; }
    .adv-door .adv-question { font-size: 1.25rem; }
}

/* ---- the card header on a phone (#4449) ----------------------------
   The reader's header row keeps its commencement mark at its natural width
   (`flex: 0 0 auto`, inline on the card), which suits the reader's column and
   not a 320-412 px door: a long chip ("Date withheld: we could not verify when
   this applies") ran past the screen edge. Here alone, the row wraps and the
   chip's words wrap inside it; its full wording stays in its title, its
   accessible name and the receipt it opens. The reader's own header is
   untouched. */
.adv-pv .celex-card .card-header { flex-wrap: wrap; row-gap: var(--space-2); }
.adv-pv .celex-card .card-header > .d-flex.flex-nowrap {
    flex: 0 1 auto !important;
    min-width: 0;
    max-width: 100%;
}
.adv-pv .lx-cs-mark-wrap { min-width: 0; max-width: 100%; }
.adv-pv .lx-cs-chip { white-space: normal; max-width: 100%; text-align: left; }
/* The reader's tint chip at the end of a deferred paragraph keeps its words on
   one line too; on a door it shrinks and wraps its own words. The paragraph row
   itself keeps the reader's layout (no wrap), which the game measures. */
.adv-pv .paragraph-container > .lx-cs-chip { flex: 0 1 auto; min-width: 0; white-space: normal; }
/* A grid item's minimum is its widest unbreakable run; on a 320 px phone a
   long reference in the expanded article pushed the door past the screen. */
.adv-door > *, .adv-stage > *, .adv-pv__window .celex-card > * { min-width: 0; }
/* A multi-word defined term is ONE brick in the game played in place (it never
   breaks inside a term), so on a door the card keeps a term on one line too:
   the reveal and the game then break the same lines. A term longer than the
   line ("payment service provider" on a 320 px phone) wraps inside its own box
   rather than running off the screen. Door cards only. */
.adv-pv a.internal-link.definition { display: inline-block; max-width: 100%; }

/* The excerpt's rows while the card is played in place: their words are the
   wall's bricks, so the rows' own text is hidden (not removed: the layout the
   wall is built in stays put). The card loses .so-in-place-card on exit. */
.so-in-place-card .adv-in-wall { visibility: hidden; }
