/* MiniZShop Wedstrijden: race reports, round results, NK standings and rider pages.
 * A compact layout on the storefront palette (elessi-theme-child branding.css):
 * thin rules and quiet panels structure the page, colour is kept for meaning
 * (the active tab, the leader, penalty points, medal hints, a live season). */

.mzwed {
    --mzwed-red: var(--mzs-brand-red, #e30613);
    --mzwed-red-ink: #b5121b;
    --mzwed-red-soft: rgba(227, 6, 19, 0.08);
    --mzwed-ink: var(--mzs-ink, #25272b);
    --mzwed-muted: #6b6f78;
    --mzwed-faint: #8a8f97;
    --mzwed-line: #e6e7ea;
    --mzwed-soft: #f5f5f6;
    --mzwed-surface: #ffffff;
    --mzwed-gold: #c9a227;
    --mzwed-silver: #a3a9b1;
    --mzwed-bronze: #b07345;
    --mzwed-radius: 12px;
    --mzwed-display: var(--mzs-font-display, "Instrument Sans", "Inter", sans-serif);
    --mzwed-gap: 40px;
    --mzwed-width: 1440px;

    color: var(--mzwed-ink);
    display: grid;
    gap: var(--mzwed-gap);
    max-width: var(--mzwed-width);
    margin: 0 auto;
    padding-block: 20px 64px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
}

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

/* Grid children may shrink, so wide tables scroll inside their own wrapper. */
.mzwed > *,
.mzwed-section > *,
.mzwed-results,
.mzwed-results > *,
[data-mzvue-fallback],
[data-mzvue-island] {
    min-width: 0;
}

.mzwed :is(h1, h2, h3) {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-wrap: balance;
    margin: 0;
    color: var(--mzwed-ink);
    text-transform: none;
}

.mzwed h1 {
    font-size: clamp(1.9rem, 3.8vw, 2.6rem);
}

.mzwed h2 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
}

.mzwed h3 {
    font-size: 1.05rem;
}

.mzwed :is(h1, h2, h3) a {
    text-decoration: none;
}

.mzwed :is(h2, h3) a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed p {
    margin: 0;
}

.mzwed a {
    color: inherit;
}

.mzwed :focus-visible {
    outline: 2px solid var(--mzwed-red);
    outline-offset: 2px;
}

.mzwed :is(ul, ol) {
    margin: 0;
}

.mzwed-kicker {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mzwed-muted);
}

.mzwed-muted {
    color: var(--mzwed-muted);
}

.mzwed-nowrap {
    white-space: nowrap;
}

.mzwed-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--mzwed-ink) !important;
    text-decoration: none;
    white-space: nowrap;
}

.mzwed-cta::after {
    content: "→";
    color: var(--mzwed-red);
    transition: transform 0.15s;
}

a:hover > .mzwed-cta::after,
.mzwed-cta:hover::after {
    transform: translateX(3px);
}

.mzwed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--mzwed-soft);
    color: var(--mzwed-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.4;
    white-space: nowrap;
}

.mzwed-badge.is-live {
    background: var(--mzwed-red-soft);
    color: var(--mzwed-red-ink);
}

.mzwed-badge.is-live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mzwed-red);
}

/* Page head */
.mzwed-head {
    display: grid;
    gap: 8px;
    max-width: 64ch;
}

.mzwed-head > p:not(.mzwed-meta) {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--mzwed-muted);
}

.mzwed-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
    color: var(--mzwed-muted);
    font-size: 0.92rem;
}

.mzwed-meta > span:not(:last-child)::after {
    content: "·";
    margin-inline: 9px;
    color: var(--mzwed-faint);
}

.mzwed-meta > .mzwed-badge:not(:last-child)::after {
    content: none;
}

.mzwed-meta > .mzwed-badge {
    margin-right: 10px;
}

.mzwed-section {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.mzwed-section-head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: baseline;
    justify-content: space-between;
}

.mzwed-section-head--stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.mzwed-section-head > .mzwed-badge {
    align-self: center;
}

/* Crumbs and the compact rider search */
.mzwed-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    margin-bottom: calc(16px - var(--mzwed-gap));
}

.mzwed-crumbs {
    font-size: 0.85rem;
    color: var(--mzwed-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.mzwed-crumbs a {
    text-decoration: none;
}

.mzwed-crumbs a:hover {
    color: var(--mzwed-ink);
}

.mzwed-crumbs [aria-current] {
    color: var(--mzwed-ink);
    font-weight: 500;
}

.mzwed-topbar > .mzwed-finder-wrap {
    flex: 0 1 300px;
}

/* Rider search: the form is the pill, the island adds a suggestion list. */
.mzwed-finder-wrap {
    position: relative;
    min-width: 0;
}

.mzwed .mzwed-finder {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0 4px 0 14px;
    height: 40px;
    border: 1px solid var(--mzwed-line);
    border-radius: 999px;
    background: var(--mzwed-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mzwed .mzwed-finder--hero {
    height: 52px;
    padding-left: 18px;
    border-color: #d5d7db;
    box-shadow: 0 1px 2px rgba(37, 39, 43, 0.05);
}

.mzwed .mzwed-finder:focus-within {
    border-color: var(--mzwed-ink);
    box-shadow: 0 0 0 3px var(--mzwed-red-soft);
}

.mzwed-finder-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--mzwed-faint);
    cursor: text;
}

.mzwed-finder-field svg {
    flex: none;
}

.mzwed .mzwed-finder input[type="search"] {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    outline: none;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    color: var(--mzwed-ink);
    -webkit-appearance: none;
    appearance: none;
}

.mzwed .mzwed-finder--hero input[type="search"] {
    font-size: 1.02rem;
}

.mzwed .mzwed-finder input[type="search"]::placeholder {
    color: var(--mzwed-faint);
    opacity: 1;
}

.mzwed .mzwed-finder input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.mzwed .mzwed-finder-go {
    flex: none;
    height: 42px;
    min-height: 0;
    margin: 0;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--mzwed-ink);
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.15s;
}

.mzwed .mzwed-finder-go:hover {
    background: var(--mzwed-red);
    color: #fff;
}

.mzwed-finder-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    gap: 2px;
    max-height: min(420px, 60vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    background: var(--mzwed-surface);
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    box-shadow: 0 12px 32px rgba(37, 39, 43, 0.14);
}

.mzwed-topbar .mzwed-finder-list {
    min-width: min(420px, calc(100vw - 32px));
    left: auto;
}

.mzwed-finder-list a {
    display: grid;
    gap: 1px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--mzwed-ink);
}

.mzwed-finder-list a[aria-selected="true"] {
    background: var(--mzwed-soft);
}

.mzwed-finder-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.mzwed-finder-name mark {
    background: none;
    color: var(--mzwed-red-ink);
    padding: 0;
}

.mzwed-finder-list small {
    font-size: 0.82rem;
    color: var(--mzwed-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-finder-empty {
    padding: 10px 12px;
    font-size: 0.9rem;
    color: var(--mzwed-muted);
}

.mzwed .mzwed-finder-list .mzwed-finder-all {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--mzwed-line);
    border-radius: 0 0 8px 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mzwed-finder-all::after {
    content: "→";
    color: var(--mzwed-red);
}

/* Hub head: title on the left, search on the right */
.mzwed-hub-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 20px 40px;
    align-items: end;
}

.mzwed-hub-search {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.mzwed-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    padding-inline: 18px;
    font-size: 0.85rem;
    color: var(--mzwed-muted);
}

.mzwed-facts b {
    color: var(--mzwed-ink);
    font-variant-numeric: tabular-nums;
}

.mzwed-facts .mzwed-cta {
    margin-left: auto;
    font-size: 0.85rem;
}

/* The hub's head as a red banner with a chequered flag fading in on the right. */
.mzwed-hub-hero {
    position: relative;
    isolation: isolate;
    grid-template-areas: "head search" "nav nav";
    gap: 24px 48px;
    align-items: center;
    padding: 34px 36px 18px;
    border-radius: var(--mzwed-radius);
    background: linear-gradient(120deg, var(--mzwed-red) 0%, var(--mzwed-red) 45%, var(--mzwed-red-ink) 100%);
    color: #fff;
}

.mzwed-hub-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 0 45%;
    z-index: -1;
    border-radius: 0 var(--mzwed-radius) var(--mzwed-radius) 0;
    background: repeating-conic-gradient(rgba(255, 255, 255, 0.11) 0 25%, transparent 0 50%) 0 0 / 28px 28px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%);
    mask-image: linear-gradient(90deg, transparent, #000 75%);
    pointer-events: none;
}

.mzwed-hub-hero > .mzwed-head {
    grid-area: head;
}

.mzwed-hub-hero > .mzwed-hub-search {
    grid-area: search;
}

.mzwed .mzwed-hub-hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 4.6vw, 3.2rem);
    line-height: 1;
}

.mzwed-hub-hero .mzwed-kicker {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
}

.mzwed-hub-hero .mzwed-head > p:not(.mzwed-meta) {
    color: rgba(255, 255, 255, 0.9);
    text-wrap: balance;
}

.mzwed .mzwed-hub-hero .mzwed-finder--hero {
    border-color: #fff;
    box-shadow: 0 10px 28px rgba(80, 0, 6, 0.28);
}

.mzwed .mzwed-hub-hero .mzwed-finder:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 10px 28px rgba(80, 0, 6, 0.28);
}

.mzwed .mzwed-hub-hero .mzwed-finder input[type="search"] {
    text-overflow: ellipsis;
}

.mzwed-hub-hero .mzwed-facts {
    justify-content: space-around;
    gap: 4px 20px;
    color: rgba(255, 255, 255, 0.85);
}

.mzwed-hub-hero .mzwed-facts b {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
}

.mzwed-hub-nav {
    grid-area: nav;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.mzwed .mzwed-hub-nav a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mzwed .mzwed-hub-nav a:hover,
.mzwed .mzwed-hub-nav a:focus-visible {
    border-color: #fff;
    background: #fff;
    color: var(--mzwed-red-ink);
}

/* Hub season card: the next race and the season's rounds above the leaders */
.mzwed-now-next {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 2px 0 4px;
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--mzwed-red-soft), transparent 80%);
    box-shadow: inset 3px 0 0 var(--mzwed-red);
}

.mzwed-now-date {
    display: grid;
    place-items: center;
    width: 54px;
    padding: 6px 0 5px;
    border-radius: 10px;
    background: var(--mzwed-red);
    color: #fff;
    line-height: 1;
}

.mzwed-now-date b {
    font-family: var(--mzwed-display);
    font-size: 1.6rem;
    font-weight: 800;
}

.mzwed-now-date span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mzwed-now-next-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.mzwed-now-next-text .mzwed-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mzwed-red-ink);
}

.mzwed-now-next-text > b {
    font-family: var(--mzwed-display);
    font-size: 1.15rem;
}

.mzwed-now-next-text > span:last-child {
    font-size: 0.86rem;
    color: var(--mzwed-muted);
}

.mzwed-now-next-text small {
    margin-left: 4px;
    font-weight: 700;
    color: var(--mzwed-ink);
}

.mzwed-now-rounds {
    list-style: none;
    margin: 4px 0 6px;
    padding: 0;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 4px;
}

.mzwed-now-rounds li {
    position: relative;
    margin: 0;
    min-width: 0;
}

.mzwed-now-rounds li > * {
    display: grid;
    gap: 1px;
    padding: 6px 4px 5px;
    border-top: 3px solid var(--mzwed-line);
    color: var(--mzwed-muted);
    text-align: center;
    text-decoration: none;
    font-size: 0.72rem;
    line-height: 1.2;
}

.mzwed-now-rounds li > * > b {
    font-size: 0.78rem;
    color: var(--mzwed-ink);
}

.mzwed-now-rounds li > * > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-now-rounds li.is-raced > * {
    border-top-color: var(--mzwed-red);
}

.mzwed-now-rounds li.is-next > * {
    border-top-color: var(--mzwed-red);
    border-top-style: dashed;
    color: var(--mzwed-red-ink);
}

.mzwed-now-rounds a:hover {
    background: var(--mzwed-red-soft);
}

/* Bottom of the hub: the archive beside the map of locations. */
.mzwed-hub-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: var(--mzwed-gap) 40px;
    align-items: start;
}

.mzwed .mzwed-hub-places {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: radial-gradient(circle at 70% 25%, #fff, var(--mzwed-soft) 80%);
    color: var(--mzwed-ink);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.mzwed .mzwed-hub-places:hover,
.mzwed .mzwed-hub-places:focus-visible {
    border-color: var(--mzwed-red);
    box-shadow: 0 14px 32px rgba(37, 39, 43, 0.12);
    transform: translateY(-2px);
}

.mzwed-hub-places-map {
    display: block;
    max-width: 300px;
    width: 100%;
    justify-self: center;
    pointer-events: none;
}

.mzwed-hub-places-text {
    display: grid;
    gap: 4px;
}

.mzwed-hub-places-text > b {
    font-family: var(--mzwed-display);
    font-size: 1.25rem;
}

.mzwed-hub-places-text > span:not(.mzwed-kicker):not(.mzwed-cta) {
    color: var(--mzwed-muted);
    font-size: 0.92rem;
}

.mzwed-hub-places .mzwed-cta {
    margin-top: 4px;
}

@media (max-width: 860px) {
    .mzwed-hub-bottom {
        grid-template-columns: minmax(0, 1fr);
    }

    .mzwed-hub-places {
        grid-template-columns: 120px minmax(0, 1fr);
        align-items: center;
    }

    .mzwed-hub-places-map {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .mzwed-now-next {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mzwed-now-next > .mzwed-cta {
        grid-column: 2;
    }

    .mzwed-now-rounds li > * > span {
        display: none;
    }

    /* Three more reports are enough on a phone. */
    .mzwed-hub .mzwed-reports > :nth-child(n + 4) {
        display: none;
    }
}

/* Hub: the newest report beside the current standings */
.mzwed-top {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 20px;
    align-items: stretch;
}

.mzwed-top > :only-child {
    grid-column: 1 / -1;
}

.mzwed-lead,
.mzwed-now {
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
    overflow: hidden;
    min-width: 0;
}

.mzwed-lead {
    display: grid;
    grid-template-rows: auto 1fr;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mzwed-lead:hover {
    border-color: #d5d7db;
    box-shadow: 0 6px 20px rgba(37, 39, 43, 0.08);
}

.mzwed-lead-text {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 16px 20px 18px;
    min-width: 0;
}

.mzwed-lead-text h2 {
    font-size: clamp(1.3rem, 2.2vw, 1.65rem);
}

.mzwed-lead-summary {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--mzwed-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mzwed-lead-text .mzwed-cta {
    margin-top: 2px;
}

.mzwed-lead:hover h2,
.mzwed-report:hover h3,
.mzwed-pager-link:hover .mzwed-pager-title {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    text-decoration-color: var(--mzwed-red);
}

.mzwed-now {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
}

.mzwed-now-head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
}

.mzwed-leaders {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* Beside a tall lead story the rows share the extra height evenly. */
.mzwed-leaders li {
    position: relative;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 6.2rem minmax(0, 1fr) auto 14px;
    gap: 10px;
    align-items: baseline;
    align-content: center;
    margin: 0 -12px;
    padding: 9px 12px;
    border-top: 1px solid var(--mzwed-line);
    border-radius: 10px;
    transition: background 0.15s, box-shadow 0.15s;
}

/* The class link covers the row; the rider's name stays its own link above it. */
.mzwed-leaders .mzwed-leader-class::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
}

.mzwed-leaders li::after {
    content: "→";
    align-self: center;
    color: var(--mzwed-red);
    font-weight: 700;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.15s, transform 0.15s;
}

.mzwed-leaders li:hover,
.mzwed-leaders li:focus-within {
    background: var(--mzwed-red-soft);
    box-shadow: inset 3px 0 0 var(--mzwed-red);
}

.mzwed-leaders li:hover + li,
.mzwed-leaders li:focus-within + li {
    border-top-color: transparent;
}

.mzwed-leaders li:hover::after,
.mzwed-leaders li:focus-within::after {
    opacity: 1;
    transform: none;
}

.mzwed-leaders li:hover .mzwed-leader-class {
    color: var(--mzwed-red-ink) !important;
}

.mzwed-leaders .mzwed-leader-class:focus-visible {
    outline: none;
}

.mzwed-leaders .mzwed-leader-class:focus-visible::after {
    outline: 2px solid var(--mzwed-red);
    outline-offset: -2px;
}

.mzwed-leaders .mzwed-leader-name a {
    position: relative;
    z-index: 1;
    justify-self: start;
}

.mzwed-leader-class {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mzwed-muted) !important;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-leader-class:hover {
    color: var(--mzwed-red-ink) !important;
}

.mzwed-leader-name {
    display: grid;
    min-width: 0;
    font-weight: 600;
    font-size: 0.97rem;
    line-height: 1.3;
}

.mzwed-leader-name a,
.mzwed-name a,
.mzwed-card-name a,
.mzwed-step-name a {
    text-decoration: none;
}

.mzwed-leader-name a:hover,
.mzwed-name a:hover,
.mzwed-card-name a:hover,
.mzwed-step-name a:hover {
    color: var(--mzwed-red-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mzwed-leader-name small {
    font-weight: 400;
    font-size: 0.84rem;
    color: var(--mzwed-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-leader-pts {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 1.2rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.mzwed-leader-pts small {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--mzwed-muted);
    margin-left: 2px;
}

.mzwed-now-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--mzwed-line);
}

/* The next round: one line with a live dot, filled in with the days to go */
.mzwed-next {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 12px 18px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: linear-gradient(90deg, var(--mzwed-red-soft), transparent 55%);
    font-size: 0.95rem;
}

.mzwed-next-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--mzwed-red);
    box-shadow: 0 0 0 0 rgba(227, 6, 19, 0.45);
    animation: mzwed-pulse 2s ease-out infinite;
}

@keyframes mzwed-sheet {
    from { transform: translateY(100%); }
}

@keyframes mzwed-pulse {
    0% { box-shadow: 0 0 0 0 rgba(227, 6, 19, 0.45); }
    70%, 100% { box-shadow: 0 0 0 9px rgba(227, 6, 19, 0); }
}

.mzwed-next .mzwed-kicker {
    color: var(--mzwed-red-ink);
}

.mzwed-next-what {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    min-width: 0;
}

.mzwed-next-what a {
    text-decoration: none;
}

.mzwed-next-what a:hover {
    color: var(--mzwed-red-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mzwed-next-when {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    color: var(--mzwed-muted);
}

.mzwed-next-days {
    color: var(--mzwed-ink);
}

.mzwed-next .mzwed-cta {
    margin-left: auto;
}

/* Agenda subscribe box and small buttons */
.mzwed-agenda {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    min-width: 0;
}

.mzwed-agenda-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.mzwed-agenda-title svg {
    flex: none;
    color: var(--mzwed-red);
}

.mzwed-agenda-note {
    font-size: 0.82rem;
    color: var(--mzwed-muted);
}

.mzwed-agenda-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.mzwed .mzwed-button {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--mzwed-ink);
    border-radius: 999px;
    background: var(--mzwed-ink);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.mzwed .mzwed-button:hover {
    background: var(--mzwed-red);
    border-color: var(--mzwed-red);
    color: #fff;
}

.mzwed .mzwed-button--quiet {
    background: transparent;
    border-color: var(--mzwed-line);
    color: var(--mzwed-ink);
}

.mzwed .mzwed-button--quiet:hover {
    background: transparent;
    border-color: var(--mzwed-ink);
    color: var(--mzwed-ink);
}

/* Report and round cards: a picture over a kicker and a title */
.mzwed-reports {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 16px;
}

.mzwed-rounds-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 20px 14px;
}

.mzwed-rounds-grid li {
    margin: 0;
    min-width: 0;
    display: grid;
}

.mzwed-report {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    align-content: start;
    text-decoration: none;
    min-width: 0;
}

.mzwed-report-body {
    display: grid;
    gap: 4px;
    align-content: start;
    min-width: 0;
}

.mzwed-report-body .mzwed-kicker {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
}

.mzwed-report h3 {
    font-size: 0.98rem;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mzwed-report--upcoming {
    color: var(--mzwed-faint);
}

.mzwed-report--upcoming h3 {
    color: var(--mzwed-muted);
    font-weight: 500;
}

/* Visuals: a photo, two or three portrait photos side by side, or a cover. */
.mzwed-lead-visual,
.mzwed-report-visual {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--mzwed-soft);
    container-type: inline-size;
}

.mzwed-lead-visual {
    aspect-ratio: 2 / 1;
}

.mzwed-report-visual {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
}

/* The season on every round picture, top left in line with the cover text. */
.mzwed-visual-season {
    position: absolute;
    top: 7%;
    left: 7%;
    padding: 3px 9px;
    border-radius: 999px;
    background: #15171a;
    color: #fff;
    font-size: 0.74rem;
    font-size: clamp(0.66rem, 4.4cqi, 0.92rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    pointer-events: none;
}

/* Phone thumbnails: a small tag in the corner, clear of the photo and track. */
@container (max-width: 160px) {
    .mzwed-visual-season {
        top: 4px;
        left: 4px;
        padding: 1px 5px;
        border-radius: 4px;
        font-size: 0.56rem;
        letter-spacing: 0;
    }
}

.mzwed-place-visual {
    position: relative;
}

/* In card grids the caption already gives place and date, and red stays for the lead. */
.mzwed-report-visual .mzwed-cover-text span {
    display: none;
}

.mzwed-reports .mzwed-cover--red {
    --mzwed-cover-bg: #1f2125;
    --mzwed-cover-road: rgba(255, 255, 255, 0.07);
    --mzwed-cover-line: var(--mzwed-red);
}

.mzwed-lead-visual > img,
.mzwed-report-visual > img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.mzwed-report:hover .mzwed-report-visual > *,
.mzwed-lead:hover .mzwed-lead-visual > * {
    transform: scale(1.03);
}

.mzwed-upcoming {
    display: grid;
    place-content: center;
    background: transparent;
    border: 1.5px dashed #d5d7db;
}

.mzwed-upcoming b {
    font-family: var(--mzwed-display);
    font-stretch: 75%;
    font-style: italic;
    font-weight: 700;
    font-size: 1.8rem;
    color: #c3c6cb;
}

.mzwed-strip-photos {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 2px;
    height: 100%;
    transition: transform 0.4s ease;
}

.mzwed-strip-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.mzwed-cover {
    --mzwed-cover-bg: #1f2125;
    --mzwed-cover-road: rgba(255, 255, 255, 0.07);
    --mzwed-cover-line: var(--mzwed-red);
    --mzwed-cover-ink: #ffffff;
    --mzwed-cover-sub: rgba(255, 255, 255, 0.86);
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: var(--mzwed-cover-bg);
    transition: transform 0.4s ease;
}

.mzwed-cover--red {
    --mzwed-cover-bg: #d9101b;
    --mzwed-cover-road: rgba(0, 0, 0, 0.12);
    --mzwed-cover-line: #ffffff;
    --mzwed-cover-sub: rgba(255, 255, 255, 0.85);
}

.mzwed-cover--sand {
    --mzwed-cover-bg: #efeeeb;
    --mzwed-cover-road: rgba(37, 39, 43, 0.06);
    --mzwed-cover-line: var(--mzwed-red);
    --mzwed-cover-ink: var(--mzwed-ink);
    --mzwed-cover-sub: var(--mzwed-muted);
}

.mzwed-cover-track {
    position: absolute;
    inset: -6% -10% -6% 22%;
    width: 88%;
    height: 112%;
}

.mzwed-cover-road {
    fill: none;
    stroke: var(--mzwed-cover-road);
    stroke-width: 22;
    stroke-linejoin: round;
}

.mzwed-cover-line {
    fill: none;
    stroke: var(--mzwed-cover-line);
    stroke-width: 2.5;
    stroke-dasharray: 10 7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mzwed-cover-text {
    position: absolute;
    left: 7%;
    bottom: 9%;
    right: 7%;
    display: grid;
    gap: 4px;
    color: var(--mzwed-cover-ink);
}

/* Cover type scales with its card (container query units on the visual). */
.mzwed-cover-text b {
    font-family: var(--mzwed-display);
    font-stretch: 75%;
    font-style: italic;
    font-weight: 700;
    font-size: 2.4rem;
    font-size: clamp(1.5rem, 19cqi, 6rem);
    line-height: 0.9;
    letter-spacing: -0.01em;
}

.mzwed-cover-text span {
    font-size: 0.78rem;
    font-size: clamp(0.6rem, 4.4cqi, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mzwed-cover-sub);
}

@container (max-width: 150px) {
    .mzwed-cover-text span {
        display: none;
    }
}

.mzwed-hero--cover {
    aspect-ratio: 21 / 7;
    max-height: 360px;
    overflow: hidden;
    border-radius: var(--mzwed-radius);
}

.mzwed-hero--cover .mzwed-cover-track {
    inset: 8% 4% 8% auto;
    width: 46%;
    height: 84%;
}

.mzwed-hero--cover .mzwed-cover-text {
    left: clamp(20px, 4vw, 40px);
    bottom: clamp(16px, 4vw, 32px);
}

.mzwed-hero--cover .mzwed-cover-text b {
    font-size: clamp(3rem, 8vw, 6rem);
}

.mzwed-hero--cover .mzwed-cover-text span {
    font-size: 0.8rem;
}

/* Season archive */
.mzwed-archive {
    list-style: none;
    padding: 0;
    border-top: 1px solid var(--mzwed-ink);
}

.mzwed-archive li {
    margin: 0;
}

.mzwed-archive a {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr) auto;
    gap: 4px 20px;
    align-items: center;
    padding-block: 12px;
    border-bottom: 1px solid var(--mzwed-line);
    text-decoration: none;
}

.mzwed-archive-year {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mzwed-archive-body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mzwed-archive-body strong {
    font-weight: 600;
    font-size: 0.97rem;
}

.mzwed-archive-body span {
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--mzwed-muted);
}

.mzwed-archive a:hover strong {
    color: var(--mzwed-red-ink);
}

/* Round report */
.mzwed-report-head {
    display: grid;
    gap: 18px;
}

.mzwed-title {
    display: grid;
    gap: 8px;
    max-width: 780px;
}

.mzwed-hero {
    margin: 0;
}

.mzwed-hero img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 520px;
    object-fit: cover;
    display: block;
    border-radius: var(--mzwed-radius);
}

.mzwed-story-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) minmax(260px, 380px);
    justify-content: start;
    gap: 40px 72px;
    align-items: start;
}

.mzwed-aside {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-soft);
    font-size: 0.95rem;
}

.mzwed .mzwed-aside h2 {
    font-family: inherit;
    font-stretch: 100%;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
}

.mzwed-aside dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.mzwed-aside dt a {
    font-weight: 600;
    text-decoration: none;
}

.mzwed-aside dt a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-aside dd {
    margin: 2px 0 0;
}

.mzwed-aside ol {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1px;
}

.mzwed-aside li {
    margin: 0;
    color: var(--mzwed-muted);
}

.mzwed-aside li a {
    text-decoration: none;
}

.mzwed-aside li a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-aside li:first-child {
    color: var(--mzwed-ink);
    font-weight: 600;
}

.mzwed-story-text {
    display: grid;
    gap: 14px;
    max-width: 760px;
    font-size: 1.08rem;
    line-height: 1.72;
}

.mzwed-story-text > p:first-child {
    font-size: 1.15rem;
    line-height: 1.6;
}

.mzwed-intro,
.mzwed-intro > p:first-child {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--mzwed-muted);
}

.mzwed-story-text h2 {
    font-size: 1.3rem;
    margin-top: 10px;
}

.mzwed-story-text :is(ul, ol) {
    padding-left: 22px;
}

.mzwed-story-text a {
    color: var(--mzwed-red-ink);
}

.mzwed-story-text blockquote {
    margin: 0;
    padding-left: 16px;
    border-left: 2px solid var(--mzwed-red);
    font-style: italic;
}

.mzwed-inline-photo {
    margin: 6px 0;
    display: grid;
    gap: 6px;
}

.mzwed-inline-photo img {
    width: auto;
    max-width: 100%;
    max-height: 520px;
    height: auto;
    display: block;
    border-radius: 10px;
}

.mzwed-inline-photo figcaption,
.mzwed-gallery figcaption {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--mzwed-muted);
}

/* Even tiles in the gallery's main orientation; a portrait gallery (podium
 * cards with names in a text bar) keeps every picture whole. */
.mzwed-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 16px 12px;
    align-items: start;
}

.mzwed-gallery--portrait {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
}

.mzwed-gallery + .mzwed-gallery {
    margin-top: calc(16px - var(--mzwed-gap));
}

.mzwed-gallery figure {
    margin: 0;
    display: grid;
    gap: 6px;
    min-width: 0;
}

.mzwed-gallery a {
    display: block;
    border-radius: 10px;
    overflow: hidden;
}

.mzwed-gallery img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    background: var(--mzwed-soft);
    transition: transform 0.4s ease;
}

.mzwed-gallery a:hover img {
    transform: scale(1.03);
}

.mzwed-gallery--portrait img {
    aspect-ratio: 4 / 5;
    object-fit: contain;
}

.mzwed-gallery figcaption span {
    color: var(--mzwed-faint);
}

.mzwed-report-foot {
    display: grid;
    gap: 12px;
    max-width: 680px;
    padding-top: 16px;
    border-top: 1px solid var(--mzwed-line);
    margin-top: calc(8px - var(--mzwed-gap) / 2);
}

.mzwed-links {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 6px;
}

.mzwed-links li {
    margin: 0;
}

.mzwed-links .mzwed-cta {
    white-space: normal;
}

.mzwed-sources {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--mzwed-muted);
    max-width: 680px;
}

.mzwed-sources a {
    color: inherit;
}

/* Class tabs */
.mzwed-tabs {
    display: flex;
    gap: 22px;
    border-bottom: 1px solid var(--mzwed-line);
    overflow-x: auto;
    scrollbar-width: none;
}

.mzwed-tabs::-webkit-scrollbar {
    display: none;
}

.mzwed-tabs :is(a, button) {
    font: inherit;
    font-weight: 600;
    font-size: 0.93rem;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin: 0 0 -1px;
    padding: 0 0 10px;
    color: var(--mzwed-muted);
    cursor: pointer;
    display: flex;
    gap: 5px;
    align-items: baseline;
    flex: none;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
    min-height: 0;
    box-shadow: none;
    white-space: nowrap;
}

.mzwed-tabs :is(a, button) small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--mzwed-faint);
}

.mzwed-tabs :is(a, button):hover {
    color: var(--mzwed-ink);
    background: none;
}

.mzwed-tabs :is(a, button)[aria-selected="true"],
.mzwed-tabs a[aria-current="true"] {
    color: var(--mzwed-ink);
    border-bottom-color: var(--mzwed-red);
}

.mzwed-class {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.mzwed-class + .mzwed-class {
    margin-top: 28px;
}

.mzwed-class h3 small {
    font-family: inherit;
    font-stretch: 100%;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0;
}

.mzwed-island,
.mzwed-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.mzwed-panel[hidden] {
    display: none !important;
}

/* Podium of a race day: winner in the middle on the highest step, medal
 * coloured like the Elo ranking, with the day total on the step. */
.mzwed-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    max-width: 600px;
    margin-inline: auto;
    text-align: center;
}

.mzwed-step {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mzwed-step-name {
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.mzwed-step-score {
    font-size: 0.84rem;
    color: var(--mzwed-muted);
    font-variant-numeric: tabular-nums;
}

.mzwed-step-block {
    display: grid;
    place-content: center;
    gap: 2px;
    height: 76px;
    margin-top: 8px;
    border-radius: 10px 10px 0 0;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: linear-gradient(180deg, #b9bfc6, #98a0a9);
}

.mzwed-step-block small {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

.mzwed-step--1 .mzwed-step-block {
    height: 112px;
    font-size: 2.4rem;
    background: linear-gradient(180deg, #cfa83a, #b08a20);
}

.mzwed-step--3 .mzwed-step-block {
    height: 56px;
    background: linear-gradient(180deg, #c58a5c, #a5693e);
}

/* Results and standings tables */
.mzwed-sheet-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mzwed table.mzwed-sheet {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    border: 0;
}

.mzwed-sheet :is(th, td) {
    padding: 7px 6px;
    border: 0;
    border-bottom: 1px solid var(--mzwed-line);
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    background: var(--mzwed-surface);
    line-height: 1.35;
}

.mzwed-sheet thead th {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--mzwed-muted);
    border-bottom-color: var(--mzwed-ink);
    vertical-align: bottom;
}

.mzwed-sheet thead tr.mzwed-rounds th {
    color: var(--mzwed-ink);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: none;
    border-bottom: 0;
    padding-bottom: 2px;
    line-height: 1.2;
}

.mzwed-sheet thead tr.mzwed-rounds th small {
    display: block;
    font-weight: 400;
    color: var(--mzwed-muted);
    font-size: 0.76rem;
    letter-spacing: 0;
}

.mzwed-sheet thead tr.mzwed-rounds th a {
    text-decoration: none;
}

.mzwed-sheet thead tr.mzwed-rounds th a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-sheet .mzwed-grp {
    border-left: 1px solid var(--mzwed-line);
}

.mzwed-sheet .mzwed-left {
    text-align: left;
}

.mzwed-sheet td.mzwed-pos {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 1rem;
    width: 3.4rem;
    min-width: 3.4rem;
    text-align: left;
    padding-left: 4px;
}

.mzwed-sheet .mzwed-stick1 {
    position: sticky;
    left: 0;
    z-index: 1;
}

.mzwed-sheet .mzwed-stick2 {
    position: sticky;
    left: 3.4rem;
    z-index: 1;
}

.mzwed-sheet td.mzwed-name {
    font-weight: 500;
    min-width: 10rem;
    padding-right: 16px;
}

/* Spare width goes to the names, so the numbers stay together on the right. */
.mzwed-sheet-wrap--standings td.mzwed-name {
    width: 100%;
}

.mzwed-sheet td.mzwed-h {
    width: 2rem;
    min-width: 2rem;
    color: var(--mzwed-muted);
}

.mzwed-sheet td.mzwed-p1 {
    color: var(--mzwed-ink);
    font-weight: 700;
}

.mzwed-sheet td:is(.mzwed-p2, .mzwed-p3) {
    color: var(--mzwed-ink);
}

.mzwed-sheet td.mzwed-dns,
.mzwed-sheet .mzwed-future {
    color: var(--mzwed-faint);
}

.mzwed-sheet thead th.mzwed-future {
    font-weight: 500;
    color: var(--mzwed-faint);
}

.mzwed-sheet td.mzwed-future {
    background: repeating-linear-gradient(135deg, transparent 0 5px, var(--mzwed-soft) 5px 7px);
}

.mzwed-sheet td.mzwed-pen {
    color: var(--mzwed-red-ink);
}

.mzwed-sheet td.mzwed-drop {
    color: var(--mzwed-faint);
    font-weight: 400;
    text-decoration: line-through;
}

.mzwed-sheet td.mzwed-dup {
    text-decoration: underline dotted var(--mzwed-red);
    text-underline-offset: 4px;
}

.mzwed-sheet td.mzwed-pts {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 700;
    font-size: 1.05rem;
    border-left: 1px solid var(--mzwed-line);
    padding-inline: 12px;
}

.mzwed-sheet td.mzwed-gap {
    color: var(--mzwed-muted);
    font-size: 0.82rem;
    text-align: right;
}

.mzwed-sheet tbody tr:nth-child(even) td:not(.mzwed-future) {
    background: #fafafb;
}

.mzwed-sheet tbody tr:hover td {
    background: var(--mzwed-soft);
}

.mzwed-sheet th button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    text-transform: inherit;
    letter-spacing: inherit;
    padding: 0;
    height: auto;
    min-height: 0;
    line-height: inherit;
    box-shadow: none;
}

.mzwed-sheet th button[aria-pressed="true"],
.mzwed-sheet th[aria-sort] button,
.mzwed-sheet th button:hover {
    color: var(--mzwed-ink);
}

/* Sortable headers: a faint arrow, solid on the sorted column. Number
 * columns get it on the left, so the label stays above the numbers. */
.mzwed-sheet th .mzwed-sort {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    text-align: inherit;
    white-space: nowrap;
}

.mzwed-sheet th:not(.mzwed-left) .mzwed-sort {
    flex-direction: row-reverse;
}

.mzwed-sheet th.mzwed-right {
    text-align: right;
}

.mzwed-sheet th .mzwed-sort::after {
    content: "";
    flex: none;
    border-inline: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.45;
}

.mzwed-sheet th[aria-sort] .mzwed-sort::after {
    opacity: 1;
}

.mzwed-sheet th[aria-sort="ascending"] .mzwed-sort::after {
    border-top: 0;
    border-bottom: 4px solid currentColor;
}

.mzwed-sheet th .mzwed-sort:focus-visible {
    outline: 2px solid var(--mzwed-ink);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Filters above a table; hidden until the script runs. */
.mzwed [hidden] {
    display: none !important;
}

.mzwed-toolbar-controls {
    display: flex;
    flex: 0 1 420px;
    gap: 8px;
    min-width: 0;
}

.mzwed-toolbar-controls .mzwed-search {
    flex: 1 1 160px;
}

.mzwed-sort-menu select {
    max-width: 100%;
}

.mzwed-table-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
}

.mzwed-table-tools .mzwed-search {
    flex: 0 1 260px;
}

.mzwed-select {
    position: relative;
    display: inline-flex;
    margin: 0;
}

.mzwed-select::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    margin-top: -2px;
    border-inline: 4px solid transparent;
    border-top: 5px solid var(--mzwed-muted);
    pointer-events: none;
}

.mzwed .mzwed-select select {
    -webkit-appearance: none;
    appearance: none;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0 32px 0 14px;
    border: 1px solid var(--mzwed-line);
    border-radius: 999px;
    background: none;
    box-shadow: none;
    font: inherit;
    font-size: 0.9rem;
    color: var(--mzwed-ink);
    cursor: pointer;
}

.mzwed .mzwed-select select:focus-visible {
    border-color: var(--mzwed-ink);
    outline: none;
}

.mzwed-table-count {
    margin-left: auto;
    font-size: 0.84rem;
    color: var(--mzwed-muted);
}

.mzwed-table-tools > p {
    flex-basis: 100%;
}

/* Medal hints for the first three places */
:is(.mzwed-rank-1, .mzwed-rank-2, .mzwed-rank-3) :is(.mzwed-pos, .mzwed-day)::before,
:is(.mzwed-card--1, .mzwed-card--2, .mzwed-card--3) .mzwed-plate::before,
.mzwed-medal::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: 0.15em;
    background: var(--mzwed-bronze);
}

:is(.mzwed-rank-1, .mzwed-card--1) :is(.mzwed-pos, .mzwed-plate, .mzwed-day)::before,
.mzwed-medal--1::before {
    background: var(--mzwed-gold);
}

:is(.mzwed-rank-2, .mzwed-card--2) :is(.mzwed-pos, .mzwed-plate, .mzwed-day)::before,
.mzwed-medal--2::before {
    background: var(--mzwed-silver);
}

.mzwed-trend {
    display: inline-block;
    font-family: inherit;
    font-stretch: 100%;
    font-weight: 500;
    font-size: 0.76rem;
    margin-left: 4px;
    vertical-align: 0.15em;
    color: var(--mzwed-faint);
}

.mzwed-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    align-items: center;
    justify-content: space-between;
}

.mzwed-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--mzwed-line);
    border-radius: 999px;
    min-width: 0;
    flex: 0 1 240px;
    margin: 0;
}

.mzwed-search svg {
    flex: none;
    color: var(--mzwed-faint);
}

.mzwed .mzwed-search input {
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.9rem;
    color: var(--mzwed-ink);
    width: 100%;
    min-width: 0;
    outline: none;
    box-shadow: none;
    padding: 2px 0;
    margin: 0;
    height: auto;
    min-height: 0;
}

.mzwed-search:focus-within {
    border-color: var(--mzwed-ink);
}

.mzwed-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 0.82rem;
    color: var(--mzwed-muted);
}

.mzwed-legend b {
    color: var(--mzwed-ink);
}

.mzwed-legend s {
    color: var(--mzwed-faint);
}

.mzwed-legend .mzwed-legend-pen {
    color: var(--mzwed-red-ink);
}

.mzwed-legend .mzwed-legend-dup {
    text-decoration: underline dotted var(--mzwed-red);
    text-underline-offset: 3px;
}

/* Mobile standings: one row per rider */
.mzwed-cards {
    display: none;
    border-top: 1px solid var(--mzwed-ink);
}

.mzwed-card {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    gap: 4px 10px;
    align-items: baseline;
    padding-block: 10px;
    border-bottom: 1px solid var(--mzwed-line);
}

.mzwed-plate {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.mzwed-card-name {
    font-weight: 500;
    line-height: 1.3;
}

.mzwed-card-points {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: right;
    line-height: 1.1;
}

.mzwed-card-points small {
    display: block;
    font-family: inherit;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--mzwed-muted);
}

.mzwed-strip {
    grid-column: 2 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--mzwed-muted);
    font-variant-numeric: tabular-nums;
}

.mzwed-strip-round {
    display: inline-flex;
    gap: 5px;
    align-items: baseline;
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--mzwed-soft);
}

.mzwed-strip-round i {
    font-style: normal;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--mzwed-faint);
    margin-right: 1px;
}

.mzwed-strip .mzwed-p1 { color: var(--mzwed-ink); font-weight: 700; }
.mzwed-strip :is(.mzwed-p2, .mzwed-p3) { color: var(--mzwed-ink); }
.mzwed-strip .mzwed-pen { color: var(--mzwed-red-ink); }
.mzwed-strip .mzwed-dns { color: var(--mzwed-faint); }
.mzwed-strip .mzwed-drop { color: var(--mzwed-faint); font-weight: 400; text-decoration: line-through; }

/* Rider page */
.mzwed-stats {
    /* Hairlines between the tiles; tiles grow so no row ends in an empty cell. */
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    margin: 0;
    background: var(--mzwed-line);
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    overflow: hidden;
}

.mzwed-stats > div {
    flex: 1 1 140px;
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 12px 16px;
    background: var(--mzwed-surface);
}

.mzwed-stats dt {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mzwed-muted);
}

.mzwed-stats dd {
    margin: 0;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.mzwed-stats dd small {
    display: block;
    font-family: inherit;
    font-stretch: 100%;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--mzwed-muted);
    margin-top: 2px;
}

.mzwed-rider-season {
    gap: 8px;
}

.mzwed-class-row-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
}

.mzwed-class-row-inner .mzwed-cta {
    margin-left: auto;
}

.mzwed-rider-sheet tbody + tbody .mzwed-class-row th {
    padding-top: 18px;
}

.mzwed-sheet .mzwed-class-row th {
    padding: 10px 6px 6px 0;
    font-size: inherit;
    text-transform: none;
    letter-spacing: 0;
    color: var(--mzwed-ink);
    border-bottom: 1px solid var(--mzwed-line);
    white-space: normal;
}

.mzwed-sheet .mzwed-class-row:hover th {
    background: var(--mzwed-surface);
}

.mzwed-class-row-name {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 1.05rem;
    margin-right: 12px;
}

.mzwed-class-row .mzwed-cta {
    margin-left: 12px;
    font-size: 0.9rem;
}

.mzwed-rider-standing {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--mzwed-muted);
    white-space: nowrap;
}

.mzwed-rider-standing b {
    color: var(--mzwed-ink);
    font-weight: 700;
}

.mzwed-rider-sheet td.mzwed-round-cell {
    width: 100%;
    white-space: normal;
}

.mzwed-round-cell a {
    text-decoration: none;
}

.mzwed-round-cell a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-round-cell b {
    font-weight: 600;
    margin-right: 2px;
}

.mzwed-round-cell small {
    margin-left: 8px;
    font-size: 0.84rem;
    color: var(--mzwed-muted);
    white-space: nowrap;
}

.mzwed-sheet td.mzwed-day {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
    min-width: 4.4rem;
}

.mzwed-day small {
    font-family: inherit;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--mzwed-faint);
    margin-left: 1px;
}

/* Rider page: compare box, highlights, rivals and standings sparklines */
.mzwed-rider-page .mzwed-stats > div {
    flex-basis: 17%;
}

.mzwed-rider-page .mzwed-hub-head {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.mzwed-compare {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    min-width: 0;
}

.mzwed-compare-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.mzwed-compare-title svg {
    flex: none;
    color: var(--mzwed-red);
}

.mzwed-compare .mzwed-finder-list {
    min-width: 0;
    left: 0;
}

.mzwed-compare-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--mzwed-muted);
}

.mzwed .mzwed-compare-quick .mzwed-chip {
    padding: 3px 10px;
    font-size: 0.8rem;
}

.mzwed-rider-extra {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 40px;
    align-items: start;
}

/* Highlights: medal cards for NK podium places, quiet cards for the rest */
.mzwed-highlights {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.mzwed-highlights li {
    margin: 0;
    min-width: 0;
}

.mzwed-highlight {
    --mzwed-tone: var(--mzwed-muted);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon kicker" "icon value" "icon note";
    column-gap: 10px;
    align-content: start;
    height: 100%;
    padding: 12px 14px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
    color: var(--mzwed-ink);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

a.mzwed-highlight:hover {
    border-color: var(--mzwed-ink);
    transform: translateY(-1px);
}

.mzwed-highlight-icon {
    grid-area: icon;
    margin-top: 2px;
    color: var(--mzwed-tone);
}

.mzwed-highlight .mzwed-kicker {
    grid-area: kicker;
    font-size: 0.76rem;
    color: var(--mzwed-tone);
}

.mzwed-highlight b {
    grid-area: value;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.2;
}

.mzwed-highlight small {
    grid-area: note;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--mzwed-muted);
}

.mzwed-highlight--gold {
    --mzwed-tone: #7a5d08;
    border-color: #ead9a0;
    background: linear-gradient(135deg, #fbf3d9, var(--mzwed-surface) 75%);
}

.mzwed-highlight--silver {
    --mzwed-tone: #6f7781;
    border-color: #d8dce1;
    background: linear-gradient(135deg, #eef0f3, var(--mzwed-surface) 75%);
}

.mzwed-highlight--bronze {
    --mzwed-tone: #8f5530;
    border-color: #e6cbb5;
    background: linear-gradient(135deg, #f7e9dd, var(--mzwed-surface) 75%);
}

/* The ? behind a number and its explanation (a native popover) */
.mzwed .mzwed-info {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0 0 0 5px;
    padding: 0;
    border: 1px solid #c8cbd0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: var(--mzwed-muted);
    font: 700 0.62rem/1 var(--mzwed-display);
    letter-spacing: 0;
    text-transform: none;
    vertical-align: 1px;
    cursor: help;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.mzwed .mzwed-info:hover,
.mzwed .mzwed-info:focus-visible {
    border-color: var(--mzwed-ink);
    background: var(--mzwed-ink);
    color: #fff;
}

.mzwed .mzwed-pop {
    width: min(300px, calc(100vw - 32px));
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--mzwed-ink);
    box-shadow: 0 12px 32px rgba(20, 21, 24, 0.22);
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 400;
    font-stretch: 100%;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    white-space: normal;
}

.mzwed .mzwed-pop.is-anchored {
    position: fixed;
    inset: auto;
    margin: 0;
    overflow: visible;
}

.mzwed .mzwed-pop.is-anchored::after {
    content: "";
    position: absolute;
    top: -5px;
    left: calc(var(--mzwed-arrow, 50%) - 5px);
    width: 10px;
    height: 10px;
    background: inherit;
    transform: rotate(45deg);
}

.mzwed .mzwed-pop.is-anchored.is-above::after {
    top: auto;
    bottom: -5px;
}

.mzwed-pop b {
    display: block;
    margin-bottom: 3px;
    font-weight: 700;
}

.mzwed .mzwed-pop-close {
    display: none;
}

.mzwed-pop::backdrop {
    background: transparent;
}

.mzwed-rivals {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 8px;
}

.mzwed-rivals li {
    margin: 0;
    min-width: 0;
}

/* A rival as a head-to-head card: own score red on the left, theirs right. */
.mzwed-rival {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    height: 100%;
    padding: 12px 14px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
    color: var(--mzwed-ink);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

a.mzwed-rival:hover {
    border-color: var(--mzwed-ink);
    transform: translateY(-1px);
}

.mzwed-rival-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.mzwed-rival-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.mzwed-rival-verdict {
    flex: none;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--mzwed-soft);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--mzwed-muted);
}

.mzwed-rival-verdict.is-lead {
    background: var(--mzwed-red-soft);
    color: var(--mzwed-red-ink);
}

.mzwed-rival-score {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.mzwed-rival-score b {
    min-width: 1.6ch;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mzwed-rival-score b.is-own {
    color: var(--mzwed-red);
}

.mzwed-rival-split {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: var(--mzwed-ink);
    overflow: hidden;
}

.mzwed-rival-split i {
    display: block;
    height: 100%;
    background: var(--mzwed-red);
    box-shadow: 2px 0 0 var(--mzwed-surface);
}

.mzwed-rival-sides {
    display: flex;
    justify-content: space-between;
    margin-top: -4px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--mzwed-faint);
}

.mzwed-rival-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--mzwed-line);
    font-size: 0.78rem;
    color: var(--mzwed-muted);
}

.mzwed-rival-meta > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mzwed-rival-form {
    display: flex;
    flex: none;
    gap: 3px;
}

.mzwed-rival-form i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c9ccd1;
}

.mzwed-rival-form i.is-win {
    background: var(--mzwed-red);
}

.mzwed-score-bar {
    display: block;
    height: 6px;
    margin-top: 4px;
    border-radius: 3px;
    background: var(--mzwed-line);
    overflow: hidden;
}

.mzwed-score-bar i {
    display: block;
    height: 100%;
    border-radius: 3px 0 0 3px;
    background: var(--mzwed-ink);
}

.mzwed-spark {
    display: inline-block;
    vertical-align: middle;
    margin-left: 12px;
    overflow: visible;
}

.mzwed-spark polyline {
    fill: none;
    stroke: var(--mzwed-muted);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.mzwed-spark-dot {
    fill: var(--mzwed-surface);
    stroke: var(--mzwed-muted);
    stroke-width: 1.5;
}

.mzwed-spark-dot.is-last {
    fill: var(--mzwed-ink);
    stroke: var(--mzwed-surface);
    stroke-width: 1.5;
}

.mzwed-spark-hit {
    fill: transparent;
}

.mzwed-spark g:hover .mzwed-spark-dot {
    stroke: var(--mzwed-red);
}

/* Compare page: team colours, red for the first rider, blue for the second */
.mzwed-duel-page {
    --mzwed-a: var(--mzwed-red);
    --mzwed-b: #1f6fd1;
}

.mzwed-vs {
    display: grid;
    gap: 10px;
}

.mzwed-vs-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border-radius: var(--mzwed-radius);
    overflow: hidden;
    background: #15171a;
}

.mzwed-vs-side {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 150px;
    padding: 20px 56px 20px 24px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(120deg, var(--mzwed-a), #8f0710);
    clip-path: polygon(0 0, 100% 0, calc(100% - 28px) 100%, 0 100%);
}

.mzwed-vs-side--b {
    padding: 20px 24px 20px 68px;
    text-align: right;
    background: linear-gradient(240deg, var(--mzwed-b), #123f7a);
    clip-path: polygon(28px 0, 100% 0, 100% 100%, 0 100%);
    margin-left: -28px;
}

/* White on the team colours; the generic link colour of the page must not win. */
.mzwed a.mzwed-vs-side,
.mzwed a.mzwed-vs-side:visited,
.mzwed a.mzwed-vs-side:hover {
    color: #fff;
}

.mzwed .mzwed-vs-side:hover {
    filter: brightness(1.08);
}

.mzwed-vs-name {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: clamp(1.4rem, 3.2vw, 2.4rem);
    font-weight: 700;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.mzwed-vs-facts {
    font-size: 0.92rem;
    font-weight: 700;
}

.mzwed-vs-classes {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
}

/* The VS badge sits on the seam, on a strip of chequered flag. */
.mzwed-vs-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 4px solid #15171a;
    border-radius: 50%;
    background: #fff;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 1.5rem;
    font-weight: 800;
    color: #15171a;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
    z-index: 2;
}

.mzwed-vs-grid::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 14px;
    transform: translateX(-50%) skewX(-10deg);
    background: repeating-conic-gradient(#fff 0 25%, #15171a 0 50%) 0 0 / 7px 7px;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

.mzwed-duel-page .mzwed-score-bar {
    background: var(--mzwed-b);
}

.mzwed-duel-page .mzwed-score-bar i,
.mzwed-duel-page .mzwed-prediction-bar i {
    background: var(--mzwed-a);
    border-radius: 0;
}

.mzwed-duel-page .mzwed-prediction-bar {
    background: var(--mzwed-b);
}

.mzwed-duel-page .mzwed-score-side:first-child b,
.mzwed-duel-page .mzwed-prediction-ends > :first-child,
.mzwed-duel-legend .is-a,
.mzwed-versus-heads .is-a {
    color: var(--mzwed-a);
}

.mzwed-duel-page .mzwed-score-side:last-child b,
.mzwed-duel-page .mzwed-prediction-ends > :last-child,
.mzwed-duel-legend .is-b,
.mzwed-versus-heads .is-b {
    color: var(--mzwed-b);
}

.mzwed-duel-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
}

.mzwed-duel-legend a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.mzwed-duel-legend a::before {
    content: "";
    width: 18px;
    height: 4px;
    border-radius: 2px;
    background: currentColor;
}

.mzwed-duel-line {
    fill: none;
    stroke-width: 2.75;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.mzwed-duel-line--a,
.mzwed-duel-end--a {
    stroke: var(--mzwed-a);
}

.mzwed-duel-line--b,
.mzwed-duel-end--b {
    stroke: var(--mzwed-b);
}

.mzwed-duel-end {
    fill: var(--mzwed-surface);
    stroke-width: 3;
}

/* Side by side as a butterfly: both bars grow outwards from the label. */
.mzwed-versus-heads {
    display: flex;
    justify-content: space-between;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mzwed-versus {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
}

.mzwed-versus-row {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr) minmax(0, 1fr) 4.2rem;
    grid-template-areas: "label label label label" "va ba bb vb";
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--mzwed-line);
}

.mzwed-versus-label {
    grid-area: label;
    justify-self: center;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mzwed-muted);
}

.mzwed-versus-value {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--mzwed-faint);
}

.mzwed-versus-value.is-a {
    grid-area: va;
}

.mzwed-versus-value.is-b {
    grid-area: vb;
    text-align: right;
}

.mzwed-versus-value.is-better {
    font-weight: 800;
}

.mzwed-versus-value.is-a.is-better {
    color: var(--mzwed-a);
}

.mzwed-versus-value.is-b.is-better {
    color: var(--mzwed-b);
}

.mzwed-versus-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    background: var(--mzwed-soft);
    overflow: hidden;
}

.mzwed-versus-bar.is-a {
    grid-area: ba;
    justify-content: flex-end;
}

.mzwed-versus-bar.is-b {
    grid-area: bb;
}

.mzwed-versus-bar i {
    display: block;
    height: 100%;
    background: #c9ccd1;
}

.mzwed-versus-row:has(.is-a.is-better) .mzwed-versus-bar.is-a i {
    background: var(--mzwed-a);
}

.mzwed-versus-row:has(.is-b.is-better) .mzwed-versus-bar.is-b i {
    background: var(--mzwed-b);
}

@media (max-width: 720px) {
    .mzwed-vs-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mzwed-vs-side,
    .mzwed-vs-side--b {
        min-height: 0;
        margin: 0;
        padding: 16px 18px;
        clip-path: none;
        text-align: left;
    }

    /* Room above and below the seam for the badge. */
    .mzwed-vs-side {
        padding-bottom: 32px;
    }

    .mzwed-vs-side--b {
        padding-top: 32px;
        padding-bottom: 16px;
        text-align: right;
    }

    .mzwed-vs-badge {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .mzwed-vs-grid::after {
        top: 50%;
        bottom: auto;
        left: 0;
        right: 0;
        width: auto;
        height: 10px;
        transform: translateY(-50%);
    }

    .mzwed-versus-row {
        grid-template-columns: 3.2rem minmax(0, 1fr) minmax(0, 1fr) 3.2rem;
    }

    .mzwed-versus-value {
        font-size: 1.05rem;
    }
}
    max-width: 900px;
}

.mzwed-duel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mzwed-duel-empty {
    padding: 14px 16px;
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-soft);
    color: var(--mzwed-muted);
}

.mzwed-scoreboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mzwed-score {
    display: grid;
    gap: 4px;
    justify-items: center;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    text-align: center;
}

.mzwed-score-line {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 2.6rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mzwed-score-side {
    display: grid;
    justify-items: center;
    min-width: 2ch;
    color: var(--mzwed-muted);
}

.mzwed-score-side b {
    font-weight: 600;
}

.mzwed-score-side small {
    font-family: var(--mzwed-font, inherit);
    font-stretch: 100%;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
}

.mzwed-score-side.is-ahead {
    color: var(--mzwed-ink);
}

.mzwed-score-dash {
    align-self: start;
    color: var(--mzwed-faint);
    font-size: 0.7em;
    line-height: 1.4;
}

.mzwed-score .mzwed-score-bar {
    width: 100%;
    max-width: 220px;
}

.mzwed-score small {
    font-size: 0.8rem;
    color: var(--mzwed-muted);
}

.mzwed-sheet .is-better {
    color: var(--mzwed-ink);
    font-weight: 700;
}

.mzwed-sheet td.mzwed-day.mzwed-duel-day,
.mzwed-duel-rounds td.mzwed-day {
    text-align: center;
}

.mzwed-duel-rounds td.mzwed-round-cell {
    width: 100%;
    white-space: normal;
}

/* Each final as "own : other" on a fixed grid, so the columns line up. */
.mzwed-duel-final {
    display: inline-grid;
    grid-template-columns: 2.4ch auto 2.4ch;
    margin-right: 10px;
    font-variant-numeric: tabular-nums;
    color: var(--mzwed-muted);
}

.mzwed-duel-final b:first-child {
    text-align: right;
}



.mzwed-duel-final i {
    padding-inline: 2px;
    font-style: normal;
    color: var(--mzwed-faint);
}

.mzwed-duel-final b {
    font-weight: 500;
}

/* Elo: ranking page, rider tile and the prediction on the compare page */
.mzwed-ranking-page h1 .mzwed-info {
    vertical-align: 0.6em;
}

.mzwed-ranking td.mzwed-name {
    width: 100%;
    white-space: normal;
}

.mzwed-ranking td.mzwed-name a {
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.mzwed-ranking td.mzwed-name small {
    display: block;
    /* One line with an ellipsis; width 0 keeps the classes from widening the table. */
    width: 0;
    min-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--mzwed-muted);
}

/* Choosing the view: season, class and which riders, one labelled row each. */
.mzwed-ranking-pick {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-soft);
}

.mzwed-pick-row {
    display: grid;
    grid-template-columns: 4.6rem minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mzwed-pick-label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--mzwed-muted);
}

.mzwed-ranking-pick .mzwed-chip {
    background: var(--mzwed-surface);
}

.mzwed-boss {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
}

.mzwed-boss a {
    font-weight: 700;
    text-decoration: none;
}

.mzwed-boss a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-crown {
    flex: none;
    color: var(--mzwed-gold);
}

.mzwed-honour-boss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7a5d08;
}

.mzwed-honour-boss .mzwed-crown {
    width: 22px;
    height: 18px;
}

/* Podium and table read as one list: rank 4 follows straight after the steps. */
.mzwed-ranking-board {
    display: grid;
    gap: 14px;
}

.mzwed-honours--elo .mzwed-honour > small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mzwed-honours--elo .mzwed-honour-block {
    align-content: center;
    gap: 2px;
    height: 112px;
    line-height: 1;
}

.mzwed-honours--elo .mzwed-honour--1 .mzwed-honour-block {
    height: 150px;
    font-size: 1.8rem;
}

.mzwed-honours--elo .mzwed-honour--3 .mzwed-honour-block {
    height: 92px;
}

.mzwed-honours--elo .mzwed-honour-block i {
    font-style: normal;
    font-size: 1.6rem;
    opacity: 0.8;
}

.mzwed-honours--elo .mzwed-honour--1 .mzwed-honour-block i {
    font-size: 2.2rem;
}

.mzwed-honours--elo .mzwed-honour-block b {
    font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
}

.mzwed-honours--elo .mzwed-honour--1 .mzwed-honour-block b {
    font-size: 1.9rem;
}

.mzwed-honours--elo .mzwed-honour-block small {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.mzwed-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--mzwed-soft);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--mzwed-muted);
    vertical-align: 1px;
}

.mzwed-ranking .mzwed-spark {
    display: block;
    margin: 0 0 0 auto;
}

.mzwed-spark--elo polyline {
    stroke: var(--mzwed-ink);
    stroke-width: 1.75;
}

.mzwed-elo-change {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--mzwed-faint);
}

.mzwed-elo-change.is-up {
    color: #1d7a46;
}

.mzwed-elo-change.is-down {
    color: var(--mzwed-red-ink);
}

.mzwed-stat-elo dd .mzwed-spark {
    margin-left: 10px;
    vertical-align: 2px;
}

.mzwed-prediction {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-soft);
}

.mzwed-prediction p {
    font-size: 1rem;
    font-weight: 600;
}

.mzwed-prediction-bar {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: #c9ccd1;
    overflow: hidden;
}

.mzwed-prediction-bar i {
    display: block;
    height: 100%;
    background: var(--mzwed-ink);
}

.mzwed-prediction-ends {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--mzwed-ink);
}

.mzwed-years-short {
    display: none;
}

/* The Elo tile is twice as wide, so its line fits and the rows fill up evenly. */
.mzwed-rider-page .mzwed-stats > .mzwed-stat-elo {
    flex-basis: 36%;
}

/* Forecast: title chances, favourites for the next race and day highlights */
/* Cards grow to fill their row, so a fifth class never stands alone. */
.mzwed-race-grid,
/* One class per column, as many as fit: a short last row keeps the same width. */
.mzwed-fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 10px;
}

.mzwed-race-grid > * {
    flex: 1 1 300px;
    min-width: 0;
}

.mzwed-fav-grid > * {
    min-width: 0;
}

@media (max-width: 720px) {
    /* On a phone the classes sit side by side to swipe through. */
    .mzwed-fav-grid {
        display: flex;
        margin-inline: -16px;
        padding: 0 16px 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .mzwed-fav-grid > * {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }
}

.mzwed-race,
.mzwed-fav {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
}

.mzwed-race header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.mzwed .mzwed-race h3,
.mzwed .mzwed-fav h3 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--mzwed-muted);
}

.mzwed-race h3 a {
    color: inherit;
    text-decoration: none;
}

.mzwed-race h3 a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-race header small {
    font-size: 0.78rem;
    color: var(--mzwed-faint);
}

.mzwed-race ol,
.mzwed-fav ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.mzwed-race-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 3.4em;
    grid-template-areas: "name name pct" "bar now pct";
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    margin: 0;
}

.mzwed-race-now {
    grid-area: now;
    font-size: 0.74rem;
    color: var(--mzwed-faint);
    white-space: nowrap;
}

.mzwed-race-name {
    grid-area: name;
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.mzwed-race-name a {
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.mzwed-race-name a:hover,
.mzwed-fav-name a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-race-row .mzwed-race-bar {
    grid-area: bar;
}

.mzwed-race-bar {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: var(--mzwed-soft);
    overflow: hidden;
}

.mzwed-race-bar i {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--mzwed-ink);
}

.mzwed-race-row.is-favourite .mzwed-race-bar i,
.mzwed-fav li:first-child .mzwed-race-bar i {
    background: var(--mzwed-red);
}

.mzwed-race-pct {
    grid-area: pct;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.mzwed-race-row:not(.is-favourite) .mzwed-race-pct {
    font-size: 1rem;
    font-weight: 600;
}

.mzwed-race-rest {
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid var(--mzwed-line);
    font-size: 0.8rem;
    color: var(--mzwed-faint);
}

.mzwed-fav li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    row-gap: 3px;
    margin: 0;
}

.mzwed-fav li .mzwed-race-bar {
    grid-column: 1 / -1;
    height: 4px;
}

.mzwed-fav-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 600;
}

.mzwed-fav-name a {
    text-decoration: none;
}

.mzwed-fav li b {
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
}

.mzwed-day-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.mzwed-day-card {
    --mzwed-tone: var(--mzwed-red);
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon kicker" "icon value" "icon text";
    column-gap: 12px;
    align-content: start;
    padding: 14px 16px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: linear-gradient(135deg, color-mix(in srgb, var(--mzwed-tone) 12%, var(--mzwed-surface)), var(--mzwed-surface) 65%);
    overflow: hidden;
}

.mzwed-day-card--riser {
    --mzwed-tone: #1d7a46;
}

.mzwed-day-icon {
    grid-area: icon;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--mzwed-tone);
    color: #fff;
}

.mzwed-day-card .mzwed-kicker {
    grid-area: kicker;
    color: var(--mzwed-tone);
}

.mzwed-day-card--riser .mzwed-kicker {
    color: #176a3c;
}

.mzwed-day-value {
    grid-area: value;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
}

.mzwed-day-value small {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mzwed-muted);
}

.mzwed .mzwed-day-card p {
    grid-area: text;
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--mzwed-muted);
}

.mzwed-day-card p a {
    font-weight: 600;
    color: var(--mzwed-ink);
    text-decoration: none;
}

.mzwed-day-card p a:hover {
    color: var(--mzwed-red-ink);
}

/* Season card: preview, season chips, share and download, in the shop's red */
.mzwed-share {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 16px;
    border-radius: var(--mzwed-radius);
    background: linear-gradient(135deg, var(--mzwed-red), var(--mzwed-red-ink));
    color: #fff;
}

.mzwed-share-preview {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(80, 0, 6, 0.35);
    transform: rotate(-2deg);
    transition: transform 0.2s;
}

.mzwed-share-preview:hover {
    transform: rotate(0deg) scale(1.02);
}

.mzwed-share-preview img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    background: #fff;
}

.mzwed-share-body {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.mzwed .mzwed-share h2 {
    margin: 0;
    color: #fff;
}

.mzwed .mzwed-share p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.mzwed-share .mzwed-kicker {
    color: #fff;
}

.mzwed .mzwed-share .mzwed-chip {
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.mzwed .mzwed-share .mzwed-chip:hover {
    border-color: #fff;
}

.mzwed .mzwed-share .mzwed-chip[aria-current="true"] {
    background: #fff;
    border-color: #fff;
    color: var(--mzwed-red-ink);
}

.mzwed .mzwed-share .mzwed-button:not(.mzwed-button--ghost) {
    border-color: #fff;
    background: #fff;
    color: var(--mzwed-red-ink);
}

.mzwed .mzwed-share .mzwed-button:not(.mzwed-button--ghost):hover {
    background: #fdecee;
}

.mzwed .mzwed-share .mzwed-button--ghost {
    border-color: rgba(255, 255, 255, 0.6);
}

.mzwed-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mzwed .mzwed-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid var(--mzwed-red);
    border-radius: 999px;
    background: var(--mzwed-red);
    box-shadow: none;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.mzwed .mzwed-button:hover {
    background: var(--mzwed-red-ink);
    border-color: var(--mzwed-red-ink);
    color: #fff;
}

.mzwed .mzwed-button--ghost {
    border-color: rgba(255, 255, 255, 0.35);
    background: transparent;
}

.mzwed .mzwed-button--ghost:hover {
    border-color: #fff;
    background: transparent;
}

.mzwed-highlight--live {
    --mzwed-tone: var(--mzwed-red-ink);
    border-color: #f3c2c5;
    background: linear-gradient(135deg, #fdecee, var(--mzwed-surface) 75%);
}

/* Roll of honour: records, champions per season and the medal table */
.mzwed-records {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.mzwed-record {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon kicker" "value value" "holder holder" "note note" "next next";
    column-gap: 8px;
    row-gap: 2px;
    align-content: start;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
}

.mzwed-record.is-major {
    border-color: #ead9a0;
    background: linear-gradient(135deg, #fbf3d9, var(--mzwed-surface) 70%);
}

.mzwed-record-icon {
    grid-area: icon;
    width: 18px;
    height: 18px;
    color: var(--mzwed-red);
}

.mzwed-record.is-major .mzwed-record-icon,
.mzwed-record.is-major .mzwed-kicker {
    color: #7a5d08;
}

.mzwed-record .mzwed-kicker {
    grid-area: kicker;
    align-self: center;
}

.mzwed-record-value {
    grid-area: value;
    margin-top: 4px;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mzwed-record-holder {
    grid-area: holder;
    font-size: 1rem;
    font-weight: 700;
}

.mzwed-record-holder a {
    text-decoration: none;
}

.mzwed-record-holder a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-record-note {
    grid-area: note;
    font-size: 0.8rem;
    color: var(--mzwed-muted);
}

.mzwed-record-next {
    grid-area: next;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--mzwed-line);
    font-size: 0.8rem;
    color: var(--mzwed-muted);
}

.mzwed-champions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.mzwed-champion-season {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
}

.mzwed-champion-season header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mzwed .mzwed-champion-season h3 {
    margin: 0;
    font-size: 1.25rem;
}

.mzwed-champion-season h3 a {
    text-decoration: none;
}

.mzwed-champion-season ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
}

.mzwed-champion-season li {
    display: grid;
    grid-template-columns: 6.5em minmax(0, 1fr);
    column-gap: 10px;
    margin: 0;
    padding: 6px 0;
    border-top: 1px solid var(--mzwed-line);
}

.mzwed-champion-class {
    grid-row: span 2;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mzwed-muted);
    text-decoration: none;
}

.mzwed-champion-name {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-weight: 700;
}

.mzwed-champion-name a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.mzwed-champion-name a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-champion-season li small {
    grid-column: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--mzwed-faint);
}

.mzwed-champion-season.is-live .mzwed-champion-name {
    font-weight: 600;
}

.mzwed-medal-table th .mzwed-medal {
    margin-right: 2px;
}

/* Medal table page: a switch between day podiums and final standings, a
   podium with real medals, and a table whose names open where each medal was won. */
.mzwed-medal-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    background: var(--mzwed-soft);
    max-width: 640px;
}

.mzwed .mzwed-medal-switch a {
    display: grid;
    gap: 2px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--mzwed-ink);
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
}

.mzwed .mzwed-medal-switch a:hover {
    background: #fff;
}

.mzwed .mzwed-medal-switch a[aria-current="true"] {
    background: #fff;
    box-shadow: 0 1px 2px rgba(37, 39, 43, 0.08), inset 0 -3px 0 var(--mzwed-red);
}

.mzwed-medal-switch b {
    font-family: var(--mzwed-display);
    font-size: 1.15rem;
}

.mzwed-medal-switch small {
    color: var(--mzwed-muted);
    font-size: 0.82rem;
}

/* A medal with its count: a coloured disc with a ribbon notch. */
.mzwed-medal-step-count .mzwed-medal,
.mzwed-medal-where .mzwed-medal,
.mzwed-medal-case-item .mzwed-medal {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6cf, var(--mzwed-gold) 45%, #a8841a);
    color: #3b2c00;
    font-family: var(--mzwed-display);
    font-size: 1rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mzwed-medal-step-count .mzwed-medal--2,
.mzwed-medal-where .mzwed-medal--2,
.mzwed-medal-case-item .mzwed-medal--2 {
    background: radial-gradient(circle at 35% 30%, #ffffff, var(--mzwed-silver) 45%, #7d848c);
    color: #22262b;
}

.mzwed-medal-step-count .mzwed-medal--3,
.mzwed-medal-where .mzwed-medal--3,
.mzwed-medal-case-item .mzwed-medal--3 {
    background: radial-gradient(circle at 35% 30%, #ffe2c8, var(--mzwed-bronze) 45%, #7d4a26);
    color: #fff;
}

.mzwed-medal-step-count .mzwed-medal::before,
.mzwed-medal-where .mzwed-medal::before,
.mzwed-medal-case-item .mzwed-medal::before {
    display: none;
}

.mzwed-medal-where .mzwed-medal,
.mzwed-medal-case-item .mzwed-medal {
    flex: none;
    width: 18px;
    height: 18px;
}

.mzwed-medal-case-item .mzwed-medal {
    width: 22px;
    height: 22px;
    margin-right: 6px;
}

.mzwed-medal-podium {
    list-style: none;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: center;
    gap: 14px;
    align-items: end;
}

.mzwed-medal-step {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin: 0;
    min-width: 0;
    text-align: center;
}

.mzwed-medal-step-name {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 2.5em;
    font-family: var(--mzwed-display);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.mzwed-medal-step-name a {
    text-decoration: none;
}

.mzwed-medal-step-count {
    display: flex;
    gap: 6px;
}

.mzwed-medal-step-block {
    display: grid;
    place-items: center;
    justify-self: stretch;
    height: 90px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, #c58a5c, #a86d40);
    color: #fff;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 2rem;
    font-weight: 800;
}

.mzwed-medal-step--1 .mzwed-medal-step-block {
    height: 160px;
    font-size: 2.8rem;
    background: linear-gradient(180deg, #cfa83a, #b08a20);
}

.mzwed-medal-step--2 .mzwed-medal-step-block {
    height: 120px;
    background: linear-gradient(180deg, #b9bfc6, #98a0a9);
}

.mzwed-medal-table--full td.mzwed-medal-count,
.mzwed-medal-table--full td.mzwed-medal-total {
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.mzwed-medal-table--full td.mzwed-medal-count.is-gold {
    font-weight: 800;
    color: #7a5d08;
}

.mzwed-medal-table--full td.mzwed-medal-total {
    font-weight: 700;
}

.mzwed-medal-row {
    cursor: pointer;
}

.mzwed .mzwed-medal-toggle {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    min-height: 0;
    margin: 0 0 0 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--mzwed-soft);
    box-shadow: none;
    color: var(--mzwed-red);
    vertical-align: middle;
    cursor: pointer;
}

.mzwed .mzwed-medal-toggle::after {
    content: "▾";
    font-size: 0.8rem;
    line-height: 1;
    transition: transform 0.15s;
}

.mzwed-medal-row.is-open .mzwed-medal-toggle::after {
    transform: rotate(180deg);
}

.mzwed-medal-row.is-open td {
    background: var(--mzwed-red-soft);
}

.mzwed-sheet tbody tr.mzwed-detail-row td {
    padding: 4px 14px 16px;
    background: var(--mzwed-red-soft);
}

.mzwed-medal-where {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 3 220px;
    column-gap: 24px;
    font-size: 0.88rem;
    text-align: left;
}

.mzwed-medal-where li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    break-inside: avoid;
}

.mzwed-medal-where li a {
    text-decoration: none;
}

.mzwed-medal-where li a:hover {
    text-decoration: underline;
}

/* Rider page: two rows of medals, day podiums and final standings. */
.mzwed-medal-case-rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mzwed .mzwed-medal-case-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 14px 16px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    color: var(--mzwed-ink);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mzwed .mzwed-medal-case-row:hover {
    border-color: var(--mzwed-red);
    box-shadow: 0 8px 22px rgba(37, 39, 43, 0.08);
}

.mzwed-medal-case-label {
    font-weight: 700;
}

.mzwed-medal-case-count {
    display: flex;
    gap: 14px;
}

.mzwed-medal-case-item {
    display: inline-flex;
    align-items: center;
    font-family: var(--mzwed-display);
    font-size: 1.3rem;
}

.mzwed-medal-case-item .mzwed-medal::before {
    width: 14px;
    height: 14px;
}

.mzwed-medal-case-item.is-empty {
    opacity: 0.35;
}

@media (max-width: 720px) {
    .mzwed-medal-podium {
        gap: 6px;
    }

    .mzwed-medal-step-name {
        font-size: 0.95rem;
    }

    .mzwed-medal-step-count .mzwed-medal {
        width: 26px;
        height: 26px;
        font-size: 0.82rem;
    }

    .mzwed-medal-step-count {
        gap: 3px;
    }

    .mzwed-medal-step-block {
        height: 70px;
        font-size: 1.5rem;
    }

    .mzwed-medal-step--1 .mzwed-medal-step-block {
        height: 104px;
        font-size: 2rem;
    }

    .mzwed-medal-step--2 .mzwed-medal-step-block {
        height: 86px;
    }

    .mzwed-medal-case-rows {
        grid-template-columns: minmax(0, 1fr);
    }

    /* The medal discs say enough on a phone, so the table fits without scrolling. */
    .mzwed-medal-table--full .mzwed-medal-word {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .mzwed-medal-table--full th .mzwed-medal::before {
        width: 12px;
        height: 12px;
        margin-right: 0;
    }

    .mzwed-medal-where {
        columns: 1;
    }
}

/* Reactions and comments */
.mzwed-talk {
    gap: 14px;
}

.mzwed .mzwed-talk h2 small {
    margin-left: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mzwed-faint);
}

.mzwed-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.mzwed .mzwed-reaction {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--mzwed-line);
    border-radius: 999px;
    background: var(--mzwed-surface);
    box-shadow: none;
    font: inherit;
    font-size: 1.15rem;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    color: var(--mzwed-ink);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.mzwed .mzwed-reaction:hover {
    border-color: var(--mzwed-ink);
    background: var(--mzwed-surface);
}

.mzwed .mzwed-reaction[aria-pressed="true"] {
    border-color: var(--mzwed-red);
    background: var(--mzwed-red-soft);
}

.mzwed-reaction b {
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.mzwed-reaction b:empty {
    display: none;
}

.mzwed .mzwed-reaction--talk {
    margin-left: 4px;
    text-decoration: none;
    font-size: 1rem;
}

.mzwed-reaction.is-pop span {
    animation: mzwed-pop 0.4s ease-out;
}

@keyframes mzwed-pop {
    40% { transform: scale(1.45) rotate(-8deg); }
}

.mzwed-comments {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.mzwed-comments:empty {
    display: none;
}

.mzwed-comment {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    margin: 0;
}

.mzwed-comment.is-new .mzwed-comment-body {
    animation: mzwed-new 1.6s ease-out;
}

@keyframes mzwed-new {
    from { background: #fff3c4; }
}

.mzwed-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: #6b6f78;
}

.mzwed-avatar--1 { background: #b5121b; }
.mzwed-avatar--2 { background: #1d6fa5; }
.mzwed-avatar--3 { background: #1d7a46; }
.mzwed-avatar--4 { background: #8a5a12; }
.mzwed-avatar--5 { background: #6a3d9a; }

.mzwed-comment-body {
    justify-self: start;
    max-width: 100%;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 4px 12px 12px 12px;
    background: var(--mzwed-soft);
}

.mzwed .mzwed-comment-head {
    margin: 0 0 2px;
    font-size: 0.86rem;
}

.mzwed-comment-head time {
    margin-left: 4px;
    font-size: 0.78rem;
    color: var(--mzwed-faint);
}

.mzwed .mzwed-comment-text {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 0.94rem;
}

.mzwed-talk-form {
    display: grid;
    gap: 8px;
}

.mzwed .mzwed-talk-form textarea {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--mzwed-line);
    border-radius: 12px;
    background: var(--mzwed-surface);
    box-shadow: none;
    font: inherit;
    font-size: 0.95rem;
    resize: none;
    color: var(--mzwed-ink);
}

.mzwed .mzwed-talk-form textarea:focus {
    border-color: var(--mzwed-ink);
    outline: none;
}

.mzwed-talk-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mzwed-talk-actions .is-error {
    color: var(--mzwed-red-ink);
}

.mzwed-talk-login {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0;
}

/* Elo page: the chart with season bands, dots, peak and a tooltip */
.mzwed-elo-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
}

.mzwed-elo-now {
    display: grid;
    justify-items: end;
    line-height: 1;
}

.mzwed-elo-now b {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 3.4rem;
    font-weight: 700;
    color: var(--mzwed-red);
}

.mzwed-elo-now span {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--mzwed-muted);
}

.mzwed-elo-figure {
    position: relative;
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 12px 8px 8px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
}

.mzwed-elo-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mzwed-elo-chart {
    display: block;
    width: 100%;
    min-width: 640px;
    height: auto;
    font-family: inherit;
}

.mzwed-elo-figure figcaption {
    padding: 0 8px;
    font-size: 0.8rem;
}

.mzwed-chart-band {
    fill: var(--mzwed-soft);
}

.mzwed-chart-grid {
    stroke: var(--mzwed-line);
    stroke-width: 1;
}

.mzwed-chart-start {
    stroke: var(--mzwed-faint);
    stroke-width: 1.25;
    stroke-dasharray: 4 4;
}

.mzwed-chart-axis,
.mzwed-chart-season {
    font-size: 12px;
    fill: var(--mzwed-faint);
    font-variant-numeric: tabular-nums;
}

.mzwed-chart-season {
    font-weight: 700;
    fill: var(--mzwed-muted);
}

.mzwed-chart-area {
    fill: var(--mzwed-red);
    fill-opacity: 0.08;
}

.mzwed-chart-line {
    fill: none;
    stroke: var(--mzwed-red);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.mzwed-chart-dot {
    cursor: pointer;
    outline: none;
}

.mzwed-chart-dot circle:first-of-type {
    fill: var(--mzwed-surface);
    stroke: var(--mzwed-red);
    stroke-width: 2;
    transition: r 0.15s;
}

.mzwed-chart-dot.is-last circle:first-of-type {
    fill: var(--mzwed-red);
}

.mzwed-chart-dot.is-peak circle:first-of-type {
    fill: var(--mzwed-gold);
    stroke: #8a6a10;
}

.mzwed-chart-dot:is(:hover, :focus-visible, .is-active) circle:first-of-type {
    r: 7px;
    stroke-width: 3;
}

.mzwed-chart-hit {
    fill: transparent;
}

.mzwed-chart-label {
    font-size: 12px;
    font-weight: 800;
    fill: #8a6a10;
}

.mzwed-chart-tip {
    position: absolute;
    z-index: 2;
    display: grid;
    gap: 4px;
    max-width: 260px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--mzwed-ink);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.35;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.mzwed-chart-tip a {
    font-weight: 700;
    color: #ff7a82;
    text-decoration: none;
}

.mzwed-stats dd.is-up {
    color: #1d7a46;
}

.mzwed-stats dd.is-down {
    color: var(--mzwed-red-ink);
}

.mzwed-elo-link {
    color: inherit;
    text-decoration: none;
}

.mzwed-elo-link:hover {
    color: var(--mzwed-red-ink);
}

a.mzwed-honour-block {
    text-decoration: none;
    transition: filter 0.15s;
}

a.mzwed-honour-block:hover {
    filter: brightness(1.08);
}

.mzwed-elo-days td.mzwed-round-cell {
    width: 100%;
    white-space: normal;
}

.mzwed-elo-days td.mzwed-elo-days-classes {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.84rem;
    color: var(--mzwed-muted);
}

@media (max-width: 720px) {
    .mzwed-elo-days .mzwed-elo-days-classes {
        display: none;
    }

    .mzwed-elo-now b {
        font-size: 2.6rem;
    }
}

/* Rider list A to Z */
.mzwed-az-index {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mzwed-az-index a {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border: 1px solid var(--mzwed-line);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.mzwed-az-index a:hover {
    border-color: var(--mzwed-ink);
}

.mzwed-az {
    columns: 3 280px;
    column-gap: 36px;
}

.mzwed-az-group {
    break-inside: avoid;
    padding-bottom: 18px;
    scroll-margin-top: 90px;
}

.mzwed-az-group h2 {
    font-size: 1.1rem;
    color: var(--mzwed-red);
    padding-bottom: 4px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--mzwed-line);
}

.mzwed-az-group ul {
    list-style: none;
    padding: 0;
}

.mzwed-az-group li {
    margin: 0;
}

.mzwed-az-group a {
    display: grid;
    padding: 5px 0;
    text-decoration: none;
    min-width: 0;
}

.mzwed-az-group b {
    font-weight: 600;
    font-size: 0.94rem;
}

.mzwed-az-group small {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--mzwed-muted);
}

.mzwed-az-group a:hover b {
    color: var(--mzwed-red-ink);
}

/* Scoring rules, old files, notes and the round pager */
.mzwed-season-foot {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--mzwed-line);
}

.mzwed-rules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 32px;
    margin: 0;
}

.mzwed-rules div {
    display: grid;
    gap: 2px;
    align-content: start;
}

.mzwed-rules dt {
    font-weight: 600;
    font-size: 0.9rem;
}

.mzwed-rules dd {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--mzwed-muted);
}

.mzwed-files {
    font-size: 0.84rem;
    color: var(--mzwed-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.mzwed-files a {
    color: inherit;
}

.mzwed-files a:hover {
    color: var(--mzwed-ink);
}

.mzwed-note {
    font-size: 0.8rem;
    color: var(--mzwed-muted);
}

.mzwed-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mzwed-pager-link {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    text-decoration: none;
    min-width: 0;
    transition: border-color 0.15s;
}

.mzwed-pager-link:hover {
    border-color: var(--mzwed-ink);
}

.mzwed-pager-link--previous .mzwed-kicker::before {
    content: "← ";
    color: var(--mzwed-red);
}

.mzwed-pager-link--next {
    text-align: right;
}

.mzwed-pager-link--next .mzwed-kicker::after {
    content: " →";
    color: var(--mzwed-red);
}

.mzwed-pager-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Place filter chips */
.mzwed-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.mzwed .mzwed-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid var(--mzwed-line);
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.mzwed .mzwed-chip small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--mzwed-faint);
}

.mzwed .mzwed-chip:hover {
    border-color: var(--mzwed-ink);
}

.mzwed button.mzwed-chip {
    margin: 0;
    background: none;
    box-shadow: none;
    height: auto;
    min-height: 0;
    font-family: inherit;
    line-height: inherit;
    letter-spacing: 0;
    text-transform: none;
    color: var(--mzwed-ink);
    cursor: pointer;
}

.mzwed .mzwed-chip:is([aria-current="true"], [aria-pressed="true"]) {
    background: var(--mzwed-ink);
    border-color: var(--mzwed-ink);
    color: #fff;
}

.mzwed .mzwed-chip:is([aria-current="true"], [aria-pressed="true"]) small {
    color: rgba(255, 255, 255, 0.7);
}

.mzwed-cal-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    font-size: 0.92rem;
}

.mzwed-cal-summary[hidden] {
    display: none;
}

/* Season grid: a row per season, a column per month */
.mzwed-cal {
    --mzwed-year: 6.4rem;
    display: grid;
    gap: 4px;
}

.mzwed-cal-head,
.mzwed-cal-row {
    display: grid;
    grid-template-columns: var(--mzwed-year) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.mzwed-cal-months,
.mzwed-cal-cells {
    display: grid;
    grid-template-columns: repeat(var(--mzwed-cols), minmax(0, 1fr));
    gap: 6px;
}

/* Rounds without a date get a narrower last column. */
.mzwed-cal.has-undated :is(.mzwed-cal-months, .mzwed-cal-cells) {
    grid-template-columns: repeat(var(--mzwed-cols), minmax(0, 1fr)) minmax(0, 0.7fr);
}

.mzwed-cal-months span {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mzwed-muted);
    padding: 0 2px 4px;
    border-bottom: 1px solid var(--mzwed-ink);
}

.mzwed-cal-rows {
    list-style: none;
    padding: 0;
    display: grid;
}

.mzwed-cal-row {
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px solid var(--mzwed-line);
    transition: opacity 0.2s;
}

.mzwed-cal-year {
    display: grid;
    align-content: center;
    gap: 1px;
    text-decoration: none;
}

.mzwed-cal-year b {
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mzwed-cal-year small {
    font-size: 0.78rem;
    color: var(--mzwed-muted);
}

.mzwed-cal-year:hover b {
    color: var(--mzwed-red-ink);
}

.mzwed-cal-row.is-empty .mzwed-cal-year {
    opacity: 0.35;
}

.mzwed-cal-cells {
    list-style: none;
    padding: 0;
}

.mzwed-cal-cell {
    grid-column: var(--mzwed-col);
    display: grid;
    gap: 4px;
    align-content: start;
    margin: 0;
    min-width: 0;
}

.mzwed-cal-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "day place" "day name";
    column-gap: 8px;
    align-items: center;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--mzwed-soft);
    text-decoration: none;
    color: var(--mzwed-ink);
    min-width: 0;
    transition: opacity 0.2s, filter 0.2s, border-color 0.15s, background 0.15s;
}

a.mzwed-cal-chip:hover {
    border-color: var(--mzwed-ink);
    background: var(--mzwed-surface);
}

.mzwed-cal-day {
    grid-area: day;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 600;
    font-size: 1.35rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    min-width: 1.4ch;
    text-align: center;
}

/* The month is in the column header; screen readers still read it. */
.mzwed-cal-month {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.mzwed-cal-place {
    grid-area: place;
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-cal-name {
    grid-area: name;
    font-size: 0.76rem;
    color: var(--mzwed-muted);
    line-height: 1.2;
}

.mzwed-cal-chip.is-upcoming,
.mzwed-cal-chip.is-next {
    background: transparent;
    border: 1px dashed #c8cbd0;
    color: var(--mzwed-muted);
}

.mzwed-cal-chip.is-next {
    border: 1.5px solid var(--mzwed-red);
    color: var(--mzwed-ink);
    background: var(--mzwed-red-soft);
}

.mzwed-cal-chip.is-next .mzwed-cal-name {
    color: var(--mzwed-red-ink);
    font-weight: 600;
}

.mzwed-cal-chip.is-dim {
    opacity: 0.22;
    filter: grayscale(1);
}

.mzwed-cal-legend {
    align-items: center;
    gap: 6px 18px;
    font-size: 0.8rem;
    color: var(--mzwed-muted);
}

.mzwed-cal-key {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    border-radius: 4px;
    vertical-align: -1px;
    background: var(--mzwed-soft);
    border: 1px solid #dfe1e4;
}

.mzwed-cal-key.is-upcoming {
    background: transparent;
    border-style: dashed;
    border-color: #c8cbd0;
}

.mzwed-cal-key.is-next {
    background: var(--mzwed-red-soft);
    border: 1.5px solid var(--mzwed-red);
}

.mzwed-cal-key.is-undated {
    width: auto;
    padding: 0 3px;
    font-style: normal;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 10px;
    text-align: center;
}

/* Locations list on the calendar page */
.mzwed-places {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
}

.mzwed-places li {
    margin: 0;
    min-width: 0;
}

.mzwed-places a {
    display: grid;
    gap: 1px;
    height: 100%;
    padding: 10px 14px;
    border: 1px solid var(--mzwed-line);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s;
}

.mzwed-places a:hover {
    border-color: var(--mzwed-ink);
}

.mzwed-places b {
    font-weight: 600;
}

.mzwed-places span {
    font-size: 0.84rem;
    color: var(--mzwed-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-places small {
    font-size: 0.82rem;
    color: var(--mzwed-faint);
}

/* Locations as photo cards: the name on the picture, the next race marked */
.mzwed-place-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

.mzwed-place-cards li {
    margin: 0;
    min-width: 0;
}

.mzwed .mzwed-place-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
    color: var(--mzwed-ink);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* A red finish line that runs in along the bottom on hover. */
.mzwed .mzwed-place-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 4px;
    background: var(--mzwed-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.mzwed .mzwed-place-card:hover,
.mzwed .mzwed-place-card:focus-visible {
    border-color: transparent;
    box-shadow: 0 16px 36px rgba(37, 39, 43, 0.16);
    transform: translateY(-4px);
}

.mzwed .mzwed-place-card:hover::after,
.mzwed .mzwed-place-card:focus-visible::after {
    transform: scaleX(1);
}

.mzwed .mzwed-place-card:focus-visible {
    outline: 2px solid var(--mzwed-red);
    outline-offset: 2px;
}

.mzwed .mzwed-place-card.is-next {
    border-color: var(--mzwed-red);
    box-shadow: 0 0 0 1px var(--mzwed-red);
}

.mzwed-place-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1f2125;
    container-type: inline-size;
}

.mzwed-place-card-media > img,
.mzwed-place-card-media > .mzwed-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-out;
}

.mzwed-place-card:hover .mzwed-place-card-media > img,
.mzwed-place-card:hover .mzwed-place-card-media > .mzwed-cover {
    transform: scale(1.06);
}

/* The card puts the name on the picture itself. */
.mzwed-place-card-media .mzwed-cover-text {
    display: none;
}

/* Dark at the bottom for the name, and a chequered corner like a finish flag. */
.mzwed-place-card-media::before,
.mzwed-place-card-media::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.mzwed-place-card-media::before {
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(12, 13, 15, 0) 38%, rgba(12, 13, 15, 0.78) 100%);
}

.mzwed-place-card-media::after {
    right: 0;
    bottom: 0;
    z-index: 1;
    width: 84px;
    height: 84px;
    background: repeating-conic-gradient(rgba(255, 255, 255, 0.5) 0 25%, transparent 0 50%) 0 0 / 14px 14px;
    -webkit-mask-image: linear-gradient(135deg, transparent 50%, #000 100%);
    mask-image: linear-gradient(135deg, transparent 50%, #000 100%);
    opacity: 0.55;
    transition: opacity 0.2s;
}

.mzwed-place-card:hover .mzwed-place-card-media::after {
    opacity: 0.9;
}

.mzwed-place-card-title {
    position: absolute;
    left: 16px;
    right: 70px;
    bottom: 14px;
    z-index: 2;
    display: grid;
    gap: 2px;
    color: #fff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.mzwed-place-card-title b {
    font-family: var(--mzwed-display);
    font-size: clamp(1.5rem, 9cqi, 2.1rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
}

.mzwed-place-card-title span {
    font-size: 0.86rem;
    font-weight: 600;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-place-card-count,
.mzwed-place-card-next {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.mzwed-place-card-count {
    right: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--mzwed-ink);
}

.mzwed-place-card-count b {
    font-family: var(--mzwed-display);
    font-size: 0.95rem;
    font-weight: 800;
}

.mzwed-place-card-next {
    left: 12px;
    background: var(--mzwed-red);
    color: #fff;
}

.mzwed-place-card-next .mzwed-next-dot {
    background: #fff;
}

.mzwed-place-card-body {
    display: grid;
    gap: 6px;
    flex: 1 1 auto;
    align-content: start;
    padding: 14px 16px 18px;
}

.mzwed-place-card-meta {
    font-size: 0.84rem;
    color: var(--mzwed-muted);
}

.mzwed-place-card-king {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.9rem;
}

.mzwed-place-card-king svg {
    flex: none;
    color: var(--mzwed-gold);
}

.mzwed-place-card-king b {
    font-weight: 600;
}

.mzwed-place-card .mzwed-cta {
    margin-top: 4px;
}

.mzwed-place-card:hover .mzwed-cta::after {
    transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
    .mzwed .mzwed-place-card,
    .mzwed .mzwed-place-card::after,
    .mzwed-place-card-media > img,
    .mzwed-place-card-media > .mzwed-cover {
        transition: none;
    }

    .mzwed .mzwed-place-card:hover {
        transform: none;
    }

    .mzwed-place-card:hover .mzwed-place-card-media > img,
    .mzwed-place-card:hover .mzwed-place-card-media > .mzwed-cover {
        transform: none;
    }
}

/* The map of the Netherlands: a dot per place, the next race pulsing */
.mzwed-map-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.mzwed-map-land {
    fill: #f1f1f2;
    stroke: #d7d9dd;
    stroke-width: 0.8;
    stroke-linejoin: round;
}

.mzwed-map-dot {
    cursor: pointer;
}

.mzwed-map-hit {
    fill: transparent;
}

.mzwed-map-pin {
    fill: var(--mzwed-ink);
    fill-opacity: 0.78;
    stroke: #fff;
    stroke-width: 1.4;
    transition: fill 0.15s, fill-opacity 0.2s, transform 0.2s;
    transform-box: fill-box;
    transform-origin: center;
}

.mzwed-map-label {
    font-family: var(--mzwed-display);
    font-size: 9px;
    font-weight: 700;
    fill: var(--mzwed-ink);
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 3.5px;
    stroke-linejoin: round;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.mzwed-map-dot:hover .mzwed-map-pin,
.mzwed-map-dot:focus-visible .mzwed-map-pin,
.mzwed-map-dot.is-current .mzwed-map-pin,
.mzwed-map-dot.is-next .mzwed-map-pin,
.mzwed-map-dot.is-active .mzwed-map-pin {
    fill: var(--mzwed-red);
    fill-opacity: 1;
}

.mzwed-map-dot:hover .mzwed-map-pin,
.mzwed-map-dot:focus-visible .mzwed-map-pin,
.mzwed-map-dot.is-active .mzwed-map-pin {
    transform: scale(1.3);
}

.mzwed-map-dot.is-active:not(.is-next) .mzwed-map-pin {
    fill: var(--mzwed-ink);
    stroke: var(--mzwed-red);
    stroke-width: 2.6;
}

.mzwed-map-dot.is-active.is-next .mzwed-map-pin {
    stroke: var(--mzwed-ink);
    stroke-width: 2;
}

/* In the explorer one name at a time: the place under the pointer, else the chosen one. */
.mzwed-explorer.is-live .mzwed-map-label {
    opacity: 0 !important;
}

.mzwed-explorer.is-live .mzwed-map-label.is-active,
.mzwed-explorer.is-live .mzwed-map-labels.has-hover .mzwed-map-label.is-hover {
    opacity: 1 !important;
}

.mzwed-explorer.is-live .mzwed-map-labels.has-hover .mzwed-map-label.is-active:not(.is-hover) {
    opacity: 0 !important;
}

.mzwed-map-label.is-hover,
.mzwed-map-label.is-current,
.mzwed-map-label.is-active,
.mzwed-map-svg:not(.has-current) .mzwed-map-label.is-next {
    opacity: 1;
}

.mzwed-map-dot:focus-visible {
    outline: none;
}

.mzwed-map-dot:focus-visible .mzwed-map-pin {
    stroke: var(--mzwed-ink);
    stroke-width: 2;
}

/* Beside the place itself, or outside the chosen season, other places step back. */
.mzwed-map-svg.has-current .mzwed-map-dot:not(.is-current):not(:hover) .mzwed-map-pin,
.mzwed-map-dot.is-dim .mzwed-map-pin {
    fill: var(--mzwed-faint);
    fill-opacity: 0.4;
}

.mzwed-map-dot.is-dim {
    pointer-events: none;
}

.mzwed-map-halo {
    fill: none;
    stroke: var(--mzwed-red);
    stroke-width: 1.5;
    opacity: 0.35;
    transform-box: fill-box;
    transform-origin: center;
    animation: mzwed-map-ping 2.4s ease-out infinite;
}

.mzwed-map-svg.has-route .mzwed-map-halo {
    display: none;
}

.mzwed-map-svg.has-route .mzwed-map-dot .mzwed-map-pin {
    fill: var(--mzwed-faint);
    fill-opacity: 0.35;
    stroke-width: 1;
}

@keyframes mzwed-map-ping {
    0% { transform: scale(0.6); opacity: 0.6; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}

/* A season's route: drawn from round to round, the stops popping in after it. */
.mzwed-map-route {
    display: none;
    pointer-events: none;
}

.mzwed-map-route.is-shown {
    display: inline;
}

.mzwed-map-route-line,
.mzwed-map-route-next {
    fill: none;
    stroke: var(--mzwed-red);
    stroke-opacity: 0.75;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mzwed-map-route-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.mzwed-map-route.is-shown .mzwed-map-route-line {
    animation: mzwed-map-draw 1.6s ease-in-out forwards;
}

.mzwed-map-route-next {
    stroke-width: 1.6;
    stroke-dasharray: 1.5 4;
    opacity: 0;
}

.mzwed-map-route.is-shown .mzwed-map-route-next {
    animation: mzwed-map-fade 0.4s 1.5s ease-out forwards;
}

.mzwed-map-stop {
    opacity: 0;
}

.mzwed-map-route.is-shown .mzwed-map-stop {
    animation: mzwed-map-fade 0.3s ease-out forwards;
    animation-delay: calc(0.15s + var(--i) * 0.22s);
}

.mzwed-map-stop circle {
    fill: #fff;
    stroke: var(--mzwed-red);
    stroke-width: 1.6;
}

.mzwed-map-stop.is-raced circle {
    fill: var(--mzwed-red);
    stroke: #fff;
}

@media (max-width: 480px) {
    .mzwed-map-stop circle {
        transform: scale(0.85);
        transform-box: fill-box;
        transform-origin: center;
    }
}

.mzwed-map-stop text {
    font-family: var(--mzwed-display);
    font-size: 8.5px;
    font-weight: 800;
    text-anchor: middle;
    fill: var(--mzwed-red-ink);
}

.mzwed-map-stop.is-raced text {
    fill: #fff;
}

@keyframes mzwed-map-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes mzwed-map-fade {
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .mzwed-map-halo {
        animation: none;
    }

    .mzwed-map-route.is-shown .mzwed-map-route-line,
    .mzwed-map-route.is-shown .mzwed-map-route-next,
    .mzwed-map-route.is-shown .mzwed-map-stop {
        animation: none;
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Locations overview: the map to explore, the chosen place beside it. */
.mzwed-explorer {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 20px;
    border: 1px solid var(--mzwed-line);
    border-radius: calc(var(--mzwed-radius) + 4px);
    background: radial-gradient(circle at 30% 20%, #fff, var(--mzwed-soft) 80%);
}

.mzwed-explorer-map {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.mzwed-explorer-map .mzwed-chips {
    margin: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.mzwed-explorer-art {
    max-width: 520px;
    width: 100%;
    justify-self: center;
}

.mzwed-explorer-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
    margin: 0;
    font-size: 0.82rem;
    color: var(--mzwed-muted);
}

.mzwed-explorer-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mzwed-legend-dot {
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--mzwed-ink);
    box-shadow: 0 0 0 1px var(--mzwed-line);
}

.mzwed-legend-dot.is-next {
    background: var(--mzwed-red);
}

.mzwed-explorer-route {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.mzwed-explorer-route li {
    margin: 0;
}

.mzwed .mzwed-explorer-route button {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid var(--mzwed-line);
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
    color: var(--mzwed-ink);
    font: inherit;
    font-size: 0.84rem;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.mzwed-explorer-route button b {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--mzwed-red);
    border-radius: 50%;
    color: var(--mzwed-red-ink);
    font-size: 0.72rem;
}

.mzwed-explorer-route li.is-raced button b {
    border-color: var(--mzwed-red);
    background: var(--mzwed-red);
    color: #fff;
}

.mzwed-explorer-route button small {
    color: var(--mzwed-faint);
}

.mzwed .mzwed-explorer-route button:hover,
.mzwed .mzwed-explorer-route button.is-active {
    border-color: var(--mzwed-red);
    background: var(--mzwed-red-soft);
}

.mzwed-explorer-panel {
    min-width: 0;
}

.mzwed-explorer-place {
    display: grid;
    overflow: hidden;
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
    box-shadow: 0 14px 34px rgba(37, 39, 43, 0.12);
}

.mzwed-explorer.is-live .mzwed-explorer-place:not([hidden]) {
    animation: mzwed-explorer-in 0.25s ease-out;
}

@keyframes mzwed-explorer-in {
    from { opacity: 0; transform: translateY(6px); }
}

.mzwed-explorer-photo {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1f2125;
    container-type: inline-size;
}

.mzwed-explorer-photo > img,
.mzwed-explorer-photo > .mzwed-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mzwed-explorer-body {
    display: grid;
    gap: 12px;
    padding: 16px 20px 20px;
}

.mzwed .mzwed-explorer-body h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.05;
}

.mzwed-explorer-body h2 a {
    text-decoration: none;
}

.mzwed .mzwed-explorer-clubs {
    margin: -6px 0 0;
    color: var(--mzwed-muted);
    font-weight: 600;
}

.mzwed-explorer-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--mzwed-line);
    border-radius: 10px;
    background: var(--mzwed-line);
}

.mzwed-explorer-facts div {
    padding: 8px 10px;
    background: var(--mzwed-surface);
}

.mzwed-explorer-facts dt {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mzwed-muted);
}

.mzwed-explorer-facts dd {
    margin: 0;
    font-family: var(--mzwed-display);
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
}

.mzwed-explorer-kings {
    display: grid;
    gap: 6px;
}

.mzwed-explorer-kings ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.mzwed-explorer-kings li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 600;
}

.mzwed-explorer-kings li::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mzwed-bronze);
}

.mzwed-explorer-kings li.is-1::before {
    background: var(--mzwed-gold);
}

.mzwed-explorer-kings li.is-2::before {
    background: var(--mzwed-silver);
}

.mzwed-explorer-kings a {
    text-decoration: none;
}

.mzwed-explorer-kings small {
    margin-left: auto;
    color: var(--mzwed-muted);
    font-weight: 400;
}

.mzwed-explorer-kings small::after {
    content: " dagzeges";
}

.mzwed .mzwed-explorer-seasons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
}

.mzwed-explorer-seasons span {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--mzwed-soft);
    color: var(--mzwed-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.mzwed-explorer-body .mzwed-button {
    justify-self: start;
}

.mzwed .mzwed-place-card.is-active {
    border-color: var(--mzwed-red);
    box-shadow: 0 0 0 2px var(--mzwed-red), 0 16px 36px rgba(37, 39, 43, 0.16);
}

/* Locations overview: intro beside the totals. */
.mzwed-places-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px 40px;
}

.mzwed-places-head .mzwed-facts {
    padding-inline: 0;
}

/* Location page: the map card under the intro. */
.mzwed-place-map {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-top: 6px;
    padding: 10px 16px 10px 10px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
}

.mzwed-place-map-art {
    border-radius: 8px;
    background: var(--mzwed-soft);
}

.mzwed-place-map-art .mzwed-map-label {
    font-size: 16px;
    stroke-width: 4px;
}

.mzwed-place-map-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.mzwed-place-map-text b {
    font-weight: 700;
}

.mzwed-place-map-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    margin-top: 4px;
}

.mzwed-place-map-links .mzwed-cta {
    font-size: 0.86rem;
}

/* Ranking per class at one place: a small podium above the full table. */
.mzwed-place-table-panel + .mzwed-place-table-panel {
    margin-top: 28px;
}

.mzwed .mzwed-place-table-name {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.mzwed-place-table-name small {
    font-weight: 400;
    font-size: 0.84rem;
    color: var(--mzwed-muted);
}

.mzwed-place-table.is-tabbed .mzwed-place-table-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.mzwed-place-table.is-tabbed .mzwed-place-table-panel + .mzwed-place-table-panel {
    margin-top: 0;
}

.mzwed-place-table [data-mzwed-tab-list] {
    margin-bottom: 18px;
}

.mzwed-place-podium {
    list-style: none;
    margin: 0 auto 18px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 200px));
    justify-content: center;
    gap: 10px;
    align-items: end;
}

.mzwed-place-step {
    display: grid;
    gap: 2px;
    margin: 0;
    min-width: 0;
    text-align: center;
}

.mzwed-place-step-name {
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.mzwed-place-step-name a {
    text-decoration: none;
}

.mzwed-place-step-meta {
    font-size: 0.82rem;
    color: var(--mzwed-muted);
}

.mzwed-place-step-block {
    display: grid;
    place-items: center;
    height: 56px;
    margin-top: 6px;
    border-radius: 10px 10px 0 0;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #c58a5c, #a86d40);
}

.mzwed-place-step--1 .mzwed-place-step-block {
    height: 84px;
    font-size: 2rem;
    background: linear-gradient(180deg, #cfa83a, #b08a20);
}

.mzwed-place-step--2 .mzwed-place-step-block {
    height: 70px;
    background: linear-gradient(180deg, #b9bfc6, #98a0a9);
}

.mzwed-place-ranking td.mzwed-h {
    min-width: 2.6em;
}

.mzwed-place-ranking td.mzwed-name a {
    overflow-wrap: normal;
    word-break: normal;
}

.mzwed-place-best a {
    text-decoration: none;
    white-space: nowrap;
}

.mzwed-place-best small {
    color: var(--mzwed-muted);
    font-size: 0.8rem;
}

/* Elo at one place: closed until asked for, then specialists as bars. */
.mzwed-place-elo {
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    background: var(--mzwed-surface);
    overflow: hidden;
}

.mzwed-place-elo summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    transition: background 0.15s;
}

.mzwed-place-elo summary::-webkit-details-marker {
    display: none;
}

.mzwed-place-elo summary:hover,
.mzwed-place-elo[open] summary {
    background: var(--mzwed-red-soft);
}

.mzwed-place-elo summary:focus-visible {
    outline: 2px solid var(--mzwed-red);
    outline-offset: -2px;
}

.mzwed-place-elo-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--mzwed-red);
    color: #fff;
}

.mzwed-place-elo-title {
    display: grid;
    gap: 2px;
}

.mzwed-place-elo-title b {
    font-family: var(--mzwed-display);
    font-size: 1.15rem;
}

.mzwed-place-elo-title small {
    color: var(--mzwed-muted);
    font-size: 0.88rem;
}

.mzwed-place-elo-toggle::before {
    content: "Bekijk";
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--mzwed-red-ink);
}

.mzwed-place-elo-toggle::after {
    content: "↓";
    margin-left: 6px;
    color: var(--mzwed-red);
    font-weight: 700;
}

.mzwed-place-elo[open] .mzwed-place-elo-toggle::before {
    content: "Verberg";
}

.mzwed-place-elo[open] .mzwed-place-elo-toggle::after {
    content: "↑";
}

.mzwed-place-elo-body {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 24px 40px;
    align-items: start;
    padding: 18px;
    border-top: 1px solid var(--mzwed-line);
}

.mzwed-place-elo-body > :only-child {
    grid-column: 1 / -1;
}

.mzwed-place-elo-gains {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.mzwed .mzwed-place-elo-gains h3 {
    margin: 0;
}

.mzwed-place-elo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
    counter-reset: mzwed-elo;
}

.mzwed-place-elo-list li {
    counter-increment: mzwed-elo;
    display: grid;
    grid-template-columns: 1.6em minmax(0, 14em) minmax(40px, 1fr) 4.2em;
    gap: 10px;
    align-items: center;
    margin: 0;
}

.mzwed-place-elo-list li::before {
    content: counter(mzwed-elo);
    font-weight: 700;
    color: var(--mzwed-faint);
    text-align: right;
}

.mzwed-place-elo-name {
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-place-elo-name a {
    text-decoration: none;
}

.mzwed-place-elo-name small {
    font-weight: 400;
    color: var(--mzwed-faint);
}

.mzwed-place-elo-bar {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mzwed-red) var(--mzwed-bar), var(--mzwed-soft) var(--mzwed-bar));
}

.mzwed-place-elo-list li.is-down .mzwed-place-elo-bar {
    background: linear-gradient(90deg, var(--mzwed-faint) var(--mzwed-bar), var(--mzwed-soft) var(--mzwed-bar));
}

.mzwed-place-elo-gain {
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: var(--mzwed-tone, #1d7a46);
}

.mzwed-place-elo-list li.is-down .mzwed-place-elo-gain {
    color: var(--mzwed-red-ink);
}

/* Rider page: results per place as small cards, the best place marked. */
.mzwed-rider-place-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 10px;
}

.mzwed-rider-place-list li {
    margin: 0;
    min-width: 0;
}

.mzwed .mzwed-rider-place {
    position: relative;
    display: grid;
    gap: 6px;
    height: 100%;
    padding: 12px 14px;
    border: 1px solid var(--mzwed-line);
    border-radius: var(--mzwed-radius);
    color: var(--mzwed-ink);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.mzwed .mzwed-rider-place:hover,
.mzwed .mzwed-rider-place:focus-visible {
    border-color: var(--mzwed-red);
    box-shadow: 0 8px 22px rgba(37, 39, 43, 0.1);
    transform: translateY(-2px);
}

.mzwed .mzwed-rider-place.is-best {
    border-color: #ead9a0;
    background: linear-gradient(135deg, #fbf3d9, var(--mzwed-surface) 70%);
}

.mzwed-rider-place-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mzwed-rider-place-name b {
    font-family: var(--mzwed-display);
    font-size: 1.1rem;
}

.mzwed-rider-place-tag {
    padding: 1px 8px;
    border-radius: 999px;
    background: #7a5d08;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.mzwed-rider-place-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    font-size: 0.84rem;
    color: var(--mzwed-muted);
}

.mzwed-rider-place-stats b {
    color: var(--mzwed-ink);
}

.mzwed-rider-place-elo {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--mzwed-muted);
}

.mzwed-rider-place-elo.is-up {
    color: #1d7a46;
}

.mzwed-rider-place-elo.is-down {
    color: var(--mzwed-red-ink);
}

@media (max-width: 860px) {
    .mzwed-explorer {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
    }

    .mzwed-place-elo-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .mzwed-explorer-facts dt {
        font-size: 0.62rem;
        letter-spacing: 0.04em;
    }

    .mzwed-explorer-facts dd {
        font-size: 0.98rem;
        white-space: normal;
    }

    .mzwed-explorer-route {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .mzwed-explorer-route li {
        flex: none;
    }

    .mzwed-place-ranking .mzwed-place-days,
    .mzwed-place-best-year {
        display: none;
    }

    /* The best day is on the rider's page too; the table fits a phone without it. */
    .mzwed-place-ranking th:last-child,
    .mzwed-place-ranking td.mzwed-place-best {
        display: none;
    }

    .mzwed-place-podium {
        gap: 6px;
    }

    .mzwed-place-step-name {
        font-size: 0.9rem;
    }

    .mzwed-place-elo summary {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mzwed-place-elo-toggle {
        grid-column: 2;
    }

    .mzwed-place-elo-list li {
        grid-template-columns: 1.4em minmax(0, 1fr) 3.6em;
    }

    .mzwed-place-elo-bar {
        grid-column: 2 / -1;
        grid-row: 2;
        height: 6px;
    }
}

/* Location page: picture hero, upcoming dates and a podium of day winners */
.mzwed-place-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
    gap: 20px 40px;
    align-items: center;
}

.mzwed-place-visual {
    margin: 0;
    aspect-ratio: 16 / 10;
    border-radius: var(--mzwed-radius);
    overflow: hidden;
    background: var(--mzwed-soft);
    container-type: inline-size;
}

.mzwed-place-visual > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mzwed-photo-credit {
    position: absolute;
    right: 6px;
    bottom: 6px;
    max-width: calc(100% - 12px);
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(20, 21, 24, 0.62);
    color: #fff;
    font-size: 0.72rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzwed-photo-credit a {
    color: inherit;
}

.mzwed-place-next {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.mzwed-place-next .mzwed-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mzwed-red-ink);
}

.mzwed-place-next ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mzwed-date-chip {
    display: grid;
    gap: 1px;
    margin: 0;
    padding: 8px 12px;
    border: 1px dashed #c8cbd0;
    border-radius: 10px;
}

.mzwed-date-chip.is-next {
    border: 1.5px solid var(--mzwed-red);
    background: var(--mzwed-red-soft);
}

.mzwed-date-chip b {
    font-weight: 600;
}

.mzwed-date-chip span {
    font-size: 0.8rem;
    color: var(--mzwed-muted);
}

.mzwed-date-chip small {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mzwed-red-ink);
}

.mzwed-date-chip small:empty {
    display: none;
}

.mzwed-honours {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 220px));
    justify-content: center;
    gap: 12px;
    align-items: end;
}

.mzwed-honour {
    display: grid;
    gap: 2px;
    margin: 0;
    min-width: 0;
    text-align: center;
}

.mzwed-honour-name {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.mzwed-honour-name a {
    text-decoration: none;
}

.mzwed-honour-name a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-honour-wins {
    font-size: 0.86rem;
    color: var(--mzwed-muted);
}

.mzwed-honour-wins b {
    color: var(--mzwed-ink);
}

.mzwed-honour small {
    font-size: 0.78rem;
    color: var(--mzwed-faint);
}

.mzwed-honour-block {
    display: grid;
    place-items: center;
    height: 84px;
    margin-top: 8px;
    border-radius: 10px 10px 0 0;
    font-family: var(--mzwed-display);
    font-stretch: 85%;
    font-weight: 700;
    font-size: 1.8rem;
    color: #fff;
    background: linear-gradient(180deg, #cfa83a, #b08a20);
}

.mzwed-honour--1 .mzwed-honour-block {
    height: 124px;
    font-size: 2.6rem;
}

.mzwed-honour--2 .mzwed-honour-block {
    background: linear-gradient(180deg, #b9bfc6, #98a0a9);
}

.mzwed-honour--3 .mzwed-honour-block {
    height: 58px;
    background: linear-gradient(180deg, #c58a5c, #a5693e);
}

.mzwed-honours-more {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
    padding-top: 10px;
    border-top: 1px solid var(--mzwed-line);
    font-size: 0.9rem;
}

.mzwed-honours-more i {
    font-style: normal;
    color: var(--mzwed-faint);
}

.mzwed-honours-more a {
    font-weight: 600;
    text-decoration: none;
}

.mzwed-honours-more a:hover {
    color: var(--mzwed-red-ink);
}

.mzwed-honours-more small {
    color: var(--mzwed-muted);
}

.mzwed-place-rounds {
    list-style: none;
    padding: 0;
    display: grid;
    border-top: 1px solid var(--mzwed-line);
}

.mzwed-place-rounds li {
    margin: 0;
    min-width: 0;
}

.mzwed .mzwed-report--row {
    grid-template-rows: none;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding-block: 12px;
    border-bottom: 1px solid var(--mzwed-line);
}

.mzwed-winners {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    margin-top: 2px;
    font-size: 0.84rem;
    color: var(--mzwed-ink);
}

.mzwed-winners > span {
    white-space: nowrap;
}

.mzwed-winners i {
    font-style: normal;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mzwed-muted);
    margin-right: 3px;
}

@media (max-width: 1000px) {
    .mzwed-story-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* The full results with their podiums follow right below. */
    .mzwed-story-layout .mzwed-aside {
        display: none;
    }
}

@media (max-width: 860px) {
    .mzwed-place-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .mzwed-place-visual {
        order: -1;
        aspect-ratio: 2 / 1;
    }
}

/* Phones: each season becomes a block of date chips with the month shown. */
@media (max-width: 720px) {
    .mzwed-next .mzwed-cta {
        margin-left: 0;
    }

    .mzwed-chips--scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: -16px;
        padding-inline: 16px;
    }

    .mzwed-chips--scroll::-webkit-scrollbar {
        display: none;
    }

    .mzwed-cal-head {
        display: none;
    }

    .mzwed-cal-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 12px 0;
    }

    .mzwed-cal-year {
        display: flex;
        align-items: baseline;
        gap: 10px;
    }

    .mzwed-cal .mzwed-cal-cells,
    .mzwed-cal.has-undated .mzwed-cal-cells {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mzwed-cal-cell {
        grid-column: auto;
        display: contents;
    }

    .mzwed-cal-chip {
        grid-template-areas: "day place" "month name";
    }

    .mzwed-cal-month {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip-path: none;
        grid-area: month;
        font-size: 0.76rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        text-align: center;
        color: var(--mzwed-muted);
    }

    .mzwed .mzwed-report--row {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 12px;
        padding-block: 10px;
    }

    .mzwed-places {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .mzwed-honours {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .mzwed-honour-name {
        font-size: 0.92rem;
    }

    .mzwed-honour-block {
        height: 64px;
        font-size: 1.6rem;
    }

    .mzwed-honour--1 .mzwed-honour-block {
        height: 92px;
        font-size: 2.1rem;
    }

    .mzwed-honour--3 .mzwed-honour-block {
        height: 44px;
    }

    /* Day winners as a compact two-column list: class over name. */
    .mzwed-winners {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3px 10px;
        font-size: 0.8rem;
    }

    .mzwed-winners > span {
        display: grid;
        min-width: 0;
    }

    .mzwed-winners > span > span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mzwed-winners i {
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .mzwed-chips--scroll {
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
        mask-image: linear-gradient(90deg, #000 85%, transparent);
    }

    .mzwed-duel-rounds thead th {
        letter-spacing: 0;
    }

    .mzwed .mzwed-duel-rounds td.mzwed-day {
        min-width: 2.4rem;
    }

    .mzwed .mzwed-duel-final {
        grid-template-columns: 2ch auto 2ch;
        margin-right: 2px;
        font-size: 0.84rem;
    }

    .mzwed-rider-page .mzwed-stats > div {
        flex-basis: 40%;
    }

    .mzwed-rider-page .mzwed-stats > .mzwed-stat-elo {
        flex-basis: 100%;
    }

    .mzwed-favourites .mzwed-section-head {
        flex-wrap: nowrap;
        align-items: baseline;
    }

    .mzwed-share {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
        align-items: start;
    }

    .mzwed .mzwed-share h2 {
        font-size: 1.15rem;
    }

    .mzwed .mzwed-share p {
        font-size: 0.86rem;
    }

    .mzwed .mzwed-share .mzwed-chips--scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .mzwed .mzwed-button {
        height: 38px;
        padding: 0 14px;
    }

    .mzwed-honours--elo .mzwed-honour-block {
        height: 92px;
    }

    .mzwed-honours--elo .mzwed-honour--1 .mzwed-honour-block {
        height: 122px;
    }

    .mzwed-honours--elo .mzwed-honour--3 .mzwed-honour-block {
        height: 76px;
    }

    .mzwed-honours--elo .mzwed-honour-block b {
        font-size: 1.2rem;
    }

    .mzwed-honours--elo .mzwed-honour--1 .mzwed-honour-block b {
        font-size: 1.5rem;
    }

    .mzwed .mzwed-duel-rounds .mzwed-round-cell small {
        font-size: 0.74rem;
        white-space: nowrap;
    }

    .mzwed .mzwed-duel-final:last-child {
        margin-right: 0;
    }

    .mzwed .mzwed-duel-final i {
        padding-inline: 1px;
    }

    .mzwed-years-long {
        display: none;
    }

    .mzwed-years-short {
        display: inline;
    }

    .mzwed .mzwed-duel-rounds :is(thead th:not(.mzwed-left), td.mzwed-day) {
        padding-inline: 3px;
    }

    /* First names in normal case, so both columns and their arrows fit. */
    .mzwed .mzwed-duel-rounds thead th:not(.mzwed-left) {
        text-transform: none;
        font-size: 0.8rem;
    }

    .mzwed-ranking :is(.mzwed-ranking-trend, .mzwed-ranking-peak, .mzwed-ranking-finals) {
        display: none;
    }

    .mzwed-rider-extra {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .mzwed-highlights li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .mzwed-highlight {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "icon" "kicker" "value" "note";
        row-gap: 1px;
        padding: 10px 12px;
    }

    .mzwed-highlight-icon {
        margin: 0 0 4px;
    }

    /* On phones the explanation slides up as a sheet from the bottom. */
    .mzwed .mzwed-pop,
    .mzwed .mzwed-pop.is-anchored {
        position: fixed;
        inset: auto 0 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
        border-radius: 18px 18px 0 0;
        font-size: 0.95rem;
    }

    .mzwed .mzwed-pop::before {
        content: "";
        display: block;
        width: 36px;
        height: 4px;
        margin: 0 auto 14px;
        border-radius: 2px;
        background: rgba(255, 255, 255, 0.3);
    }

    .mzwed .mzwed-pop:popover-open {
        animation: mzwed-sheet 0.22s ease-out;
    }

    .mzwed-pop::backdrop {
        background: rgba(20, 21, 24, 0.4);
    }

    .mzwed .mzwed-pop-close {
        display: block;
        width: 100%;
        height: 42px;
        min-height: 0;
        margin-top: 14px;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }

    .mzwed-spark {
        margin-left: 0;
    }

    .mzwed-scoreboard {
        gap: 8px;
    }

    .mzwed-score {
        padding: 12px 10px;
    }

    .mzwed-score-line {
        font-size: 2rem;
    }

    .mzwed-duel-final {
        margin-right: 6px;
    }

    .mzwed-places a {
        padding: 8px 10px;
    }
}

@media (max-width: 960px) {
    .mzwed-reports {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .mzwed {
        --mzwed-gap: 32px;
    }

    .mzwed-hub-head,
    .mzwed-rider-page .mzwed-hub-head,
    .mzwed-top {
        grid-template-columns: minmax(0, 1fr);
    }

    .mzwed-hub-head {
        gap: 18px;
    }

    .mzwed-hub-hero {
        grid-template-areas: "head" "search" "nav";
        padding: 26px 20px 16px;
    }

    .mzwed-hub-hero::before {
        inset: 0;
        border-radius: var(--mzwed-radius);
        -webkit-mask-image: radial-gradient(circle at 100% 0, #000, transparent 55%);
        mask-image: radial-gradient(circle at 100% 0, #000, transparent 55%);
    }

    .mzwed-hub-hero .mzwed-facts {
        justify-content: flex-start;
    }

    /* Every link in sight: an even grid instead of a row to swipe. */
    .mzwed-hub-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .mzwed .mzwed-hub-nav a {
        justify-content: center;
        padding: 0 6px;
        font-size: 0.82rem;
    }
}

/* Phones: lists instead of card grids, tighter tables */
@media (max-width: 720px) {
    .mzwed {
        --mzwed-gap: 28px;
        padding-top: 14px;
    }

    .mzwed-topbar {
        margin-bottom: calc(10px - var(--mzwed-gap));
    }

    .mzwed-topbar > .mzwed-finder-wrap {
        flex: 1 1 100%;
    }

    .mzwed-topbar .mzwed-finder-list {
        left: 0;
        min-width: 0;
    }

    .mzwed .mzwed-finder--hero {
        height: 48px;
        padding-left: 14px;
    }

    .mzwed .mzwed-finder-go {
        height: 38px;
        padding: 0 14px;
    }

    .mzwed-facts {
        padding-inline: 4px;
    }

    .mzwed-lead-text,
    .mzwed-now {
        padding: 14px 16px;
    }

    .mzwed-reports,
    .mzwed-rounds-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        border-top: 1px solid var(--mzwed-line);
    }

    .mzwed-report {
        grid-template-rows: none;
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        padding-block: 10px;
        border-bottom: 1px solid var(--mzwed-line);
    }

    .mzwed-report-visual {
        aspect-ratio: 4 / 3;
        border-radius: 8px;
    }

    .mzwed-report h3 {
        font-size: 0.95rem;
    }

    .mzwed-upcoming b {
        font-size: 1.4rem;
    }

    .mzwed-archive a {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 12px;
    }

    .mzwed-archive-year {
        grid-column: 1 / -1;
        font-size: 1.15rem;
    }

    .mzwed-archive .mzwed-badge {
        grid-row: 1;
        grid-column: 2;
    }

    .mzwed-hero--cover {
        aspect-ratio: 16 / 9;
        min-height: 180px;
    }

    .mzwed-hero--cover .mzwed-cover-track {
        width: 58%;
        opacity: 0.75;
    }

    .mzwed-gallery--landscape {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 8px;
    }

    .mzwed-story-text {
        font-size: 1rem;
    }

    .mzwed-story-text > p:first-child {
        font-size: 1.08rem;
    }

    .mzwed-sheet-wrap--standings {
        display: none;
    }

    .mzwed-cards {
        display: block;
    }

    .mzwed-sheet :is(th, td) {
        padding: 7px 3px;
    }

    .mzwed-sheet td.mzwed-pos {
        width: 2.8rem;
        min-width: 2.8rem;
    }

    .mzwed-sheet .mzwed-stick2 {
        left: 2.8rem;
    }

    .mzwed-sheet td.mzwed-name {
        min-width: 7.5rem;
        padding-right: 8px;
        white-space: normal;
    }

    .mzwed-sheet td.mzwed-pts {
        padding-inline: 8px;
    }

    .mzwed-step-name {
        font-size: 0.9rem;
    }

    .mzwed-step-block {
        height: 60px;
        font-size: 1.5rem;
    }

    .mzwed-step--1 .mzwed-step-block {
        height: 88px;
        font-size: 2rem;
    }

    .mzwed-step--3 .mzwed-step-block {
        height: 46px;
    }

    .mzwed-stats > div {
        flex-basis: 30%;
        padding: 10px 12px;
    }

    .mzwed-stats dd {
        font-size: 1.6rem;
    }

    .mzwed-class-row-name {
        flex-basis: 100%;
    }

    .mzwed-rider-sheet .mzwed-col-total {
        display: none;
    }

    .mzwed-round-cell small {
        display: block;
        margin-left: 0;
    }

    .mzwed-sheet td.mzwed-day {
        min-width: 3.6rem;
    }

    .mzwed-az {
        columns: 2 150px;
        column-gap: 20px;
    }

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

    .mzwed-pager > span {
        display: none;
    }
}

@media (max-width: 420px) {
    .mzwed-stats > div {
        flex-basis: 40%;
    }

    .mzwed-leaders li {
        grid-template-columns: minmax(0, 1fr) auto 14px;
        gap: 2px 10px;
    }

    .mzwed-leader-class {
        grid-column: 1 / -1;
    }

    .mzwed-facts .mzwed-cta {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mzwed * {
        transition: none !important;
    }

    .mzwed-report:hover .mzwed-report-visual > *,
    .mzwed-lead:hover .mzwed-lead-visual > *,
    .mzwed-gallery a:hover img {
        transform: none;
    }

    .mzwed-next-dot,
    .mzwed .mzwed-pop:popover-open {
        animation: none;
    }
}

/* Elo after a race day, per class */
.mzwed-round-elo-panel {
    display: grid;
    gap: 10px;
}

.mzwed-round-elo-panel + .mzwed-round-elo-panel {
    margin-top: 18px;
}

.mzwed .mzwed-round-elo-name {
    margin: 0;
    font-size: 1rem;
}

.mzwed-round-elo.is-tabbed .mzwed-round-elo-name {
    display: none;
}

.mzwed-round-elo.is-tabbed .mzwed-round-elo-panel + .mzwed-round-elo-panel {
    margin-top: 0;
}

.mzwed-round-elo .mzwed-chips {
    margin: 0 0 4px;
}

.mzwed-round-elo-table .mzwed-pos {
    white-space: nowrap;
}

.mzwed-round-elo-rank {
    display: inline-block;
    min-width: 2ch;
    text-align: right;
}

.mzwed-round-elo-table .mzwed-trend {
    margin-left: 6px;
    font-size: 0.74rem;
    font-weight: 600;
}

.mzwed-round-elo-table .mzwed-trend--up {
    color: #1d7a46;
}

.mzwed-round-elo-table .mzwed-trend--down {
    color: var(--mzwed-red-ink);
}

/* Share bar and share sheet: a share button that opens the generated card,
 * with the plain downloads beside it. The sheet sits at the bottom on phones. */
.mzwed-share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.mzwed-head .mzwed-share-bar,
.mzwed-ranking-board .mzwed-share-bar {
    margin-top: 4px;
}

.mzwed-ranking-board .mzwed-share-bar {
    justify-content: center;
}

.mzwed-section-head + .mzwed-share-bar {
    margin-bottom: 6px;
}

.mzwed-hub-head .mzwed-share-bar {
    margin-bottom: 6px;
}

.mzwed-downloads {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.mzwed .mzwed-share-open {
    height: 38px;
    padding: 0 16px;
}

.mzwed .mzwed-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mzwed-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.mzwed .mzwed-download small {
    padding: 1px 5px;
    border: 1px solid var(--mzwed-line);
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mzwed .mzwed-download:hover {
    color: var(--mzwed-red);
}

.mzwed .mzwed-sharesheet {
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 16px 18px 18px;
    border: 0;
    border-top: 5px solid var(--mzwed-red);
    border-radius: 18px;
    background: #fff;
    color: var(--mzwed-ink);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    overflow: auto;
    overscroll-behavior: contain;
}

.mzwed .mzwed-sharesheet[open] {
    display: grid;
    gap: 12px;
}

.mzwed .mzwed-sharesheet::backdrop {
    background: rgba(12, 13, 15, 0.6);
}

.mzwed-sharesheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mzwed .mzwed-sharesheet-head h2 {
    margin: 0;
    color: var(--mzwed-ink);
    font-family: var(--mzwed-display);
    font-size: 1.1rem;
}

.mzwed .mzwed-sharesheet-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--mzwed-soft);
    box-shadow: none;
    color: var(--mzwed-ink);
    cursor: pointer;
}

.mzwed .mzwed-sharesheet .mzwed-chips {
    margin: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.mzwed .mzwed-sharesheet button.mzwed-chip {
    border-color: var(--mzwed-line);
    color: var(--mzwed-ink);
}

.mzwed .mzwed-sharesheet button.mzwed-chip[aria-pressed="true"] {
    border-color: var(--mzwed-red);
    background: var(--mzwed-red);
    color: #fff;
}

.mzwed-sharesheet-preview {
    display: block;
    width: min(100%, calc(50dvh * 0.8), calc((100dvh - 330px) * 0.8));
    min-width: 180px;
    box-shadow: 0 0 0 1px var(--mzwed-line), 0 10px 30px rgba(0, 0, 0, 0.12);
    aspect-ratio: 4 / 5;
    margin: 0 auto;
    border-radius: 12px;
    background: var(--mzwed-soft);
    overflow: hidden;
}

.mzwed-sharesheet-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.2s;
}

.mzwed-sharesheet-preview.is-loading img {
    opacity: 0.25;
}

.mzwed-sharesheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mzwed .mzwed-sharesheet-actions .mzwed-button {
    justify-content: center;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    color: #fff;
}

.mzwed .mzwed-sharesheet-actions .mzwed-button--ghost,
.mzwed .mzwed-sharesheet-actions .mzwed-button--ghost:hover {
    border: 1px solid var(--mzwed-line);
    background: #fff;
    color: var(--mzwed-ink);
}

/* Only with a mouse: on phones a hover state sticks after the tap that opened the sheet. */
@media (hover: hover) {
    .mzwed .mzwed-sharesheet-actions .mzwed-button--ghost:hover {
        border-color: var(--mzwed-red);
        color: var(--mzwed-red-ink);
    }
}

.mzwed .mzwed-sharesheet-actions [data-act="share"] {
    grid-column: 1 / -1;
    height: 50px;
    font-size: 1rem;
}

.mzwed .mzwed-sharesheet-status {
    margin: 0;
    color: var(--mzwed-muted);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.mzwed-sharesheet-status:empty {
    display: none;
}

@media (max-width: 720px) {
    .mzwed .mzwed-sharesheet {
        width: 100%;
        max-width: none;
        max-height: 94dvh;
        margin: auto 0 0;
        padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0;
    }

    /* The grabber: drag the sheet down to close it. */
    .mzwed .mzwed-sharesheet::before {
        content: "";
        justify-self: center;
        width: 36px;
        height: 4px;
        margin: -6px 0 -4px;
        border-radius: 2px;
        background: var(--mzwed-line);
    }

    .mzwed .mzwed-sharesheet[open] {
        animation: mzwed-sharesheet-up 0.22s ease-out;
    }
}

@keyframes mzwed-sharesheet-up {
    from {
        transform: translateY(48px);
        opacity: 0;
    }
}

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