/* ==========================================================================
   mp.css – Meldungsportal design system ("sportlich-dynamisch")
   --------------------------------------------------------------------------
   All colours/fonts/shapes come from the --mp-* tokens rendered by
   app/services/theme_service.py (see docs/theme.md). Every class is
   prefixed with .mp- so Bootstrap pages that are not restyled yet keep
   working. Global effects are limited to .mp-body (font, ground colour).

   State hooks on <html>:
     data-scheme="light|dark|auto"   colour scheme (tokens swap)
     data-motion="off|calm|full"     animation level (+ prefers-reduced-motion)
     .mp-js                          set by mp.js – enables scroll reveal
   ========================================================================== */

/* ── Fallback tokens (overridden by the theme <style> block) ────────────── */
:root {
    --mp-primary: #D7263D; --mp-on-primary: #FFFFFF;
    --mp-secondary: #1D4ED8; --mp-on-secondary: #FFFFFF;
    --mp-accent: #D7263D; --mp-on-accent: #FFFFFF;
    --mp-ink: #0B1324; --mp-on-ink: #FFFFFF; --mp-ink-muted: #C7CEDD; --mp-ink-line: rgba(255,255,255,.18);
    --mp-primary-on-ink: #FF8A98;
    --mp-paper: #F3F4F7; --mp-card: #FFFFFF; --mp-text: #0B1324; --mp-muted: #4B556A;
    --mp-line: #DDE2EB; --mp-soft: #EEF1F6;
    --mp-primary-text: #B81F33; --mp-secondary-text: #1D4ED8; --mp-accent-text: #B81F33;
    --mp-primary-tint: #FCE9EB; --mp-secondary-tint: #E8EEFC;
    --mp-success: #15803D; --mp-warning: #B45309; --mp-danger: #B91C1C; --mp-live: #22C55E;
    --mp-radius: 10px; --mp-radius-lg: 14px; --mp-radius-xl: 20px; --mp-radius-pill: 999px;
    --mp-font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --mp-font-body: 'Manrope', system-ui, sans-serif;
    --mp-display-case: uppercase; --mp-display-weight: 800; --mp-display-tracking: .01em; --mp-display-leading: .92;
    --mp-density: 1; --mp-space: 1rem; --mp-section-y: 5rem; --mp-card-pad: 1.5rem;
    --mp-shadow: 0 22px 40px -24px rgba(11,19,36,.45);
    --mp-shadow-lg: 0 30px 60px -30px rgba(11,19,36,.5);
    --mp-ease: cubic-bezier(.2,.8,.2,1);
    --mp-focus: var(--mp-secondary-text);
    --mp-gutter: 24px;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
.mp-body {
    --bs-body-font-family: var(--mp-font-body);
    --bs-body-bg: var(--mp-paper);
    --bs-body-color: var(--mp-text);
    font-family: var(--mp-font-body);
    background: var(--mp-paper);
    color: var(--mp-text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}
.mp-body > main { flex: 1 0 auto; }
.mp-body :focus-visible { outline: 3px solid var(--mp-focus); outline-offset: 3px; }
.mp-on-ink { --mp-focus: var(--mp-on-ink); color: var(--mp-on-ink); }
.mp-body img { max-width: 100%; }

.mp-wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--mp-gutter); box-sizing: border-box; }
.mp-sr-only { 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; left: 12px; top: -100px; z-index: 3000;
    background: var(--mp-card); color: var(--mp-text); padding: 10px 16px;
    border-radius: var(--mp-radius); font-weight: 800; text-decoration: none;
    box-shadow: var(--mp-shadow);
}
.mp-skip:focus { top: 12px; }

/* ── Typography ────────────────────────────────────────────────────────── */
.mp-display {
    font-family: var(--mp-font-display);
    text-transform: var(--mp-display-case);
    font-weight: var(--mp-display-weight);
    letter-spacing: var(--mp-display-tracking);
    line-height: var(--mp-display-leading);
}
.mp-eyebrow {
    display: block; font-size: 13px; font-weight: 800; letter-spacing: .14em;
    text-transform: uppercase; color: var(--mp-primary-text); margin: 0;
}
.mp-on-ink .mp-eyebrow { color: var(--mp-ink-muted); }
.mp-h1 { font-size: clamp(52px, 9vw, 132px); margin: 0; overflow-wrap: anywhere; }
.mp-h2 { font-size: clamp(38px, 6vw, 64px); margin: 8px 0 0; }
.mp-h3 { font-size: clamp(26px, 3.4vw, 34px); margin: 0; }
.mp-lead { font-size: 17px; line-height: 1.6; color: var(--mp-muted); max-width: 62ch; }
.mp-muted { color: var(--mp-muted); }
.mp-outline-text { color: transparent; -webkit-text-stroke: 2px currentColor; }
@supports not (-webkit-text-stroke: 1px black) { .mp-outline-text { color: inherit; } }
.mp-on-ink .mp-outline-text { -webkit-text-stroke-color: var(--mp-on-ink); }

.mp-prose { line-height: 1.65; color: var(--mp-text); overflow-wrap: anywhere; }
.mp-prose > :first-child { margin-top: 0; }
.mp-prose > :last-child { margin-bottom: 0; }
.mp-prose a:not(.mp-btn) { color: var(--mp-primary-text); font-weight: 700; }
.mp-prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; display: block; overflow-x: auto; }
.mp-prose th, .mp-prose td { border-bottom: 1px solid var(--mp-line); padding: .5rem .75rem; text-align: left; }
.mp-prose img { height: auto; border-radius: var(--mp-radius); }
.mp-prose blockquote { border-left: 4px solid var(--mp-primary); margin: 1rem 0; padding: .25rem 1rem; color: var(--mp-muted); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.mp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 22px; border-radius: var(--mp-radius);
    font-family: var(--mp-font-body); font-weight: 800; font-size: 16px; line-height: 1.1;
    text-decoration: none; border: 2px solid transparent; cursor: pointer;
    transition: transform .25s var(--mp-ease), box-shadow .25s, background-color .25s, border-color .25s, color .25s;
    background: var(--mp-card); color: var(--mp-text); text-align: center;
}
.mp-btn:hover { transform: translateY(-3px); }
.mp-btn:active { transform: translateY(0); }
.mp-btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.mp-btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.mp-btn--block { width: 100%; }
.mp-btn--primary { background: var(--mp-primary); color: var(--mp-on-primary); }
.mp-btn--primary:hover { color: var(--mp-on-primary); box-shadow: 0 14px 30px -10px var(--mp-primary); }
.mp-btn--secondary { background: var(--mp-secondary); color: var(--mp-on-secondary); }
.mp-btn--secondary:hover { color: var(--mp-on-secondary); box-shadow: 0 14px 30px -10px var(--mp-secondary); }
.mp-btn--ink { background: var(--mp-ink); color: var(--mp-on-ink); }
.mp-btn--ink:hover { color: var(--mp-on-ink); }
.mp-btn--ghost { background: var(--mp-card); border-color: var(--mp-line); color: var(--mp-text); }
.mp-btn--ghost:hover { border-color: var(--mp-text); color: var(--mp-text); }
.mp-btn--outline-light { background: transparent; border-color: currentColor; color: var(--mp-on-ink); }
.mp-btn--outline-light:hover { background: rgba(255,255,255,.1); color: var(--mp-on-ink); }
.mp-btn--light { background: #FFFFFF; color: #0B1324; }
.mp-btn--light:hover { color: #0B1324; }
.mp-btn[disabled], .mp-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.mp-icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

/* ── Cards, chips, pills ───────────────────────────────────────────────── */
.mp-card {
    background: var(--mp-card); color: var(--mp-text); border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-lg); padding: var(--mp-card-pad);
    transition: transform .3s var(--mp-ease), box-shadow .3s, border-color .3s;
    position: relative; min-width: 0;
}
.mp-card--hover:hover, a.mp-card:hover { transform: translateY(-4px); box-shadow: var(--mp-shadow); border-color: var(--mp-primary); }
.mp-card--raised { box-shadow: var(--mp-shadow-lg); border-color: transparent; }
a.mp-card { text-decoration: none; display: block; }

.mp-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    padding: 5px 10px; border-radius: var(--mp-radius-pill); background: var(--mp-soft); color: var(--mp-text);
    line-height: 1.2;
}
.mp-chip--primary { background: var(--mp-primary-tint); color: var(--mp-primary-text); }
.mp-chip--secondary { background: var(--mp-secondary-tint); color: var(--mp-secondary-text); }
.mp-chip--female { background: #FCE7EC; color: #9F1239; }
[data-scheme="dark"] .mp-chip--female { background: #4C0519; color: #FECDD3; }

.mp-pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--mp-radius-pill);
    font-size: 13px; font-weight: 800; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
    color: inherit;
}
.mp-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.mp-dot--live { background: var(--mp-live); }
.mp-dot--wait { background: #FBBF24; }
.mp-dot--off { background: #94A3B8; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.mp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mp-label { font-weight: 800; font-size: 14px; color: var(--mp-text); }
.mp-help { font-size: 13px; color: var(--mp-muted); }
.mp-help a { color: var(--mp-secondary-text); font-weight: 700; }
.mp-input, .mp-select, .mp-textarea {
    width: 100%; min-height: 48px; padding: 10px 14px; box-sizing: border-box;
    border: 2px solid var(--mp-line); border-radius: var(--mp-radius);
    background: var(--mp-card); color: var(--mp-text); font: inherit; font-size: 16px;
    transition: border-color .2s, box-shadow .2s;
}
.mp-textarea { min-height: 120px; }
.mp-input:focus, .mp-select:focus, .mp-textarea:focus {
    outline: none; border-color: var(--mp-secondary-text);
    box-shadow: 0 0 0 4px var(--mp-secondary-tint);
}
.mp-input[aria-invalid="true"] { border-color: var(--mp-danger); }
.mp-error { color: var(--mp-danger); font-size: 13px; font-weight: 700; }
.mp-inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.mp-inline-form > .mp-input { flex: 1 1 240px; }

/* ── Alerts (flash messages in the new frame) ──────────────────────────── */
.mp-flashes { padding-top: 16px; }
.mp-flashes:empty { display: none; }
/* Inside an overlap page (.mp-page--overlap): first item of the pulled-up
   stack, so the cards cannot cover the message. */
.mp-flashes.mp-flashes--inline { padding-top: 0; margin-bottom: 16px; position: relative; z-index: 1; }

/* ── Sections ──────────────────────────────────────────────────────────── */
.mp-section { padding-block: calc(var(--mp-section-y) * .5) calc(var(--mp-section-y) * .3); scroll-margin-top: 16px; }
.mp-section:first-child { padding-top: calc(var(--mp-section-y) * .7); }
.mp-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: calc(var(--mp-space) * 2); }
.mp-section:last-child { padding-bottom: var(--mp-section-y); }
.mp-grid { display: grid; gap: calc(var(--mp-space) * 1.1); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.mp-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

/* ── Header / navigation ───────────────────────────────────────────────── */
/* No overflow:hidden / stacking context on the header itself: the mobile menu
   panel must be able to overlap the content below (decorations clip in __bg). */
.mp-header { position: relative; background: var(--mp-ink); color: var(--mp-on-ink); }
.mp-header__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mp-header > .mp-hero { z-index: 1; }
.mp-nav { position: relative; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.mp-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--mp-on-ink); min-width: 0; }
.mp-brand:hover { color: var(--mp-on-ink); }
.mp-brand__logo { height: 42px; width: auto; max-width: 140px; object-fit: contain; }
.mp-brand__name { font-size: 24px; overflow-wrap: anywhere; }
.mp-nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.mp-navlink { position: relative; text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 4px; color: var(--mp-ink-muted); }
.mp-navlink::after { content: ''; position: absolute; left: 4px; right: 4px; bottom: 4px; height: 2px; background: var(--mp-primary); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.mp-navlink:hover, .mp-navlink[aria-current="page"] { color: var(--mp-on-ink); }
.mp-navlink:hover::after, .mp-navlink[aria-current="page"]::after { transform: scaleX(1); }
.mp-lang { display: inline-flex; border: 1px solid rgba(255,255,255,.3); border-radius: var(--mp-radius-pill); overflow: hidden; font-size: 13px; font-weight: 800; }
.mp-lang a, .mp-lang span { padding: 8px 12px; text-decoration: none; color: var(--mp-on-ink); line-height: 1; }
.mp-lang [aria-current="true"] { background: var(--mp-on-ink); color: var(--mp-ink); }
.mp-lang abbr { text-decoration: none; }

.mp-menu { display: none; }
.mp-menu > summary {
    list-style: none; width: 46px; height: 46px; border-radius: var(--mp-radius); cursor: pointer;
    border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.25); display: grid; place-items: center;
}
.mp-menu > summary::-webkit-details-marker { display: none; }
.mp-menu__panel {
    position: absolute; left: 0; right: 0; top: calc(100% - 6px); z-index: 20;
    background: var(--mp-card); color: var(--mp-text); border-radius: var(--mp-radius-lg);
    padding: 8px; box-shadow: var(--mp-shadow-lg); display: flex; flex-direction: column;
}
.mp-menu__panel a { padding: 14px 12px; font-weight: 800; text-decoration: none; color: var(--mp-text); border-top: 1px solid var(--mp-soft); }
.mp-menu__panel a:first-child { border-top: 0; }
.mp-menu__lang { display: flex; gap: 12px; padding: 12px; border-top: 1px solid var(--mp-soft); }
.mp-menu__lang a, .mp-menu__lang span { padding: 0; border: 0; }
.mp-menu__lang [aria-current="true"] { color: var(--mp-primary-text); }
.mp-menu[open] .mp-menu__panel { animation: mp-drop .3s var(--mp-ease) both; }

/* ── Hero (start page masthead) ────────────────────────────────────────── */
.mp-hero { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-block: 40px 96px; }
.mp-hero__main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; position: relative; }
.mp-hero__status { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.mp-hero__kicker { font-size: 13px; font-weight: 700; color: var(--mp-ink-muted); letter-spacing: .1em; text-transform: uppercase; }
.mp-hero__title { text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.mp-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 17px; font-weight: 600; color: var(--mp-ink-muted); }
.mp-hero__meta span, .mp-hero__meta a { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.mp-hero__note { font-size: 14px; color: var(--mp-ink-muted); margin: 0; }
.mp-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.mp-hero__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.mp-hero__logos a, .mp-hero__logos span { display: inline-flex; background: rgba(255,255,255,.92); border-radius: var(--mp-radius); padding: 8px 12px; }
.mp-hero__logos img { height: 44px; width: auto; max-width: 160px; object-fit: contain; }
.mp-hero__visual { flex: 0 1 440px; display: flex; justify-content: center; }
.mp-header--minimal .mp-hero { padding-block: 32px 72px; }

.mp-slash { position: absolute; top: 0; height: 100%; }
.mp-slash--p { right: -10%; width: 58%; background: var(--mp-primary); clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); opacity: .95; }
.mp-slash--s { right: -10%; width: 44%; background: var(--mp-secondary); clip-path: polygon(30% 0, 100% 0, 100% 100%, 8% 100%); }
.mp-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; }
.mp-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-hero-img--texture { opacity: .14; mix-blend-mode: luminosity; }
.mp-hero-overlay { position: absolute; inset: 0; background: var(--mp-ink); }

/* Wrestling mat ring */
.mp-mat { position: relative; width: min(440px, 80vw); aspect-ratio: 1; }
.mp-mat > * { position: absolute; border-radius: 50%; }
.mp-mat__dash { inset: 0; width: 100%; height: 100%; }
.mp-mat__outer { inset: 7%; background: var(--mp-ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.12); }
.mp-mat__zone { inset: 14%; background: var(--mp-primary); }
.mp-mat__center { inset: 23.6%; background: #F3EBDD; }
.mp-mat__ring { inset: 0; width: 100%; height: 100%; }
.mp-mat__dot { left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 4px solid var(--mp-secondary); }
.mp-mat__year { left: 50%; top: 50%; transform: translate(-50%, -50%); margin-top: 72px; border-radius: 0; font-family: var(--mp-font-display); font-weight: 800; font-size: 22px; letter-spacing: .2em; color: #0B1324; }
.mp-mat--bg { position: absolute; right: -90px; top: 50%; width: 520px; margin-top: -260px; opacity: .9; }

/* ── Countdown tiles ───────────────────────────────────────────────────── */
.mp-countdown { display: flex; flex-direction: column; gap: 12px; }
.mp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.mp-tile {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--mp-radius);
    padding: 14px 6px 10px; text-align: center; min-width: 0; backdrop-filter: blur(6px);
}
.mp-tile__num { font-family: var(--mp-font-display); font-weight: 800; font-size: clamp(36px, 6vw, 64px); line-height: 1; color: var(--mp-on-ink); font-variant-numeric: tabular-nums; }
.mp-tile--accent .mp-tile__num { color: var(--mp-primary-on-ink); }
.mp-tile__lbl { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mp-ink-muted); margin-top: 6px; }
.mp-countdown-band { background: var(--mp-ink); color: var(--mp-on-ink); border-radius: var(--mp-radius-xl); padding: calc(var(--mp-card-pad) * 1.2); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.mp-countdown-band .mp-tiles { flex: 1 1 360px; }

/* ── Progress / capacity ───────────────────────────────────────────────── */
.mp-progress { height: 16px; background: var(--mp-soft); border-radius: var(--mp-radius-pill); overflow: hidden; }
.mp-progress__bar { height: 100%; border-radius: var(--mp-radius-pill); background: linear-gradient(90deg, var(--mp-secondary), var(--mp-primary)); }
.mp-capacity { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.mp-capacity__num { font-size: clamp(40px, 6vw, 54px); }
.mp-capacity__num span { color: var(--mp-muted); }
.mp-capacity__bar { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.mp-capacity__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; color: var(--mp-muted); }
.mp-capacity__meta strong { color: var(--mp-text); }
.mp-capacity__stats { display: flex; gap: 22px; }
.mp-stat__num { font-size: 36px; }
.mp-stat__lbl { font-size: 13px; font-weight: 700; color: var(--mp-muted); }
.mp-overlap { position: relative; margin-top: -48px; padding-top: 0 !important; z-index: 2; }

/* ── Age class cards ───────────────────────────────────────────────────── */
.mp-ac { display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.mp-ac__corner { position: absolute; top: 0; right: 0; width: 90px; height: 90px; clip-path: polygon(100% 0, 100% 100%, 0 0); opacity: .9; }
.mp-ac__corner--0 { background: var(--mp-primary); }
.mp-ac__corner--1 { background: var(--mp-secondary); }
.mp-ac__corner--2 { background: var(--mp-ink); }
.mp-ac__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-right: 56px; }
.mp-ac__name { font-size: clamp(34px, 4vw, 46px); margin: 0; overflow-wrap: anywhere; }
.mp-ac__style { font-size: 14px; font-weight: 700; color: var(--mp-muted); }
.mp-ac__years { font-size: 15px; font-weight: 600; color: var(--mp-muted); }
.mp-ac__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-ac__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--mp-line); padding-top: 14px; }
.mp-ac__fee { font-size: 30px; color: var(--mp-primary-text); }
.mp-ac__weights { font-size: 13px; color: var(--mp-muted); line-height: 1.5; }

/* ── Timeline ──────────────────────────────────────────────────────────── */
.mp-timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 28px 0; }
.mp-timeline__step { position: relative; padding-right: 20px; }
.mp-timeline__track { display: flex; align-items: center; margin-bottom: 18px; }
.mp-timeline__dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; background: var(--mp-card); color: var(--mp-text); border: 2px solid var(--mp-line); box-shadow: 0 0 0 6px var(--mp-paper); }
.mp-timeline__line { flex: 1; height: 3px; background: var(--mp-line); }
.mp-timeline__step.is-done .mp-timeline__dot, .mp-timeline__step.is-current .mp-timeline__dot { background: var(--mp-primary); color: var(--mp-on-primary); border-color: var(--mp-primary); }
.mp-timeline__step.is-done .mp-timeline__line { background: var(--mp-primary); }
.mp-timeline__step:last-child .mp-timeline__line { visibility: hidden; }
.mp-timeline__date { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mp-primary-text); }
.mp-timeline__title { font-size: 30px; margin: 6px 0; }
.mp-timeline__text { margin: 0; color: var(--mp-muted); font-size: 15px; line-height: 1.55; }

/* ── Helpers teaser ────────────────────────────────────────────────────── */
.mp-band { position: relative; overflow: hidden; border-radius: var(--mp-radius-xl); background: var(--mp-secondary); color: var(--mp-on-secondary); padding: clamp(24px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 36px; align-items: center; }
.mp-band::before { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgba(255,255,255,.08); }
.mp-band > * { position: relative; flex: 1 1 320px; min-width: 0; }
.mp-band .mp-eyebrow { color: inherit; opacity: .85; }
.mp-band p { color: inherit; opacity: .92; font-size: 17px; line-height: 1.6; max-width: 520px; }
.mp-shift { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: var(--mp-radius); padding: 14px 16px; }
.mp-shift + .mp-shift { margin-top: 10px; }
.mp-shift__info { flex: 1; min-width: 0; }
.mp-shift__role { font-weight: 800; }
.mp-shift__time { font-size: 13px; opacity: .9; }
.mp-shift__bar { width: 90px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; flex-shrink: 0; }
.mp-shift__bar > span { display: block; height: 100%; background: currentColor; }
.mp-shift__label { font-size: 13px; font-weight: 800; min-width: 44px; text-align: right; }

/* ── Sponsors marquee ──────────────────────────────────────────────────── */
.mp-marquee { overflow: hidden; border-block: 1px solid var(--mp-line); background: var(--mp-card); }
.mp-marquee__track { display: flex; width: max-content; }
.mp-marquee__group { display: flex; flex-shrink: 0; }
.mp-marquee__cell { display: flex; }
.mp-marquee__item { display: flex; align-items: center; justify-content: center; padding: 22px 44px; border-right: 1px solid var(--mp-soft); white-space: nowrap; min-height: 96px; box-sizing: border-box; text-decoration: none; }
.mp-marquee__item img { height: 52px; width: auto; max-width: 180px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.mp-marquee__item:hover img, .mp-marquee__item:focus-visible img { filter: none; opacity: 1; }
.mp-marquee__name { font-size: 28px; font-weight: 700; color: var(--mp-muted); }
[data-scheme="dark"] .mp-marquee__item img { filter: grayscale(1) invert(1); }

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.mp-faq-layout { display: flex; flex-wrap: wrap; gap: 48px; }
.mp-faq-layout > :first-child { flex: 1 1 280px; }
.mp-faq-layout > :last-child { flex: 2 1 480px; min-width: 0; }
.mp-faq { border-bottom: 1px solid var(--mp-line); }
.mp-faq > summary { list-style: none; cursor: pointer; padding: 22px 0; font-weight: 800; font-size: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mp-faq > summary::-webkit-details-marker { display: none; }
.mp-faq__pm { transition: transform .3s; flex-shrink: 0; width: 22px; height: 22px; }
.mp-faq[open] .mp-faq__pm { transform: rotate(45deg); }
.mp-faq__body { padding: 0 0 22px; color: var(--mp-muted); }
.mp-faq__body.mp-prose { color: var(--mp-muted); }

/* ── Announcement banner ───────────────────────────────────────────────── */
.mp-announce { font-size: 14px; font-weight: 800; padding: 10px 0; text-align: center; }
.mp-announce a { color: inherit; text-decoration: underline; text-underline-offset: 3px; margin-left: 8px; }
.mp-announce--primary { background: var(--mp-primary); color: var(--mp-on-primary); }
.mp-announce--secondary { background: var(--mp-secondary); color: var(--mp-on-secondary); }
.mp-announce--ink { background: var(--mp-ink); color: var(--mp-on-ink); border-bottom: 1px solid var(--mp-ink-line); }
.mp-announce--warning { background: #FDE68A; color: #3B2A03; }

/* ── Venue, hotels, gallery, results, text ─────────────────────────────── */
.mp-venue { display: flex; flex-wrap: wrap; gap: 24px; }
.mp-venue > * { flex: 1 1 300px; min-width: 0; }
.mp-address { font-style: normal; white-space: pre-line; font-size: 17px; line-height: 1.6; font-weight: 600; }
.mp-list-plain { list-style: none; margin: 0; padding: 0; }
.mp-hotel__name { font-size: 26px; margin: 0 0 6px; }
.mp-gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.mp-gallery figure { margin: 0; border-radius: var(--mp-radius-lg); overflow: hidden; background: var(--mp-soft); aspect-ratio: 4 / 3; }
.mp-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--mp-ease); display: block; }
.mp-gallery figure:hover img { transform: scale(1.04); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.mp-footer { background: var(--mp-ink); color: var(--mp-ink-muted); margin-top: auto; }
.mp-footer__inner { padding-block: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.mp-footer__org { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--mp-on-ink); }
.mp-footer__links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; font-weight: 700; list-style: none; margin: 0; padding: 0; }
.mp-footer a { color: var(--mp-ink-muted); text-decoration: none; }
.mp-footer a:hover { color: var(--mp-on-ink); text-decoration: underline; }

/* ── Sticky mobile CTA ─────────────────────────────────────────────────── */
.mp-sticky-cta { display: none; }

/* ── Preview badge (admin live preview) ────────────────────────────────── */
.mp-preview-badge { position: fixed; right: 12px; bottom: 12px; z-index: 4000; background: #FDE68A; color: #3B2A03; font-weight: 800; font-size: 12px; padding: 6px 10px; border-radius: 999px; box-shadow: var(--mp-shadow); pointer-events: none; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .mp-nav__links { display: none; }
    .mp-menu { display: block; }
    .mp-hero__visual { display: none; }
    .mp-slash--p { right: -24%; width: 62%; }
    .mp-slash--s { right: -24%; width: 46%; }
    /* Hero text runs across the slashes here: mute them and give the tiles a solid ground */
    .mp-slash--p { background: color-mix(in srgb, var(--mp-primary) 45%, var(--mp-ink)); }
    .mp-slash--s { background: color-mix(in srgb, var(--mp-secondary) 45%, var(--mp-ink)); }
    .mp-tile { background: var(--mp-ink); backdrop-filter: none; }
}
@media (max-width: 760px) {
    :root { --mp-gutter: 16px; }
    .mp-hero { padding-block: 22px 64px; gap: 24px; }
    .mp-hero__meta { font-size: 15px; }
    .mp-tiles { gap: 8px; }
    .mp-tile { padding: 10px 2px 8px; }
    .mp-tile__lbl { font-size: 10px; letter-spacing: .08em; }
    .mp-overlap { margin-top: -32px; }
    .mp-capacity { gap: 16px; }
    .mp-marquee__item { padding: 16px 26px; min-height: 76px; }
    .mp-marquee__item img { height: 40px; }
    .mp-faq > summary { font-size: 16px; }
    .mp-body.has-sticky-cta { padding-bottom: 88px; }
    .mp-sticky-cta {
        display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
        padding: 14px 16px 18px; background: linear-gradient(180deg, transparent, var(--mp-paper) 35%);
    }
    .mp-sticky-cta .mp-btn { width: 100%; box-sizing: border-box; box-shadow: 0 14px 30px -12px var(--mp-primary); }
    .mp-ac-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 8px; margin-inline: calc(var(--mp-gutter) * -1); padding-inline: var(--mp-gutter); scrollbar-width: thin; }
    .mp-ac-scroll > * { flex: 0 0 min(78%, 280px); scroll-snap-align: start; }
}

/* ── Motion ────────────────────────────────────────────────────────────── */
@keyframes mp-fade-up { from { opacity: 0; transform: translateY(var(--mp-rise, 28px)); } to { opacity: 1; transform: none; } }
@keyframes mp-spin { to { transform: rotate(360deg); } }
@keyframes mp-grow { from { width: 0; } }
@keyframes mp-pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes mp-slide-in { from { transform: translateX(30%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes mp-drop { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mp-tick { 0% { transform: translateY(-6px); opacity: .4; } 100% { transform: none; opacity: 1; } }

/* Reveal: hidden only when JS runs and motion is allowed; mp.js adds .is-in */
.mp-js[data-motion="full"] .mp-reveal:not(.is-in),
.mp-js[data-motion="calm"] .mp-reveal:not(.is-in) { opacity: 0; }
[data-motion="full"] .mp-reveal.is-in { animation: mp-fade-up .8s var(--mp-ease) both; animation-delay: var(--mp-delay, 0s); }
[data-motion="calm"] .mp-reveal.is-in { --mp-rise: 10px; animation: mp-fade-up .5s ease-out both; animation-delay: calc(var(--mp-delay, 0s) * .5); }
[data-motion="full"] .mp-spin { animation: mp-spin 40s linear infinite; }
[data-motion="full"] .mp-spin-r { animation: mp-spin 26s linear infinite reverse; }
[data-motion="full"] .mp-dot--live, [data-motion="calm"] .mp-dot--live { animation: mp-pulse 2s infinite; }
[data-motion="full"] .mp-slash { animation: mp-slide-in 1s var(--mp-ease) both; }
[data-motion="full"] .mp-slash--s { animation-delay: .15s; }
[data-motion="full"] .mp-grow, [data-motion="calm"] .mp-grow { animation: mp-grow 1.6s var(--mp-ease) .4s both; }
[data-motion="full"] .mp-marquee__track { animation: mp-marquee 30s linear infinite; }
[data-motion="full"] .mp-marquee:hover .mp-marquee__track,
[data-motion="full"] .mp-marquee:focus-within .mp-marquee__track { animation-play-state: paused; }
[data-motion="full"] .mp-tick { animation: mp-tick .35s var(--mp-ease); }
[data-motion="full"] { scroll-behavior: smooth; }

/* Without full motion the sponsor strip is a static, wrapping row */
:root:not([data-motion="full"]) .mp-marquee__track { width: auto; }
:root:not([data-motion="full"]) .mp-marquee__group { flex-wrap: wrap; justify-content: center; flex-shrink: 1; width: 100%; }
:root:not([data-motion="full"]) .mp-marquee__dup { display: none; }

[data-motion="off"] .mp-body *, [data-motion="off"] .mp-body *::before, [data-motion="off"] .mp-body *::after { transition: none !important; animation: none !important; }

@media (prefers-reduced-motion: reduce) {
    .mp-body *, .mp-body *::before, .mp-body *::after { animation: none !important; transition: none !important; }
    .mp-js .mp-reveal:not(.is-in) { opacity: 1 !important; }
    html { scroll-behavior: auto !important; }
    .mp-marquee__track { width: auto !important; }
    .mp-marquee__group { flex-wrap: wrap; justify-content: center; flex-shrink: 1; width: 100%; }
    .mp-marquee__dup { display: none !important; }
}

@media print {
    .mp-header__bg, .mp-hero__visual, .mp-menu, .mp-sticky-cta, .mp-marquee__dup { display: none !important; }
    .mp-header, .mp-footer { background: none !important; color: #000 !important; }
}

/* ==========================================================================
   PHASE 2 – PUBLIC PAGES (wizard, magic link, helpers, guide, errors)
   --------------------------------------------------------------------------
   Shared components for the restyled public pages. Everything below only
   uses --mp-* tokens; the status tones (ok/warn/bad) are fixed hues with
   light and dark variants (they encode state, not branding).
   Page-specific wizard styles live in css/wizard.css.
   ========================================================================== */

/* ── Status tones ──────────────────────────────────────────────────────── */
:root {
    --mp-ok-bg: #DCFCE7; --mp-ok-fg: #14532D; --mp-ok-line: #86EFAC;
    --mp-warn-bg: #FEF3C7; --mp-warn-fg: #78350F; --mp-warn-line: #FCD34D;
    --mp-bad-bg: #FEE2E2; --mp-bad-fg: #991B1B; --mp-bad-line: #FCA5A5;
}
:root[data-scheme="dark"] {
    --mp-ok-bg: #0B3B22; --mp-ok-fg: #86EFAC; --mp-ok-line: #166534;
    --mp-warn-bg: #3D2A07; --mp-warn-fg: #FCD34D; --mp-warn-line: #92400E;
    --mp-bad-bg: #45121A; --mp-bad-fg: #FCA5A5; --mp-bad-line: #991B1B;
}
@media (prefers-color-scheme: dark) {
    :root[data-scheme="auto"] {
        --mp-ok-bg: #0B3B22; --mp-ok-fg: #86EFAC; --mp-ok-line: #166534;
        --mp-warn-bg: #3D2A07; --mp-warn-fg: #FCD34D; --mp-warn-line: #92400E;
        --mp-bad-bg: #45121A; --mp-bad-fg: #FCA5A5; --mp-bad-line: #991B1B;
    }
}

/* ── Utilities ─────────────────────────────────────────────────────────── */
.mp-body [hidden] { display: none !important; }
:root:not(.mp-js) .mp-js-only { display: none !important; }
.mp-stack { display: flex; flex-direction: column; gap: calc(var(--mp-space) * 1.25); }
.mp-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mp-row--between { justify-content: space-between; }
.mp-row--end { justify-content: flex-end; }
.mp-nowrap { white-space: nowrap; }
.mp-num { font-variant-numeric: tabular-nums; }
.mp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.mp-center { text-align: center; }
.mp-prose code { background: var(--mp-soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.mp-prose h3 { font-size: 22px; margin: 0 0 10px; }
.mp-prose h4, .mp-prose h5, .mp-prose h6 { font-size: 17px; margin: 18px 0 8px; }

/* ── Page frame: main area, page head in the header ────────────────────── */
.mp-page { padding-block: calc(var(--mp-section-y) * .4) var(--mp-section-y); }
.mp-page--overlap { position: relative; z-index: 2; margin-top: -32px; padding-top: 0; }
.mp-page--narrow { max-width: 920px; }
.mp-title { font-size: clamp(36px, 6vw, 52px); margin: 0 0 8px; overflow-wrap: anywhere; }
.mp-title-sm { font-size: clamp(28px, 4vw, 36px); margin: 0; }
.mp-subtitle { margin: 0; color: var(--mp-muted); line-height: 1.6; max-width: 72ch; }

.mp-pagehead { position: relative; z-index: 1; padding-block: 8px 64px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; justify-content: space-between; }
.mp-pagehead--compact { padding-block: 0 26px; align-items: center; }
.mp-pagehead__main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mp-pagehead__title { font-size: clamp(42px, 8vw, 92px); margin: 0; overflow-wrap: anywhere; }
.mp-pagehead__name { font-size: clamp(22px, 3vw, 26px); margin: 0; overflow-wrap: anywhere; }
.mp-pagehead__sub { margin: 0; color: var(--mp-ink-muted); font-weight: 600; line-height: 1.6; max-width: 640px; overflow-wrap: anywhere; }
.mp-pagehead__meta { font-size: 13px; font-weight: 700; color: var(--mp-ink-muted); }
.mp-pagehead__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mp-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; color: var(--mp-on-ink); text-decoration: none; }
.mp-back:hover { color: var(--mp-on-ink); text-decoration: underline; text-underline-offset: 4px; }
.mp-btn--glass { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.32); color: var(--mp-on-ink); }
.mp-btn--glass:hover { background: rgba(255,255,255,.18); color: var(--mp-on-ink); }

/* Header decorations (inside .mp-header__bg) */
.mp-deco { position: absolute; top: 0; right: 0; height: 100%; }
.mp-deco--s { width: 40%; background: var(--mp-secondary); clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%); }
.mp-deco--p { width: 22%; background: var(--mp-primary); clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%); }
.mp-deco--wide { width: 34%; }
.mp-deco--ring { top: -120px; right: -60px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.08); box-sizing: border-box; }
.mp-deco--ring2 { top: auto; bottom: -160px; right: 180px; width: 300px; height: 300px; border-radius: 50%; border: 40px solid rgba(255,255,255,.06); box-sizing: border-box; }
[data-motion="full"] .mp-deco--s, [data-motion="full"] .mp-deco--p { animation: mp-slide-in 1s var(--mp-ease) both; }
[data-motion="full"] .mp-deco--p { animation-delay: .12s; }

/* Header in the secondary colour (helper pages) */
.mp-header--secondary { background: var(--mp-secondary); --mp-on-ink: var(--mp-on-secondary); --mp-ink-muted: var(--mp-on-secondary); --mp-ink-line: rgba(255,255,255,.22); color: var(--mp-on-secondary); }

/* ── Buttons (additions) ───────────────────────────────────────────────── */
.mp-btn--danger { background: var(--mp-danger); color: #FFFFFF; }
.mp-btn--danger:hover { color: #FFFFFF; box-shadow: 0 14px 30px -12px var(--mp-danger); }
.mp-btn--danger-ghost { background: var(--mp-card); border-color: var(--mp-bad-line); color: var(--mp-bad-fg); }
.mp-btn--danger-ghost:hover { border-color: var(--mp-bad-fg); color: var(--mp-bad-fg); }
.mp-btn--text { background: transparent; color: var(--mp-secondary-text); min-height: 44px; padding: 0 10px; }
.mp-btn--text:hover { color: var(--mp-secondary-text); text-decoration: underline; text-underline-offset: 4px; transform: none; }
.mp-btn--dashed { border-style: dashed; border-color: var(--mp-line); background: var(--mp-card); color: var(--mp-text); min-height: 60px; }
.mp-btn--dashed:hover { border-color: var(--mp-text); color: var(--mp-text); }
.mp-btn.is-busy { pointer-events: none; opacity: .75; }
.mp-iconbtn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
    border: 2px solid transparent; border-radius: var(--mp-radius); background: transparent;
    color: var(--mp-muted); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.mp-iconbtn:hover { background: var(--mp-soft); color: var(--mp-text); }
.mp-iconbtn--danger:hover { background: var(--mp-bad-bg); color: var(--mp-bad-fg); }
.mp-iconbtn--outline { border-color: var(--mp-line); }
.mp-spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: mp-spin .7s linear infinite; vertical-align: -2px; box-sizing: border-box; }

/* ── Alerts / flash messages / callouts ────────────────────────────────── */
.mp-alert {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; line-height: 1.55;
    border: 1px solid var(--mp-line); border-radius: var(--mp-radius); background: var(--mp-card); color: var(--mp-text);
}
.mp-alert + .mp-alert { margin-top: 10px; }
.mp-alert > .mp-icon { margin-top: 2px; }
.mp-alert__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mp-alert__body > :first-child { margin-top: 0; }
.mp-alert__body > :last-child { margin-bottom: 0; }
.mp-alert__body ul { margin: 6px 0 0; padding-left: 20px; }
.mp-alert a { color: inherit; font-weight: 800; }
.mp-alert--info { background: var(--mp-secondary-tint); border-color: var(--mp-secondary-tint); }
.mp-alert--ok { background: var(--mp-ok-bg); color: var(--mp-ok-fg); border-color: var(--mp-ok-line); }
.mp-alert--warn { background: var(--mp-warn-bg); color: var(--mp-warn-fg); border-color: var(--mp-warn-line); }
.mp-alert--bad { background: var(--mp-bad-bg); color: var(--mp-bad-fg); border-color: var(--mp-bad-line); }
.mp-alert__close { margin: -10px -10px -10px auto; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: var(--mp-radius); display: grid; place-items: center; flex-shrink: 0; }
.mp-alert__close:hover { background: rgba(127,127,127,.15); }
.mp-flashes { display: flex; flex-direction: column; gap: 10px; }
.mp-flashes .mp-alert + .mp-alert { margin-top: 0; }
[data-motion="full"] .mp-flashes .mp-alert { animation: mp-drop .4s var(--mp-ease) both; }

.mp-callout { padding: 14px 18px; border-left: 4px solid var(--mp-secondary); border-radius: 0 var(--mp-radius) var(--mp-radius) 0; margin: 0 0 16px; background: var(--mp-secondary-tint); color: var(--mp-text); line-height: 1.6; }
.mp-callout--warn { border-color: var(--mp-warning); background: var(--mp-warn-bg); color: var(--mp-warn-fg); }
.mp-callout--tip { border-color: var(--mp-success); background: var(--mp-ok-bg); color: var(--mp-ok-fg); }

/* ── Status badges ─────────────────────────────────────────────────────── */
.mp-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; line-height: 1.2;
    padding: 5px 11px; border-radius: var(--mp-radius-pill); background: var(--mp-soft); color: var(--mp-text); white-space: nowrap;
}
.mp-badge--dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.mp-badge--ok { background: var(--mp-ok-bg); color: var(--mp-ok-fg); }
.mp-badge--warn { background: var(--mp-warn-bg); color: var(--mp-warn-fg); }
.mp-badge--bad { background: var(--mp-bad-bg); color: var(--mp-bad-fg); }
.mp-badge--info { background: var(--mp-secondary-tint); color: var(--mp-secondary-text); }
.mp-badge--primary { background: var(--mp-primary-tint); color: var(--mp-primary-text); }
.mp-badge--lg { font-size: 13px; padding: 7px 14px; }
.mp-on-ink .mp-badge--neutral { background: rgba(255,255,255,.14); color: var(--mp-on-ink); }

/* ── Forms (additions) ─────────────────────────────────────────────────── */
.mp-error { color: var(--mp-bad-fg); display: flex; gap: 6px; align-items: flex-start; }
.mp-error .mp-icon { margin-top: 1px; }
.mp-select[aria-invalid="true"], .mp-textarea[aria-invalid="true"] { border-color: var(--mp-danger); }
.mp-input[aria-invalid="true"], .mp-select[aria-invalid="true"] { background-color: var(--mp-bad-bg); color: var(--mp-text); }
.mp-input[aria-invalid="true"]:focus, .mp-select[aria-invalid="true"]:focus { background-color: var(--mp-card); }
.mp-req { color: var(--mp-bad-fg); }
.mp-label__opt { font-weight: 600; color: var(--mp-muted); }
.mp-select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.mp-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.mp-fieldset > legend { padding: 0; margin-bottom: 6px; }
.mp-form-grid { display: grid; gap: 16px 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.mp-form-grid > .mp-field--wide { grid-column: 1 / -1; }
.mp-help.is-ok { color: var(--mp-ok-fg); font-weight: 700; }
.mp-help.is-bad { color: var(--mp-bad-fg); font-weight: 700; }
.mp-subpanel { background: var(--mp-soft); border-radius: var(--mp-radius-lg); padding: clamp(16px, 3vw, 22px); }

.mp-check {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer;
    border: 2px solid var(--mp-line); border-radius: var(--mp-radius); background: var(--mp-card); color: var(--mp-text);
    font-weight: 700; line-height: 1.5; transition: border-color .2s, background-color .2s;
}
.mp-check input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--mp-primary); cursor: pointer; }
.mp-check:hover { border-color: var(--mp-text); }
.mp-check:has(input:checked) { border-color: var(--mp-primary); background: var(--mp-primary-tint); }
.mp-check.is-invalid { border-color: var(--mp-danger); }

/* File input */
.mp-file { font: inherit; font-size: 15px; color: var(--mp-text); max-width: 100%; min-height: 48px; }
.mp-file::file-selector-button {
    font: inherit; font-weight: 800; min-height: 44px; padding: 0 16px; margin-right: 12px; cursor: pointer;
    border: 2px solid var(--mp-line); border-radius: var(--mp-radius); background: var(--mp-card); color: var(--mp-text);
}
.mp-file:hover::file-selector-button { border-color: var(--mp-text); }

/* Segmented radio group (e.g. gender) */
.mp-seg { display: inline-flex; align-self: flex-start; max-width: 100%; border: 2px solid var(--mp-line); border-radius: var(--mp-radius); overflow: hidden; background: var(--mp-card); }
.mp-seg__opt { position: relative; display: block; }
.mp-seg__opt + .mp-seg__opt { border-left: 2px solid var(--mp-line); }
.mp-seg__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mp-seg__opt span { display: grid; place-items: center; min-height: 44px; min-width: 52px; padding: 0 14px; font-weight: 800; color: var(--mp-muted); transition: background-color .2s, color .2s; }
.mp-seg__opt input:checked + span { background: var(--mp-text); color: var(--mp-card); }
.mp-seg__opt input:focus-visible + span { outline: 3px solid var(--mp-focus); outline-offset: -5px; }
.is-invalid .mp-seg { border-color: var(--mp-danger); }

/* Selectable chips with radio semantics (weight classes) */
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-chipradio { position: relative; display: inline-flex; }
.mp-chipradio input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mp-chipradio span {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; box-sizing: border-box;
    border: 2px solid var(--mp-line); border-radius: var(--mp-radius-pill); background: var(--mp-card); color: var(--mp-text);
    font-size: 14px; font-weight: 700; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s;
}
.mp-chipradio:hover span { border-color: var(--mp-text); }
.mp-chipradio input:checked + span { background: var(--mp-primary); border-color: var(--mp-primary); color: var(--mp-on-primary); }
.mp-chipradio input:focus-visible + span { outline: 3px solid var(--mp-focus); outline-offset: 2px; }
.mp-chipradio--none span { border-style: dashed; color: var(--mp-muted); }
.mp-chipradio--none input:checked + span { background: var(--mp-soft); border-color: var(--mp-text); color: var(--mp-text); }
.is-invalid .mp-chipradio span { border-color: var(--mp-danger); }
[data-motion="full"] .mp-chipradio input:checked + span { animation: mp-pop-sm .3s cubic-bezier(.2,1.4,.4,1); }
.mp-note { display: inline-flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--mp-radius); background: var(--mp-secondary-tint); color: var(--mp-text); font-weight: 700; font-size: 14px; line-height: 1.5; }
.mp-note .mp-icon { color: var(--mp-secondary-text); margin-top: 1px; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.mp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mp-table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--mp-text); }
.mp-table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mp-muted); padding: 12px 10px; white-space: nowrap; }
.mp-table thead th { background: var(--mp-soft); }
.mp-table td { padding: 14px 10px; border-top: 1px solid var(--mp-line); vertical-align: middle; }
.mp-table th:first-child, .mp-table td:first-child { padding-left: var(--mp-table-x, 10px); }
.mp-table th:last-child, .mp-table td:last-child { padding-right: var(--mp-table-x, 10px); }
.mp-table tbody tr { transition: background-color .2s; }
.mp-table tbody tr:hover { background: var(--mp-soft); }
.mp-table .is-num, .mp-table .is-end { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mp-table tfoot td { font-weight: 800; border-top: 2px solid var(--mp-line); }
.mp-table tr.is-removed { opacity: .6; }
.mp-table tr.is-removed .mp-person__name { text-decoration: line-through; }
.mp-table--bordered th, .mp-table--bordered td { border: 1px solid var(--mp-line); }
.mp-table--flush { --mp-table-x: clamp(16px, 3vw, 24px); }
.mp-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mp-person__name { font-weight: 800; overflow-wrap: anywhere; }
.mp-person__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mp-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; font-size: 14px; background: var(--mp-text); color: var(--mp-card); text-transform: uppercase; }
.mp-avatar--1 { background: var(--mp-primary); color: var(--mp-on-primary); }
.mp-avatar--2 { background: var(--mp-secondary); color: var(--mp-on-secondary); }

/* Stacked table rows on small screens (cells carry data-label) */
@media (max-width: 640px) {
    .mp-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .mp-table--stack, .mp-table--stack tbody, .mp-table--stack tfoot, .mp-table--stack tr, .mp-table--stack td { display: block; width: 100%; box-sizing: border-box; }
    .mp-table--stack tr { border-top: 1px solid var(--mp-line); padding: 12px var(--mp-table-x, 12px); }
    .mp-table--stack td { border: 0; padding: 4px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
    .mp-table--stack td::before { content: attr(data-label); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mp-muted); text-align: left; flex-shrink: 0; }
    .mp-table--stack td:not([data-label])::before { content: none; }
    .mp-table--stack td.is-lead { display: block; text-align: left; padding-bottom: 8px !important; }
    .mp-table--stack tfoot tr { border-top: 2px solid var(--mp-line); }
    .mp-table--stack .is-stack-hide { display: none; }
}

/* ── Description list ──────────────────────────────────────────────────── */
.mp-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 0; font-size: 15px; }
.mp-dl dt { color: var(--mp-muted); font-weight: 700; }
.mp-dl dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 480px) { .mp-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .mp-dl dd { margin-bottom: 10px; } }

/* ── Card heads / KPI cards ────────────────────────────────────────────── */
.mp-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.mp-card__title { margin: 0; font-size: 18px; font-weight: 800; }
.mp-card--flush { padding: 0; overflow: hidden; }
.mp-card--flush > .mp-card__head { padding: clamp(16px, 3vw, 22px) clamp(16px, 3vw, 24px) 0; }
.mp-card--flush > .mp-card__pad { padding: 0 clamp(16px, 3vw, 24px) 16px; }
.mp-card--danger { border-color: var(--mp-bad-line); }
.mp-card--warn { border-color: var(--mp-warn-line); background: var(--mp-warn-bg); color: var(--mp-warn-fg); }
.mp-card--ok { border-color: var(--mp-ok-line); background: var(--mp-ok-bg); color: var(--mp-ok-fg); }
.mp-card--ink { background: var(--mp-ink); color: var(--mp-on-ink); border-color: var(--mp-ink); --mp-focus: var(--mp-on-ink); }
.mp-kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.mp-kpi { display: flex; flex-direction: column; gap: 6px; }
.mp-kpi--ring { flex-direction: row; align-items: center; gap: 18px; }
.mp-kpi__label { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mp-muted); }
.mp-card--ink .mp-kpi__label, .mp-card--ink .mp-kpi__sub { color: var(--mp-ink-muted); }
.mp-kpi__value { font-size: clamp(40px, 6vw, 52px); line-height: 1; margin: 4px 0 6px; overflow-wrap: anywhere; }
.mp-kpi__sub { font-size: 14px; color: var(--mp-muted); font-weight: 600; }
.mp-ring { width: 96px; height: 96px; flex-shrink: 0; }
.mp-ring__track { stroke: var(--mp-soft); }
.mp-ring__val { stroke: var(--mp-primary); }
.mp-ring__txt { fill: currentColor; font-family: var(--mp-font-display); font-weight: 800; font-size: 28px; }
[data-motion="full"] .mp-ring__val { animation: mp-dash 1.6s var(--mp-ease) .2s both; }
.mp-paybar { height: 10px; border-radius: var(--mp-radius-pill); background: var(--mp-soft); overflow: hidden; }
.mp-paybar > span { display: block; height: 100%; border-radius: inherit; background: var(--mp-success); }
.mp-paylegend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 14px; font-weight: 700; }
.mp-paylegend .is-ok { color: var(--mp-ok-fg); }
.mp-paylegend .is-bad { color: var(--mp-bad-fg); }
.mp-mini-tiles { display: flex; gap: 8px; margin: 6px 0 4px; }
.mp-mini-tiles > div { min-width: 64px; text-align: center; padding: 8px 6px; border-radius: var(--mp-radius); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.mp-mini-tiles .mp-tile__num { font-size: 36px; }
.mp-mini-tiles .mp-tile__lbl { font-size: 10px; margin-top: 4px; }

/* Waitlist position */
.mp-waitcard { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; }
.mp-waitcard__pos { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--mp-ink); color: var(--mp-on-ink); font-size: 46px; }
.mp-waitcard__text { flex: 1 1 300px; min-width: 0; }
[data-motion="full"] .mp-float { animation: mp-float 3s ease-in-out infinite; }

/* History (vertical timeline) */
.mp-history { list-style: none; margin: 0; padding: 0; }
.mp-history li { display: flex; gap: 14px; }
.mp-history__rail { display: flex; flex-direction: column; align-items: center; }
.mp-history__dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; background: var(--mp-text); box-shadow: 0 0 0 4px var(--mp-soft); }
.mp-history__dot--ok { background: var(--mp-success); box-shadow: 0 0 0 4px var(--mp-ok-bg); }
.mp-history__dot--warn { background: var(--mp-warning); box-shadow: 0 0 0 4px var(--mp-warn-bg); }
.mp-history__dot--bad { background: var(--mp-danger); box-shadow: 0 0 0 4px var(--mp-bad-bg); }
.mp-history__dot--info { background: var(--mp-secondary); box-shadow: 0 0 0 4px var(--mp-secondary-tint); }
.mp-history__line { flex: 1; width: 2px; margin: 4px 0; background: var(--mp-line); }
.mp-history li:last-child .mp-history__line { display: none; }
.mp-history__body { padding-bottom: 16px; min-width: 0; }
.mp-history__text { font-weight: 800; overflow-wrap: anywhere; }
.mp-history__when { font-size: 13px; color: var(--mp-muted); }

/* Danger zone (<details>) */
.mp-dangerzone { border-color: var(--mp-bad-line); }
.mp-dangerzone > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; }
.mp-dangerzone > summary::-webkit-details-marker { display: none; }
.mp-dangerzone__body { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--mp-bad-line); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mp-dangerzone[open] .mp-dangerzone__toggle { display: none; }

/* QR block / generic disclosure */
.mp-qr { display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: center; }
.mp-qr__img { width: 160px; height: 160px; padding: 10px; background: #FFFFFF; border-radius: var(--mp-radius); box-shadow: 0 0 0 1px var(--mp-line); }
.mp-disclosure > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; font-weight: 800; }
.mp-disclosure > summary::-webkit-details-marker { display: none; }
.mp-disclosure > summary .mp-faq__pm { transition: transform .3s; }
.mp-disclosure[open] > summary .mp-faq__pm { transform: rotate(45deg); }
.mp-disclosure__body { margin-top: 14px; }

/* ── Native dialog ─────────────────────────────────────────────────────── */
.mp-dialog { border: 0; padding: 0; border-radius: var(--mp-radius-lg); background: var(--mp-card); color: var(--mp-text); width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: var(--mp-shadow-lg); }
.mp-dialog::backdrop { background: rgba(11,19,36,.6); }
.mp-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--mp-line); }
.mp-dialog__title { margin: 0; font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.mp-dialog__body { padding: 20px; }
.mp-dialog__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--mp-line); }
[data-motion="full"] .mp-dialog[open] { animation: mp-drop .3s var(--mp-ease) both; }

/* ── Helper shifts ─────────────────────────────────────────────────────── */
.mp-split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.mp-split__main { flex: 999 1 560px; min-width: 0; }
.mp-split__aside { flex: 1 1 340px; min-width: 0; position: sticky; top: 20px; }
.mp-role + .mp-role { margin-top: 28px; }
.mp-role__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
.mp-role__name { font-size: 30px; margin: 0; overflow-wrap: anywhere; }
.mp-role__where { font-size: 14px; font-weight: 600; color: var(--mp-muted); }
.mp-role__desc { margin: 0 0 12px; color: var(--mp-muted); font-size: 15px; line-height: 1.55; }
.mp-shifts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); list-style: none; margin: 0; padding: 0; }
.mp-shifts > li, .mp-shifts form { display: flex; min-width: 0; }
.mp-shifts form { flex: 1; }
.mp-shiftcard {
    position: relative; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px;
    min-height: 120px; padding: 12px 14px; text-align: left; font: inherit; cursor: pointer; text-decoration: none;
    border: 2px solid var(--mp-line); border-radius: var(--mp-radius); background: var(--mp-card); color: var(--mp-text);
    transition: transform .2s var(--mp-ease), border-color .2s, box-shadow .2s, background-color .2s;
}
.mp-shiftcard:hover { transform: translateY(-3px); box-shadow: var(--mp-shadow); border-color: var(--mp-secondary-text); color: var(--mp-text); }
.mp-shiftcard[disabled], .mp-shiftcard[aria-disabled="true"] { cursor: not-allowed; background: var(--mp-soft); color: var(--mp-muted); transform: none; box-shadow: none; border-color: var(--mp-line); }
.mp-shiftcard.is-mine { border-color: var(--mp-secondary); background: var(--mp-secondary-tint); }
.mp-shiftcard__day { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mp-muted); }
.mp-shiftcard__time { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.mp-shiftcard__note { font-size: 13px; color: var(--mp-muted); overflow-wrap: anywhere; }
.mp-shiftcard__state { font-size: 13px; font-weight: 700; color: var(--mp-ok-fg); }
.mp-shiftcard[disabled] .mp-shiftcard__state { color: var(--mp-muted); }
.mp-shiftcard__cta { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--mp-secondary-text); }
.mp-shiftcard__flag { position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--mp-secondary); color: var(--mp-on-secondary); }
[data-motion="full"] .mp-shiftcard__flag { animation: mp-pop .35s cubic-bezier(.2,1.4,.4,1) both; }
.mp-capdots { display: flex; flex-wrap: wrap; gap: 4px; }
.mp-capdots > span { width: 10px; height: 10px; border-radius: 50%; background: var(--mp-secondary); }
.mp-capdots > span.is-free { background: transparent; box-shadow: inset 0 0 0 2px var(--mp-muted); }
.mp-capbar { height: 8px; border-radius: var(--mp-radius-pill); background: var(--mp-soft); overflow: hidden; }
.mp-capbar > span { display: block; height: 100%; background: var(--mp-secondary); }

.mp-cart { border: 1px solid var(--mp-line); border-radius: var(--mp-radius-xl); overflow: hidden; background: var(--mp-card); color: var(--mp-text); box-shadow: var(--mp-shadow-lg); }
.mp-cart__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; background: var(--mp-ink); color: var(--mp-on-ink); }
.mp-cart__title { margin: 0; font-size: 28px; }
.mp-cart__body { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 22px; }
.mp-cart__item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--mp-radius); background: var(--mp-secondary-tint); }
.mp-cart__item strong { font-size: 17px; }
.mp-timer { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--mp-radius-pill); background: rgba(255,255,255,.12); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mp-timer.is-urgent, .mp-timer.is-expired { background: var(--mp-danger); color: #FFFFFF; }
[data-motion="full"] .mp-timer.is-urgent { animation: mp-pulse-bad 1.4s infinite; }
.mp-howto { list-style: none; counter-reset: mp-howto; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; line-height: 1.55; }
.mp-howto li { counter-increment: mp-howto; position: relative; padding-left: 40px; min-height: 28px; }
.mp-howto li::before { content: counter(mp-howto); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--mp-secondary-tint); color: var(--mp-secondary-text); }
.mp-myshifts { list-style: none; margin: 14px 0 0; padding: 0; }
.mp-myshift { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px clamp(16px, 3vw, 24px); border-top: 1px solid var(--mp-line); }
.mp-myshift__date { width: 64px; height: 64px; border-radius: var(--mp-radius); flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--mp-secondary); color: var(--mp-on-secondary); font-size: 20px; line-height: 1; }
.mp-myshift__date span { font-size: 12px; letter-spacing: .1em; margin-bottom: 4px; }
.mp-myshift__info { flex: 1 1 220px; min-width: 0; }

/* ── Guide (Anleitung) ─────────────────────────────────────────────────── */
.mp-guide { display: grid; gap: 40px; grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
.mp-toc { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
.mp-toc__group { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mp-primary-text); padding: 16px 12px 6px; }
.mp-toc a { display: block; padding: 8px 12px; border-left: 3px solid transparent; color: var(--mp-muted); text-decoration: none; font-weight: 700; font-size: 14px; }
.mp-toc a:hover, .mp-toc a.is-active { color: var(--mp-text); border-left-color: var(--mp-primary); }
.mp-toc-mobile { display: none; }
.mp-guide__part { display: flex; align-items: center; gap: 12px; font-size: clamp(30px, 5vw, 44px); margin: 48px 0 20px; padding-bottom: 10px; border-bottom: 3px solid var(--mp-primary); scroll-margin-top: 16px; }
.mp-guide__part:first-child { margin-top: 0; }
.mp-guide__section { scroll-margin-top: 16px; margin-bottom: 40px; }
.mp-guide__step { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.mp-guide__step > div:not(.mp-guide__num) { min-width: 0; flex: 1; }
.mp-prose .mp-table { display: table; margin: 1rem 0; }
.mp-guide__main { min-width: 0; }
.mp-guide__main .mp-card { margin-bottom: 16px; }
.mp-guide__num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--mp-primary); color: var(--mp-on-primary); font-weight: 800; }
@media (max-width: 960px) {
    .mp-guide { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .mp-guide > .mp-toc { display: none; }
    .mp-toc-mobile { display: block; }
    .mp-toc-mobile .mp-toc { position: static; max-height: none; }
}

/* ── Error pages ───────────────────────────────────────────────────────── */
.mp-errorpage { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding-block: clamp(40px, 8vw, 96px); }
.mp-errorpage__code { font-size: clamp(110px, 26vw, 220px); line-height: .85; margin: 0; color: var(--mp-primary-text); }
.mp-errorpage__mark { color: var(--mp-text); }

/* ── Payment deadline countdown (markup from js/deadline.js) ───────────── */
.mp-body .deadline-countdown .cd-boxes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 440px; }
.mp-body .deadline-countdown .cd-cell { min-width: 0; padding: 10px 4px; text-align: center; border-radius: var(--mp-radius); background: var(--mp-soft); }
.mp-body .deadline-countdown .cd-num { font-family: var(--mp-font-display); font-weight: 800; font-size: clamp(30px, 6vw, 40px); line-height: 1; color: var(--mp-text); font-variant-numeric: tabular-nums; }
.mp-body .deadline-countdown .cd-lbl { margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mp-muted); }
.mp-body .deadline-countdown.deadline-urgent .cd-cell { background: var(--mp-bad-bg); }
.mp-body .deadline-countdown.deadline-urgent .cd-num { color: var(--mp-bad-fg); }
.mp-body .deadline-countdown .text-danger { color: var(--mp-bad-fg); }
.mp-body .deadline-countdown .fw-semibold { font-weight: 700; }

/* ── Motion (phase 2) ──────────────────────────────────────────────────── */
@keyframes mp-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes mp-pop-sm { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: none; } }
@keyframes mp-draw { to { stroke-dashoffset: 0; } }
@keyframes mp-ring { from { transform: scale(.4); opacity: .8; } to { transform: scale(1.8); opacity: 0; } }
@keyframes mp-dash { from { stroke-dashoffset: 302; } }
@keyframes mp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes mp-pulse-bad { 0% { box-shadow: 0 0 0 0 rgba(185,28,28,.6); } 70% { box-shadow: 0 0 0 8px rgba(185,28,28,0); } 100% { box-shadow: 0 0 0 0 rgba(185,28,28,0); } }

@media (max-width: 760px) {
    /* Mixed instead of opacity: the slide-in animation ends at opacity 1 */
    .mp-deco--s { width: 46%; background: color-mix(in srgb, var(--mp-secondary) 45%, var(--mp-ink)); }
    .mp-deco--p { width: 26%; background: color-mix(in srgb, var(--mp-primary) 45%, var(--mp-ink)); }
    .mp-deco--ring, .mp-deco--ring2 { opacity: .6; }
    .mp-pagehead { padding-bottom: 52px; }
    .mp-split__aside { position: static; }
    .mp-kpi--ring { gap: 14px; }
}
@media print {
    .mp-dangerzone, .mp-pagehead__actions, .mp-totalbar, .mp-flashes { display: none !important; }
}

/* ── Test mode / setup preview strip (base.html) ── */
.mp-mockbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
    padding: 9px 16px; font-size: 14px; font-weight: 700; text-align: center;
    background: var(--mp-warn-bg); color: var(--mp-warn-fg); border-bottom: 1px solid var(--mp-warn-line);
}
.mp-mockbar a { color: inherit; text-decoration: underline; }
.mp-mockbar .mp-icon { flex: none; }
.mp-mockbar--admin { background: var(--mp-soft); color: var(--mp-text); border-bottom-color: var(--mp-line); }

/* ── Admin look options (Design → Gestaltung) ──────────────────────────── */
/* Small labels in normal case instead of spaced capitals */
[data-labels="normal"] :is(.mp-eyebrow, .mp-hero__kicker, .mp-tile__lbl, .mp-timeline__date, .mp-table th,
    .mp-kpi__label, .mp-shiftcard__day, .mp-toc__group, .mp-summary__total-label),
[data-labels="normal"] .mp-body .deadline-countdown .cd-lbl,
[data-labels="normal"] .mp-table--stack td::before { text-transform: none; letter-spacing: normal; }
[data-labels="normal"] .mp-eyebrow { font-size: 15px; }
/* Age-class cards without the coloured corner */
[data-corners="off"] .mp-ac__corner { display: none; }
[data-corners="off"] .mp-ac__head { padding-right: 0; }
