/* ==========================================================================
   Open Court (מגרש פתוח) — main stylesheet. RTL-first, logical properties.
   Concept: a tournament draw sheet laid on a court — court-blue surfaces,
   crisp white lines, ball-yellow fills and lines (never yellow text on light).
   ========================================================================== */

:root {
    --mp-blue: #1E5A8C;
    --mp-blue-deep: #143F63;
    --mp-blue-night: #0E2A42;
    --mp-yellow: #D9E021;
    --mp-yellow-soft: #EEF29A;

    --mp-bg: #F5F8FB;
    --mp-surface: #FFFFFF;
    --mp-tint: #E8F0F7;
    --mp-ink: #13263A;
    --mp-muted: #4B5E72;
    --mp-line: #D3DFEA;
    --mp-link: #1E5A8C;
    --mp-focus: #1E5A8C;

    --mp-band: #1E5A8C;
    --mp-band-deep: #143F63;
    --mp-on-band: #FFFFFF;
    --mp-on-band-soft: rgba(255, 255, 255, 0.86);
    --mp-header: #1E5A8C;
    --mp-footer: #0E2A42;

    --mp-font: 'Arimo', 'Arial Hebrew', Arial, sans-serif;
    --mp-display: 'Karantina', 'Arimo', 'Arial Hebrew', sans-serif;
    --mp-logo: 'Secular One', 'Arimo', sans-serif;

    --mp-radius: 14px;
    --mp-wrap: 1320px;
    --mp-shadow: 0 1px 2px rgba(14, 42, 66, 0.06), 0 8px 24px -12px rgba(14, 42, 66, 0.22);
    --mp-court: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 500' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2' vector-effect='non-scaling-stroke'%3E%3Crect x='20' y='20' width='960' height='460' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M20 75H980M20 425H980M265 75V425M735 75V425M265 250H735M500 8V492' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3C/svg%3E");
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --mp-bg: #0B1724;
        --mp-surface: #11243A;
        --mp-tint: #0F2033;
        --mp-ink: #E4ECF4;
        --mp-muted: #A9BACB;
        --mp-line: #24425F;
        --mp-link: #D9E021;
        --mp-focus: #D9E021;
        --mp-band: #163F63;
        --mp-band-deep: #0F2C46;
        --mp-header: #0F2C46;
        --mp-footer: #08131F;
        --mp-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --mp-bg: #0B1724;
    --mp-surface: #11243A;
    --mp-tint: #0F2033;
    --mp-ink: #E4ECF4;
    --mp-muted: #A9BACB;
    --mp-line: #24425F;
    --mp-link: #D9E021;
    --mp-focus: #D9E021;
    --mp-band: #163F63;
    --mp-band-deep: #0F2C46;
    --mp-header: #0F2C46;
    --mp-footer: #08131F;
    --mp-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    background: var(--mp-bg);
    color: var(--mp-ink);
    font-family: var(--mp-font);
    font-size: 1.0625rem;
    line-height: 1.7;
    overflow-x: clip;
}

img, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--mp-link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--mp-yellow); text-decoration-thickness: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
button { font: inherit; }

:focus-visible {
    outline: 3px solid var(--mp-focus);
    outline-offset: 2px;
    border-radius: 4px;
}

.mp-header :focus-visible,
.mp-draw :focus-visible,
.mp-band :focus-visible,
.mp-next :focus-visible,
.mp-footer :focus-visible,
.mp-btn:focus-visible {
    outline-color: var(--mp-yellow);
}

.mp-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.mp-skip {
    position: absolute;
    inset-inline-start: 16px;
    top: -100px;
    z-index: 100;
    padding: 12px 18px;
    background: var(--mp-yellow);
    color: var(--mp-blue-night);
    font-weight: 700;
    border-radius: 0 0 10px 10px;
    text-decoration: none;
}
.mp-skip:focus { top: 0; }

.mp-wrap {
    width: 100%;
    max-width: var(--mp-wrap);
    margin-inline: auto;
    padding-inline: 20px;
}
.mp-wrap--mid { max-width: 960px; }
.mp-wrap--read { max-width: 800px; }

.mp-main:focus { outline: none; }

.mp-icon { flex: none; vertical-align: middle; }
.mp-seam { flex: none; color: var(--mp-yellow); width: 42px; height: auto; vertical-align: middle; }

/* ---------- Header ---------- */
.mp-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--mp-header);
    color: #fff;
}
.mp-header::after {
    /* the baseline: a crisp white court line along the bottom of the bar */
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 7px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    pointer-events: none;
}
.mp-header__bar {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 76px;
    padding-bottom: 9px;
    padding-top: 6px;
}

.mp-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    flex: none;
}
.mp-brand .mp-mark { border-radius: 12px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }
.mp-brand__name {
    font-family: var(--mp-logo);
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.mp-brand:hover { text-decoration: none; }

.mp-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.mp-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mp-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 6px 11px;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 8px;
    position: relative;
}
.mp-nav a::after {
    content: "";
    position: absolute;
    inset-inline: 11px;
    bottom: 4px;
    height: 3px;
    border-radius: 2px;
    background: var(--mp-yellow);
    transform: scaleX(0);
    transition: transform 0.18s ease;
}
.mp-nav a:hover::after,
.mp-nav .current-menu-item > a::after,
.mp-nav a[aria-current="page"]::after { transform: scaleX(1); }
.mp-nav__all {
    margin-inline-start: 6px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px !important;
}
.mp-nav__all::after { display: none; }
.mp-nav__all:hover { background: var(--mp-yellow); color: var(--mp-blue-night) !important; border-color: var(--mp-yellow); }

.mp-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.mp-iconbtn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.mp-iconbtn:hover { border-color: var(--mp-yellow); }
.mp-iconbtn[aria-expanded="true"] { background: var(--mp-yellow); color: var(--mp-blue-night); border-color: var(--mp-yellow); }
.mp-mode .mp-icon--sun { display: none; }
:root[data-theme="dark"] .mp-mode .mp-icon--sun { display: block; }
:root[data-theme="dark"] .mp-mode .mp-icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mp-mode .mp-icon--sun { display: block; }
    :root:not([data-theme="light"]) .mp-mode .mp-icon--moon { display: none; }
}
.mp-burger { display: none; }
.mp-burger .mp-icon--close { display: none; }
.mp-burger[aria-expanded="true"] .mp-icon--close { display: block; }
.mp-burger[aria-expanded="true"] .mp-icon--menu { display: none; }

.mp-searchbar {
    background: var(--mp-surface);
    border-bottom: 1px solid var(--mp-line);
    padding-block: 16px;
    color: var(--mp-ink);
}
.mp-searchbar[hidden] { display: none; }

.mp-progress { position: absolute; inset-inline: 0; bottom: 0; height: 4px; }
.mp-progress span {
    display: block;
    height: 100%;
    background: var(--mp-yellow);
    transform: scaleX(0);
    transform-origin: right center;
}

@media (max-width: 1180px) {
    .mp-burger { display: inline-grid; }
    .mp-nav {
        display: none;
        position: absolute;
        top: 100%;
        inset-inline: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 20px;
        background: var(--mp-header);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.5);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    .mp-nav.is-open { display: flex; }
    .mp-nav__list { flex-direction: column; }
    .mp-nav a { min-height: 48px; font-size: 1.05rem; }
    .mp-nav a::after { inset-inline-end: auto; width: 28px; }
    .mp-nav__all { margin: 10px 0 0; justify-content: center; }
}
@media (max-width: 420px) {
    .mp-brand__name { font-size: 1.4rem; }
    .mp-brand .mp-mark { width: 38px; height: 38px; }
    .mp-tools { gap: 2px; }
    .mp-iconbtn { width: 42px; height: 42px; }
    .mp-header__bar { gap: 10px; }
}

/* ---------- Search form ---------- */
.mp-searchform {
    display: flex;
    gap: 8px;
    max-width: 640px;
}
.mp-searchform input {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 10px 18px;
    border: 2px solid var(--mp-line);
    border-radius: 999px;
    background: var(--mp-surface);
    color: var(--mp-ink);
    font: inherit;
}
.mp-searchform input::placeholder { color: var(--mp-muted); opacity: 1; }
.mp-searchform input:focus-visible { border-color: var(--mp-blue); outline-offset: 1px; }
.mp-searchform button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--mp-blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.mp-searchform button:hover { background: var(--mp-blue-deep); }
@media (max-width: 480px) {
    .mp-searchform button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .mp-searchform button { padding-inline: 14px; }
}

/* ---------- Shared bits ---------- */
.mp-kicker,
.mp-band__kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: var(--mp-blue);
}
:root[data-theme="dark"] .mp-kicker { color: #9CC6EA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mp-kicker { color: #9CC6EA; } }

.mp-section { padding-block: clamp(48px, 7vw, 84px); }
.mp-section--tint { background: var(--mp-tint); }

.mp-head { margin-bottom: 28px; }
.mp-head--split { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.mp-head__title {
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 4.5vw, 3.3rem);
    line-height: 1;
    letter-spacing: 0.005em;
}
.mp-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-weight: 700;
    text-decoration: none;
}
.mp-more:hover { text-decoration: underline; text-decoration-color: var(--mp-yellow); text-decoration-thickness: 3px; }

.mp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}
.mp-btn--ball {
    background: var(--mp-yellow);
    color: var(--mp-blue-night);
    box-shadow: inset 0 0 0 2px rgba(14, 42, 66, 0.12);
}
.mp-btn--ball:hover { background: #fff; color: var(--mp-blue-night); text-decoration: none; }

.mp-tag,
.mp-card__tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--mp-yellow);
    color: var(--mp-blue-night);
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.6;
    text-decoration: none;
}
a.mp-tag:hover { background: #fff; text-decoration: none; }

.mp-avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--mp-yellow);
    color: var(--mp-blue-night);
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 0 0 3px #fff;
}
.mp-avatar--lg { width: 72px; height: 72px; font-size: 1.6rem; }

/* ---------- Homepage: the draw sheet ---------- */
.mp-draw {
    --s: 18px;
    --gap: 10px;
    --pool-gap: 30px;
    position: relative;
    background: var(--mp-band);
    color: #fff;
    padding-block: 40px 56px;
    overflow: hidden;
}
.mp-draw__lines {
    position: absolute;
    inset: 22px 14px;
    background: var(--mp-court) center / 100% 100% no-repeat;
    opacity: 0.16;
    pointer-events: none;
}
.mp-draw .mp-wrap { position: relative; }

.mp-draw__rounds {
    display: grid;
    grid-template-columns: 1fr auto minmax(320px, 410px) auto 1fr;
    gap: 0 calc(var(--s) * 2);
    margin-bottom: 14px;
    font-family: var(--mp-display);
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
}
.mp-draw__rounds span:nth-child(2),
.mp-draw__rounds span:nth-child(4) { width: 150px; }

.mp-draw__grid {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 410px) 1fr;
    column-gap: calc(var(--s) * 2);
    align-items: center;
}

.mp-half {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--pool-gap);
}
.mp-pool {
    position: relative;
    display: flex;
    align-items: center;
    gap: calc(var(--s) * 2);
}
.mp-half--end .mp-pool { flex-direction: row-reverse; }

.mp-pool__entries {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.mp-entry { position: relative; }
.mp-entry a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 7px 8px 7px 14px;
    padding-inline: 8px 14px;
    background: #fff;
    color: var(--mp-blue-night);
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mp-entry a:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px var(--mp-yellow), 0 10px 20px -12px rgba(0, 0, 0, 0.6);
}
.mp-entry__img {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--mp-yellow);
    box-shadow: 0 0 0 2px var(--mp-yellow);
}
.mp-entry__img img { width: 100%; height: 100%; object-fit: cover; }
.mp-entry__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mp-entry__name { font-weight: 700; font-size: 0.98rem; }
.mp-entry__count { font-size: 0.82rem; color: var(--mp-blue); font-weight: 700; margin-top: 2px; }

/* connector lines — start half: lines run toward inline-end; end half: toward inline-start */
.mp-entry::after,
.mp-entry::before,
.mp-pool__node::before,
.mp-pool__node::after,
.mp-pool::after,
.mp-half::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.mp-entry::after {
    top: 50%;
    width: var(--s);
    border-top: 2px solid rgba(255, 255, 255, 0.92);
}
.mp-entry::before {
    width: 0;
    border-inline-start: 2px solid rgba(255, 255, 255, 0.92);
    top: calc(var(--gap) / -2 - 1px);
    bottom: calc(var(--gap) / -2 - 1px);
}
.mp-entry:first-child::before { top: 50%; }
.mp-entry:last-child::before { bottom: 50%; }
.mp-entry:only-child::before { display: none; }
.mp-half--start .mp-entry::after { inset-inline-end: calc(var(--s) * -1); }
.mp-half--start .mp-entry::before { inset-inline-end: calc(var(--s) * -1 - 1px); }
.mp-half--end .mp-entry::after { inset-inline-start: calc(var(--s) * -1); }
.mp-half--end .mp-entry::before { inset-inline-start: calc(var(--s) * -1 - 1px); }

.mp-pool__node {
    position: relative;
    flex: none;
    width: 150px;
    padding: 10px 12px;
    border: 2px solid #fff;
    border-radius: 12px;
    background: var(--mp-band-deep);
    text-align: center;
}
.mp-pool__node::before,
.mp-pool__node::after {
    top: 50%;
    width: var(--s);
    border-top: 2px solid rgba(255, 255, 255, 0.92);
}
.mp-half--start .mp-pool__node::before { inset-inline-start: calc(var(--s) * -1 - 2px); }
.mp-half--start .mp-pool__node::after { inset-inline-end: calc(var(--s) * -1 - 2px); }
.mp-half--end .mp-pool__node::before { inset-inline-end: calc(var(--s) * -1 - 2px); }
.mp-half--end .mp-pool__node::after { inset-inline-start: calc(var(--s) * -1 - 2px); }
.mp-pool__label {
    display: block;
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: 1.55rem;
    line-height: 1.05;
}
.mp-pool__count { display: block; font-size: 0.8rem; color: var(--mp-on-band-soft); margin-top: 3px; }

.mp-pool::after {
    width: 0;
    border-inline-start: 2px solid rgba(255, 255, 255, 0.92);
    top: calc(var(--pool-gap) / -2 - 1px);
    bottom: calc(var(--pool-gap) / -2 - 1px);
}
.mp-pool:first-child::after { top: 50%; }
.mp-pool:last-child::after { bottom: 50%; }
.mp-pool:only-child::after { display: none; }
.mp-half--start .mp-pool::after { inset-inline-end: calc(var(--s) * -1 - 1px); }
.mp-half--end .mp-pool::after { inset-inline-start: calc(var(--s) * -1 - 1px); }

.mp-half::after {
    top: 50%;
    width: var(--s);
    border-top: 2px solid rgba(255, 255, 255, 0.92);
}
.mp-half--start::after { inset-inline-end: calc(var(--s) * -2); }
.mp-half--end::after { inset-inline-start: calc(var(--s) * -2); }

/* the centre court */
.mp-final {
    position: relative;
    padding: 30px 30px 28px;
    border: 3px solid #fff;
    border-radius: 20px;
    background: var(--mp-band-deep);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08), 0 24px 40px -24px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}
.mp-final::before {
    /* service box lines inside the panel */
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    pointer-events: none;
}
.mp-final > * { position: relative; }
.mp-final__ball {
    position: absolute;
    top: -34px;
    inset-inline-end: -34px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M22 14c26 18 26 74 0 92M98 14c-26 18-26 74 0 92' fill='none' stroke='%23fff' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
        var(--mp-yellow);
    opacity: 0.95;
}
.mp-final__kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--mp-yellow);
    font-weight: 700;
    font-size: 0.9rem;
}
.mp-final__title {
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: clamp(2.3rem, 3.4vw, 3rem);
    line-height: 1.02;
    margin-bottom: 14px;
    max-width: 18ch;
}
.mp-final__lead p { margin: 0 0 18px; color: var(--mp-on-band-soft); font-size: 1rem; line-height: 1.65; }
.mp-final__lead a { color: #fff; }
.mp-final__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.mp-final__count { font-size: 0.88rem; color: var(--mp-on-band-soft); }

@media (max-width: 1260px) and (min-width: 1100px) {
    .mp-draw { --s: 14px; }
    .mp-pool__node, .mp-draw__rounds span:nth-child(2), .mp-draw__rounds span:nth-child(4) { width: 124px; }
    .mp-pool__label { font-size: 1.35rem; }
    .mp-entry__img { width: 40px; height: 40px; }
}

/* small screens: the draw becomes a vertical bracket */
@media (max-width: 1099px) {
    .mp-draw { padding-block: 28px 44px; }
    .mp-draw__rounds { display: none; }
    .mp-draw__grid { grid-template-columns: 1fr; row-gap: 28px; }
    .mp-final { order: -1; }
    .mp-half { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
    .mp-pool, .mp-half--end .mp-pool { flex-direction: column; align-items: stretch; gap: 0; }
    .mp-pool__node { order: -1; width: auto; text-align: start; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-radius: 12px 12px 12px 12px; }
    .mp-pool__count { margin: 0; }
    .mp-pool__entries { padding-inline-start: 22px; padding-top: var(--gap); position: relative; }
    .mp-entry::before, .mp-entry::after,
    .mp-pool::after, .mp-half::after, .mp-pool__node::before, .mp-pool__node::after { display: none; }
    .mp-pool__entries::before {
        content: "";
        position: absolute;
        inset-inline-start: 9px;
        top: 0;
        bottom: 31px;
        border-inline-start: 2px solid rgba(255, 255, 255, 0.92);
    }
    .mp-entry { position: relative; }
    .mp-half .mp-entry::after,
    .mp-half--start .mp-entry::after,
    .mp-half--end .mp-entry::after {
        display: block;
        inset-inline-start: -13px;
        inset-inline-end: auto;
        width: 13px;
    }
    .mp-final { padding: 26px 22px 24px; }
    .mp-final__title { max-width: none; }
}

/* ---------- Cards ---------- */
.mp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    overflow: hidden;
    box-shadow: var(--mp-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mp-card::after {
    /* a ball-yellow baseline appears on hover */
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 4px;
    background: var(--mp-yellow);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}
.mp-card:hover { transform: translateY(-3px); }
.mp-card:hover::after, .mp-card:focus-within::after { transform: scaleX(1); }
.mp-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--mp-tint); }
.mp-card__media img, .mp-cat__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-card__media::after,
.mp-cat__media::after {
    /* court lines drawn over the photo */
    content: "";
    position: absolute;
    inset: 10px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 6px;
    background: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)) center / 2px 100% no-repeat;
    pointer-events: none;
    opacity: 0.7;
}
.mp-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.mp-card__title { font-size: 1.15rem; font-weight: 700; line-height: 1.35; }
.mp-card__title a { color: var(--mp-ink); text-decoration: none; }
.mp-card__title a::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.mp-card__title a:hover { text-decoration: underline; text-decoration-color: var(--mp-yellow); text-decoration-thickness: 3px; }
.mp-card__title a:focus-visible { outline: none; }
.mp-card:focus-within { outline: 3px solid var(--mp-focus); outline-offset: 2px; }
.mp-card__excerpt { color: var(--mp-muted); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.mp-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: auto 0 0;
    padding-top: 6px;
    font-size: 0.82rem;
    color: var(--mp-muted);
}

.mp-card--lead .mp-card__media { aspect-ratio: 16 / 10; }
.mp-card--lead .mp-card__title { font-family: var(--mp-display); font-size: clamp(2rem, 3vw, 2.6rem); line-height: 1.05; font-weight: 700; }
.mp-card--lead .mp-card__body { padding: 22px 26px 26px; }

.mp-card--row { flex-direction: row; align-items: stretch; box-shadow: none; }
.mp-card--row .mp-card__media { flex: none; width: 112px; aspect-ratio: auto; }
.mp-card--row .mp-card__media::after { display: none; }
.mp-card--row .mp-card__body { padding: 12px 16px; gap: 4px; }
.mp-card--row .mp-card__tag { font-size: 0.75rem; padding: 1px 9px; }
.mp-card--row .mp-card__title { font-size: 1rem; }
.mp-card--row:hover { transform: none; }

.mp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 1000px) { .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mp-grid { grid-template-columns: 1fr; } }

.mp-latest {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
    align-items: start;
}
.mp-latest__rows { display: grid; gap: 12px; }
@media (max-width: 900px) {
    .mp-latest { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .mp-card--row .mp-card__media { width: 92px; }
}

/* ---------- Homepage: sections ---------- */
.mp-cats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mp-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--mp-surface);
    border-radius: var(--mp-radius);
    border: 1px solid var(--mp-line);
    overflow: hidden;
    box-shadow: var(--mp-shadow);
}
.mp-cat__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mp-band); }
.mp-cat__body { padding: 14px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.mp-cat__name { font-family: var(--mp-display); font-weight: 700; font-size: 2rem; line-height: 1; }
.mp-cat__name a { color: var(--mp-ink); text-decoration: none; }
.mp-cat__name a:hover { text-decoration: underline; text-decoration-color: var(--mp-yellow); text-decoration-thickness: 3px; }
.mp-cat__count {
    align-self: flex-start;
    margin: 8px 0 10px;
    padding: 1px 10px;
    border-radius: 999px;
    background: var(--mp-tint);
    border: 1px solid var(--mp-line);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--mp-link);
}
.mp-cat__lead { font-size: 0.92rem; line-height: 1.6; color: var(--mp-muted); margin-bottom: 12px; }
.mp-cat__posts {
    margin: auto 0 0;
    padding: 10px 0 0;
    list-style: none;
    border-top: 2px dashed var(--mp-line);
    display: grid;
    gap: 6px;
}
.mp-cat__posts a {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    padding-block: 3px;
}
.mp-cat__posts a::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-inline-end: 8px;
    border-radius: 50%;
    background: var(--mp-yellow);
    box-shadow: 0 0 0 2px var(--mp-blue);
    vertical-align: 1px;
}
.mp-cat__posts a:hover { text-decoration: underline; text-decoration-color: var(--mp-yellow); text-decoration-thickness: 3px; }

.mp-writers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mp-writer {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 24px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    border-top: 5px solid var(--mp-blue);
}
.mp-writer__name { font-size: 1.25rem; font-weight: 700; }
.mp-writer__count { font-size: 0.85rem; color: var(--mp-link); font-weight: 700; margin: 2px 0 8px; }
.mp-writer__bio { color: var(--mp-muted); font-size: 0.95rem; margin: 0; }

.mp-front { background: var(--mp-surface); border-block: 1px solid var(--mp-line); }

/* the "week on the courts" training card */
.mp-tcard {
    margin: 1.6em 0 2em;
    border: 2px solid var(--mp-blue);
    border-radius: 18px;
    overflow: hidden;
    background: var(--mp-surface);
}
.mp-tcard__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 10px 20px;
    background: var(--mp-blue);
    color: #fff;
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
}
.mp-prose .mp-tcard__list,
.mp-tcard__list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
    background: none;
    border: 0;
    border-radius: 0;
}
.mp-prose .mp-tcard__list > li,
.mp-tcard__list > li {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    align-items: start;
    margin: 0;
    padding: 14px 20px;
    border-top: 1px solid var(--mp-line);
    font-size: 0.98rem;
    line-height: 1.65;
}
.mp-prose .mp-tcard__list > li:first-child { border-top: 0; }
.mp-prose .mp-tcard__list > li::before,
.mp-prose .mp-tcard__list > li::after { display: none; }
.mp-prose .mp-tcard__list > li:nth-child(even) { background: var(--mp-tint); }
.mp-tcard__day {
    display: block;
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--mp-yellow);
    color: var(--mp-blue-night);
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 1.2;
    text-align: center;
}
.mp-tcard__text strong { display: block; color: var(--mp-ink); }
@media (max-width: 520px) {
    .mp-prose .mp-tcard__list > li, .mp-tcard__list > li { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
    .mp-tcard__day { justify-self: start; padding-inline: 14px; }
}

/* ---------- Bands (page/archive/article heads) ---------- */
.mp-band {
    position: relative;
    background: var(--mp-band);
    color: #fff;
    padding-block: 34px 44px;
    overflow: hidden;
}
.mp-band::before {
    content: "";
    position: absolute;
    inset: 16px 12px;
    background: var(--mp-court) center / 100% 100% no-repeat;
    opacity: 0.12;
    pointer-events: none;
}
.mp-band > * { position: relative; }
.mp-band--article { padding-bottom: 110px; }
.mp-band__title {
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: clamp(2.6rem, 5.6vw, 4.1rem);
    line-height: 1.02;
    margin: 12px 0 0;
    text-wrap: balance;
}
.mp-band__kicker { color: var(--mp-yellow); margin: 6px 0 0; }
.mp-band__count {
    display: inline-block;
    margin: 14px 0 0;
    padding: 2px 14px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}
.mp-band__lead { font-size: 1.12rem; color: #fff; margin: 14px 0 0; max-width: 62ch; }
.mp-band__lead a, .mp-band__desc a { color: #fff; }
.mp-band__desc { color: var(--mp-on-band-soft); font-size: 0.98rem; }
.mp-band__desc p { margin: 0 0 0.8em; }
.mp-band__desc .mp-band__lead { margin-top: 0; margin-bottom: 0.8em; }
.mp-band__split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px 56px; align-items: start; }
.mp-band__search { margin-top: 22px; }
.mp-band__author { display: flex; gap: 20px; align-items: center; }
.mp-band--404 { padding-block: 64px 72px; }
@media (max-width: 860px) {
    .mp-band__split { grid-template-columns: 1fr; }
}

.mp-crumbs { font-size: 0.85rem; color: var(--mp-on-band-soft); }
.mp-crumbs a { color: #fff; }
.mp-crumbs .breadcrumb_last { color: var(--mp-on-band-soft); }

.mp-byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.mp-byline .mp-avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9); }
.mp-byline__text { display: flex; flex-direction: column; gap: 2px; }
.mp-byline__name { font-weight: 700; color: #fff; }
.mp-byline__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.88rem; color: var(--mp-on-band-soft); }
.mp-byline__meta > span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Article ---------- */
.mp-article__media {
    margin-top: -84px;
    margin-bottom: 0;
    position: relative;
}
.mp-article__media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    border: 5px solid var(--mp-surface);
    box-shadow: var(--mp-shadow);
    background: var(--mp-tint);
}

.mp-article__layout {
    max-width: 1180px;
    padding-block: 36px 64px;
}
.mp-article__main { max-width: 760px; margin-inline: auto; min-width: 0; }
.mp-article__layout.has-toc {
    display: grid;
    grid-template-columns: 270px minmax(0, 760px);
    justify-content: center;
    gap: 56px;
    align-items: start;
}
.mp-article__layout.has-toc .mp-article__main { margin: 0; }

.mp-toc { position: sticky; top: 100px; }
.mp-toc__box {
    border: 2px solid var(--mp-line);
    border-radius: var(--mp-radius);
    background: var(--mp-surface);
    padding: 6px 16px 12px;
}
.mp-toc__box summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 700;
    cursor: pointer;
    color: var(--mp-ink);
}
.mp-toc__box ol {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}
.mp-toc__box li { counter-increment: toc; }
.mp-toc__box a {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    padding-inline-start: 8px;
    border-inline-start: 3px solid transparent;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--mp-muted);
    text-decoration: none;
}
.mp-toc__box a::before { content: counter(toc); font-weight: 700; color: var(--mp-link); min-width: 1.2em; }
.mp-toc__box a:hover { color: var(--mp-ink); }
.mp-toc__box a.is-active { border-inline-start-color: var(--mp-yellow); color: var(--mp-ink); font-weight: 700; background: var(--mp-tint); }

@media (max-width: 1099px) {
    .mp-article__layout.has-toc { display: block; }
    .mp-toc { position: static; max-width: 760px; margin: 0 auto 28px; }
    .mp-toc__box ol { max-height: none; }
}

/* ---------- Prose ---------- */
.mp-prose { font-size: 1.0625rem; line-height: 1.8; overflow-wrap: break-word; }
.mp-prose > :first-child { margin-top: 0; }
.mp-prose p, .mp-prose ul, .mp-prose ol { margin: 0 0 1.15em; }
.mp-prose h2 {
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: clamp(2.05rem, 3.4vw, 2.5rem);
    line-height: 1.05;
    margin: 1.7em 0 0.55em;
    color: var(--mp-ink);
}
.mp-prose h2::before {
    content: "";
    display: inline-block;
    width: 0.42em;
    height: 0.42em;
    margin-inline-end: 0.3em;
    border-radius: 50%;
    background: var(--mp-yellow);
    box-shadow: 0 0 0 3px var(--mp-blue);
    vertical-align: 0.12em;
}
.mp-prose h3 { font-size: 1.22rem; font-weight: 700; margin: 1.6em 0 0.5em; line-height: 1.35; }
.mp-prose strong { font-weight: 700; }
.mp-prose em { font-style: normal; }
.mp-prose ul { padding-inline-start: 1.4em; }
.mp-prose ul > li { margin-bottom: 0.45em; }
.mp-prose ul > li::marker { color: var(--mp-blue); }
:root[data-theme="dark"] .mp-prose ul > li::marker { color: var(--mp-yellow); }

/* ordered lists: drills as training-card steps */
.mp-prose ol {
    counter-reset: step;
    list-style: none;
    padding: 18px 20px 6px;
    background: var(--mp-tint);
    border: 1px solid var(--mp-line);
    border-inline-start: 5px solid var(--mp-blue);
    border-radius: 14px;
}
.mp-prose ol > li {
    counter-increment: step;
    position: relative;
    padding-inline-start: 50px;
    padding-bottom: 14px;
    min-height: 44px;
}
.mp-prose ol > li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mp-yellow);
    color: var(--mp-blue-night);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--mp-blue);
}
.mp-prose ol > li:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: 16px;
    top: 40px;
    bottom: 4px;
    border-inline-start: 2px dashed var(--mp-blue);
    opacity: 0.45;
}

/* tables: score sheets */
.mp-sheet {
    margin: 1.5em 0 1.8em;
    overflow-x: auto;
    border: 2px solid var(--mp-blue);
    border-radius: 14px;
    background: var(--mp-surface);
    box-shadow: inset 0 5px 0 var(--mp-yellow);
    padding-top: 5px;
}
.mp-sheet table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}
.mp-sheet th {
    background: var(--mp-blue);
    color: #fff;
    font-weight: 700;
    text-align: start;
    padding: 11px 14px;
    white-space: nowrap;
}
.mp-sheet td {
    padding: 10px 14px;
    border-top: 1px solid var(--mp-line);
    vertical-align: top;
}
.mp-sheet th + th, .mp-sheet td + td { border-inline-start: 1px solid var(--mp-line); }
.mp-sheet th + th { border-inline-start-color: rgba(255, 255, 255, 0.3); }
.mp-sheet tbody tr:nth-child(even) td { background: var(--mp-tint); }
.mp-sheet td:first-child { font-weight: 700; color: var(--mp-ink); }
@media (max-width: 600px) {
    .mp-sheet th { white-space: normal; }
    .mp-sheet table { font-size: 0.9rem; }
    .mp-sheet td, .mp-sheet th { padding: 9px 10px; }
}

/* "לאימון הבא" — the next-session card */
.mp-next {
    position: relative;
    margin: 2.4em 0 1.8em;
    padding: 26px 30px 12px;
    background: var(--mp-band);
    color: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.mp-next::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    pointer-events: none;
}
.mp-next > * { position: relative; }
.mp-next__ball {
    position: absolute !important;
    top: -40px;
    inset-inline-end: -40px;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M22 14c26 18 26 74 0 92M98 14c-26 18-26 74 0 92' fill='none' stroke='%23fff' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
        var(--mp-yellow);
}
.mp-next__kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px !important;
    color: var(--mp-yellow);
    font-weight: 700;
    font-size: 0.88rem;
}
.mp-prose .mp-next h2 { margin: 0 0 0.4em; color: #fff; padding-inline-end: 80px; }
.mp-prose .mp-next h2::before { display: none; }
.mp-next__body { font-size: 1.02rem; }
.mp-next__body a { color: #fff; }
.mp-next__body a:hover { text-decoration-color: var(--mp-yellow); }

/* the closing general disclaimer: a quiet note */
.mp-quiet {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 2em 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--mp-line);
    color: var(--mp-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}
.mp-quiet p { margin: 0 !important; }
.mp-quiet .mp-icon { margin-top: 2px; color: var(--mp-link); }

.mp-readalso {
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--mp-tint);
    border-inline-start: 5px solid var(--mp-yellow);
}

.mp-prose blockquote {
    margin: 1.5em 0;
    padding: 6px 20px;
    border-inline-start: 5px solid var(--mp-yellow);
    color: var(--mp-muted);
}
.mp-prose img { border-radius: 12px; height: auto; }

/* homepage body */
.mp-prose--front h2 { font-size: clamp(2.2rem, 3.8vw, 2.8rem); }

/* ---------- Author box ---------- */
.mp-authorbox {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 40px;
    padding: 24px;
    border: 1px solid var(--mp-line);
    border-top: 5px solid var(--mp-blue);
    border-radius: var(--mp-radius);
    background: var(--mp-surface);
}
.mp-authorbox__label { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--mp-link); }
.mp-authorbox__name { font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }
.mp-authorbox p:last-child { margin: 0; color: var(--mp-muted); font-size: 0.95rem; }

/* ---------- Listings ---------- */
.mp-listing { padding-block: 32px 72px; }

.mp-strip { margin-bottom: 28px; }
.mp-strip ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mp-strip a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 6px 8px 6px 16px;
    padding-inline: 16px 8px;
    border: 2px solid var(--mp-line);
    border-radius: 999px;
    background: var(--mp-surface);
    color: var(--mp-ink);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}
.mp-strip li:first-child a { padding-inline-end: 16px; }
.mp-strip a:hover { border-color: var(--mp-blue); }
.mp-strip a[aria-current="page"] { background: var(--mp-blue); border-color: var(--mp-blue); color: #fff; }
.mp-strip__n {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding-inline: 6px;
    border-radius: 999px;
    background: var(--mp-yellow);
    color: var(--mp-blue-night);
    font-size: 0.78rem;
}
@media (max-width: 700px) {
    .mp-strip ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
    .mp-strip a { white-space: nowrap; }
}

.mp-empty {
    padding: 40px;
    border: 2px dashed var(--mp-line);
    border-radius: var(--mp-radius);
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 14px;
}
.mp-empty p { margin: 0; color: var(--mp-muted); font-size: 1.05rem; }

.mp-pagination { margin-top: 40px; }
.mp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mp-pagination .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 46px;
    min-height: 46px;
    padding: 6px 14px;
    border: 2px solid var(--mp-line);
    border-radius: 999px;
    background: var(--mp-surface);
    color: var(--mp-ink);
    font-weight: 700;
    text-decoration: none;
}
.mp-pagination .page-numbers.current { background: var(--mp-blue); border-color: var(--mp-blue); color: #fff; }
.mp-pagination a.page-numbers:hover { border-color: var(--mp-blue); }
.mp-pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Static pages ---------- */
.mp-page__body { padding-block: 40px 72px; }

/* contact form (plugin markup + its CSS variables) */
.mp-prose .adxc {
    --adxc-accent: var(--mp-blue);
    --adxc-border: var(--mp-line);
    --adxc-bg: var(--mp-surface);
    --adxc-input-bg: var(--mp-surface);
    --adxc-radius: 16px;
    margin: 0;
}
.mp-prose .adxc .adxc-form { border-width: 2px; border-top: 5px solid var(--mp-blue); }
.mp-prose .adxc .adxc-field label { font-size: 0.95rem; font-weight: 700; }
.mp-prose .adxc .adxc-field input,
.mp-prose .adxc .adxc-field textarea { border-width: 2px; border-radius: 12px; min-height: 48px; }
.mp-prose .adxc .adxc-field input:focus-visible,
.mp-prose .adxc .adxc-field textarea:focus-visible { outline: 3px solid var(--mp-focus); outline-offset: 2px; }
.mp-prose .adxc .adxc-submit { min-height: 48px; padding: 10px 32px; border-radius: 999px; font-weight: 700; background: var(--mp-blue); color: #fff; }
.mp-prose .adxc .adxc-submit:hover { background: var(--mp-blue-deep); filter: none; }
.mp-prose .adxc .adxc-submit:focus-visible { outline: 3px solid var(--mp-focus); outline-offset: 3px; }
:root[data-theme="dark"] .mp-prose .adxc .adxc-submit { background: #2A6EA6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mp-prose .adxc .adxc-submit { background: #2A6EA6; } }

/* ---------- Footer ---------- */
.mp-footer {
    position: relative;
    background: var(--mp-footer);
    color: rgba(255, 255, 255, 0.86);
    padding-top: 56px;
    font-size: 0.95rem;
}
.mp-footer::before {
    /* a white court line + yellow ball-line along the top */
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 5px;
    background: linear-gradient(to left, var(--mp-yellow) 0 64px, transparent 64px), rgba(255, 255, 255, 0.85);
    background-size: 100% 100%;
}
.mp-footer__grid {
    display: grid;
    grid-template-columns: 1.1fr 1.5fr 1fr;
    gap: 36px 48px;
    padding-bottom: 40px;
}
.mp-footer .mp-brand { color: #fff; margin-bottom: 14px; }
.mp-footer .mp-brand .mp-mark { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); border-radius: 13px; }
.mp-footer__about p { margin: 0; max-width: 38ch; line-height: 1.65; }
.mp-footer__title {
    font-family: var(--mp-display);
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--mp-yellow);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.mp-footer__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.mp-footer__list--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.mp-footer__list a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: #fff;
    text-decoration: none;
}
.mp-footer__list a:hover { text-decoration: underline; text-decoration-color: var(--mp-yellow); text-decoration-thickness: 3px; }
.mp-footer__base { border-top: 1px solid rgba(255, 255, 255, 0.16); padding-block: 16px; font-size: 0.85rem; }
.mp-footer__base p { margin: 0; }
@media (max-width: 900px) {
    .mp-footer__grid { grid-template-columns: 1fr 1fr; }
    .mp-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .mp-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Dark-mode adjustments ---------- */
:root[data-theme="dark"] .mp-entry a { background: #F3F7FB; }
:root[data-theme="dark"] .mp-article__media img { border-color: var(--mp-surface); }
:root[data-theme="dark"] .mp-tcard, :root[data-theme="dark"] .mp-sheet { border-color: #3B79AE; }
:root[data-theme="dark"] .mp-tcard__head, :root[data-theme="dark"] .mp-sheet th { background: #1E5A8C; }
:root[data-theme="dark"] .mp-prose ol { border-inline-start-color: #3B79AE; }
:root[data-theme="dark"] .mp-searchform button { background: #2A6EA6; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mp-entry a { background: #F3F7FB; }
    :root:not([data-theme="light"]) .mp-tcard, :root:not([data-theme="light"]) .mp-sheet { border-color: #3B79AE; }
    :root:not([data-theme="light"]) .mp-tcard__head, :root:not([data-theme="light"]) .mp-sheet th { background: #1E5A8C; }
    :root:not([data-theme="light"]) .mp-prose ol { border-inline-start-color: #3B79AE; }
    :root:not([data-theme="light"]) .mp-searchform button { background: #2A6EA6; }
    :root:not([data-theme="light"]) .mp-prose ul > li::marker { color: var(--mp-yellow); }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    .mp-card:hover, .mp-entry a:hover { transform: none; }
}

@media print {
    .mp-header, .mp-footer, .mp-toc, .mp-related, .mp-skip { display: none !important; }
    .mp-band { background: none; color: #000; }
}

/* search inside a blue band: a ball-yellow button so it stands out from the band */
.mp-band .mp-searchform button { background: var(--mp-yellow); color: var(--mp-blue-night); }
.mp-band .mp-searchform button:hover { background: #fff; }
.mp-band .mp-searchform input { border-color: #fff; }
