/* Benoit Awards. */

:root {
    --ink:            #0a0a0c;
    --ink-raised:     #131318;
    --ink-line:       #2a2a33;
    --ink-line-soft:  #1b1b21;

    --text:           #f1efeb;
    --text-dim:       #9a958d;
    --text-faint:     #6a665f;

    --gold:           #cfa94f;
    --gold-bright:    #ecca7d;
    --gold-dim:       #6f5c2c;

    --danger:         #d9806f;
    --success:        #86ad7f;

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --measure: 46rem;
    --gutter: 1.5rem;
    --radius: 8px;
    --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* A cool wash from the top, warmed by a single gold pool behind the title. */
body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 70vh;
    background:
        radial-gradient(60% 90% at 50% -10%, rgba(207, 169, 79, 0.13), transparent 68%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* -------------------------------------------------------------------- bar */

/* One sticky row on every page: brand at the left edge, nav in the middle,
   account at the right edge. Full width on purpose: no max-width, so nothing
   drifts in from the sides on a wide screen. bar.js keeps --bar-h equal to its
   real height, which the sticky jump list on the categories page sits under. */

:root { --bar-h: 3.5rem; }

.bar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--ink-line-soft);
    background: rgba(10, 10, 12, 0.88);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.bar__inner {
    min-height: 3.5rem;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.bar__brand {
    justify-self: start;
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 300;
    font-variation-settings: "opsz" 120;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, opacity 0.35s ease, transform 0.35s ease;
}

.bar__brand:hover { color: var(--gold-bright); }

.bar__brand small {
    margin-left: 0.6rem;
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--gold);
}

.bar__nav { display: flex; gap: 1.75rem; }
.bar__nav .nav__link { font-size: 0.68rem; white-space: nowrap; }

.bar__end {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.bar__end .utility__who { white-space: nowrap; }

/* Over a hero the bar is clear and carries no brand: the hero is the brand.
   Once the hero's brand has scrolled away the bar turns solid and its own
   brand comes in. */
.has-hero .bar:not(.is-solid) { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
.has-hero .bar:not(.is-solid) .bar__brand { opacity: 0; transform: translateY(-4px); pointer-events: none; }

/* Narrow: brand and account share the first row and the nav takes the second.
   A wrapping flex row rather than a grid, because a grid track grows to its
   content's min-content width — the nowrap nav links and the account buttons
   then made the bar wider than the screen, and the whole page scrolled
   sideways. Here the account drops under the brand when the two do not fit,
   and the nav scrolls within its own row. */
@media (max-width: 52rem) {
    .bar__inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 1rem;
        padding-top: 0.7rem;
        row-gap: 0.4rem;
    }

    .bar__brand { min-width: 0; }
    .bar__end { margin-left: auto; }

    .bar__nav {
        order: 1;
        flex: 1 0 100%;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 1.4rem;
        padding-bottom: 0.3rem;
    }

    .bar__nav::-webkit-scrollbar { display: none; }
    .bar__end .utility__who { display: none; }

    /* Nothing to fade in from on a narrow screen: the brand is always there,
       so the bar is always solid, or the hero shows through under it. */
    .has-hero .bar:not(.is-solid) {
        background: rgba(10, 10, 12, 0.88);
        border-bottom-color: var(--ink-line-soft);
        backdrop-filter: blur(10px);
    }
    .has-hero .bar:not(.is-solid) .bar__brand { opacity: 1; transform: none; pointer-events: auto; }
}

.utility__who {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.utility__action {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--ink-line);
    border-radius: 999px;
    background: transparent;
    color: var(--text-dim);
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

/* The icon stands in for the label on a phone only; see the 30rem rule. */
.utility__icon { display: none; width: 1rem; height: 1rem; }

.utility__action:hover {
    color: var(--ink);
    background: var(--gold);
    border-color: var(--gold);
}

/* ------------------------------------------------------------------- hero */

/* The whole first screen of the home page. The first category is below the
   fold on purpose, and the cue at the bottom says so. */
.hero {
    position: relative;
    z-index: 1;
    min-height: calc(100svh - var(--bar-h));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem var(--gutter) 6rem;
    text-align: center;
}

.hero__brand {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(3.4rem, 13vw, 10.5rem);
    font-weight: 200;
    font-variation-settings: "opsz" 144;
    line-height: 0.92;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--text);
    animation: hero-in 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__brand span { display: block; }
.hero__brand span + span { color: var(--gold-bright); }

.hero__year {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    color: var(--gold);
    animation: hero-in 1.2s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__rule {
    display: block;
    width: clamp(2rem, 10vw, 5rem);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim));
}

.hero__rule:last-child { background: linear-gradient(90deg, var(--gold-dim), transparent); }

.hero__lede {
    margin: 1.5rem auto 0;
    max-width: 30rem;
    color: var(--text-dim);
    animation: hero-in 1.2s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero .actions { animation: hero-in 1.2s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }

.hero__cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    white-space: nowrap;
    animation: hero-fade 1s 0.8s ease both;
}

.hero__cue:hover { color: var(--gold-bright); }

/* A line with a gold bead running down it. */
.hero__cue i {
    position: relative;
    width: 1px;
    height: 3rem;
    background: var(--ink-line);
    overflow: hidden;
}

.hero__cue i::after {
    content: "";
    position: absolute;
    left: 0;
    width: 1px;
    height: 1rem;
    background: var(--gold);
    animation: hero-run 1.8s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(1.25rem); }
    to   { opacity: 1; transform: none; }
}

@keyframes hero-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-run { from { top: -1rem; } to { top: 3rem; } }

/* A page under a hero has already been introduced. */
.hero + .page { padding-top: 3rem; animation: none; }

/* -------------------------------------------------------------------- nav */

.nav__link {
    position: relative;
    padding: 0.4rem 0;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.22s ease;
}

.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(0.4); }

.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { transform: scaleX(1); }

/* ------------------------------------------------------------------ main */

.page {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 4rem var(--gutter) 5rem;
    animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page--wide { max-width: 60rem; }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.1;
    margin: 0;
}

.title {
    font-size: clamp(1.9rem, 5.5vw, 2.75rem);
    font-weight: 300;
    font-variation-settings: "opsz" 100;
    letter-spacing: -0.01em;
}

.eyebrow {
    margin: 0 0 1rem;
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
}

.lede {
    margin: 1.1rem 0 0;
    max-width: 34rem;
    color: var(--text-dim);
}

.section { margin-top: 4.5rem; }

.section__title {
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.section__title::after {
    content: "";
    display: block;
    width: 1.5rem;
    height: 1px;
    margin: 1.1rem 0 0;
    background: var(--ink-line);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-top: 2rem;
}

.hero .actions { justify-content: center; }

.muted { color: var(--text-dim); }
.small { font-size: 0.85rem; }
.faint { color: var(--text-faint); }

/* --------------------------------------------------------------- laurels */

.laurel-list {
    list-style: none;
    margin: 2.75rem 0 0;
    padding: 0;
    display: grid;
    /* Not the implicit auto track: that is as wide as a card's widest
       unbreakable content, and an <audio> is 300px whatever its CSS says. */
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.laurel {
    position: relative;
    padding: 2.1rem 1.5rem;
    border: 1px solid var(--ink-line-soft);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.laurel:hover {
    border-color: var(--gold-dim);
    background: linear-gradient(180deg, rgba(207, 169, 79, 0.05), transparent);
    transform: translateY(-2px);
}

.laurel__name {
    font-size: 1.6rem;
    font-weight: 300;
    font-variation-settings: "opsz" 100;
    letter-spacing: -0.005em;
}

.laurel__desc {
    margin: 0.55rem 0 0;
    max-width: 36rem;
    color: var(--text-dim);
    font-size: 0.92rem;
}

.laurel__deadline {
    margin: 1.15rem 0 0;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.laurel__deadline b { color: var(--gold); font-weight: 600; }

/* -------------------------------------------------------------- chapters */

/* The categories page: a jump list on the left that stays put, and one
   chapter of running text per category. chapters.js adds the motion. */

.chapters {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 4rem;
    margin-top: 4rem;
    text-align: left;
}

.chapters__nav {
    position: sticky;
    top: calc(var(--bar-h) + 2rem);
    align-self: start;
}

.chapters__label {
    margin: 0 0 1.1rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.chapters__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--ink-line);
}

.chapters__link {
    display: flex;
    gap: 0.7rem;
    align-items: baseline;
    margin-left: -1px;
    padding: 0.55rem 0 0.55rem 1rem;
    border-left: 1px solid transparent;
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.35;
    text-decoration: none;
    transition: color 0.25s ease, border-color 0.25s ease;
}

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

.chapters__link.is-current {
    color: var(--gold-bright);
    border-left-color: var(--gold);
}

.chapters__link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(207, 169, 79, 0.28);
    border-radius: var(--radius-sm);
}

.chapters__num {
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.chapters__link.is-current .chapters__num { color: var(--gold); }

/* Clips the numerals sideways without clipping them vertically, and without
   making this a scroll container, which would undo the sticky nav. */
.chapters__body { overflow-x: clip; }

.chapter {
    position: relative;
    padding: 2.5rem 0 5.5rem;
    scroll-margin-top: calc(var(--bar-h) + 1rem);
    isolation: isolate;
}

.chapter + .chapter { border-top: 1px solid var(--ink-line-soft); }

.chapter__numeral {
    position: absolute;
    top: 0;
    right: 0;
    z-index: -1;
    font-family: var(--serif);
    font-size: clamp(7rem, 16vw, 12rem);
    font-weight: 200;
    line-height: 1;
    color: rgba(207, 169, 79, 0.07);
    pointer-events: none;
    user-select: none;
    will-change: transform;
}

.chapter__eyebrow {
    margin: 0 0 0.9rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    color: var(--gold);
}

.chapter__name {
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    font-weight: 300;
    font-variation-settings: "opsz" 100;
    letter-spacing: -0.01em;
}

.chapter__text {
    margin: 1.4rem 0 0;
    max-width: 36rem;
    font-family: var(--serif);
    font-size: 1.12rem;
    font-weight: 300;
    line-height: 1.75;
    color: var(--text-dim);
}

.chapter__text + .chapter__text { margin-top: 1rem; }

.chapter__new {
    margin-left: 0.8rem;
    vertical-align: middle;
    color: var(--gold);
    border-color: var(--gold-dim);
}

/* Formation and type: one box, a cell each, label above value. */
.chapter__facts {
    display: inline-grid;
    grid-template-columns: auto auto;
    margin: 1.4rem 0 0;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
}

.chapter__facts div { padding: 0.75rem 1.2rem; }
.chapter__facts div + div { border-left: 1px solid var(--ink-line); }

.chapter__facts dt {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}

.chapter__facts dd { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--text); }

.chapter__lineage {
    margin: 1.2rem 0 0;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--gold);
}

.chapter__rule {
    margin: 1.5rem 0 0;
    max-width: 36rem;
    padding: 0.9rem 1.1rem;
    border-left: 2px solid var(--gold-dim);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(207, 169, 79, 0.05);
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-dim);
}

.chapter__rule b {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}

.chapter__rule + .chapter__rule { margin-top: 0.6rem; }

@media (max-width: 30rem) {
    .chapter__facts { display: grid; grid-template-columns: minmax(0, 1fr); }
    .chapter__facts div + div { border-left: 0; border-top: 1px solid var(--ink-line); }
}

/* -------------------------------------------- between rules and categories */

/* "See the rules": a small gold pill pointing at the article that says it. */
.see-rules {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.65rem;
    border: 1px solid var(--gold-dim);
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-indent: 0;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.see-rules::after { content: "→"; margin-left: 0.4rem; letter-spacing: 0; }
.see-rules:hover { background: rgba(207, 169, 79, 0.1); color: var(--gold-bright); }

/* Under the last rule box, on a line of its own. */
.chapter__rule .see-rules { display: flex; width: max-content; margin-top: 0.7rem; }

/* The deadline carries the rules timeline's dot: the same sign for "date". */
.chapter__deadline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.7rem;
}

.chapter__deadline::before {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    border: 1px solid var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--ink);
}

/* A category named in the rules, linked to its section. Dotted, so it does
   not read as a link to another article. */
.named {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px dotted var(--gold);
}

.named:hover { color: var(--gold-bright); }

/* The last thing on each of the two pages: a way on to the other. */
.handover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    max-width: 46rem;
    margin: 5rem 0 0;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(207, 169, 79, 0.06), transparent);
    text-align: left;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.handover:hover { border-color: var(--gold-dim); }

.handover small {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}

.handover strong {
    display: block;
    margin-top: 0.25rem;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text);
}

.handover__arrow {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 300;
    color: var(--gold);
    transition: transform 0.2s ease;
}

.handover:hover .handover__arrow { transform: translateX(0.3rem); }

/* The other language's version of stored content (Bilingual.cs). Whatever
   display a class gives it, hidden wins. */
[data-lang][hidden] { display: none !important; }

/* ----------------------------------------------------------------- rules */

/* The one year every date on the timeline shares, said once above them. */
.dates__year {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 3.5rem 0 0;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 300;
    font-variant-numeric: lining-nums;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
    color: var(--gold);
}

.dates {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 46rem;
    margin: 2rem auto 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

.dates::before {
    content: "";
    position: absolute;
    left: 16.66%;
    right: 16.66%;
    top: 0.45rem;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-dim));
}

.date { position: relative; padding-top: 1.6rem; }

.date::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 0.9rem;
    height: 0.9rem;
    margin-left: -0.45rem;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 4px var(--ink);
}

/* Day and month on one line, in figures that sit on the line: Fraunces
   defaults to old-style ones, whose 9 and 5 drop below it. */
.date__day {
    display: block;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    font-variant-numeric: lining-nums tabular-nums;
    font-variation-settings: "opsz" 48;
    line-height: 1.15;
    color: var(--text);
    white-space: nowrap;
}

.date__what {
    display: inline-block;
    margin-top: 0.7rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 1px solid var(--ink-line);
}

.date__what:hover { color: var(--gold-bright); border-color: var(--gold-dim); }

/* One article per row, opening with its number in the sentence itself, the
   way a legal text does. */
.articles {
    max-width: 46rem;
    margin: 5rem 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.article {
    padding: 2.25rem 0;
    border-top: 1px solid var(--ink-line-soft);
    scroll-margin-top: calc(var(--bar-h) + 1.5rem);
}

.article:last-child { border-bottom: 1px solid var(--ink-line-soft); }

.article__text {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.08rem;
    font-weight: 300;
    line-height: 1.75;
    color: var(--text-dim);
}

.article__text + .article__text { margin-top: 0.9rem; }
.article strong { color: var(--text); font-weight: 400; }

.article__text a {
    color: var(--gold-bright);
    text-decoration: none;
    border-bottom: 1px solid var(--gold-dim);
}

.article__runin {
    margin-right: 0.35rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}

/* Deadlines inside an article, as a small ledger. */
.ledger {
    margin: 1.1rem 0 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius);
}

.ledger li {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1rem;
    align-items: baseline;
    padding: 0.8rem 1.1rem;
}

.ledger li + li { border-top: 1px solid var(--ink-line); }
.ledger b { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.ledger span { font-size: 0.9rem; color: var(--text-dim); }

/* The same arrival as the categories, driven by the same script. */
.chapters-motion .article {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.chapters-motion .article.is-visible { opacity: 1; transform: none; }

@media (max-width: 40rem) {
    .dates { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding-left: 2rem; text-align: left; }

    .dates::before {
        left: 0.45rem;
        right: auto;
        top: 0.45rem;
        bottom: 0.45rem;
        width: 1px;
        height: auto;
        background: linear-gradient(180deg, var(--gold-dim), var(--gold), var(--gold-dim));
    }

    .date { padding-top: 0; }
    .date::before { left: -2rem; top: 0.35rem; margin-left: 0; }
    .date__what { margin-top: 0.3rem; }
    .article { padding: 1.75rem 0; }
    .ledger li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

/* Checkboxes in the category sheet, one row of them per flag set. */
.checks { border: 0; padding: 0; margin-inline: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
.checks legend { width: 100%; padding: 0; }

.check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--text-dim);
    cursor: pointer;
}

.check input { accent-color: var(--gold); width: 1rem; height: 1rem; margin: 0; }

.chapter__deadline {
    margin: 1.75rem 0 0;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.chapter__deadline b { color: var(--gold); font-weight: 600; }

.chapter .files { margin-left: 0; }
.chapter .actions { justify-content: flex-start; }

/* Beside the title rather than in a corner: a chapter has no card to sit in. */
.chapter__edit.laurel__edit { top: 2.5rem; right: 0; bottom: auto; }

/* Hidden only once chapters.js has said it will reveal them. */
.chapters-motion .chapter > :not(.chapter__numeral) {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.chapters-motion .chapter.is-visible > :not(.chapter__numeral) {
    opacity: 1;
    transform: none;
}

/* Each line follows the one above it in. */
.chapters-motion .chapter.is-visible > .chapter__name     { transition-delay: 0.08s; }
.chapters-motion .chapter.is-visible > .chapter__text     { transition-delay: 0.16s; }
.chapters-motion .chapter.is-visible > .chapter__deadline { transition-delay: 0.24s; }

/* The numeral's drift and fade are chapters.js's, frame by frame: a transition
   here would lag behind the scroll. */

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* Narrow: the jump list becomes a strip pinned to the top that scrolls
   sideways on its own, so the page itself never does. */
@media (max-width: 52rem) {
    .chapters { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 2.5rem; }

    .chapters__nav {
        top: var(--bar-h);
        z-index: 3;
        margin: 0 calc(-1 * var(--gutter));
        padding: 0.6rem var(--gutter);
        background: rgba(10, 10, 12, 0.92);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid var(--ink-line-soft);
    }

    .chapters__label { display: none; }

    .chapters__list {
        display: flex;
        gap: 0.4rem;
        overflow-x: auto;
        scrollbar-width: none;
        border-left: 0;
    }

    .chapters__list::-webkit-scrollbar { display: none; }

    .chapters__link {
        margin: 0;
        padding: 0.45rem 0.75rem;
        border: 1px solid var(--ink-line);
        border-radius: 999px;
        white-space: nowrap;
        font-size: 0.8rem;
    }

    .chapters__link.is-current { border-color: var(--gold-dim); }

    .chapter { padding: 2.25rem 0 4rem; scroll-margin-top: calc(var(--bar-h) + 4rem); }
    .chapter__text { font-size: 1.02rem; }
    .chapter__edit.laurel__edit { top: 2.1rem; }
    .chapter__name { padding-right: 3rem; }
}

/* --------------------------------------------------------- uploaded files */

.files {
    list-style: none;
    margin: 1.15rem 0 0;
    padding: 0;
    border-top: 1px solid var(--ink-line-soft);
}

.file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--ink-line-soft);
    font-size: 0.9rem;
}

.file__name { word-break: break-word; }

/* Pushes the tag to the end of the row, and the reason onto its own line. */
.file__size { margin-left: auto; }
.file__why { flex-basis: 100%; }

/* Where a closed category stands with its jury: the same rows as a list of
   files, with a count at the end of each instead of a size. */
.dispatch { text-align: left; font-size: 0.9rem; color: var(--text-dim); }
.dispatch__count { margin-left: auto; color: var(--gold); font-weight: 600; }
.dispatch + .small { margin-top: 0.9rem; }

/* A jury member's ballot: one row per candidate, its players stacked under
   the number so a narrow screen gives each the full width. */
.ballot { text-align: left; }
/* nowrap: a wrapping column's line is as wide as its widest item, which made
   the 300px <audio> the width of the card on a phone. */
.ballot__candidate { flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding: 1.1rem 0; }
.ballot__number {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.ballot__number b { color: var(--gold); font-weight: 600; }
.ballot__recording { display: flex; align-items: center; gap: 0.75rem; }
.ballot__player { flex: 1 1 auto; min-width: 0; height: 2.5rem; color-scheme: dark; }
.ballot__length { flex: 0 0 auto; font-variant-numeric: tabular-nums; }

.upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.35rem;
}

.upload__file {
    flex: 1 1 12rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.upload__file::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--ink-line);
    border-radius: 3px;
    background: transparent;
    color: var(--text-dim);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.upload__file::file-selector-button:hover { color: var(--gold); border-color: var(--gold-dim); }

/* ----------------------------------------------------------------- cards */

.card {
    background: var(--ink-raised);
    border: 1px solid var(--ink-line-soft);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    margin-top: 0.75rem;
}

.card__title {
    font-size: 1.35rem;
    font-weight: 300;
    font-variation-settings: "opsz" 100;
}

/* ----------------------------------------------------------------- forms */

.form {
    margin: 2.5rem 0 0;
    max-width: 23rem;
}

.field { margin-bottom: 1.4rem; }

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.input, .select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder { color: var(--text-faint); }

.input:focus, .select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold-dim);
    box-shadow: 0 0 0 3px rgba(207, 169, 79, 0.14);
}

.select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
                      linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
    background-position: calc(100% - 1.1rem) 55%, calc(100% - 0.75rem) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.25rem;
}

.select option { background: var(--ink-raised); color: var(--text); }

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border: 1px solid var(--gold);
    border-radius: var(--radius-sm);
    background: var(--gold);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    transform: translateY(-1px);
}

.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(207, 169, 79, 0.28); }

.btn--block { width: 100%; }

.btn--ghost { background: transparent; color: var(--text-dim); border-color: var(--ink-line); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); border-color: var(--text-faint); }

.btn--small { padding: 0.5rem 1.1rem; font-size: 0.66rem; letter-spacing: 0.12em; }

.btn--danger { background: transparent; color: var(--danger); border-color: rgba(217, 128, 111, 0.35); }
.btn--danger:hover { background: rgba(217, 128, 111, 0.1); border-color: var(--danger); color: var(--danger); }

.btn--go { background: transparent; color: var(--success); border-color: rgba(134, 173, 127, 0.35); }
.btn--go:hover { background: rgba(134, 173, 127, 0.1); border-color: var(--success); color: var(--success); }

/* ---------------------------------------------------------------- notice */

[hidden] { display: none !important; }

.notice {
    display: flex;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
    max-width: 34rem;
    padding: 0.95rem 1.15rem;
    border: 1px solid var(--ink-line-soft);
    border-radius: var(--radius-sm);
    background: var(--ink-raised);
    color: var(--text-dim);
    font-size: 0.9rem;
    text-align: left;
}

.notice::before {
    content: "";
    flex: 0 0 2px;
    border-radius: 2px;
    background: var(--text-faint);
}

.notice--good::before { background: var(--success); }
.notice--bad::before  { background: var(--danger); }

/* ---------------------------------------------------------------- roster */

.roster {
    width: 100%;
    margin-top: 2.5rem;
    border-collapse: collapse;
    text-align: left;
}

.roster th {
    padding: 0 0.85rem 0.9rem;
    border-bottom: 1px solid var(--ink-line);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.roster td {
    padding: 1.15rem 0.85rem;
    border-bottom: 1px solid var(--ink-line-soft);
    vertical-align: middle;
}

.roster tbody tr { transition: background 0.15s ease; }
.roster tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.roster th:last-child, .roster td:last-child { text-align: right; }

.roster__email { word-break: break-word; }

.tag {
    display: inline-block;
    padding: 0.28rem 0.75rem;
    border: 1px solid var(--ink-line);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    white-space: nowrap;
}

.tag--active  { color: var(--success); border-color: rgba(134, 173, 127, 0.3); }
.tag--blocked { color: var(--danger);  border-color: rgba(217, 128, 111, 0.3); }
.tag--seat    { color: var(--gold);    border-color: var(--gold-dim); background: rgba(207, 169, 79, 0.06); }
.tag--preview { color: var(--danger);  border-color: rgba(217, 128, 111, 0.3); padding: 0.16rem 0.6rem; }

.seats {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* The preview-mode persona picker. Deliberately plain: it is scaffolding, and
   should not read as part of the ceremony. */
.personas {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
}

.persona {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--ink-line);
}

.persona:last-child { border-bottom: 1px solid var(--ink-line); }

.persona__who {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    word-break: break-word;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.inline-form .input { width: auto; min-width: 8rem; padding: 0.5rem 0.75rem; font-size: 0.85rem; }

.card .inline-form { justify-content: flex-start; margin-top: 1.35rem; }
.card .select { width: auto; min-width: 12rem; padding: 0.5rem 2.25rem 0.5rem 0.75rem; font-size: 0.85rem; }

/* ---------------------------------------------------------------- footer */

.foot {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding: 1.75rem var(--gutter) 2.25rem;
    border-top: 1px solid var(--ink-line-soft);
    text-align: center;
}

.foot__note { margin: 0; font-size: 0.75rem; color: var(--text-faint); }
.foot a { color: var(--text-dim); text-decoration: none; border-bottom: 1px solid var(--ink-line); }
.foot a:hover { color: var(--gold); border-bottom-color: var(--gold-dim); }

/* ----------------------------------------------------------- flag switch */

.langs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.lang {
    display: inline-flex;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: none;
    line-height: 0;
    cursor: pointer;
    opacity: 0.45;
    filter: saturate(0.7);
    transition: opacity 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.lang:hover { opacity: 0.85; filter: none; }

.lang.is-current {
    opacity: 1;
    filter: none;
    box-shadow: 0 0 0 1px var(--gold-dim);
}

.lang:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gold); }

.lang svg { display: block; width: 22px; height: 15px; border-radius: 2px; }

.utility__role {
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--ink-line);
    color: var(--text-faint);
}

.utility__divider {
    width: 1px;
    height: 1rem;
    background: var(--ink-line);
}

/* A phone: brand and account have to share one row in both languages, and
   "Se déconnecter" alone is a third of it. The label stays for screen
   readers; the title attribute says it on hover. */
@media (max-width: 30rem) {
    .bar__inner { column-gap: 0.75rem; padding-inline: 1rem; }
    .bar__end { gap: 0.6rem; }
    .bar__brand { font-size: 0.95rem; }
    .bar__brand small { display: none; }

    .utility__action { display: inline-flex; padding: 0.4rem 0.6rem; }

    @media (max-width: 22rem) {
        .bar__inner { column-gap: 0.5rem; }
        .bar__end { gap: 0.4rem; }
        .bar__brand { font-size: 0.85rem; letter-spacing: 0.05em; }
    }
    .utility__icon { display: block; }
    .utility__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .tag--preview { padding: 0.12rem 0.45rem; }
}

/* ---------------------------------------------------------------- mobile */

@media (max-width: 40rem) {
    .page { padding: 3rem var(--gutter) 4rem; }
    .section { margin-top: 3.25rem; }
    .laurel { padding: 1.75rem 1.1rem; }

    /* The roster stops being a table and becomes one card per person. */
    .roster, .roster tbody, .roster tr, .roster td { display: block; width: 100%; }
    .roster thead { display: none; }

    .roster tr {
        border: 1px solid var(--ink-line-soft);
        border-radius: var(--radius);
        background: var(--ink-raised);
        padding: 1.35rem;
        margin-bottom: 0.75rem;
    }

    .roster td { padding: 0.3rem 0; border: 0; }
    .roster td:last-child { text-align: left; padding-top: 1rem; }

    .inline-form { justify-content: flex-start; }
    .inline-form .input { width: 100%; min-width: 0; }
}

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

/* --- card edit affordance -------------------------------------------------- */

/* Bottom right of the card, quiet until wanted. .laurel is already positioned. */
.laurel__edit {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.laurel__edit:hover {
    color: var(--gold);
    border-color: var(--gold-dim);
    background: rgba(207, 169, 79, 0.08);
}

.laurel__edit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(207, 169, 79, 0.28);
}

.laurel__edit svg { width: 1rem; height: 1rem; }

/* Room for it, so a long description never runs underneath. */
.laurel { padding-bottom: 3.75rem; }

/* --- side sheet ------------------------------------------------------------
   A <dialog> rather than a div, so Escape, focus trapping and the inert page
   behind come from the browser instead of from script. */

.sheet {
    margin: 0 0 0 auto;
    height: 100%;
    max-height: 100%;
    width: min(30rem, 100%);
    max-width: 100%;
    border: 0;
    border-left: 1px solid var(--ink-line);
    padding: 0;
    background: var(--ink-raised);
    color: var(--text);
}

.sheet::backdrop { background: rgba(10, 9, 8, .6); }

/* A column, so the actions sit on the floor of the sheet rather than trailing
   after however much description someone typed. Deliberately not .form: that
   is a centred 23rem page form, which is not what a drawer wants. */
.sheet__panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}

.sheet__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 2rem var(--gutter);
}

.sheet__body .section__title { margin-top: 0; }
.sheet__body .notice { margin-left: 0; margin-right: 0; max-width: none; }
.sheet__body .field:last-child { margin-bottom: 0; }

.sheet__foot {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0 var(--gutter) 2rem;
}

/* Delete is destructive and lives in the same row as Save, so it is pushed to
   the far end rather than sitting shoulder to shoulder with it. */
.sheet__foot-end { margin-left: auto; }

.sheet[open] { animation: sheet-in .18s ease-out; }

@keyframes sheet-in {
    from { transform: translateX(1.5rem); opacity: 0; }
    to   { transform: translateX(0);      opacity: 1; }
}

@media (max-width: 40rem) {
    /* Full width, and the footer buttons go full width with it so they are not
       two small targets in a corner. */
    .sheet { width: 100%; border-left: 0; }
    .sheet__body { padding: 1.5rem var(--gutter); }
    .sheet__foot { padding: 0 var(--gutter) 1.5rem; }
    .sheet__foot .btn { flex: 1 1 100%; }
    .sheet__foot .sheet__foot-end { margin-left: 0; width: 100%; }

    .laurel .actions { margin-top: 1.25rem; }
    .laurel .inline-form { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .sheet[open] { animation: none; }
}
