/* KarateConnect landing.
   Tokens, fonts and radii are copied from the app (KarateConnect.Frontend/src/styles/global.scss),
   so the landing and the portal look like one product. Change them there first, then here. */

/* The app's fonts, served from this site instead of Google Fonts, so a visit sends no IP address to Google.
   Inter and Instrument Sans are variable fonts under the SIL Open Font License; latin, and latin-ext for č ć đ š ž */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('fonts/instrument-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('fonts/instrument-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ── Tokens ─────────────────────────────────────────── */
:root {
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Instrument Sans', var(--font);

    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;
    --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

    --radius-control: 8px;
    --radius-container: 12px;
    --page-wide: 1200px;
    --nav-height: 64px;

    /* Strong ease-out for presses and openings */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    /* iOS-like drawer curve, for the menu */
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
    /* Strong ease-in-out, for things that move across the screen (the line under the active link) */
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

    /* Light theme */
    color-scheme: light;
    --bg: #FFFFFF;
    --bg-subtle: #F7F8FA;
    --bg-card: #FFFFFF;
    --border: #E6E8EC;
    --border-strong: #C4C8D0;
    --text-primary: #16181F;
    --text-body: #2E323C;
    --text-muted: #5B6070;
    --nav-bg: rgba(255,255,255,0.92);
    --state-hover: rgba(22,24,31,.04);
    --link: #2952CC;
    --focus-ring: #2952CC;
    --primary: #16181F;
    --on-primary: #FFFFFF;
    --aka: #D7263D;
    /* The aka red under white words: 4.96:1 in both themes */
    --aka-fill: #D7263D;
    --on-aka: #FFFFFF;

    /* The app's meaningful colors. Each topic of the page keeps the color it has in the app:
       paid fees are green, a cancelled training is amber, results are gold, groups have their own colors */
    --success: #15803D;
    --warning: #B45309;
    --warning-bg: #FFFBEB;
    --danger: #B91C1C;
    --medal-gold: #B8860B;
    --medal-silver: #8A929E;
    --medal-bronze: #A5612B;
    --group-0: #2E59BB;
    --group-2: #756F27;
    --success-bg: #F0FDF4;
    --group-1: #068D6F;
    --group-3: #B956B0;
    --group-4: #B12060;
    --group-6: #984800;
    --group-7: #1483BF;
    --tint: 8%;

    /* Belt colors, white to black, for the band under the hero */
    --belt-white: #E5E7EB;
    --belt-yellow: #FACC15;
    --belt-orange: #F97316;
    --belt-green: #16A34A;
    --belt-blue: #2563EB;
    --belt-purple: #7C3AED;
    --belt-brown: #78350F;
    --belt-black: #111111;
}

/* Dark theme: the device's choice, unless the visitor picked light */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0E1015;
        --bg-subtle: #13161D;
        --bg-card: #161922;
        --border: #262A33;
        --border-strong: #3A3F4B;
        --text-primary: #ECEDF0;
        --text-body: #C9CCD3;
        --text-muted: #9A9FAD;
        --nav-bg: rgba(14,16,21,0.94);
        --state-hover: rgba(255,255,255,.04);
        --link: #7C9CFF;
        --focus-ring: #7C9CFF;
        --primary: #ECEDF0;
        --on-primary: #16181F;
        --aka: #F0566A;
        --success: #4ADE80;
        --warning: #FBBF24;
        --warning-bg: rgba(251,191,36,.10);
        --danger: #F87171;
        --medal-gold: #D4A017;
        --medal-silver: #B6BCC6;
        --medal-bronze: #D08A4E;
        --group-0: #95A5FF;
        --group-2: #C7BD7D;
        --success-bg: rgba(74,222,128,.10);
        --group-1: #83DDC0;
        --group-3: #FFAEFD;
        --group-4: #FF84AD;
        --group-6: #EB985B;
        --group-7: #93D2FF;
        --tint: 14%;
        --belt-black: #2A2D36;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0E1015;
    --bg-subtle: #13161D;
    --bg-card: #161922;
    --border: #262A33;
    --border-strong: #3A3F4B;
    --text-primary: #ECEDF0;
    --text-body: #C9CCD3;
    --text-muted: #9A9FAD;
    --nav-bg: rgba(14,16,21,0.94);
    --state-hover: rgba(255,255,255,.04);
    --link: #7C9CFF;
    --focus-ring: #7C9CFF;
    --primary: #ECEDF0;
    --on-primary: #16181F;
    --aka: #F0566A;
    --success: #4ADE80;
    --warning: #FBBF24;
    --warning-bg: rgba(251,191,36,.10);
    --danger: #F87171;
    --medal-gold: #D4A017;
    --medal-silver: #B6BCC6;
    --medal-bronze: #D08A4E;
    --group-0: #95A5FF;
    --group-2: #C7BD7D;
    --success-bg: rgba(74,222,128,.10);
    --group-1: #83DDC0;
    --group-3: #FFAEFD;
    --group-4: #FF84AD;
    --group-6: #EB985B;
    --group-7: #93D2FF;
    --tint: 14%;
    --belt-black: #2A2D36;
}

/* ── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + var(--sp-4)); -webkit-text-size-adjust: 100%; }
a, button, summary { touch-action: manipulation; }
body {
    font: 400 16px/1.6 var(--font);
    color: var(--text-body);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--text-primary); font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
/* Links in the ink color with a thin underline: the landing keeps to ink, red and the meaningful colors, no blue */
a { color: var(--text-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--page-wide); margin: 0 auto; padding: 0 var(--sp-4); }
@media (min-width: 600px) { .wrap { padding: 0 var(--sp-6); } }

.skip-link {
    position: absolute; left: var(--sp-4); top: -100px; z-index: 20;
    background: var(--primary); color: var(--on-primary);
    padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-control);
}
.skip-link:focus { top: var(--sp-2); }

/* ── Buttons: the app's 44px controls, words only ───── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 var(--sp-5);
    border: 1px solid transparent; border-radius: var(--radius-control);
    font: 500 14px/20px var(--font); text-decoration: none; white-space: nowrap;
    background: transparent; color: var(--primary); cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
/* One size for every button, as in the app: 44px high, 14px words. The large ones only get more room at the sides */
.btn-large { padding: 0 var(--sp-6); }
.btn-filled { background: var(--primary); color: var(--on-primary); }
.btn-outlined { border-color: var(--border-strong); }
/* The sign-in button next to the main one in the first screen: a solid card-colored face, so the grid behind it does not show through */
.hero-text .btn-outlined { background: var(--bg-card); }
@media (hover: hover) { .hero-text .btn-outlined:hover { background: color-mix(in srgb, var(--primary) 4%, var(--bg-card)); } }
.btn-text { padding: 0 var(--sp-3); }
.btn-inverse { background: var(--on-primary); color: var(--primary); }
@media (hover: hover) and (pointer: fine) {
    .btn-filled:hover { background: color-mix(in srgb, var(--primary) 88%, var(--bg)); }
    .btn-outlined:hover { background: var(--state-hover); border-color: var(--primary); }
    .btn-text:hover { background: var(--state-hover); }
    .btn-inverse:hover { background: color-mix(in srgb, var(--on-primary) 90%, var(--primary)); }
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 10;
    background: var(--nav-bg);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 20px -16px rgba(16,24,40,.5); }
.header-row { display: flex; align-items: center; gap: var(--sp-4); height: var(--nav-height); }
.brand { display: flex; align-items: center; gap: var(--sp-2); text-decoration: none; color: var(--text-primary); }
.brand-mark { width: 28px; height: 28px; border-radius: var(--radius-control); }
.brand-name { font: 600 17px/1 var(--font-display); }
.header-nav { display: none; gap: var(--sp-1); margin-left: var(--sp-6); }
.header-nav a {
    padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-control);
    color: var(--text-muted); text-decoration: none; font: 500 14px/20px var(--font); white-space: nowrap;
    transition: color 150ms ease, background-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .header-nav a:hover { color: var(--text-primary); background: var(--state-hover); } }
/* The section on screen: its link turns to full ink and a line under it slides across (main.js decides which) */
.header-nav a.is-active { color: var(--text-primary); }
.header-nav { position: relative; }
.nav-indicator {
    position: absolute; left: 0; bottom: -1px; width: 1px; height: 2px; pointer-events: none;
    background: var(--text-primary); transform-origin: left center; transform: translateX(0) scaleX(0); opacity: 0;
    transition: transform 300ms var(--ease-in-out), opacity 200ms ease;
}
.nav-indicator.is-on { opacity: 1; }
.menu-links a.is-active { color: var(--text-primary); background: var(--state-hover); }
.header-actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
/* The section links only where the bar has room for them next to the language, theme and both buttons */
@media (min-width: 1100px) { .header-nav { display: flex; align-items: center; align-self: stretch; } }
/* Wide screens: the language, the theme and a quiet sign-in link sit in the bar. Below 1100px they move to the menu,
   and the bar keeps only the menu button, the mark and the one main action */
.header-wide { display: none; }
@media (min-width: 1100px) {
    .header-wide { display: flex; align-items: center; gap: var(--sp-2); }
}
.header-login {
    /* A text link, but the same 44px high as the buttons beside it */
    align-items: center; min-height: 44px; padding: 0 var(--sp-3); border-radius: var(--radius-control);
    font: 500 14px/20px var(--font); color: var(--text-body); text-decoration: none; white-space: nowrap;
    transition: background-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .header-login:hover { background: var(--state-hover); color: var(--text-primary); } }
.header-contact { flex: none; }

/* The menu button: three lines that turn into a cross while the menu is open */
.menu-btn {
    display: inline-grid; place-content: center; gap: 4px; flex: none;
    width: 44px; height: 44px; margin-left: calc(-1 * var(--sp-3));
    border: none; border-radius: 50%; background: transparent; color: var(--text-primary); cursor: pointer;
    transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.menu-btn span {
    display: block; width: 18px; height: 2px; border-radius: 1px; background: currentColor;
    transition: transform 250ms var(--ease-out), opacity 150ms ease;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .menu-btn:hover { background: var(--state-hover); } }

/* The menu slides in from the left under the bar, as in the app. It opens on the iOS drawer curve
   and closes faster than it opens; closed, it is hidden for real (inert), so its links take no focus */
.mobile-menu {
    position: fixed; z-index: 20; top: var(--nav-height); left: 0; bottom: 0;
    width: min(300px, 86vw); overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column;
    background: var(--bg-card); border-right: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.05);
    transform: translateX(-100%); visibility: hidden;
    transition: transform 200ms var(--ease-out), visibility 0s linear 200ms;
}
.mobile-menu.is-open { transform: none; visibility: visible; transition: transform 320ms var(--ease-drawer); }
.menu-backdrop {
    position: fixed; z-index: 19; inset: var(--nav-height) 0 0 0;
    background: rgba(15,23,42,.5); opacity: 0; pointer-events: none;
    transition: opacity 200ms ease;
}
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }
.menu-links { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4); }
.menu-links a {
    display: flex; align-items: center; min-height: 44px; padding: var(--sp-2) var(--sp-4);
    border-radius: var(--radius-control);
    font: 500 15px/20px var(--font); color: var(--text-body); text-decoration: none;
}
/* Sign-in sits under a line, at the same 44px as the links above */
.menu-links a:last-child { position: relative; margin-top: calc(var(--sp-6) + var(--sp-1)); } /* the line above is 16px from the link, the line below too */
.menu-links a:last-child::before { content: ''; position: absolute; left: 0; right: 0; top: calc(-1 * var(--sp-4) - 1px); height: 1px; background: var(--border); }
@media (hover: hover) and (pointer: fine) { .menu-links a:not(:last-child):hover { background: var(--state-hover); color: var(--text-primary); } }
.menu-settings {
    display: flex; align-items: center; justify-content: space-between;
    margin: 0 var(--sp-4); padding: var(--sp-3) 0; border-top: 1px solid var(--border);
}
@media (min-width: 1100px) { .menu-btn, .mobile-menu, .menu-backdrop { display: none; } }
/* BS | EN, as in the app: quiet codes, the language in use in the text color, a thin line between them */
.lang-switch { display: flex; align-items: center; }
.lang-switch a {
    /* 44px high to tap, the codes stay small; the line between them is drawn shorter than the tap area */
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-2); position: relative;
    font: 500 14px/20px var(--font); color: var(--text-muted); text-decoration: none;
    transition: color 150ms ease;
}
.lang-switch a + a::before { content: ''; position: absolute; left: 0; top: 13px; bottom: 13px; width: 1px; background: var(--border-strong); }
.lang-switch a[aria-current] { color: var(--text-primary); }
@media (hover: hover) and (pointer: fine) { .lang-switch a:hover { color: var(--text-primary); } }

/* Light or dark, as the app's round icon button: a moon in the light theme, a sun in the dark */
.theme-btn {
    display: inline-grid; place-items: center; flex: none;
    width: 44px; height: 44px; border: none; border-radius: 50%;
    background: transparent; color: var(--text-body); cursor: pointer;
    transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.theme-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn svg {
    grid-area: 1 / 1;
    transition: opacity 250ms var(--ease-out), transform 350ms var(--ease-out), filter 250ms var(--ease-out);
}
.theme-btn .icon-sun, .is-dark .theme-btn .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.85); filter: blur(3px); }
.is-dark .theme-btn .icon-sun { opacity: 1; transform: none; filter: none; }
.theme-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .theme-btn:hover { background: var(--state-hover); } }
/* On the narrowest phones the mark alone stands for the name, so the language, theme and sign-in fit */
@media (max-width: 419px) {
    .header-row { gap: var(--sp-2); }
    .site-header .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .header-actions { gap: var(--sp-1); }
}

/* ── 1. Hero ────────────────────────────────────────── */
.hero { padding: var(--sp-12) 0 var(--sp-16); }
.hero-grid { display: grid; gap: var(--sp-10); align-items: center; }
.hero h1 {
    font-size: clamp(32px, 3.6vw + 12px, 48px);
    line-height: 1.08; letter-spacing: -0.02em;
    max-width: 20ch;
}
.lead { margin-top: var(--sp-5); font-size: 18px; line-height: 1.55; color: var(--text-muted); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }
@media (max-width: 479px) { .actions .btn { flex: 1 1 100%; } }
@media (min-width: 960px) {
    .hero { padding: var(--sp-20) 0 var(--sp-24); }
    .hero-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-10); }
}
@media (min-width: 1200px) {
    .hero-grid { grid-template-columns: 5fr 7fr; gap: var(--sp-12); }
}

/* Belt band: the ranks from white to black, the one strip of pure color at the top of the page */
.belt-band {
    display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
    height: 10px; margin-top: var(--sp-12);
    border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
}
/* Filled once, white to black, when it first comes into view: the one moment of motion on the page.
   Only with scripts on (html.js), so the band is never left empty */
.js .belt-band { clip-path: inset(0 100% 0 0 round 999px); transition: clip-path 1100ms var(--ease-out) 150ms; }
.js .belt-band.is-revealed { clip-path: inset(0 0 0 0 round 999px); }
.belt-band span:nth-child(1) { background: var(--belt-white); }
.belt-band span:nth-child(2) { background: var(--belt-yellow); }
.belt-band span:nth-child(3) { background: var(--belt-orange); }
.belt-band span:nth-child(4) { background: var(--belt-green); }
.belt-band span:nth-child(5) { background: var(--belt-blue); }
.belt-band span:nth-child(6) { background: var(--belt-purple); }
.belt-band span:nth-child(7) { background: var(--belt-brown); }
.belt-band span:nth-child(8) { background: var(--belt-black); }

/* ── Screenshots ─────────────────────────────────────── */
.shot { min-width: 0; }
.shot-frame, .shot img {
    width: 100%; aspect-ratio: 16 / 10;
    border: 1px solid var(--border); border-radius: var(--radius-container);
    background: var(--bg-subtle);
}
/* A screenshot sits on a faint wash of its topic's color */
.shot-frame, .shot img {
    background: color-mix(in srgb, var(--topic, var(--text-muted)) var(--tint), var(--bg));
    border-color: color-mix(in srgb, var(--topic, var(--border-strong)) 35%, var(--border));
}
/* Until a real screenshot is in place, the frame names what goes there */
.shot-frame { display: grid; place-items: center; padding: var(--sp-6); text-align: center; color: var(--text-muted); font-size: 14px; }
.shot img { object-fit: cover; object-position: top left; }
.shot-note { margin-top: var(--sp-3); color: var(--text-muted); font-size: 13px; }
.shot figcaption { margin-top: var(--sp-3); font-size: 13px; color: var(--text-muted); }

/* ── Sections ────────────────────────────────────────── */
.section { padding: var(--sp-16) 0; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(26px, 2vw + 16px, 36px); line-height: 1.15; letter-spacing: -0.01em; max-width: 24ch; }
.section h3 { font-size: 18px; line-height: 1.35; }
@media (min-width: 960px) { .section { padding: var(--sp-24) 0; } }

/* 3. Solutions: text and screenshot side by side */
.feature { display: grid; gap: var(--sp-6); padding: var(--sp-10) 0; }
.feature + .feature { border-top: 1px solid var(--border); }
.feature:first-of-type { padding-top: var(--sp-10); }
.feature-text h3 { font-size: 22px; line-height: 1.3; padding-left: var(--sp-3); border-left: 4px solid var(--topic, var(--primary)); }
.feature-text p { margin-top: var(--sp-3); max-width: 60ch; }
@media (min-width: 960px) {
    .feature { grid-template-columns: 5fr 7fr; gap: var(--sp-12); align-items: start; padding: var(--sp-16) 0; }
}

/* 4. Roles */
.role-grid { display: grid; gap: var(--sp-8); margin-top: var(--sp-10); }
.role { padding-top: var(--sp-4); border-top: 3px solid var(--topic, var(--primary)); }
.role p { margin-top: var(--sp-2); }
.roles-note { margin-top: var(--sp-10); color: var(--text-muted); }
@media (min-width: 600px) { .role-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-10) var(--sp-8); } }
@media (min-width: 960px) { .role-grid { grid-template-columns: repeat(4, 1fr); } }

/* 5. Steps: a real sequence, so they carry numbers */
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--sp-8); margin-top: var(--sp-10); }
.step { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; column-gap: var(--sp-4); }
.step::before {
    content: counter(step);
    grid-row: span 2;
    width: 44px; height: 44px; border-radius: var(--radius-control);
    display: grid; place-items: center;
    background: var(--aka-fill); color: var(--on-aka);
    font: 600 18px/1 var(--font-display);
}
.step h3 { align-self: center; min-height: 44px; display: flex; align-items: center; }
.step p { grid-column: 2; max-width: 40ch; }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* 5b. Pricing, in the portal's own look: a framed table with a gray header band and a line between rows, a status badge for what is
   free, and a belt colour per package (green, blue, purple, black: a bigger club, a higher belt).
   Edge to edge on wide screens, the money columns flush right; one card per package on narrow ones */
.pricing-trial {
    display: flex; width: 100%; margin-top: var(--sp-6); padding: var(--sp-3) var(--sp-4);
    border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); border-radius: var(--radius-control);
    background: var(--success-bg); color: var(--success); font: 500 16px/1.45 var(--font);
}
.pricing-table { width: 100%; margin-top: var(--sp-8); border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: left; }
.pricing-table thead { display: none; }
.pricing-table tbody tr {
    display: block; margin-bottom: var(--sp-3); padding: var(--sp-2) var(--sp-5);
    border: 1px solid var(--border); border-radius: var(--radius-container); background: var(--bg-card);
    position: relative;
}
/* the belt colour: a straight bar with square ends, inside the card (an inset line would bend with the card's corners) */
.pricing-table tbody tr::before {
    content: ''; position: absolute; left: 0; top: var(--sp-4); bottom: var(--sp-4); width: 3px; background: var(--topic, var(--border-strong));
}
.pricing-table tbody tr > * { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); padding: var(--sp-3) 0; text-align: right; font: 400 16px/1.4 var(--font); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pricing-table tbody tr > *::before { content: attr(data-label); text-align: left; font-size: 16px; font-weight: 400; color: var(--text-muted); }
.pricing-table tbody tr > * + * { border-top: 1px solid var(--border); }
.pricing-table tbody th { justify-content: flex-start; font: 600 20px/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--text-primary); text-align: left; }
.pricing-table tbody th::before { content: none; }
.pricing-table tbody td:nth-of-type(2),
.pricing-table tbody td:nth-of-type(3) { color: var(--text-primary); font-size: 18px; font-weight: 600; white-space: nowrap; }
.pricing-save {
    display: inline-flex; align-items: center; height: 22px; padding: 0 var(--sp-2); border-radius: var(--radius-control);
    border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); background: var(--success-bg); color: var(--success);
    font: 500 12px/16px var(--font); white-space: nowrap;
}
/* the free months, a pill under the yearly price (the price stays the thing the eye lands on) */
.pricing-yearly { display: inline-flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2); }
.pricing-table tbody td:last-child { align-items: flex-start; }
@media (max-width: 719px) {
    .pricing-table tbody th { padding-bottom: var(--sp-1); }
    .pricing-table tbody td:nth-of-type(1) { padding-top: 0; justify-content: flex-start; border-top: 0; gap: var(--sp-1); font-size: 14px; }
    .pricing-table tbody td:nth-of-type(1)::before { content: none; }
    .pricing-table tbody td:nth-of-type(1)::after { content: attr(data-unit); }
    .pricing-table tbody td:nth-of-type(1) + td { margin-top: var(--sp-1); border-top: 1px solid var(--border); }
}
@media (hover: hover) and (pointer: fine) and (min-width: 720px) {
    .pricing-table tbody tr > * { transition: background-color 150ms ease; }
    .pricing-table tbody tr:hover > * { background: var(--state-hover); }
}
.pricing-lead { max-width: 56ch; font-size: 16px; line-height: 1.6; }
.pricing-cta { margin-top: var(--sp-10); }
.pricing-cta-text { max-width: 46ch; font: 400 16px/1.55 var(--font); color: var(--text-body); }
.pricing-cta .actions { margin-top: var(--sp-5); }
@media (min-width: 720px) {
    .pricing-table { border: 1px solid var(--border); border-radius: var(--radius-container); overflow: hidden; background: var(--bg-card); }
    .pricing-table thead { display: table-header-group; }
    .pricing-table tbody tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .pricing-table th, .pricing-table td { padding: var(--sp-5); border-bottom: 1px solid var(--border); vertical-align: middle; }
    .pricing-table thead th { padding-top: var(--sp-3); padding-bottom: var(--sp-3); font: 500 12px/16px var(--font); color: var(--text-muted); background: var(--bg-subtle); }
    .pricing-table tbody tr:last-child > * { border-bottom: 0; }
    .pricing-table tbody tr > * { display: table-cell; padding: var(--sp-5); text-align: left; border-top: 0; }
    .pricing-table tbody tr > *::before { content: none; }
        .pricing-table tbody tr::before { content: none; }
    .pricing-table tbody th { position: relative; }
    .pricing-table tbody th::before { content: ''; position: absolute; left: 0; top: var(--sp-4); bottom: var(--sp-4); width: 3px; background: var(--topic, var(--border-strong)); }
    .pricing-table th:nth-child(1) { width: 30%; }
    .pricing-table th:nth-child(2) { width: 20%; }
    .pricing-table th:nth-child(3), .pricing-table td:nth-child(3),
    .pricing-table th:nth-child(4), .pricing-table td:nth-child(4) { text-align: right; }
    .pricing-table tbody td:nth-of-type(2),
    .pricing-table tbody td:nth-of-type(3) { font: 600 20px/1.3 var(--font-display); letter-spacing: -0.01em; }
}
.pricing-table tbody .pricing-custom td[colspan] { white-space: nowrap; color: var(--text-muted); font-weight: 400; font-size: 16px; font-family: var(--font); letter-spacing: 0; }
@media (min-width: 720px) { .pricing-table tbody .pricing-custom td[colspan] { text-align: right; } }

/* 6. Story (hidden until the club agrees) */

/* 8. Questions: in two columns; each question wears a belt, yellow to black */
.faq-list { display: grid; gap: var(--sp-3); margin-top: var(--sp-10); align-items: start; }
.faq-list details {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-container); background: var(--bg-card);
}
/* The question's belt: a straight line down its left side, inside the card */
.faq-list details::before {
    content: ''; position: absolute; left: var(--sp-4); top: var(--sp-4); bottom: var(--sp-4);
    width: 3px; background: var(--belt);
}
.faq-list summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
    min-height: 64px; padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-10);
    font: 600 17px/1.35 var(--font-display); color: var(--text-primary);
    border-radius: var(--radius-container);
}
.faq-list summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { .faq-list summary:hover { background: var(--state-hover); } }
/* A plus that turns into a minus: shows the answer opened */
.faq-list summary::after {
    content: ''; flex: none; width: 12px; height: 12px;
    background:
        linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat;
    transition: transform 200ms var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(90deg); background-size: 12px 2px, 0 0; }
.faq-list details p { padding: 0 var(--sp-5) var(--sp-5) var(--sp-10); max-width: 60ch; }
.faq-more { margin-top: var(--sp-8); color: var(--text-muted); }
@media (min-width: 900px) { .faq-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); } }

/* 9. Contact: a dark band, the page's quiet peak. Red is only the accent here: the benefit marks and the gi's stitches. In the dark theme the band goes darker than the page */
.contact {
    --band: #16181F; --band-ink: #FFFFFF;
    background: var(--band); color: var(--band-ink); padding: var(--sp-16) 0;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .contact { --band: #07080B; } }
:root[data-theme="dark"] .contact { --band: #07080B; }
/* The tatami again, in faint light lines that fade toward the bottom */
.contact::before {
    content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background: #FFFFFF; opacity: 0.05;
    -webkit-mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M0 0h120v60H0zM120 0h60v120h-60zM60 120h120v60H60zM0 60h60v120H0zM60 60h60v60H60z'/%3E%3C/svg%3E") 0 0 / 180px 180px,
        linear-gradient(to bottom, #000 20%, transparent 90%);
    -webkit-mask-composite: source-in;
    mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M0 0h120v60H0zM120 0h60v120h-60zM60 120h120v60H60zM0 60h60v120H0zM60 60h60v60H60z'/%3E%3C/svg%3E") 0 0 / 180px 180px,
        linear-gradient(to bottom, #000 20%, transparent 90%);
    mask-composite: intersect;
}
.contact h2 { color: var(--band-ink); font-size: clamp(30px, 3vw + 16px, 48px); line-height: 1.1; letter-spacing: -0.02em; }
/* Left the offer and what comes with it, right the form on a card: the card keeps the page's own colors in both themes */
.contact-grid { display: grid; gap: var(--sp-10); align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 5fr 7fr; gap: var(--sp-12); } }
.contact-lead { margin-top: var(--sp-4); font-size: 18px; max-width: 46ch; opacity: 0.9; }
.contact-benefits-title { margin-top: var(--sp-8); color: var(--band-ink); font-size: 16px; }
.contact-benefits { list-style: none; margin-top: var(--sp-3); display: grid; gap: var(--sp-2); }
/* Each point marked with a short red belt */
.contact-benefits li { position: relative; padding-left: var(--sp-6); }
.contact-benefits li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 14px; height: 4px; border-radius: 2px; background: var(--aka); }
/* White on the red band in both themes, ink words */
.contact .btn-inverse { background: #FFFFFF; color: #16181F; }
@media (hover: hover) and (pointer: fine) { .contact .btn-inverse:hover { background: #F1F2F4; } }
.contact :focus-visible { outline-color: #FFFFFF; }
.contact-login { margin-top: var(--sp-8); font-size: 14px; opacity: 0.85; }

/* The inquiry form: the app's fields, 44px high, labels above, errors right under the field */
.inquiry {
    display: grid; gap: var(--sp-4);
    padding: var(--sp-6); border-radius: var(--radius-container);
    background: var(--bg-card); color: var(--text-body);
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
    border: 1px solid color-mix(in srgb, #FFFFFF 8%, transparent);
}
.inquiry :focus-visible { outline-color: var(--primary); }
.field-row { display: grid; gap: var(--sp-4); }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } .inquiry { padding: var(--sp-8); } }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field label { font: 500 14px/20px var(--font); color: var(--text-primary); }
.field-optional { font-weight: 400; color: var(--text-muted); }
.field input, .field textarea {
    width: 100%; min-height: 44px; padding: 10px 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-control);
    background: var(--bg); color: var(--text-primary);
    font: 400 16px/22px var(--font);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { resize: none; min-height: 104px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); opacity: .75; }
/* The label of the field being filled turns to full ink, so the eye finds its place */
.field label { transition: color 150ms ease; }
.field:focus-within label { color: var(--text-primary); }
/* Focus in the ink color, the app's primary, not blue */
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: 13px; line-height: 18px; color: var(--danger); animation: rise 200ms var(--ease-out); }
/* The button's words blur across when they change (Send to Sending…), so it reads as one shape changing */
.btn-label { transition: filter 120ms ease, opacity 120ms ease; }
.btn-label.is-swapping { filter: blur(2px); opacity: .6; }
/* Sent: the fields fade and blur out, the thank-you rises in */
.inquiry-fields { display: grid; gap: var(--sp-4); transition: opacity 200ms var(--ease-out), filter 200ms var(--ease-out), transform 200ms var(--ease-out); }
.inquiry-fields[hidden] { display: none; }
.inquiry.is-sent .inquiry-fields { opacity: 0; filter: blur(4px); transform: scale(0.98); }
.inquiry-done { display: grid; gap: var(--sp-3); justify-items: start; padding: var(--sp-6) 0; outline: none; transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.inquiry-done[hidden] { display: none; }
@starting-style { .inquiry-done { opacity: 0; transform: translateY(10px); } }
.inquiry-done-title { font: 600 24px/1.25 var(--font-display); color: var(--text-primary); }
.inquiry-done-title::before { content: ''; display: block; width: 40px; height: 6px; margin-bottom: var(--sp-4); border-radius: 999px; background: var(--success); }
.inquiry-done .btn { margin-top: var(--sp-3); }
.check { display: grid; grid-template-columns: 20px 1fr; gap: var(--sp-3); align-items: start; font: 400 14px/20px var(--font); color: var(--text-body); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--primary); border-radius: 5px; }
.check a { color: var(--text-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.inquiry-submit { justify-self: start; }
.inquiry-submit[aria-busy="true"] { opacity: .7; pointer-events: none; }
@media (max-width: 479px) { .inquiry-submit { justify-self: stretch; } }
.inquiry-status { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-control); font-size: 14px; }
.inquiry-status.is-ok { background: var(--success-bg); color: var(--success); }
.inquiry-status.is-error { background: color-mix(in srgb, var(--danger) 10%, var(--bg)); color: var(--danger); }
.inquiry-note { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.inquiry-note a { color: var(--text-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
/* Kept whole on one line and 44px high to tap */
.contact-login a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-weight: 600; white-space: nowrap; }
@media (min-width: 960px) { .contact { padding: var(--sp-24) 0; } }

/* Footer */
/* Footer, as on well-known SaaS sites: the mark with one line about the product, four short link columns,
   and a bottom row with the copyright */
.site-footer { padding: var(--sp-16) 0 var(--sp-6); border-top: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8) var(--sp-6); }
.footer-brand { grid-column: 1 / -1; display: grid; align-content: start; gap: var(--sp-3); justify-items: start; }
.footer-brand p { max-width: 36ch; line-height: 1.55; }
.footer-title { margin-bottom: var(--sp-2); font: 600 14px/20px var(--font); color: var(--text-primary); }
.footer-col { display: grid; align-content: start; justify-items: start; }
.footer-col a {
    display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); text-decoration: none;
    transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .footer-col a:hover { color: var(--text-primary); } }
.footer-bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-6);
    margin-top: var(--sp-8); padding-top: var(--sp-4); border-top: 1px solid var(--border);
}
/* Phones: the long Aplikacija list sits on the left over two rows; Pravno and Društvene mreže stack beside it,
   so there is no empty space under Pravno. Contact follows under Aplikacija. */
@media (max-width: 959.98px) {
    .footer-brand + .footer-col { grid-row: span 2; }
    /* 28px = one title line (20) + its margin (8): the Društvene mreže links then sit level with the 5th and 6th
       Aplikacija links and both columns end on the same line (measured at 390px: link rows are 44px each) */
    .footer-col:nth-child(4) { margin-top: 28px; }
}
@media (min-width: 960px) {
    .footer-grid { grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr; gap: var(--sp-10); }
    .footer-brand { grid-column: auto; }
    /* The column title row is as tall as the logo (28px), so the title text and "KarateConnect" share one centre line.
       28px line + 0 margin takes the same space as the 20px line + 8px margin above, so the links do not move. */
    .footer-title { line-height: 28px; margin-bottom: 0; }
    .footer-col a { min-height: 36px; }
}

/* Page not found: the same left edge as the bar, one calm block in the upper middle of the window */
/* The 404 page: the same card as the portal's error page (one card in the middle, the mark, what happened, one way forward) */
.notfound { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; padding: var(--sp-6) var(--sp-4); background: var(--bg); }
.notfound-card { width: 100%; max-width: 440px; padding: var(--sp-8); text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-container); box-shadow: 0 8px 24px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.05); animation: notfound-in 400ms var(--ease-out) both; }
.notfound-brand { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin-bottom: var(--sp-6); font: 600 20px/28px var(--font-display); color: var(--text-primary); text-decoration: none; }
.notfound-brand img { width: 40px; height: 40px; border-radius: var(--radius-container); }
.notfound-code { margin: 0 0 var(--sp-2); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-muted); }
.notfound h1 { margin: 0 0 var(--sp-2); font: 600 22px/30px var(--font-display); letter-spacing: 0; color: var(--text-primary); }
.notfound-text { margin: 0 0 var(--sp-6); font-size: 14px; line-height: 20px; color: var(--text-muted); }
.notfound .btn { width: 100%; height: 48px; font-size: 16px; font-weight: 500; }
@keyframes notfound-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .notfound-card { animation: none; } }
@media (max-width: 480px) { .notfound-card { padding: var(--sp-6) var(--sp-4); } }

/* Privacy policy: one readable column */
/* The column starts at the same left edge as the bar and every section; only the line length is limited */
.legal { padding-top: var(--sp-10); padding-bottom: var(--sp-16); }
.legal > * { max-width: 760px; }
.legal-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.legal h1 { margin-top: var(--sp-4); font-size: clamp(30px, 3vw + 16px, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.legal-date { margin-top: var(--sp-2); color: var(--text-muted); font-size: 14px; }
.legal h2 { margin-top: var(--sp-10); font-size: 22px; line-height: 1.3; }
.legal p, .legal ul { margin-top: var(--sp-3); }
.legal ul { padding-left: var(--sp-6); display: grid; gap: var(--sp-1); }
.legal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); }
.legal-cleared { font-size: 14px; color: var(--success); }
@media (max-width: 479px) { .legal-actions .btn { flex: 1 1 100%; } }
.legal code { font-size: 14px; padding: 1px 6px; border-radius: 5px; background: var(--bg-subtle); border: 1px solid var(--border); }
/* What still has to be filled in before going live */

/* ── Karate elements (from the app's own landing) ───── */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* Tatami behind the hero: four mats around a half mat, in faint lines that fade toward the bottom.
   The lines take the text color through a mask, so they follow the light and dark theme */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: var(--text-primary); opacity: 0.06; pointer-events: none;
    -webkit-mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M0 0h120v60H0zM120 0h60v120h-60zM60 120h120v60H60zM0 60h60v120H0zM60 60h60v60H60z'/%3E%3C/svg%3E") 0 0 / 180px 180px,
        linear-gradient(to bottom, #000 30%, transparent 95%);
    -webkit-mask-composite: source-in;
    mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M0 0h120v60H0zM120 0h60v120h-60zM60 120h120v60H60zM0 60h60v120H0zM60 60h60v60H60z'/%3E%3C/svg%3E") 0 0 / 180px 180px,
        linear-gradient(to bottom, #000 30%, transparent 95%);
    mask-composite: intersect;
}

/* The sample week, standing like the app's window, with two notes in front of it */
.week-stage { min-width: 0; }
.week-scene { position: relative; margin: var(--sp-6) var(--sp-2) var(--sp-8); }
.aka-dot {
    position: absolute; top: -26px; left: 24px; z-index: -1;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--aka); box-shadow: inset -6px -8px 14px rgba(0,0,0,.18);
}
.week-days {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--border); border-radius: var(--radius-container);
    background: var(--bg); overflow: hidden;
    box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 30px 60px -24px rgba(16,24,40,.35);
}
/* Phones show three days, so a training's time keeps its line */
.week-day:nth-child(n+4) { display: none; }
.week-day { display: flex; flex-direction: column; gap: var(--sp-2); min-height: 260px; padding: 0 var(--sp-1) var(--sp-3); border-left: 1px solid var(--border); }
.week-day:first-child { border-left: none; }
.week-day-head {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    margin: 0 calc(-1 * var(--sp-1)) var(--sp-1); padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border); background: var(--bg-subtle);
}
.week-weekday { font: 500 12px/16px var(--font); color: var(--text-muted); }
.week-date {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    font: 600 16px/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text-primary);
}
.is-today .week-date { background: var(--aka-fill); color: var(--on-aka); }
.week-training {
    display: flex; flex-direction: column; gap: 2px; padding: 6px;
    border-left: 4px solid var(--group-color); border-radius: 0 6px 6px 0;
    background: color-mix(in srgb, var(--group-color) var(--tint), var(--bg-subtle));
}
.week-time { font: 600 12px/16px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-primary); }
.week-group { font: 400 13px/18px var(--font); color: var(--text-body); overflow-wrap: anywhere; }
.week-note {
    align-self: flex-start; margin-top: 2px; padding: 1px 6px; border-radius: 999px;
    background: var(--success-bg); color: var(--success); font: 500 11px/16px var(--font); white-space: nowrap;
}
.float-card {
    position: absolute; display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--border); border-radius: var(--radius-container);
    background: var(--bg); box-shadow: 0 18px 40px -18px rgba(16,24,40,.4);
    font: 400 13px/18px var(--font); color: var(--text-body); white-space: nowrap;
}
.float-card strong { display: block; font: 600 13px/18px var(--font); color: var(--text-primary); }
.float-card-attendance { right: -8px; bottom: 56px; flex-direction: column; align-items: flex-start; gap: 0; }
.float-card-invite { left: -8px; bottom: -24px; }
.float-dot {
    width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%;
    background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent);
}
.week-stage figcaption { margin-top: var(--sp-10); font-size: 13px; color: var(--text-muted); }
/* Five days where the week has the room: stacked tablets and wide desktops (on 960-1199px the hero is split and three fit) */
@media (min-width: 600px) and (max-width: 959px), (min-width: 1200px) {
    .week-days { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .week-day:nth-child(n+4) { display: flex; }
    .week-day { min-height: 300px; }
    .float-card-attendance { right: -24px; }
    .float-card-invite { left: -28px; }
}

/* The knot sits on the black end, as if the band were the belt itself; it lands after the band fills */
.belt-row { position: relative; --gutter: var(--sp-4); }
.belt-knot {
    /* Centered on the black end (the last eighth of the band) and on the band's middle line;
       the band's top margin falls outside the row, so the row starts at the band */
    position: absolute; right: calc(var(--gutter) + (100% - 2 * var(--gutter)) / 16 - 32px); top: -5px;
    fill: var(--belt-black); stroke: var(--bg); stroke-width: 1.5; stroke-linejoin: round;
}
.belt-knot-fold { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 1.5; }
.js .belt-knot { opacity: 0; transform: translateY(-6px) rotate(-8deg); transition: opacity 400ms var(--ease-out) 1100ms, transform 500ms var(--ease-out) 1100ms; }
.js .belt-band.is-revealed + .belt-knot { opacity: 1; transform: none; }
@media (min-width: 600px) { .belt-row { --gutter: var(--sp-6); } }

/* Before and after: the old way quiet, the new way with the topic's color */
.compare { margin-top: var(--sp-10); border: 1px solid var(--border); border-radius: var(--radius-container); overflow: hidden; }
.compare-head { display: none; }
.compare-row { display: grid; gap: var(--sp-2); padding: var(--sp-5); border-left: 4px solid var(--topic); }
.compare-row + .compare-row { border-top: 1px solid var(--border); }
.compare-topic { font-size: 16px; color: var(--topic); }
/* On phones each row shows a small "Before" / "With KarateConnect" label; on wide screens the column heads say it, and the label stays for screen readers only */
.compare-label { display: block; margin-bottom: 2px; font: 500 12px/16px var(--font); color: var(--text-muted); }
@media (min-width: 900px) { .compare-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.compare-before { color: var(--text-muted); }
/* The "after" side carries the emphasis: a green wash (the app's "done" color), full ink, a little heavier */
.compare-after {
    color: var(--text-primary); font-weight: 500;
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-control);
    background: color-mix(in srgb, var(--success) 13%, var(--bg));
}
.compare-after .compare-label { color: var(--text-primary); font-weight: 600; }
/* What kind of effort remains, in a word: the same small green note the app shows on a training */
.compare-tag {
    display: block; width: fit-content; margin-top: var(--sp-2); padding: 1px 8px; border-radius: 999px;
    background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--text-primary); font: 600 12px/18px var(--font);
}
@media (min-width: 900px) {
    .compare-head, .compare-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 0; }
    .compare-head { background: var(--bg-subtle); border-bottom: 1px solid var(--border); border-left: 4px solid transparent; font: 500 14px/20px var(--font); }
    .compare-head span { padding: var(--sp-3) var(--sp-6); color: var(--text-muted); }
    .compare-head span:last-child {
        color: var(--text-primary); font-weight: 600;
        background: color-mix(in srgb, var(--success) 13%, var(--bg-subtle)); box-shadow: inset 0 2px 0 var(--success);
    }
    .compare-topic, .compare-before, .compare-after { padding: var(--sp-5) var(--sp-6); }
    .compare-before, .compare-after { border-left: 1px solid var(--border); }
    .compare-row { isolation: isolate; }
    .compare-after { position: relative; background: none; border-radius: 0; }
    .compare-after::before {
        content: ''; position: absolute; inset: 0; z-index: -1;
        background: color-mix(in srgb, var(--success) 13%, var(--bg));
    }
    .js .compare-row.reveal .compare-after::before {
        clip-path: inset(0 100% 0 0);
        transition: clip-path 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + 420ms);
    }
    .js .compare-row.reveal.is-in .compare-after::before { clip-path: inset(0 0 0 0); }
}

/* What sets us apart: the heading on the left, four plain items on the right, separated by thin lines */
.edge-grid { display: grid; gap: var(--sp-8); }
.edge-item { padding: var(--sp-6) 0; border-top: 1px solid var(--border); }
.edge-item:last-child { border-bottom: 1px solid var(--border); }
.edge-item h3 { font-size: 18px; line-height: 1.3; }
.edge-item p { margin-top: var(--sp-2); max-width: 58ch; color: var(--text-muted); }
@media (min-width: 960px) {
    .edge-grid { grid-template-columns: 5fr 7fr; gap: var(--sp-12); align-items: start; }
    .edge-item:first-child { padding-top: 0; border-top: 0; }
}

/* Everything in one place: calm, neutral tiles, the way expensive product pages do it. A tile is a quiet surface with a thin
   line; only a small dot carries the topic's color (the same dots the app uses for groups) */
.bento { display: grid; gap: var(--sp-3); margin-top: var(--sp-10); }
.tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2);
    padding: var(--sp-6); border-radius: var(--radius-container);
    border: 1px solid var(--border); background: var(--bg-subtle);
    transition: border-color 200ms ease;
}
.tile::before { content: ''; flex: none; width: 8px; height: 8px; margin-bottom: var(--sp-3); border-radius: 50%; background: var(--topic); }
.tile-title { font: 600 18px/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--text-primary); text-wrap: balance; }
.tile-text { max-width: 46ch; margin-bottom: var(--sp-4); font: 400 15px/1.55 var(--font); color: var(--text-muted); }
@media (hover: hover) and (pointer: fine) { .tile:hover { border-color: var(--border-strong); } }
@media (min-width: 600px) {
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tile-wide { grid-column: span 2; }
}
/* Four columns only where each narrow tile still has room for its words */
@media (min-width: 1100px) {
    .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
}

/* Small examples in the tiles and in the "what sets us apart" items. They are decoration (aria-hidden) and each one plays once,
   when its tile comes into view: parts arrive one after another, on a strong ease-out, with transform and opacity only.
   Without scripts, or when the visitor asks for less motion, the finished picture is simply there */
.bento-note { margin-top: var(--sp-4); color: var(--text-muted); font-size: 13px; }
.demo {
    margin-top: auto; width: 100%; display: grid; gap: var(--sp-2); align-content: center; min-height: 104px;
    padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg);
    font: 500 12px/16px var(--font); font-variant-numeric: tabular-nums; color: var(--text-body);
}
.demo b { font-weight: 600; color: var(--text-primary); }
.demo-muted { color: var(--text-muted); font-weight: 400; }
.demo-fees { max-width: 460px; }
.demo-foot { padding-top: var(--sp-2); border-top: 1px solid var(--border); color: var(--text-muted); font-weight: 400; }
.demo-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: var(--sp-3); }
.pill { display: inline-flex; width: fit-content; padding: 1px 8px; border-radius: 999px; font: 600 11px/18px var(--font); white-space: nowrap; }
.pill-ok { background: var(--success-bg); color: var(--success); }
.pill-late { background: var(--warning-bg); color: var(--warning); }

/* Planning: a week of trainings, each in its group's color */
.demo-week { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.dw-day { display: grid; gap: 4px; align-content: start; }
.dw-day:nth-child(n+4) { display: none; }
.dw-wd { color: var(--text-muted); font-weight: 500; }
.dw-chip {
    display: grid; gap: 2px; padding: 6px; border-left: 4px solid var(--c); border-radius: 0 6px 6px 0;
    background: color-mix(in srgb, var(--c) var(--tint), var(--bg)); font-weight: 400; overflow-wrap: anywhere;
}
@media (min-width: 600px) {
    .demo-week { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .dw-day:nth-child(n+4) { display: grid; }
}

/* Attendance: twelve of fourteen filled */
.da-head { font-weight: 400; color: var(--text-muted); }
.da-head b { margin-right: 4px; font: 600 20px/24px var(--font-display); color: var(--text-primary); }
.da-cells { --step: 45ms; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; }
.da-cells span { height: 22px; border-radius: 4px; background: var(--group-1); }
.da-cells .is-out { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }

/* Results: medals drop in one by one */
.dm-row { display: flex; gap: var(--sp-2); }
.dm {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--m);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); color: #fff; font: 700 13px/1 var(--font-display);
}

/* Belt exams: the new belt wipes over the old one */
.db-bar { position: relative; height: 14px; border-radius: 999px; overflow: hidden; }
.db-bar span { position: absolute; inset: 0; }
.db-old { background: var(--belt-yellow); }
.db-new { background: var(--belt-orange); }
.db-label { color: var(--text-muted); font-weight: 400; }

/* A message and its result */
.demo-note { justify-items: start; }
.dn-msg {
    display: grid; gap: 2px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border);
    border-radius: 8px 8px 8px 2px; background: var(--bg-subtle);
}
.dn-msg span { color: var(--text-muted); font-weight: 400; }

/* Documents: four PDF sheets */
.demo-docs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.dd { display: grid; gap: 6px; justify-items: start; }
.dd-sheet {
    display: grid; align-content: start; gap: 4px; width: 100%; max-width: 92px; height: 56px; padding: 8px;
    border: 1px solid var(--border-strong); border-radius: 4px; background: var(--bg-subtle);
}
.dd-sheet i { display: block; height: 3px; border-radius: 2px; background: var(--border-strong); }
.dd-sheet i:first-child { width: 60%; }
.dd-name { color: var(--text-body); font-weight: 500; }
@media (min-width: 600px) { .demo-docs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Joining by link: three steps, the last one approved */
.demo-flow { gap: var(--sp-3); }
.df { display: flex; align-items: center; gap: var(--sp-2); }
.df-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.df .pill { margin-left: auto; }

/* A member's overview: what they can see */
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; align-content: center; }
.dc { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-subtle); }
.dc::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

/* A belt history: the eight belts fill in, white to black */
.dbs-bar { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); height: 12px; border-radius: 999px; overflow: hidden; --step: 80ms; }
.dbs-bar span:nth-child(1) { background: var(--belt-white); }
.dbs-bar span:nth-child(2) { background: var(--belt-yellow); }
.dbs-bar span:nth-child(3) { background: var(--belt-orange); }
.dbs-bar span:nth-child(4) { background: var(--belt-green); }
.dbs-bar span:nth-child(5) { background: var(--belt-blue); }
.dbs-bar span:nth-child(6) { background: var(--belt-purple); }
.dbs-bar span:nth-child(7) { background: var(--belt-brown); }
.dbs-bar span:nth-child(8) { background: var(--belt-black); }

/* In "what sets us apart" the example sits beside the words where there is room, and under them where there is not */
.edge-item { display: grid; gap: var(--sp-4); }
.edge-item .demo { margin-top: 0; min-height: 0; }
@media (min-width: 1100px) {
    .edge-item { grid-template-columns: minmax(0, 1fr) 240px; align-items: center; gap: var(--sp-8); }
}

/* The motion: hidden until the tile is on screen, then each part follows the one before it */
.js .reveal .d {
    opacity: 0; transform: translateY(8px);
    transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
    transition-delay: calc(380ms + var(--k, 0) * var(--step, 80ms) + var(--i, 0) * 70ms);
}
.js .reveal .d-pop { transform: scale(0.9); }
.js .reveal .d-drop { transform: translateY(-12px) scale(0.92); }
.js .reveal .d-rise { transform: translateY(14px) scale(0.97); }
.js .reveal .d-fill { transform: scaleX(0); transform-origin: left center; }
.js .reveal .d-wipe {
    opacity: 1; transform: none; clip-path: inset(0 100% 0 0);
    transition: clip-path 700ms var(--ease-in-out); transition-delay: calc(380ms + var(--i, 0) * 70ms);
}
.js .reveal.is-in .d { opacity: 1; transform: none; }
.js .reveal.is-in .d-wipe { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
    .js .reveal .d, .js .reveal .d-pop, .js .reveal .d-drop, .js .reveal .d-rise, .js .reveal .d-fill { transform: none; transition-property: opacity; }
    .js .reveal .d-wipe { clip-path: none; transition: none; }
}

/* The gi's outline, low in the corner of the red band */
.contact { position: relative; isolation: isolate; overflow: hidden; }
.contact-gi {
    /* Phones: top right, behind the heading, since the form fills the bottom of the band */
    position: absolute; z-index: -1; right: -90px; top: -40px; width: 320px; height: 320px;
    fill: none; stroke: color-mix(in srgb, var(--aka) 55%, transparent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
    rotate: -8deg;
}
/* On wide screens the form covers the right side, so the gi sits large under the offer on the left */
@media (min-width: 960px) { .contact-gi { right: auto; top: auto; left: -40px; bottom: -150px; width: 460px; height: 460px; } }
/* The stitches of the gi move slowly along its lines, a quiet sign of life in the red band.
   Dashes repeat every 24px, so moving them by 48px loops without a seam */
@keyframes gi-stitch { to { stroke-dashoffset: -48; } }
.contact-gi path, .contact-gi rect { stroke-dasharray: 10 14; animation: gi-stitch 7s linear infinite; animation-play-state: paused; }
.contact.is-in .contact-gi path, .contact.is-in .contact-gi rect { animation-play-state: running; }
.contact-gi path:nth-child(2) { animation-duration: 9s; animation-direction: reverse; }
.contact-gi path:nth-child(3) { animation-duration: 11s; }

/* ── Motion ─────────────────────────────────────────────
   One load sequence in the hero (CSS animations: they stay smooth while the page is still loading),
   then each part shows itself once as it comes into view (main.js adds .is-in). Only transform,
   opacity and clip-path move. Everything waits for html.js, so without scripts the page is simply there. */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes settle { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.95); } }
@keyframes fade { from { opacity: 0; } }

/* Hero: the words first, then the week, its trainings day by day, and the two notes last */
.hero-text > * { animation: rise 700ms var(--ease-out) both; }
.hero-text > :nth-child(2) { animation-delay: 80ms; }
.hero-text > :nth-child(3) { animation-delay: 160ms; }
.week-scene { animation: settle 900ms var(--ease-out) 150ms both; }
.week-day:nth-child(1) { --d: 0ms; }
.week-day:nth-child(2) { --d: 70ms; }
.week-day:nth-child(3) { --d: 140ms; }
.week-day:nth-child(4) { --d: 210ms; }
.week-day:nth-child(5) { --d: 280ms; }
.week-training { animation: pop 450ms var(--ease-out) both; animation-delay: calc(550ms + var(--d, 0ms)); }
.week-training + .week-training { animation-delay: calc(610ms + var(--d, 0ms)); }
.float-card { animation: pop 550ms var(--ease-out) both; }
.float-card-attendance { animation-delay: 1150ms; }
.float-card-invite { animation-delay: 1300ms; }
.week-stage figcaption { animation: fade 600ms ease 1300ms both; }

/* Reveal on view: up a little and in; groups follow one another (--i is set by main.js) */
.js .reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Before and after: the old way comes first, the new way follows it in from the side */
.js .compare-row.reveal .compare-after {
    opacity: 0; transform: translateX(-12px);
    transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 70ms + 220ms);
}
.js .compare-row.reveal.is-in .compare-after { opacity: 1; transform: none; }

/* Steps: revealed one at a time, in their order. Each square comes in, its words follow,
   then a line draws on to the next square (across on wide screens, down on phones) */
.step { position: relative; }
.js .steps .step::before, .js .steps .step > * { opacity: 0; }
.js .steps .step::before { transform: scale(0.9); transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out); }
.js .steps .step > * { transform: translateX(-10px); transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out); }
.js .steps.is-in .step::before, .js .steps.is-in .step > * { opacity: 1; transform: none; }
.step:nth-child(1) { --s: 0ms; }
.step:nth-child(2) { --s: 550ms; }
.step:nth-child(3) { --s: 1100ms; }
.step:nth-child(4) { --s: 1650ms; }
.js .steps .step::before { transition-delay: var(--s); }
.js .steps .step > * { transition-delay: calc(var(--s) + 150ms); }
.js .steps .step > p { transition-delay: calc(var(--s) + 220ms); }
.step:not(:last-child)::after {
    content: ''; position: absolute; background: color-mix(in srgb, var(--aka-fill) 45%, var(--border));
    left: 21px; top: 52px; bottom: calc(-1 * var(--sp-8) + 8px); width: 2px;
    transform-origin: center top;
}
.js .steps .step:not(:last-child)::after { transform: scaleY(0); transition: transform 400ms var(--ease-out); transition-delay: calc(var(--s) + 300ms); }
.js .steps.is-in .step:not(:last-child)::after { transform: none; }
@media (min-width: 960px) {
    /* On wide screens the square sits above its words, so the line to the next square crosses nothing */
    .steps { row-gap: var(--sp-4); grid-template-rows: auto auto 1fr; }
    .step { grid-template-columns: 1fr; grid-row: span 3; grid-template-rows: subgrid; row-gap: var(--sp-4); }
    .step::before { grid-row: auto; }
    .step h3, .step p { grid-column: 1; }
    .step h3 { min-height: 0; align-self: start; }
    .step:not(:last-child)::after { left: 56px; right: calc(-1 * var(--sp-8) + 12px); top: 21px; bottom: auto; width: auto; height: 2px; transform-origin: left center; }
    .js .steps .step:not(:last-child)::after { transform: scaleX(0); }
}

/* Screenshots open from the top down, like a window being pulled down */
.js .shot.reveal { opacity: 1; transform: none; }
.js .shot.reveal > .shot-frame, .js .shot.reveal > img {
    clip-path: inset(0 0 100% 0 round var(--radius-container));
    transition: clip-path 800ms var(--ease-out) 100ms;
}
.js .shot.reveal.is-in > .shot-frame, .js .shot.reveal.is-in > img { clip-path: inset(0 0 0 0 round var(--radius-container)); }

/* Roles: the colored line on top draws from left to right */
.js .role.reveal { position: relative; border-top-color: transparent; }
.js .role.reveal::before {
    content: ''; position: absolute; top: -3px; left: 0; right: 0; height: 3px; background: var(--topic, var(--primary));
    transform: scaleX(0.04); transform-origin: left center;
    transition: transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 150ms);
}
.js .role.reveal.is-in::before { transform: none; }

/* A question opens: its answer slides in just under it */
.faq-list details[open] p { animation: rise 260ms var(--ease-out); }

/* Contact: the gi's outline turns into place when the band comes in */
.js .contact-gi { transition: rotate 1200ms var(--ease-out), opacity 1200ms var(--ease-out); rotate: -20deg; opacity: 0; }
.js .contact.is-in .contact-gi { rotate: -8deg; opacity: 1; }

/* Today: the red date lands after the week's trainings, and a ring goes out from it once, the "now" of the week */
@keyframes ring { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
.is-today .week-date { position: relative; animation: pop 450ms var(--ease-out) 950ms both; }
.is-today .week-date::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--aka-fill); opacity: 0;
    animation: ring 900ms var(--ease-out) 1300ms both;
}

/* The week leans toward the pointer, on a spring (main.js); the notes in front move a little more, for depth */
.week-scene { perspective: 1400px; }
.week-days { transform-style: preserve-3d; will-change: transform; }

/* Questions open and close in their height (an accordion is the one place height may move);
   browsers without ::details-content simply open at once */
:root { interpolate-size: allow-keywords; }
.faq-list details::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size 260ms var(--ease-out), content-visibility 260ms allow-discrete;
}
.faq-list details[open]::details-content { block-size: auto; }

/* Loading screen: plain page background, centered mark, a belt that fills from white to black, and one quiet word.
   Only with scripts on (html.js), so it can never be left covering the page; as a last guard it hides itself after 6s */
.page-loader { display: none; }
.js .page-loader {
    display: grid; place-items: center; position: fixed; inset: 0; z-index: 50;
    background: var(--bg);
    animation: loader-guard 0s linear 6s forwards;
}
.page-loader.is-done { opacity: 0; visibility: hidden; transition: opacity 400ms var(--ease-out), visibility 0s linear 400ms; }
@keyframes loader-guard { to { opacity: 0; visibility: hidden; } }
.loader-inner { display: grid; justify-items: center; gap: var(--sp-5); }
/* The mark and the word come in a moment later, so a fast load shows only a calm, empty page */
@keyframes loader-in { from { opacity: 0; } to { opacity: 1; } }
.loader-mark, .loader-text { opacity: 0; animation: loader-in 400ms var(--ease-out) 250ms forwards; }
/* The hero's own entrance waits behind the loading screen and starts as it fades */
.js:not(.is-ready) :is(.hero-text > *, .week-scene, .week-training, .float-card, .week-stage figcaption, .is-today .week-date) { animation-play-state: paused; }
.js:not(.is-ready) .is-today .week-date::after { animation-play-state: paused; }
.loader-mark { width: 36px; height: 36px; border-radius: var(--radius-control); }
/* The portal's sign-in bar, under the mark: the belts in their order, white to black, sliding at the same speed
   (the pattern twice over, so the slide loops without a jump). The black belt a little lighter on a dark page */
.loader-bar {
    --loader-black: #111111;
    position: relative; display: block; width: 168px; height: 4px; border-radius: 999px; overflow: hidden;
    background: linear-gradient(to right,
        #e5e7eb 0 7.14%, #facc15 7.14% 14.28%, #f97316 14.28% 21.42%, #16a34a 21.42% 28.57%,
        #2563eb 28.57% 35.71%, #78350f 35.71% 42.85%, var(--loader-black) 42.85% 50%,
        #e5e7eb 50% 57.14%, #facc15 57.14% 64.28%, #f97316 64.28% 71.42%, #16a34a 71.42% 78.57%,
        #2563eb 78.57% 85.71%, #78350f 85.71% 92.85%, var(--loader-black) 92.85% 100%) 0 0 / 200% 100%;
    animation: belts-slide 1.4s linear infinite;
}
:root[data-theme="dark"] .loader-bar { --loader-black: #52525b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .loader-bar { --loader-black: #52525b; } }
@keyframes belts-slide { from { background-position: 0 0; } to { background-position: -200% 0; } }
.loader-text { font: 500 13px/18px var(--font); color: var(--text-muted); letter-spacing: 0.02em; }

/* Skeleton: a screenshot that is still loading shows its frame with a soft light passing over it */
.shot { position: relative; }
.shot.is-loading > img { opacity: 0; }
.shot > img { transition: opacity 300ms var(--ease-out); }
.shot.is-loading::after {
    content: ''; position: absolute; inset: 0 0 auto 0; aspect-ratio: 16 / 10; border-radius: var(--radius-container);
    background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--text-primary) 6%, transparent) 50%, transparent 70%);
    background-size: 200% 100%; animation: skeleton 1.4s linear infinite; pointer-events: none;
}
@keyframes skeleton { from { background-position: 150% 0; } to { background-position: -50% 0; } }

@media (prefers-reduced-motion: reduce) {
    .loader-bar { animation: none; }
    .shot.is-loading::after { animation: none; }
    .contact-gi path, .contact-gi rect { animation: none; }
    .btn-label, .btn-label.is-swapping { filter: none; }
    .inquiry.is-sent .inquiry-fields { filter: none; transform: none; }
    .inquiry-done { transform: none; }
    .mobile-menu, .mobile-menu.is-open { transition: visibility 0s; }
    .menu-btn span { transition: opacity 150ms ease; }
    .theme-btn svg { transition: opacity 200ms ease; }
    .theme-btn .icon-sun, .is-dark .theme-btn .icon-moon { transform: none; filter: none; }
    .js .compare-row.reveal .compare-after::before { clip-path: none; transition: none; }
    .is-today .week-date { animation-name: fade; }
    .is-today .week-date::after { animation: none; }
    .faq-list details::details-content { transition: none; }
    /* Fewer and gentler: the hero and the reveals only fade, nothing moves or wipes */
    .hero-text > *, .week-scene, .week-training, .float-card { animation-name: fade; }
    .js .reveal, .js .compare-row.reveal .compare-after { transform: none; }
    .js .tile.reveal::before, .js .shot.reveal > .shot-frame, .js .shot.reveal > img { clip-path: none; transition: none; }
    .js .steps .step::before, .js .steps .step > *, .js .steps .step:not(:last-child)::after { transform: none; }
    .js .role.reveal::before { transform: none; transition: none; }
    .faq-list details[open] p { animation-name: fade; }
    .js .contact-gi { rotate: -8deg; transition: opacity 600ms ease; }
    .js .belt-knot { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
    .btn, .faq-list summary::after { transition: none; }
    .nav-indicator { transition: opacity 150ms ease; }
    .btn:active { transform: none; }
    .js .belt-band { clip-path: none; transition: none; }
}

/* ── Living screenshots ───────────────────────────────────────────────────────────────────────
   Over a real screenshot a small card arrives once the picture is on screen (the same way as the examples in the tiles),
   and the cards lean a few pixels against the pointer, so the picture and the cards seem to sit at two depths.
   Two screens are not pictures at all but small working models of the app that the visitor can try */
.shot { position: relative; }
.sc-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* The working models share one look: the app's own card, row and button */
.mock {
    position: relative; border: 1px solid var(--border); border-radius: var(--radius-container);
    background: var(--bg); box-shadow: 0 24px 60px -28px rgba(16, 24, 40, .35); font: 400 14px/20px var(--font); color: var(--text-body);
    font-variant-numeric: tabular-nums;
}
.mock b { font-weight: 600; color: var(--text-primary); }
.mock small { display: block; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.mock-head { padding: var(--sp-4) var(--sp-4) var(--sp-2); }
.mock-title { font: 600 18px/24px var(--font-display); color: var(--text-primary); }
.mock-sub { color: var(--text-muted); font-size: 13px; }
.mock-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4) var(--sp-3); }
.mock-count { font-weight: 600; color: var(--text-primary); }
.mock-btn {
    min-height: 36px; padding: 0 var(--sp-3); border: 1px solid var(--border-strong); border-radius: var(--radius-control);
    background: var(--bg); color: var(--text-primary); font: 500 13px/20px var(--font); cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.mock-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .mock-btn:hover { background: var(--state-hover); } }
.mock button:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }

/* Attendance */
.mock-list { list-style: none; margin: 0 var(--sp-4) var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-control); overflow: hidden; }
.mock-row {
    display: flex; align-items: center; gap: var(--sp-3); padding: 6px var(--sp-3) 6px var(--sp-3); border-left: 3px solid transparent;
    border-top: 1px solid var(--border); transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.mock-row:first-child { border-top: 0; }
.mock-name { flex: 1; min-width: 0; font-weight: 500; color: var(--text-primary); overflow-wrap: anywhere; }
.mock-belt { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.mock-belt i { width: 22px; height: 6px; border-radius: 3px; background: var(--b); }
.mock-toggles { display: flex; gap: 6px; }
.mock-t {
    display: grid; place-items: center; width: 40px; height: 36px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-control);
    background: var(--bg); color: var(--text-muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.mock-t:active { transform: scale(0.94); }
.mock-t svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mock-row.is-present { background: color-mix(in srgb, var(--success) 9%, var(--bg)); border-left-color: var(--success); }
.mock-row.is-absent { background: color-mix(in srgb, var(--danger) 8%, var(--bg)); border-left-color: var(--danger); }
.mock-row.is-absent .mock-name { color: var(--text-muted); font-weight: 400; }
.mock-t[aria-pressed="true"].mock-yes { background: var(--success); border-color: var(--success); color: var(--bg); }
.mock-t[aria-pressed="true"].mock-no { background: var(--danger); border-color: var(--danger); color: var(--bg); }
@media (max-width: 439px) { .mock-belt { display: none; } .mock-t { width: 44px; height: 40px; } }

/* Fees */
.mock-sum { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-4) var(--sp-3); }
.mock-label { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.mock-big { font-size: 14px; color: var(--text-muted); }
.mock-big b { font: 600 22px/28px var(--font-display); color: var(--text-primary); }
.mock-right { text-align: right; font-size: 13px; }
.mock-meter { height: 8px; margin: 0 var(--sp-4) var(--sp-3); border-radius: 999px; background: var(--bg-subtle); overflow: hidden; }
.mock-meter span { display: block; height: 100%; border-radius: 999px; background: var(--success); transform-origin: left center; transform: scaleX(var(--s, .72)); transition: transform 280ms var(--ease-out); }
.mock-table { width: calc(100% - 2 * var(--sp-4)); margin: 0 var(--sp-4) var(--sp-4); border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: var(--radius-control); overflow: hidden; }
.mock-table th { padding: 8px var(--sp-3); background: var(--bg-subtle); text-align: left; font: 500 12px/16px var(--font); color: var(--text-muted); }
.mock-table th:not(:first-child), .mock-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.mock-table td { padding: 8px var(--sp-3); border-top: 1px solid var(--border); vertical-align: middle; }
.mock-table td:first-child { overflow-wrap: anywhere; }
.mock-table .num { font-weight: 600; color: var(--text-primary); }
.mock-paid { font-weight: 600; color: var(--success); }
.mock-table .mock-btn { min-height: 32px; font-size: 12px; }
.mock-toast {
    position: absolute; right: var(--sp-4); top: -14px; display: flex; align-items: center; gap: var(--sp-2); max-width: calc(100% - 2 * var(--sp-3));
    padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg);
    box-shadow: 0 16px 36px -16px rgba(16, 24, 40, .45); font: 500 13px/18px var(--font); color: var(--text-primary);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.mock-toast.is-on { opacity: 1; transform: none; }
.mock-toast:not(.is-on) { transition-duration: 150ms; }
.mock-reset { margin-left: var(--sp-2); padding: 0; border: 0; background: none; color: var(--text-primary); font: 500 13px/20px var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mock-reset[hidden] { display: none; }
.shot figcaption { display: flex; flex-wrap: wrap; align-items: center; }

@media (prefers-reduced-motion: reduce) {
    .mock-row, .mock-t, .mock-btn, .mock-meter span, .mock-toast { transition: none; }
    .mock-toast { transform: none; }
}

/* ── The screens, built in code ─────────────────────────────────────────────────────────────────
   Each screen of the app that the page shows is drawn here in plain HTML and CSS, the way the app looks (same fonts, radii and
   colors as the app, in light and dark). They are static pictures made of text: sharp at any size, in both languages */
.feature-wide { grid-column: 1 / -1; min-width: 0; }
.sm { font: 400 13px/18px var(--font); color: var(--text-body); font-variant-numeric: tabular-nums; }
.sm b { font-weight: 600; color: var(--text-primary); }
.sm small { display: block; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.sm-h { font: 600 15px/22px var(--font-display); color: var(--text-primary); }
.sm-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg-subtle); }
.sm-seg > span { padding: 5px 12px; border-radius: 6px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.sm-seg > span.is-on { background: var(--bg); color: var(--text-primary); box-shadow: 0 0 0 1px var(--border); }
.sm-seg b { margin-left: 4px; color: inherit; }
.sm-select {
    position: relative; display: inline-flex; flex-direction: column; justify-content: center; min-width: 124px; min-height: 36px; box-sizing: border-box; padding: 2px 30px 2px 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--bg); color: var(--text-primary); font-weight: 500;
}
.sm-select small { font-size: 10px; line-height: 12px; }
.sm-select::after { content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-70%) rotate(45deg); }
.sm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-control); background: var(--bg); color: var(--text-primary); font-weight: 500; white-space: nowrap;
}
.sm-dark { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.sm-link { font-weight: 500; color: var(--text-primary); }
.sm-red { color: var(--danger); }
.sm-card { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-container); background: var(--bg); }
.sm-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Results */
.sm-results { display: grid; gap: 12px; padding: 14px; }
.sm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sm-toolbar > span:first-child { display: flex; gap: 8px; flex-wrap: wrap; }
.sm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sm-tile {
    --m: var(--medal-gold); display: grid; justify-items: center; padding: 10px 6px; border: 1px solid color-mix(in srgb, var(--m) 60%, var(--bg));
    border-radius: 10px; background: color-mix(in srgb, var(--m) 14%, var(--bg)); color: var(--text-muted);
}
.sm-tile b { font: 600 20px/24px var(--font-display); }
.sm-tile.is-silver { --m: var(--medal-silver); }
.sm-tile.is-bronze { --m: var(--medal-bronze); }
.sm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; color: var(--text-muted); }
.sm-stats b { display: block; font-size: 15px; line-height: 20px; }
.sm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-cols .sm-card { padding: 12px 14px; min-width: 0; }
.sm-th, .sm-trow { display: grid; grid-template-columns: 18px minmax(0, 1fr) repeat(3, 40px); gap: 4px; align-items: center; }
.sm-th { margin-top: 6px; font-size: 10.5px; line-height: 16px; color: var(--text-muted); text-align: center; }
.sm-th span:first-child { grid-column: 1 / 3; text-align: left; }
.sm-cols .sm-card + .sm-card .sm-th, .sm-cols .sm-card + .sm-card .sm-trow { grid-template-columns: minmax(0, 1fr) repeat(3, 40px); }
.sm-cols .sm-card + .sm-card .sm-th span:first-child { grid-column: 1; }
.sm-trow { padding: 5px 0; border-top: 1px solid var(--border); }
.sm-trow:first-of-type { margin-top: 4px; }
.sm-trow > span:first-child { color: var(--text-muted); }
.sm-trow > span:nth-child(2), .sm-cols .sm-card + .sm-card .sm-trow > span:first-child { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-n { display: grid; place-items: center; height: 22px; border-radius: 6px; font-size: 12px; color: var(--text-primary); background: color-mix(in srgb, var(--medal-gold) 16%, var(--bg)); }
.sm-n.is-s { background: color-mix(in srgb, var(--medal-silver) 18%, var(--bg)); }
.sm-n.is-b { background: color-mix(in srgb, var(--medal-bronze) 16%, var(--bg)); }
@media (max-width: 599px) { .sm-cols { grid-template-columns: 1fr; } }

/* Dialogs sit on a calm stage, the way product pages show them */
.mock.sm-stage { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
.sm-dialog {
    width: 100%; min-width: 0; max-width: 470px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-container); background: var(--bg);
    box-shadow: 0 24px 60px -28px rgba(16, 24, 40, .4);
}
.sm-title { font: 600 18px/24px var(--font-display); color: var(--text-primary); }
.sm-lead { margin-top: 6px; color: var(--text-muted); }
.sm-textarea { position: relative; margin-top: 18px; padding: 14px; border: 2px solid var(--text-primary); border-radius: 10px; line-height: 22px; color: var(--text-primary); }
.sm-legend { position: absolute; top: -10px; left: 10px; padding: 0 5px; background: var(--bg); font-size: 11px; line-height: 16px; }
.sm-full { display: flex; width: 100%; min-height: 42px; margin-top: 16px; }
.sm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; margin-top: 10px; text-align: center; }
.sm-dialog .sm-card { margin-top: 14px; padding: 14px; }
.sm-dialog .sm-card:first-of-type { margin-top: 16px; }
.sm-status { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sm-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.sm-status small { display: inline; }
.sm-field { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg-subtle); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-hint { margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.sm-pair { display: flex; align-items: center; gap: 18px; margin-top: 10px; }
.sm-request { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); }
.sm-request > span:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 190px; }
.sm-request > span:last-child { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
.sm-check { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--border-strong); border-radius: 4px; background: var(--bg); }
.sm-check.is-on { border-color: var(--text-primary); background: var(--text-primary); }
.sm-check.is-on::after { content: ''; display: block; width: 4px; height: 8px; margin: 1px 0 0 5px; border-right: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: rotate(40deg); }

/* Report: the options and, beside them, the PDF page (a page stays white in the dark theme too, it is a document) */
.sm-report { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; }
.sm-report .sm-card { padding: 12px 14px; }
.sm-report .sm-card + .sm-card { margin-top: 10px; }
.sm-ctitle { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sm-ctitle span { font-size: 12px; color: var(--text-muted); }
.sm-report .sm-seg { margin-top: 10px; display: flex; }
.sm-report .sm-seg > span { flex: 1; text-align: center; padding: 5px 4px; }
.sm-range { margin-top: 8px; text-align: center; color: var(--text-primary); }
.sm-range small { display: block; }
.sm-opts { margin-top: 8px; display: grid; gap: 8px; }
.sm-opts p { display: flex; align-items: flex-start; gap: 10px; }
.sm-opts p > span:last-child { display: block; min-width: 0; }
.sm-opts b { display: block; font-weight: 500; }
.sm-opts small { margin-top: 0; }
.sm-group { margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.sm-paper {
    min-width: 0; padding: 16px 16px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: #1a1a1a;
    font: 400 7.6px/1.35 var(--font); box-shadow: 0 18px 40px -22px rgba(16, 24, 40, .5);
}
.sm-paper b { color: #111; font-weight: 600; }
.sm-paper .p-org { font-size: 9px; font-weight: 600; }
.sm-paper .p-sub { color: #666; font-size: 7px; }
.sm-paper .p-rule { height: 1.5px; margin: 3px 0 6px; background: #1d4ed8; }
.sm-paper h4 { margin: 0; font: 600 16px/1.2 var(--font-display); color: #1d4ed8; }
.sm-paper h5 { margin: 8px 0 4px; font: 600 9.5px/1.2 var(--font-display); color: #1d4ed8; }
.sm-paper .p-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sm-paper .p-boxes.is-3 { grid-template-columns: repeat(3, 1fr); }
.sm-paper .p-box { padding: 4px 5px; border-radius: 3px; background: #f1f3f6; color: #556; font-size: 6.4px; white-space: nowrap; }
.sm-paper .p-box strong { display: block; font: 600 12px/1.2 var(--font-display); color: #1d4ed8; }
.sm-paper .p-line { margin-top: 4px; font-size: 7.4px; white-space: nowrap; }
.sm-paper .p-bar { display: grid; grid-template-columns: 74px 1fr 22px; white-space: nowrap; gap: 6px; align-items: center; margin-top: 2px; font-size: 7px; }
.sm-paper .p-bar i { display: block; height: 4px; border-radius: 2px; background: #1d4ed8; width: var(--w); }
.sm-paper .p-bar span:last-child { font-weight: 600; text-align: right; }
.sm-paper .p-grp { margin-top: 6px; font-weight: 600; font-size: 8px; }
.sm-paper .p-grp span { font-weight: 400; color: #667; margin-left: 4px; }
.sm-paper table { width: 100%; margin-top: 2px; border-collapse: separate; border-spacing: 0; }
.sm-paper th { padding: 2px 3px; background: #e8edf7; text-align: left; font-weight: 600; color: #223; }
.sm-paper td { padding: 2px 3px; border-top: 0.5px solid #e2e4e8; }
.sm-paper th:nth-child(n+3), .sm-paper td:nth-child(n+3) { text-align: right; }
.sm-paper td:last-child { font-weight: 600; }
@media (max-width: 599px) { .sm-report { grid-template-columns: 1fr; } .sm-paper { font-size: 8.4px; } }

/* A belt exam */
.sm-exam { display: grid; gap: 10px; padding: 16px; }
/* The button and the search field on one row, the hint under them on one line, right above the table. The hint's
   wrapper dissolves, so the button and the hint are grid items of the row. (On a phone they stack: see below) */
.sm-examtop { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; }
.sm-examtop > div { display: contents; }
.sm-examtop .sm-btn { grid-column: 1 / -1; justify-self: start; }
.sm-examtop .sm-hint2 { margin-top: 0; }
@media (min-width: 720px) {
    .sm-examtop .sm-btn { grid-column: 1; grid-row: 1; }
    .sm-examtop .sm-search { grid-column: 2; grid-row: 1; }
    .sm-examtop .sm-hint2 { grid-column: 1 / -1; grid-row: 2; }
}
.sm-exam .sm-seg { display: flex; justify-self: stretch !important; }
.sm-exam .sm-seg > span { flex: 1; text-align: center; }
.sm-search { display: inline-flex; align-items: center; min-width: 180px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-control); color: var(--text-muted); }
.sm-hint2 { margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.sm-erows { border: 1px solid var(--border); border-radius: var(--radius-control); overflow: hidden; }
.sm-ehead { display: flex; justify-content: space-between; padding: 7px 12px; background: var(--bg-subtle); font-size: 11px; line-height: 16px; color: var(--text-muted); }
.sm-erow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 12px; border-top: 1px solid var(--border); }
.sm-erow b { display: block; }
.sm-erow small.is-warn { color: var(--warning); }
.sm-belts { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.sm-belts i { width: 24px; height: 7px; border-radius: 3px; background: var(--b); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 12%, transparent); }
.sm-belts i.is-ws { background: linear-gradient(90deg, var(--belt-white) 58%, var(--belt-yellow) 58%); }
.sm-toggle { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg-subtle); }
.sm-toggle span { padding: 5px 12px; border-radius: 6px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.sm-toggle .is-pass { background: var(--bg); color: var(--success); box-shadow: 0 0 0 1px var(--border); }
.sm-toggle .is-fail { background: var(--bg); color: var(--danger); box-shadow: 0 0 0 1px var(--border); }

/* The month of trainings, full width under the schedule and attendance text */
.sm-cal { padding: 14px; }
.sm-caltop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sm-month { display: flex; align-items: center; gap: 16px; font: 600 18px/24px var(--font-display); color: var(--text-primary); }
.sm-month .sm-ico { color: var(--text-muted); }
.sm-calright { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sm-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-control) var(--radius-control) 0 0; background: var(--bg-subtle); }
.sm-wd span { padding: 7px 0; text-align: center; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.sm-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--border); border-radius: 0 0 var(--radius-control) var(--radius-control); background: var(--border); overflow: hidden; }
.sm-day { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 92px; padding: 8px 8px; background: var(--bg); }
.sm-day.is-out { background: var(--bg-subtle); }
.sm-day.is-out .sm-n2 { color: var(--text-muted); }
.sm-day.is-out .sm-t { background: transparent; border-left-color: color-mix(in srgb, var(--c) 45%, var(--bg-subtle)); }
.sm-day.is-out .sm-t b, .sm-day.is-out .sm-g { color: var(--text-muted); }
.sm-day.is-today { background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--border-strong); border-radius: 8px; }
.sm-n2 { align-self: flex-start; font: 500 13px/22px var(--font); color: var(--text-primary); }
.sm-day.is-today .sm-n2 { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--aka-fill); color: var(--on-aka); }
.sm-t {
    display: flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 6px; border-left: 3px solid var(--c); border-radius: 0 4px 4px 0;
    background: color-mix(in srgb, var(--c) var(--tint), var(--bg)); font: 500 12px/16px var(--font); white-space: nowrap; overflow: hidden;
}
.sm-t b { color: var(--text-primary); }
.sm-g { overflow: hidden; text-overflow: ellipsis; color: var(--text-body); font-weight: 400; }
.sm-legend2 { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.sm-legend2 span { display: inline-flex; align-items: center; gap: 6px; }
.sm-legend2 i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
@media (max-width: 719px) {
    .sm-g { display: none; }
    .sm-day { min-height: 70px; padding: 4px 3px; gap: 3px; }
    .sm-t { padding: 2px 3px; font-size: 10.5px; gap: 0; }
    .sm-n2 { font-size: 12px; }
    .sm-calright .sm-select { display: none; }
}

/* The schedule can be seen three ways, as in the app: a list, a week and a month. The switch is the same segmented control */
.sm-seg button {
    padding: 5px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font: 500 13px/18px var(--font);
    white-space: nowrap; cursor: pointer; transition: background-color 150ms ease, color 150ms ease;
}
.sm-seg button[aria-selected="true"] { background: var(--bg); color: var(--text-primary); box-shadow: 0 0 0 1px var(--border); }
@media (hover: hover) and (pointer: fine) { .sm-seg button:hover { color: var(--text-primary); } }
.sm-seg button:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
html:not(.js) .sm-seg button { pointer-events: none; }
.sm-panel[hidden] { display: none; }
.sm-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--border); overflow: hidden; }
.sm-wcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 300px; padding: 10px 8px; background: var(--bg); }
.sm-wcol.is-today { background: var(--bg-subtle); }
.sm-wh { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 6px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.sm-wh b { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; font: 600 15px/1 var(--font-display); color: var(--text-primary); }
.sm-wcol.is-today .sm-wh b { background: var(--aka-fill); color: var(--on-aka); }
.sm-w {
    display: grid; gap: 1px; padding: 6px 7px; border-left: 3px solid var(--c); border-radius: 0 5px 5px 0;
    background: color-mix(in srgb, var(--c) var(--tint), var(--bg)); font-size: 12px; line-height: 16px;
}
.sm-w b { font-size: 11.5px; color: var(--text-primary); white-space: nowrap; }
.sm-w span { color: var(--text-body); overflow-wrap: anywhere; }
.sm-list { display: grid; gap: 14px; }
.sm-lday { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sm-lh { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--bg-subtle); font-weight: 600; color: var(--text-primary); }
.sm-today { padding: 1px 9px; border-radius: 999px; background: var(--aka-fill); color: var(--on-aka); font: 600 11px/18px var(--font); }
.sm-lrow {
    display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px 11px 11px;
    border-top: 1px solid var(--border); border-left: 3px solid var(--c);
}
.sm-lrow small { margin: 0; }
.sm-lg { font-weight: 500; color: var(--text-primary); }
@media (max-width: 719px) {
    .sm-week { grid-template-columns: minmax(0, 1fr); }
    .sm-wcol { flex-direction: row; flex-wrap: wrap; align-items: center; min-height: 0; padding: 8px 10px; }
    .sm-wh { flex-direction: row; gap: 8px; width: 64px; margin: 0; }
    .sm-w { flex: 1 1 130px; }
    .sm-lrow { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { .sm-seg button { transition: none; } }

/* The schedule is the first function and wide: its words on top, the month of trainings full width under them */
.feature.feature-stack { grid-template-columns: minmax(0, 1fr); }
.feature-stack .feature-text { max-width: 780px; }

/* ── The screens arrive part by part (the animate skill, Emil Kowalski's rules) ───────────────────────
   Each screen builds itself once, when it comes into view: its parts follow one another on a strong ease-out, a few tens of
   milliseconds apart, so the eye is led from the top down. Only transform and opacity move. Keyframes run on their own and
   never touch the hover and press transitions of the parts. Until the screen is in view its parts wait, invisible (only when
   scripts run); with less motion they only fade */
@keyframes a-in { from { opacity: var(--a-o, 0); transform: var(--a-tf, translateY(8px)); } }
.a { --a-tf: translateY(8px); }
.a-pop { --a-tf: scale(0.94); }
.a-rise { --a-tf: translateY(14px) scale(0.985); }
.a-slide { --a-tf: translateX(16px); }
.a-fill { --a-tf: scaleX(0); --a-o: 1; transform-origin: left center; }
.js .reveal:not(.is-in) .a { opacity: 0; }
.js .reveal:not(.is-in) .a-fill { opacity: 1; transform: scaleX(0); }
.js .reveal.is-in .a { animation: a-in 440ms var(--ease-out) backwards; animation-delay: calc(260ms + var(--at, 0ms) + var(--i, 0) * 70ms); }
.js .reveal.is-in .a-fill { animation-duration: 640ms; }
/* A new view of the schedule fades up a little when it is chosen */
.sm-panel { transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style { .sm-panel { opacity: 0; transform: translateY(6px); } }
.sm-panel.is-instant { transition: none; }
.ln { display: block; }
@media (prefers-reduced-motion: reduce) {
    .a, .a-pop, .a-rise, .a-slide, .a-fill { --a-tf: none; }
    @starting-style { .sm-panel { transform: none; } }
    .js .reveal:not(.is-in) .a-fill { transform: none; }
    .js .reveal.is-in .a { animation-duration: 300ms; }
}

/* Pressed: every pressable part answers the finger a little, as the buttons do */
.sm-seg button, .header-nav a, .menu-links a, .footer-col a, .faq-list summary {
    transition-property: color, background-color, transform; transition-duration: 150ms, 150ms, 160ms; transition-timing-function: ease, ease, var(--ease-out);
}
.sm-seg button:active, .header-nav a:active, .menu-links a:active, .footer-col a:active { transform: scale(0.97); }
.faq-list summary:active { transform: scale(0.992); }
@media (prefers-reduced-motion: reduce) {
    .contact-gi path, .contact-gi rect, .shot.is-loading::after { animation: none; }
    .sm-seg button:active, .header-nav a:active, .menu-links a:active, .footer-col a:active, .faq-list summary:active { transform: none; }
}

/* A quiet line under the schedule: its view can be changed */
.feature-note { margin-top: var(--sp-3); font-size: 13px; line-height: 20px; color: var(--text-muted); }

/* The month on a phone: the way the app draws it, small. A number for each day, a dot of the group's color under it for each
   training, today in a red circle in a soft box. The names of the groups are in the legend below */
.sm-mini { display: none; }
.sm-mwd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sm-mwd span { padding: 8px 0; text-align: center; font: 500 12px/16px var(--font); color: var(--text-muted); }
.sm-mdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.sm-md { display: grid; justify-items: center; align-content: start; gap: 3px; min-height: 54px; padding: 7px 0 6px; background: var(--bg); }
.sm-md.is-out { background: var(--bg-subtle); }
.sm-mn { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; font: 500 14px/1 var(--font); color: var(--text-primary); }
.sm-md.is-out .sm-mn { color: var(--text-muted); }
.sm-md.is-today { background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--border-strong); border-radius: 8px; }
.sm-md.is-today .sm-mn { background: var(--aka-fill); color: var(--on-aka); }
.sm-dots { display: flex; gap: 3px; min-height: 6px; }
.sm-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.sm-md.is-out .sm-dots { opacity: 0.55; }
@media (max-width: 719px) {
    .sm-cal { padding: 12px; }
    .sm-panel .sm-wd, .sm-panel .sm-days { display: none; }
    .sm-mini { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-container); background: var(--bg); }
    .sm-mwd { border-bottom: 1px solid var(--border); }
    .sm-calright > .sm-btn { display: none; }
    .sm-caltop { margin-bottom: 10px; }
    .sm-month { font-size: 17px; gap: 10px; }
}

/* On a phone the controls of the sample screens span the whole width of the screen, as one would use them with a thumb:
   the schedule's switch, the results' two lists and their switch, the belt exam's switches and the search field */
@media (max-width: 719px) {
    .sm-calright { width: 100%; }
    .sm-calright .sm-seg { display: flex; width: 100%; }
    .sm-calright .sm-seg button { flex: 1; text-align: center; }

    .sm-toolbar > span:first-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .sm-toolbar .sm-seg { display: flex; width: 100%; }
    .sm-toolbar .sm-seg > span { flex: 1; text-align: center; padding-left: 4px; padding-right: 4px; }

    .sm-exam .sm-seg > span { padding-left: 4px; padding-right: 4px; }
    .sm-examtop { grid-template-columns: minmax(0, 1fr); }
    .sm-examtop .sm-btn { justify-self: stretch; }
    .sm-search { display: flex; width: 100%; box-sizing: border-box; }
    .sm-erow .sm-toggle { display: flex; flex: 1 1 100%; }
    .sm-erow .sm-toggle span { flex: 1; text-align: center; padding-left: 4px; padding-right: 4px; }
}
