/*
  Va'a Coaching website design system (vaacoaching.com and the member portal). See docs/website-design.md.

  Layers, top to bottom:
    1. Tokens       colour (light + dark), spacing (8-px scale), radius, shadow, type scale, motion
    2. Base         reset, typography, links, focus rings, forms, tables, media
    3. Components   buttons, cards, chips, flash messages, lists, progress, details
    4. Chrome       skip link, site header + mobile menu, footer
    5. Home         hero, sections, feature cards, photo band, coaches, clinics, privacy, closing call to action
    6. Pages        listings, course detail, coaches, pricing, events, blog, sign-in, error pages
    7. Portal       learning, lesson, training, coaching, community, messages, billing and the rest

  Rules of the house: system fonts only, no third-party requests, colours only through the tokens (text on the lagoon
  colour is always --on-lagoon, links are --link, never the lagoon itself: it fails contrast on white), 44-px tap
  targets, motion off under prefers-reduced-motion. The page-block stylesheet (blocks.css) and the assistant widget read
  --lagoon, --charcoal, --ink, --muted, --bg, --link and --card from here.
*/

/* ---- 1. Tokens ------------------------------------------------------------------------------------------ */
:root {
    color-scheme: light dark;

    /* Brand */
    --lagoon: #2bbede;
    --charcoal: #17191b;
    --deep: #0d3b47;

    /* Colour, light */
    --ink: #17191b;
    --muted: #565d64;
    --bg: #ffffff;
    --bg-soft: #f2f7f9;
    --card: #ffffff;
    --card-2: #f7fafb;
    --line: #dbe3e7;
    --line-strong: #b9c5cc;
    --link: #0a6a80;
    --link-hover: #06485a;
    --on-lagoon: #0b1c21;
    --lagoon-tint: color-mix(in srgb, var(--lagoon) 15%, var(--bg));
    --lagoon-tint-strong: color-mix(in srgb, var(--lagoon) 28%, var(--bg));
    --ok: #135e35;
    --ok-bg: #dcf4e5;
    --warn: #6f4300;
    --warn-bg: #fff0c9;
    --danger: #a1221b;
    --danger-bg: #fde4e2;
    --focus: #0a6a80;
    --header-bg: rgb(255 255 255 / .84);
    --footer-bg: #0e1214;
    --footer-ink: #c6ced3;
    --shadow-sm: 0 1px 2px rgb(16 40 48 / .06), 0 1px 3px rgb(16 40 48 / .06);
    --shadow-md: 0 10px 28px -12px rgb(16 40 48 / .28);
    --shadow-lg: 0 28px 60px -24px rgb(16 40 48 / .38);

    /* Spacing: an 8-px scale (--s-1 is half a step) */
    --s-1: .25rem;
    --s-2: .5rem;
    --s-3: .75rem;
    --s-4: 1rem;
    --s-5: 1.5rem;
    --s-6: 2rem;
    --s-7: 3rem;
    --s-8: 4rem;
    --s-9: 6rem;
    --gutter: clamp(1rem, 4vw, 2rem);
    --wrap: 76rem;
    --wrap-text: 44rem;

    /* Shape */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 24px;
    --r-pill: 999px;

    /* Type: system fonts only. Fluid sizes with clamp(). */
    --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --fs-sm: .9rem;
    --fs-base: 1rem;
    --fs-lg: clamp(1.05rem, 1rem + .3vw, 1.25rem);
    --fs-h4: 1.1rem;
    --fs-h3: clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
    --fs-h2: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem);
    --fs-h1: clamp(2rem, 1.35rem + 3vw, 3.5rem);
    --fs-display: clamp(2.5rem, 1.4rem + 5.4vw, 5rem);

    /* Motion */
    --ease: cubic-bezier(.2, .7, .2, 1);
    --dur: .18s;
}

/*
  Dark colours, written twice with the SAME values (WebsiteThemeTests keeps the two copies identical):
    1. the visitor's device prefers dark and they have not chosen "Light" on the site (no data-theme attribute, or "dark"),
    2. the visitor chose "Dark" on the site (data-theme="dark" on <html>, set by theme-init.js before the first paint).
  "Light" sets data-theme="light", which beats the device; "System" removes the attribute so the device decides.
  Any other component rule that needs a dark variant must be written in both forms too.
*/
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: #e9ecee;
        --muted: #a5acb3;
        --bg: #111315;
        --bg-soft: #161b1e;
        --card: #1a2024;
        --card-2: #1f272b;
        --line: #2a343a;
        --line-strong: #3d4a52;
        --link: #5cd0ea;
        --link-hover: #93e2f3;
        --lagoon-tint: color-mix(in srgb, var(--lagoon) 16%, var(--bg));
        --lagoon-tint-strong: color-mix(in srgb, var(--lagoon) 30%, var(--bg));
        --ok: #8fe3b0;
        --ok-bg: #143a25;
        --warn: #f6d58a;
        --warn-bg: #3b2d0c;
        --danger: #ffb4ad;
        --danger-bg: #421a17;
        --focus: #5cd0ea;
        --header-bg: rgb(17 19 21 / .82);
        --footer-bg: #0a0d0f;
        --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
        --shadow-md: 0 12px 30px -12px rgb(0 0 0 / .7);
        --shadow-lg: 0 30px 60px -24px rgb(0 0 0 / .8);
    }
}
:root[data-theme="dark"] {
    --ink: #e9ecee;
    --muted: #a5acb3;
    --bg: #111315;
    --bg-soft: #161b1e;
    --card: #1a2024;
    --card-2: #1f272b;
    --line: #2a343a;
    --line-strong: #3d4a52;
    --link: #5cd0ea;
    --link-hover: #93e2f3;
    --lagoon-tint: color-mix(in srgb, var(--lagoon) 16%, var(--bg));
    --lagoon-tint-strong: color-mix(in srgb, var(--lagoon) 30%, var(--bg));
    --ok: #8fe3b0;
    --ok-bg: #143a25;
    --warn: #f6d58a;
    --warn-bg: #3b2d0c;
    --danger: #ffb4ad;
    --danger-bg: #421a17;
    --focus: #5cd0ea;
    --header-bg: rgb(17 19 21 / .82);
    --footer-bg: #0a0d0f;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-md: 0 12px 30px -12px rgb(0 0 0 / .7);
    --shadow-lg: 0 30px 60px -24px rgb(0 0 0 / .8);
}
/* The chosen theme also decides how the browser draws native controls, scrollbars and the page behind an overscroll */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---- 2. Base -------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    font-size: var(--fs-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main { flex: 1; }

/* The hidden attribute always wins (components below set display) */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
    margin: 0 0 var(--s-3);
    line-height: 1.15;
    letter-spacing: -.02em;
    font-weight: 750;
    text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -.03em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.015em; }
h4 { font-size: var(--fs-h4); line-height: 1.3; }
p { margin: 0 0 var(--s-4); }
:lang(ja) :is(h1, h2, h3, h4), :lang(ja) :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.3; }
:lang(ja) body { line-break: strict; }

small { font-size: var(--fs-sm); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }

a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }

img, svg, video { max-width: 100%; }
img { height: auto; }

::selection { background: color-mix(in srgb, var(--lagoon) 45%, transparent); }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 4px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link: first thing a keyboard user reaches */
.skip-link {
    position: absolute; left: var(--s-4); top: -4rem; z-index: 100;
    padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
    background: var(--charcoal); color: #fff; font-weight: 650; text-decoration: none;
    transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s-3); color: #fff; }

/* Forms: one look for every field on the site. :where() keeps the specificity at zero so any component can override it. */
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="image"], [type="color"]), select, textarea) {
    font: inherit;
    color: var(--ink);
    background: var(--card);
    min-height: 44px;
    padding: .6rem .85rem;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    max-width: 100%;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
:where(textarea) { min-height: 7rem; line-height: 1.5; resize: vertical; }
:where(select) { padding-inline-end: 2rem; }
:where(input, select, textarea):hover { border-color: color-mix(in srgb, var(--lagoon) 55%, var(--line-strong)); }
:where(input, select, textarea):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent);
    outline-offset: 0;
    border-color: var(--focus);
}
:where(input, textarea)::placeholder { color: var(--muted); opacity: .8; }
:where(input:disabled, select:disabled, textarea:disabled) { opacity: .6; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--lagoon); flex: none; margin: .2rem 0 0; }
input[type="file"] { font: inherit; max-width: 100%; }
input[aria-invalid="true"], .is-invalid { border-color: var(--danger); }
label { cursor: pointer; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); margin: 0; min-width: 0; }
legend { padding: 0 var(--s-2); font-weight: 650; }

/* Tables */
.table-wrap { overflow-x: auto; margin: var(--s-2) 0 var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.portal-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.portal-table th, .portal-table td { text-align: start; padding: .7rem var(--s-4); border-bottom: 1px solid var(--line); vertical-align: top; }
.portal-table th { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; background: var(--card-2); }
.portal-table tr:last-child td { border-bottom: 0; }
.portal-table tbody tr:hover td { background: var(--card-2); }

/* ---- 3. Components -------------------------------------------------------------------------------------- */

/* Buttons */
.button, .link-button {
    font: inherit;
    cursor: pointer;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 44px;
    padding: .6rem 1.4rem;
    border: 2px solid var(--lagoon);
    border-radius: var(--r-pill);
    background: var(--lagoon);
    color: var(--on-lagoon);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.button:hover {
    color: var(--on-lagoon);
    background: color-mix(in srgb, var(--lagoon) 86%, #fff);
    border-color: color-mix(in srgb, var(--lagoon) 86%, #fff);
    box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--lagoon) 80%, transparent);
    transform: translateY(-1px);
}
.button:active { transform: none; box-shadow: none; }
.button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.button-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.button-outline:hover { background: var(--lagoon-tint); border-color: var(--lagoon); color: var(--ink); box-shadow: none; }
.button-ghost { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .65); }
.button-ghost:hover { background: rgb(255 255 255 / .2); border-color: #fff; color: #fff; box-shadow: none; }
.button-dark { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.button-dark:hover { background: #000; border-color: #000; color: #fff; }
.button-small { min-height: 40px; padding: .35rem 1rem; font-size: .92rem; }
.button-large { min-height: 52px; padding: .8rem 1.9rem; font-size: 1.05rem; }
.button[aria-pressed="true"] { background: var(--lagoon); color: var(--on-lagoon); border-color: var(--lagoon); }
@media (pointer: coarse) { .button-small { min-height: 44px; } }

.link-button {
    background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline;
    text-underline-offset: .18em; min-height: 0;
}
.link-button:hover { color: var(--link-hover); }
.portal-link { font-weight: 600; }
form.inline { display: inline; }

/* Cards: the one surface the whole site shares (every "box" below gets it too) */
.card, .safety-card, .buy-box, .coach-card, .podcast-card, .conditions-card, .post-card, .pub-box, .stat, .lesson-tutor, .lesson-related,
.lesson-files, .podcast-feed, .checkin-card, .quiz-result, .prerequisites, .waiver-text, .lesson-search-box, .upsell-box, .badge-card, .space-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}
.safety-card, .conditions-card, .post-card, .pub-box, .lesson-tutor, .lesson-related, .lesson-files, .podcast-feed, .checkin-card, .waiver-text, .prerequisites {
    padding: var(--s-5);
    margin: var(--s-5) 0;
}
.safety-card > :first-child, .conditions-card > :first-child { margin-top: 0; }
.safety-card > :last-child, .conditions-card > :last-child { margin-bottom: 0; }
.safety-card h2, .conditions-card h2 { font-size: var(--fs-h3); }
.safety-card h3 { margin: var(--s-5) 0 var(--s-2); font-size: var(--fs-h4); }

/* Chips and badges */
.pill, .verdict, .badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .12rem .65rem;
    border-radius: var(--r-pill);
    background: var(--lagoon-tint-strong);
    color: var(--ink);
    font-size: .8rem;
    font-weight: 650;
    line-height: 1.5;
    white-space: nowrap;
}
.pill-live { background: #b3261e; color: #fff; vertical-align: middle; }
.verdict-go { background: var(--ok-bg); color: var(--ok); }
.verdict-caution { background: var(--warn-bg); color: var(--warn); }
.verdict-nogo { background: var(--danger-bg); color: var(--danger); }
.verdict-unknown { background: color-mix(in srgb, var(--muted) 18%, var(--bg)); color: var(--muted); }
.alert-box { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-sm); padding: var(--s-2) var(--s-3); margin: var(--s-2) 0; }
.badges { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Flash messages */
.flash {
    display: block;
    padding: var(--s-3) var(--s-4);
    margin: var(--s-4) 0;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    border-inline-start: 4px solid var(--lagoon);
    background: var(--lagoon-tint);
    color: var(--ink);
}
.flash-ok { border-inline-start-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.flash-error { border-inline-start-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.flash a { color: inherit; font-weight: 650; }

/* Text helpers */
.eyebrow {
    margin: 0 0 var(--s-2);
    color: var(--link);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .78rem;
}
:lang(ja) .eyebrow { letter-spacing: .06em; text-transform: none; }
.lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--muted); margin: 0 0 var(--s-5); max-width: 40rem; }
.portal-lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--muted); max-width: 44rem; margin: 0 0 var(--s-5); }
.portal-note { color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.course-meta, .course-summary { color: var(--muted); font-size: var(--fs-sm); }
.crumbs { margin: 0 0 var(--s-3); font-size: var(--fs-sm); }
.crumbs a { color: var(--link); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.offer-price { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.offer-list { margin: var(--s-2) 0; padding-inline-start: 1.2rem; font-size: var(--fs-sm); display: grid; gap: .2rem; }
.grid-full { grid-column: 1 / -1; }
.duration { font-variant-numeric: tabular-nums; }

/* Lists of lessons and rows */
.lesson-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); overflow: hidden; }
.lesson-list li {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4);
    padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); min-height: 3.25rem;
}
.lesson-list li:last-child { border-bottom: 0; }
.lesson-list a { color: var(--ink); font-weight: 650; text-decoration: none; }
.lesson-list a:hover { color: var(--link); text-decoration: underline; }
.lesson-list li.locked { color: var(--muted); }
.lesson-state { display: flex; align-items: center; gap: var(--s-3); color: var(--muted); font-size: .88rem; }
.lesson-lock { font-style: italic; }

/* Progress bars */
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: var(--r-pill); overflow: hidden; background: var(--lagoon-tint-strong); accent-color: var(--lagoon); }
progress::-webkit-progress-bar { background: var(--lagoon-tint-strong); }
progress::-webkit-progress-value { background: var(--lagoon); border-radius: var(--r-pill); }
progress::-moz-progress-bar { background: var(--lagoon); border-radius: var(--r-pill); }
.course-meta progress { margin-top: var(--s-2); }

/* Details / FAQ */
details > summary { cursor: pointer; }
.faq details { border-bottom: 1px solid var(--line); padding: var(--s-3) 0; max-width: var(--wrap-text); }
.faq summary { font-weight: 650; min-height: 44px; display: flex; align-items: center; }

/* Long-form text */
.prose { line-height: 1.7; }
.prose :is(h2, h3, h4) { margin: 1.8em 0 .6em; }
.prose a { color: var(--link); }
.prose img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: .35rem .7rem; }
.prose { overflow-wrap: anywhere; }
@media (max-width: 40rem) { .prose table { display: block; max-width: 100%; overflow-x: auto; } }
.prose blockquote { margin: var(--s-5) 0; padding: var(--s-3) var(--s-5); border-inline-start: 4px solid var(--lagoon); background: var(--lagoon-tint); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted); }

/* Tag chips and pagers */
.tag-list { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-4) 0 var(--s-5); }
.tag-list a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 550; transition: background-color var(--dur), border-color var(--dur); }
.tag-list a:hover, .tag-list a[aria-current="page"] { border-color: var(--lagoon); background: var(--lagoon-tint); color: var(--ink); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); margin: var(--s-6) 0 0; }
.pager a { font-weight: 650; }

/* ---- 4. Chrome ------------------------------------------------------------------------------------------ */

/* Header: sticky, translucent, blurred. Public and signed-in share it. */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.5) blur(16px);
    backdrop-filter: saturate(1.5) blur(16px);
    border-bottom: 1px solid var(--line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-header { background: var(--bg); } }
.site-header__inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4);
    width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; min-height: 4.25rem;
}
.brand { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--ink); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; text-decoration: none; min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; object-fit: contain; flex: none; }

.site-nav { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: var(--s-4); }
.site-nav__list { display: flex; align-items: center; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.site-nav__list form { margin: 0; }
.site-nav__actions { display: flex; align-items: center; gap: var(--s-2); }
.site-nav a:not(.button), .site-nav .link-button, .nav-more > summary {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
    border-radius: var(--r-pill); color: var(--ink); font-size: .96rem; font-weight: 560; text-decoration: none; white-space: nowrap;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.site-nav a:not(.button):hover, .site-nav .link-button:hover, .nav-more > summary:hover, .nav-more[open] > summary { background: var(--lagoon-tint); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--lagoon-tint-strong); }
.site-nav .nav-cta { margin-inline-start: var(--s-1); }

/* "More": a plain details element (works without script), a card on wide screens */
.nav-more { position: relative; }
.nav-more > summary { cursor: pointer; list-style: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: ""; width: .42rem; height: .42rem; margin-inline-start: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.12rem) rotate(45deg); transition: transform var(--dur) var(--ease); }
.nav-more[open] > summary::after { transform: translateY(.06rem) rotate(225deg); }
.nav-more-panel {
    position: absolute; inset-inline-end: 0; top: calc(100% + var(--s-2)); z-index: 60; min-width: 18rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: var(--s-2);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
}
.nav-more-panel a { border-radius: var(--r-sm) !important; white-space: normal !important; }

/* Hamburger: shown by script (site-nav.js adds .has-js) only where the menu collapses */
.nav-toggle {
    display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; color: var(--ink); cursor: pointer;
}
.nav-toggle:hover { background: var(--lagoon-tint); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* Logo mark: the charcoal-and-teal one on a light page, the white-and-lagoon one on a dark page. Both are in the markup and lazy, so only the
   visible one is ever fetched; the choice follows the visitor's theme (data-theme), then the device. */
.brand-mark--dark { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand-mark--light { display: none; }
    :root:not([data-theme="light"]) .brand-mark--dark { display: block; }
}
:root[data-theme="dark"] .brand-mark--light { display: none; }
:root[data-theme="dark"] .brand-mark--dark { display: block; }

/* Theme switch (Light / Dark / System): three icon buttons in one pill. theme-init.js adds .kv-theme-js to <html>; without script there is
   nothing to switch, so it stays hidden. The labels are read by screen readers and shown where there is room (mobile menu, footer). */
.theme-toggle {
    display: none; align-items: center; gap: 2px; padding: 3px;
    border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--card-2);
}
.kv-theme-js .theme-toggle { display: inline-flex; }
.theme-opt {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    min-width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: var(--r-pill);
    background: transparent; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; line-height: 1; cursor: pointer;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.theme-opt .icon { width: 1.1rem; height: 1.1rem; }
.theme-opt:hover { background: var(--lagoon-tint-strong); color: var(--ink); }
.theme-opt[aria-pressed="true"], .theme-opt[aria-pressed="true"]:hover { background: var(--lagoon); color: var(--on-lagoon); }
.theme-opt__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (pointer: coarse) { .theme-opt { min-width: 44px; min-height: 44px; } }
.theme-li { display: flex; align-items: center; }

/* Collapsed menu: both menus below 70rem (the public one grew when the theme switch joined Sign in and Join) */
@media (max-width: 70rem) {
    .site-header--portal .theme-li { padding: var(--s-2) 0 0; }
    .site-header--portal .theme-toggle { width: 100%; }
    .site-header--portal .theme-opt { flex: 1; min-height: 44px; padding: 0 var(--s-3); }
    .site-header--portal .theme-opt__label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
    .site-header--portal.has-js .nav-toggle { display: inline-flex; }
    .site-header--portal .site-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: var(--s-2); padding: var(--s-2) 0 var(--s-4); max-height: calc(100dvh - 4.5rem); overflow-y: auto; }
    .site-header--portal.has-js .site-nav:not(.is-open) { display: none; }
    .site-header--portal .site-nav__list { flex-direction: column; align-items: stretch; }
    .site-header--portal .site-nav a:not(.button), .site-header--portal .site-nav .link-button, .site-header--portal .nav-more > summary { min-height: 48px; width: 100%; border-radius: var(--r-sm); justify-content: flex-start; }
    .site-header--portal .nav-more-panel { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 var(--s-4); min-width: 0; grid-template-columns: 1fr; }
}
@media (max-width: 70rem) {
    .site-header:not(.site-header--portal).has-js .nav-toggle { display: inline-flex; }
    .site-header:not(.site-header--portal) .site-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: var(--s-2); padding: var(--s-2) 0 var(--s-4); }
    .site-header:not(.site-header--portal).has-js .site-nav:not(.is-open) { display: none; }
    .site-header:not(.site-header--portal) .site-nav__list { flex-direction: column; align-items: stretch; }
    .site-header:not(.site-header--portal) .site-nav a:not(.button) { min-height: 48px; border-radius: var(--r-sm); }
    .site-header:not(.site-header--portal) .site-nav__actions { flex-direction: column; align-items: stretch; padding-top: var(--s-2); border-top: 1px solid var(--line); }
    .site-header:not(.site-header--portal) .site-nav__actions .button { width: 100%; }
    .site-header:not(.site-header--portal) .site-nav .nav-cta { margin-inline-start: 0; }
    .site-header:not(.site-header--portal) .theme-toggle { width: 100%; }
    .site-header:not(.site-header--portal) .theme-opt { flex: 1; min-height: 44px; padding: 0 var(--s-3); }
    .site-header:not(.site-header--portal) .theme-opt__label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}

/* Footer: dark in both colour schemes; four columns that stack on a phone */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: var(--s-9); font-size: .95rem; }
/* Pages that end in a full-width band (home, block pages, funnels) sit directly on the footer */
body:has(.cta-band, .site-page, .funnel-page) .site-footer { margin-top: 0; }
.site-footer a { color: #e6ecef; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #fff; }
.site-footer__grid {
    display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: var(--s-6);
    width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; padding: var(--s-8) 0 var(--s-6);
}
.site-footer__brand { display: inline-flex; align-items: center; gap: var(--s-2); color: #fff !important; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.site-footer__brand img { width: 44px; height: 44px; object-fit: contain; }
.site-footer__blurb { margin: var(--s-3) 0 0; max-width: 22rem; line-height: 1.6; }
.site-footer h2 { margin: 0 0 var(--s-3); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
:lang(ja) .site-footer h2 { letter-spacing: .05em; text-transform: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.site-footer li { margin: 0; }
.site-footer li a, .site-footer .link-button { display: inline-flex; align-items: center; min-height: 36px; color: #e6ecef; }
.site-footer .link-button { font-size: inherit; text-decoration: none; }
.site-footer .link-button:hover { color: #fff; text-decoration: underline; }
.site-footer__bar {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5);
    width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; padding: var(--s-5) 0 var(--s-6);
    border-top: 1px solid rgb(255 255 255 / .12); font-size: var(--fs-sm); color: #9aa5ac;
}
.site-footer__bar p { margin: 0; }
.lang-list strong { display: inline-flex; align-items: center; min-height: 36px; color: #fff; }
/* The footer repeats the theme switch (the footer is dark in both themes, so its own colours) */
.site-footer__theme { margin-top: var(--s-5); }
.site-footer .theme-toggle { border-color: rgb(255 255 255 / .28); background: rgb(255 255 255 / .06); }
.site-footer .theme-opt { color: #c6ced3; }
.site-footer .theme-opt:hover { background: rgb(255 255 255 / .14); color: #fff; }
.site-footer .theme-opt[aria-pressed="true"], .site-footer .theme-opt[aria-pressed="true"]:hover { background: var(--lagoon); color: var(--on-lagoon); }
@media (max-width: 56rem) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__col--brand { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---- 5. Home ------------------------------------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--s-8); }
.section--soft { background: var(--bg-soft); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-6); }
.section__head h2 { margin: 0; }
.section__head .lead { margin: var(--s-2) 0 0; }
.section__more { font-weight: 700; text-decoration: none; white-space: nowrap; }
.section__more:hover { text-decoration: underline; }

.icon { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Hero: full-bleed photo, dark gradient for the text */
.hero {
    position: relative; isolation: isolate; display: flex; align-items: flex-end; overflow: hidden;
    min-height: clamp(32rem, 86svh, 48rem); color: #fff; background: var(--deep);
    --focus: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(180deg, rgb(6 22 28 / .42) 0%, rgb(6 22 28 / .12) 30%, rgb(6 22 28 / .8) 100%),
        linear-gradient(90deg, rgb(6 22 28 / .78) 0%, rgb(6 22 28 / .4) 50%, rgb(6 22 28 / 0) 100%);
}
.hero__inner { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; padding: var(--s-9) 0 var(--s-7); }
.hero .eyebrow { color: var(--lagoon); }
.hero__title { max-width: 13ch; margin: 0 0 var(--s-4); font-size: var(--fs-display); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; text-shadow: 0 2px 30px rgb(0 0 0 / .35); }
:lang(ja) .hero__title { max-width: 16ch; line-height: 1.2; letter-spacing: 0; }
.hero .lead { color: rgb(255 255 255 / .92); max-width: 34rem; margin-bottom: var(--s-6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0 0 var(--s-6); }
.trust { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; padding: 0; list-style: none; font-size: .92rem; color: rgb(255 255 255 / .9); }
.trust li { display: inline-flex; align-items: center; gap: var(--s-2); }
.trust .icon { width: 1.1rem; height: 1.1rem; color: var(--lagoon); stroke-width: 2.25; }

/* Feature cards */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-5); }
@media (min-width: 52rem) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: var(--s-6); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--lagoon) 55%, var(--line)); }
.feature__icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; margin-bottom: var(--s-4); border-radius: 16px; background: var(--lagoon-tint-strong); color: var(--link); }
.feature__icon .icon { width: 1.6rem; height: 1.6rem; }
.feature h3 { margin-bottom: var(--s-2); }
.feature p { margin: 0; color: var(--muted); line-height: 1.6; }

/* Course cards (public, portal, blog) */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s-5); align-items: stretch; }
.course-grid--fit { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.course-card {
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
    color: var(--ink); text-decoration: none;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--lagoon) 60%, var(--line)); color: var(--ink); }
.course-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--charcoal), #1f4f5b); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; transition: transform .5s var(--ease); }
.course-card:hover .course-cover img { transform: scale(1.04); }
.course-body { display: flex; flex-direction: column; flex: 1; gap: var(--s-2); padding: var(--s-4) var(--s-5) var(--s-5); }
.course-body > strong { font-size: 1.12rem; line-height: 1.3; letter-spacing: -.01em; }
.course-body .eyebrow { margin: 0; }
.course-body .offer-price { margin-top: auto; padding-top: var(--s-2); font-size: 1.05rem; }
.course-hero { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; display: block; border-radius: var(--r-lg); margin: var(--s-4) 0 var(--s-6); background: var(--bg-soft); }

/* Full-width photo band */
.band { position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; min-height: clamp(22rem, 48vw, 30rem); color: #fff; background: var(--deep); --focus: #fff; }
.band__media { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(6 22 28 / .84) 0%, rgb(6 22 28 / .55) 55%, rgb(6 22 28 / .2) 100%); }
.band__inner { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; padding-block: var(--s-8); }
.band .eyebrow { color: var(--lagoon); }
.band h2 { max-width: 18ch; color: #fff; }
.band p { max-width: 32rem; color: rgb(255 255 255 / .92); font-size: var(--fs-lg); }

/* Coaches */
.avatar { display: grid; place-items: center; flex: none; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--lagoon-tint-strong); color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.avatar--2 { background: color-mix(in srgb, var(--deep) 35%, var(--bg)); }
.avatar--3 { background: color-mix(in srgb, #f2b950 40%, var(--bg)); }
.coach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--s-5); }
.coach-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); }
.coach-card__head { display: flex; align-items: center; gap: var(--s-4); }
.coach-card h2, .coach-card h3 { margin: 0; font-size: 1.2rem; }
.coach-card p { margin: 0; }
.coach-bio { line-height: 1.6; white-space: pre-line; color: var(--muted); }
.coach-card .offer-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: auto 0 0; }
.coach-card .offer-list li { padding: .2rem .7rem; border-radius: var(--r-pill); background: var(--lagoon-tint); font-size: .82rem; font-weight: 600; }

/* Clinic teaser */
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: var(--s-5); }
.event-card { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--lagoon) 60%, var(--line)); color: var(--ink); }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 4rem; padding: var(--s-2) 0; border-radius: 14px; background: var(--lagoon-tint-strong); line-height: 1.1; }
.event-date span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.event-date strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.event-card__body { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.event-card__body strong { font-size: 1.08rem; line-height: 1.3; }

/* Privacy promise */
.promise { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-7); align-items: center; }
.promise__photo { width: 100%; aspect-ratio: 4 / 3; max-height: 28rem; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: block; }
.promise__list { list-style: none; margin: var(--s-5) 0; padding: 0; display: grid; gap: var(--s-3); }
.promise__list li { display: flex; align-items: flex-start; gap: var(--s-3); }
.promise__list .icon { width: 1.35rem; height: 1.35rem; margin-top: .2rem; color: var(--link); stroke-width: 2.25; }
@media (max-width: 52rem) { .promise { grid-template-columns: 1fr; gap: var(--s-5); } }

/* Closing call to action */
.cta-band { position: relative; isolation: isolate; overflow: hidden; padding-block: var(--s-8); text-align: center; color: #fff; background: linear-gradient(135deg, var(--deep), #0a2830 60%, #14586a); --focus: #fff; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60rem 24rem at 85% -10%, color-mix(in srgb, var(--lagoon) 38%, transparent), transparent 70%); }
.cta-band h2 { margin-inline: auto; max-width: 20ch; color: #fff; }
.cta-band p { margin: 0 auto var(--s-5); max-width: 34rem; color: rgb(255 255 255 / .9); font-size: var(--fs-lg); }
.cta-band .hero__actions { justify-content: center; margin: 0 auto; max-width: none; }

/* Home builder blocks (Website → Home page): the darkness over a photo hero, photo grids, testimonials, a checklist without a photo */
.hero--dim-light::after {
    background:
        linear-gradient(180deg, rgb(6 22 28 / .25) 0%, rgb(6 22 28 / .05) 30%, rgb(6 22 28 / .6) 100%),
        linear-gradient(90deg, rgb(6 22 28 / .55) 0%, rgb(6 22 28 / .25) 50%, rgb(6 22 28 / 0) 100%);
}
.hero--dim-strong::after {
    background:
        linear-gradient(180deg, rgb(6 22 28 / .6) 0%, rgb(6 22 28 / .35) 30%, rgb(6 22 28 / .9) 100%),
        linear-gradient(90deg, rgb(6 22 28 / .88) 0%, rgb(6 22 28 / .6) 50%, rgb(6 22 28 / .25) 100%);
}
.hero:not(:has(.hero__media)) { min-height: clamp(22rem, 52svh, 32rem); background: linear-gradient(135deg, var(--deep), #0a2830 60%, #14586a); }
.promise--text { grid-template-columns: 1fr; max-width: 46rem; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
@media (min-width: 52rem) { .photo-grid--2 { grid-template-columns: repeat(2, 1fr); } .photo-grid--3 { grid-template-columns: repeat(3, 1fr); } .photo-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.photo { margin: 0; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--bg-soft); }
.photo figcaption { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--muted); }
.quote-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.quote-card { margin: 0; padding: var(--s-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--s-3); }
.quote-card blockquote { margin: 0; font-size: var(--fs-lg); line-height: 1.5; }
.quote-card blockquote p { margin: 0; }
.quote-card figcaption { margin-top: auto; display: flex; flex-direction: column; color: var(--muted); font-size: var(--fs-sm); }
.quote-card figcaption strong { color: var(--ink); }

/* Website → Site settings: the announcement bar, the footer's contact details and social links, and the staff-preview strip */
.announce { display: flex; align-items: center; justify-content: center; gap: var(--s-3); padding: var(--s-2) var(--gutter); background: var(--deep); color: #fff; font-size: var(--fs-sm); text-align: center; }
.announce p { margin: 0; }
.announce a { color: #fff; font-weight: 700; text-decoration: underline; margin-inline-start: var(--s-2); }
.announce a:focus-visible, .announce__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.announce__close { flex: none; width: 44px; height: 44px; margin-block: -.4rem; border: 0; border-radius: var(--r-pill); background: transparent; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.announce__close:hover { background: rgb(255 255 255 / .14); }
.site-footer__contact { display: flex; flex-direction: column; gap: var(--s-1); margin: var(--s-4) 0 0; font-style: normal; line-height: 1.5; }
.site-footer__contact strong { color: #fff; }
.social-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin: var(--s-3) 0 0; padding: 0; }
.preview-bar { margin: 0; padding: var(--s-2) var(--gutter); background: var(--warn-bg); color: var(--warn); font-size: var(--fs-sm); text-align: center; }

/* ---- 6. Pages ------------------------------------------------------------------------------------------ */

/* Page header for listing pages: a soft band with the title and one sentence */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: var(--s-7) 0 var(--s-6); }
.page-hero__inner { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4) var(--s-6); }
.page-hero h1 { margin: 0 0 var(--s-2); }
.page-hero .lead { margin: 0; }
.page-body { width: min(100% - 2 * var(--gutter), var(--wrap)); margin: var(--s-7) auto 0; }
.page-body h2 { margin: var(--s-7) 0 var(--s-4); font-size: var(--fs-h3); }
.page-body > h2:first-child { margin-top: 0; }

/* Portal and older content pages */
.portal-page { width: min(100% - 2 * var(--gutter), var(--wrap)); margin: var(--s-7) auto 0; }
.portal-narrow { width: min(100% - 2 * var(--gutter), 30rem); margin: var(--s-7) auto 0; padding: var(--s-6); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.portal-narrow h1 { font-size: var(--fs-h2); }
.portal-narrow h2 { margin: var(--s-6) 0 var(--s-3); font-size: var(--fs-h3); }
.portal-page > h1, .portal-head h1 { font-size: var(--fs-h2); margin-bottom: var(--s-2); }
.portal-page h2 { margin: var(--s-7) 0 var(--s-4); font-size: var(--fs-h3); }
.portal-page > h2:first-child { margin-top: 0; }
.portal-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.portal-head p { margin-bottom: 0; }
.site-page .portal-page, .blog-post.portal-page { width: min(100% - 2 * var(--gutter), 52rem); }

.portal-form { display: flex; flex-direction: column; gap: var(--s-4); margin: var(--s-5) 0; }
.portal-form label, .learner-switch label, .tutor-form label { display: flex; flex-direction: column; gap: var(--s-1); font-size: .95rem; font-weight: 600; }
.portal-form label.check, .quiz label.check { flex-direction: row; align-items: flex-start; gap: var(--s-3); font-weight: 400; cursor: pointer; min-height: 44px; padding-block: .35rem; }
.portal-form label.check input { margin-top: .3rem; }
.portal-form a, .portal-note a { color: var(--link); }
.portal-narrow .portal-form .button, .portal-narrow .lesson-actions .button { width: 100%; }
.learner-switch label { flex-direction: row; align-items: center; gap: var(--s-3); }
.ec-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); align-items: end; }
.ec-form label.check, .ec-form .button { grid-column: 1 / -1; justify-self: start; }
.code-input { width: 11rem; text-transform: uppercase; font-family: var(--font-mono); letter-spacing: .06em; }
.lesson-actions, .call-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-5); }
.call-actions { margin-top: 0; }
.slot-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.slot-form { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.slot-form .code-input { flex: 1 1 100%; width: auto; }
.copy-row { display: flex; gap: var(--s-2); margin-top: var(--s-1); }
.copy-row input { flex: 1; min-width: 0; font-family: var(--font-mono); }

/* Course detail (public and portal): text on the left, sticky "Get access" card on the right */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: start; }
@media (max-width: 59.99rem) { .course-layout > .buy-box { order: -1; } }
@media (min-width: 60rem) { .course-layout { grid-template-columns: minmax(0, 1fr) 21rem; gap: var(--s-7); } .buy-box { position: sticky; top: 5.75rem; } }
.buy-box { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); box-shadow: var(--shadow-md); border-radius: var(--r-lg); }
.buy-box h2 { margin: 0; font-size: 1.25rem; }
.buy-offer { display: flex; flex-direction: column; gap: var(--s-1); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.buy-offer:last-of-type { border-bottom: 0; padding-bottom: 0; }
.buy-box .button { width: 100%; }
.buy-box .link-button { color: var(--link); text-decoration: underline; }
.module-title { margin: var(--s-6) 0 var(--s-3); font-size: 1.1rem; letter-spacing: -.01em; }
.prerequisites h2 { margin: 0 0 var(--s-1); font-size: 1.05rem; }
.prerequisites ul { margin: var(--s-2) 0 0; padding-inline-start: 1.25rem; }
.course-facts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-2); padding: 0; list-style: none; }

/* Pricing: offer cards with the button at the bottom */
.offer-card { display: flex; }
.offer-card .course-body { gap: var(--s-3); }
.offer-card .course-body > strong { font-size: 1.25rem; }
.offer-card .offer-price { margin-top: 0; font-size: 1.75rem; padding-top: 0; }
.offer-card .prose { margin: 0; }
.offer-actions { display: grid; gap: var(--s-2); margin-top: auto; padding-top: var(--s-3); }
.offer-actions .button { width: 100%; }
.offer-card .offer-list { margin-bottom: var(--s-3); }
.offer-card .offer-list a { font-weight: 600; }
.offer-card:hover { transform: none; }

/* Blog and site pages */
.blog-post .prose, .site-page .prose { max-width: var(--wrap-text); }
.blog-post h1, .site-page h1 { font-size: var(--fs-h1); }

/* Legal pages */
.legal.portal-page { width: min(100% - 2 * var(--gutter), 50rem); }
.legal .prose { line-height: 1.7; }

/* Funnels */
.funnel-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.funnel-page .buy-box h2 { font-size: 1.15rem; }

/* Certificate: a clean printable page (always light, like paper) */
.certificate-page { width: min(100% - 2 * var(--gutter), 52rem); margin: var(--s-6) auto; }
.certificate { text-align: center; padding: var(--s-7) var(--s-6); border: 6px double var(--lagoon); border-radius: 6px; background: #fff; color: #17191b; }
.certificate h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: .5rem 0 1.5rem; }
.certificate-name { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 700; margin: .5rem 0; }
.certificate-course { font-size: 1.35rem; font-weight: 600; margin: .5rem 0 1.25rem; }
.certificate-code { margin-top: var(--s-6); font-size: .8rem; color: #565d64; }
@media print { .site-header, .site-footer, .no-print { display: none !important; } .certificate-page { margin: 0; } }

/* Error pages */
.notice-page { width: min(100% - 2 * var(--gutter), 36rem); margin: var(--s-9) auto var(--s-7); text-align: center; }
.notice-page__code { display: inline-block; margin-bottom: var(--s-3); padding: .2rem 1rem; border-radius: var(--r-pill); background: var(--lagoon-tint-strong); font-weight: 800; letter-spacing: .06em; }
.notice-page .hero__actions { justify-content: center; margin: var(--s-5) 0 0; }
.notice-page code { padding: .1rem .4rem; border-radius: 6px; background: var(--bg-soft); font-family: var(--font-mono); }

/* Demo card */
.demo-card { display: flex; justify-content: space-between; padding: var(--s-3) var(--s-4); border-radius: 10px; background: linear-gradient(135deg, var(--charcoal), #1f4f5b); color: #fff; font-family: var(--font-mono); font-size: .9rem; }

/* ---- 7. Portal ----------------------------------------------------------------------------------------- */

/* A lesson reads best at 60 rem: the video, the notes and the boxes under it share one column */
#lesson.portal-page { width: min(100% - 2 * var(--gutter), 60rem); }
.portal-page .prose, .page-body .prose { max-width: 46rem; }

/* Live classes, calls */
.player { margin: var(--s-4) 0; border-radius: var(--r-md); overflow: hidden; background: #000; box-shadow: var(--shadow-md); }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; }
.call-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.call-tile { position: relative; background: #000; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; }
.call-tile video { width: 100%; height: 100%; object-fit: cover; }
.call-name { position: absolute; left: var(--s-2); bottom: var(--s-2); padding: .1rem .5rem; border-radius: 6px; background: rgb(0 0 0 / .6); color: #fff; font-size: .85rem; }
.live-stage { position: relative; }
.live-cc { position: absolute; left: 50%; bottom: var(--s-4); transform: translateX(-50%); width: min(100% - 1.5rem, 46rem); display: flex; flex-direction: column; align-items: center; gap: var(--s-1); pointer-events: none; opacity: 1; transition: opacity .4s; }
.live-cc.is-faded { opacity: 0; }
.live-cc-line { max-width: 100%; padding: .25rem .65rem; border-radius: 6px; background: rgb(0 0 0 / .82); color: #fff; font-size: 1.1rem; line-height: 1.35; text-align: center; }
.cc-lang { padding: .35rem .5rem; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: inherit; font: inherit; }

/* Secured course video: the viewer mark sits over the picture (also in fullscreen), never catches clicks. */
.secure-player { position: relative; }
.secure-player .watermark { position: absolute; left: 10%; top: 10%; pointer-events: none; user-select: none; z-index: 2; color: rgb(255 255 255 / .55); text-shadow: 0 0 3px rgb(0 0 0 / .7); font-size: .8rem; white-space: nowrap; transition: left 1.5s ease, top 1.5s ease; }
.secure-player .player-fullscreen { position: absolute; right: 10px; top: 10px; z-index: 3; min-height: 0; border: 0; border-radius: 6px; padding: 2px 8px; background: rgb(0 0 0 / .45); color: #fff; font-size: 1.1rem; cursor: pointer; }
.secure-player:fullscreen { background: #000; display: flex; align-items: center; }
.secure-player:fullscreen video { width: 100%; height: 100%; max-height: 100vh; }
.secure-player:fullscreen .watermark { font-size: 1.1rem; }

/* Lesson chapters, tutor, search, files */
.chapters { margin: var(--s-4) 0; }
.chapters h2 { font-size: 1rem; margin: 0 0 var(--s-2); }
.chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.chapter { display: flex; gap: var(--s-3); width: 100%; text-align: start; min-height: 44px; align-items: center; padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: inherit; font: inherit; cursor: pointer; }
.chapter:hover, .chapter:focus-visible { border-color: var(--lagoon); background: var(--lagoon-tint); }
.chapter-time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.2rem; }
.tutor-form { display: grid; gap: var(--s-3); max-width: 40rem; }
.tutor-answer { margin: var(--s-5) 0; padding: var(--s-4) var(--s-5); border-inline-start: 4px solid var(--lagoon); background: var(--lagoon-tint); border-radius: var(--r-sm); }
.tutor-text { white-space: pre-line; margin-top: 0; }
.tutor-sources { margin: var(--s-1) 0 0; }
.lesson-tutor summary, .podcast-feed summary, .waiver-text summary { font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.lesson-tutor .tutor-form { margin-top: var(--s-3); }
.lesson-search { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 var(--s-5); max-width: 40rem; }
.lesson-search input { flex: 1 1 14rem; min-width: 0; }
.search-results { margin: var(--s-4) 0; padding-inline-start: 1.2rem; display: grid; gap: var(--s-4); }
.search-title { font-weight: 650; margin-inline-end: var(--s-1); }
.search-moments { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: grid; gap: var(--s-1); overflow-wrap: anywhere; }
.search-moments a { text-decoration: none; margin-inline-end: var(--s-1); }
.lesson-related h2, .lesson-files h2 { font-size: 1rem; margin: 0 0 var(--s-2); }
.lesson-related ul, .lesson-files ul { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: var(--s-1); }

/* Quizzes */
.quiz ol, ol.quiz { padding-inline-start: 1.25rem; display: flex; flex-direction: column; gap: var(--s-5); }
.quiz fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.quiz legend { margin-bottom: var(--s-2); padding: 0; }
.quiz label.check { display: flex; gap: var(--s-2); align-items: flex-start; }
.quiz-result { padding: var(--s-4) var(--s-5); margin: var(--s-4) 0; }
.quiz-result.passed { border-color: var(--ok); background: var(--ok-bg); }
.quiz input.quiz-typed { max-width: 24rem; }

/* Waiver, safety */
.safety-history { list-style: none; margin: 0 0 var(--s-2); padding: 0; }
.safety-history li { margin: var(--s-1) 0; }
.safety-state.ok::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.safety-state.todo { font-weight: 650; }
h2.today::after { content: " •"; color: var(--lagoon); }
.comment { margin: var(--s-1) 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: color-mix(in srgb, var(--muted) 12%, transparent); font-size: .92rem; }
.comment.from-coach { border-inline-start: 3px solid var(--lagoon); }

/* Commerce */
.trial-terms { margin: var(--s-1) 0 0; font-weight: 650; }
.bump-box { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border: 1px dashed var(--lagoon); border-radius: 10px; background: var(--lagoon-tint); }
.bump-box > span { display: flex; flex-direction: column; gap: var(--s-1); }
.upsell-box { margin: var(--s-5) 0; padding: var(--s-5); border-color: var(--lagoon); }
.amount-choice { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }

/* Stats, progress, badges, streaks */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s-3); margin: var(--s-4) 0 var(--s-5); }
.stat { padding: var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); }
.stat span { font-size: .8rem; color: var(--muted); }
.stat strong { font-size: 1.3rem; letter-spacing: -.01em; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: var(--s-4); margin-bottom: var(--s-4); }
.progress-big { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin: var(--s-1) 0; }
.streak-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: var(--s-1); margin: var(--s-2) 0 var(--s-3); max-width: 24rem; }
.streak-day { aspect-ratio: 1; border-radius: .25rem; background: color-mix(in srgb, var(--muted) 20%, transparent); }
.streak-day.on { background: var(--lagoon); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--s-3); margin: var(--s-2) 0; }
.badge-card { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3) var(--s-4); opacity: .65; box-shadow: none; }
.badge-card.earned { opacity: 1; border-color: var(--lagoon); background: var(--lagoon-tint); }
.tab-links { margin: var(--s-1) 0 var(--s-3); }
.checkin-cards { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: var(--s-4) 0; }
.checkin-card { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); margin: 0; }
.checkin-qr { background: #fff; padding: var(--s-3); border-radius: 10px; max-width: 320px; }
.checkin-qr svg { display: block; width: 100%; height: auto; }

/* Community, messages */
.community .post-form textarea { width: 100%; }
.post-card { padding: var(--s-4) var(--s-5); margin: var(--s-4) 0; }
.post-card.pinned { border-color: var(--lagoon); box-shadow: inset 4px 0 0 var(--lagoon), var(--shadow-sm); }
.post-head { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-2); }
.post-actions { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; font-size: .9rem; margin-top: var(--s-3); }
.post-actions .active { font-weight: 700; }
.post-actions details.report summary { list-style: none; }
.comments { list-style: none; margin: var(--s-3) 0 0; padding: 0 0 0 var(--s-4); border-inline-start: 2px solid var(--line); }
.comments li { margin: var(--s-2) 0; }
.comments p { margin: .15rem 0; white-space: pre-line; }
.reply-form { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.reply-form input { flex: 1; min-width: 0; }
.space-card { padding: 0; }
.course-grid + .portal-note, .course-grid + p { margin-top: var(--s-5); }
.message-thread { display: flex; flex-direction: column; gap: var(--s-3); margin: var(--s-4) 0; }
.message { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); max-width: min(90%, 40rem); background: var(--card); }
.message-staff { background: var(--lagoon-tint); align-self: flex-start; }
.message-mine { align-self: flex-end; background: var(--card-2); }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: var(--s-1); }
.mention-field { position: relative; }
.mention-list { position: absolute; z-index: 20; left: 0; right: 0; margin: .15rem 0 0; padding: var(--s-1) 0; list-style: none; background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-md); max-height: 16rem; overflow-y: auto; }
.mention-list li { padding: var(--s-2) var(--s-3); cursor: pointer; }
.mention-list li[aria-selected="true"], .mention-list li:hover { background: var(--lagoon-tint); }
.mention-notices { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.mention-notices li { padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.mention-notices li.unread { border-color: var(--lagoon); }
.post-form .mention-field { display: block; }
.reply-form .mention-field { flex: 1; display: flex; min-width: 0; }
.reply-form .mention-field input { width: 100%; }
.challenge-learner { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.challenge-learner:last-child { border-bottom: 0; }
.challenge-learner p { margin: var(--s-1) 0; }
.crew-seats { margin: var(--s-1) 0 0 var(--s-5); padding: 0; }

/* Podcasts, publications */
.podcast-list { display: grid; gap: var(--s-4); }
.podcast-card { display: grid; grid-template-columns: 7rem 1fr; gap: var(--s-4); padding: var(--s-4); }
.podcast-card h2 { font-size: 1.15rem; margin: 0 0 var(--s-1); }
.podcast-card h2 a { color: inherit; text-decoration: none; }
.podcast-art { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; overflow: hidden; }
.podcast-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.podcast-art-empty { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--charcoal), #1f4f5b); }
.podcast-head { display: grid; grid-template-columns: minmax(0, 12rem) 1fr; gap: var(--s-5); align-items: start; margin: var(--s-4) 0; }
.podcast-head:not(:has(img)) { grid-template-columns: 1fr; }
.podcast-description { white-space: pre-line; }
.podcast-feed { padding: var(--s-2) var(--s-4); margin: var(--s-4) 0; }
.podcast-episodes { list-style: none; padding: 0; display: grid; gap: var(--s-5); }
.podcast-episodes h3 { margin: 0 0 var(--s-1); font-size: 1.05rem; }
.podcast-episodes audio { width: 100%; margin: var(--s-2) 0; }
@media (max-width: 40rem) { .podcast-card { grid-template-columns: 4.5rem 1fr; } .podcast-head { grid-template-columns: 1fr; } .podcast-head .podcast-art { max-width: 12rem; } }
.pub-box { background: var(--card-2); }
.pub-box h2 { font-size: 1.1rem; margin: 0 0 var(--s-1); }
.pub-box p { margin: 0 0 var(--s-3); }
.pub-issues { list-style: none; padding: 0; display: grid; gap: var(--s-5); }
.pub-issues h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.pub-issues h3 a { color: inherit; text-decoration: none; }
.pub-more { font-weight: 650; }
.pub-issue .prose { max-width: 42rem; }
.pub-fade { color: var(--muted); margin-top: -.5rem; }
.pub-nav { display: flex; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line); }

/* Ocean conditions */
.conditions-card h2, .conditions-card h3 { margin-top: 0; }

/* Headings inside boxes start at the top of the box (beats the page-level h2 spacing above) */
:is(.portal-page, .page-body) :is(.safety-card, .conditions-card, .buy-box, .coach-card, .card, .pub-box, .podcast-card, .stat) h2 { margin-top: 0; }
.notice-page h1 { font-size: var(--fs-h2); }

/* ---- Page blocks (blocks.css does the layout; a few site-wide touches) ------------------------------------ */
.site-page .bk-page-title { font-size: var(--fs-h1); }
.bk-page .bk-hero { padding-block: var(--s-8) var(--s-7); }
.bk-page { --bk-shadow: var(--shadow-sm); }

/* Reduced motion: nothing moves */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
    .button:hover, .feature:hover, .course-card:hover, .event-card:hover { transform: none; }
    .course-card:hover .course-cover img { transform: none; }
}

/* Print: paper wants no chrome */
@media print { .site-header, .site-footer { display: none; } body { background: #fff; color: #000; } }
