/* ==========================================================================
   Web Dynamix Academy — design system
   Palette comes straight from the logo: royal blue field, navy band,
   checkmark green, white. Bitter (slab) echoes the logo lettering.
   ========================================================================== */

:root {
    --blue: #2311b0;
    --blue-deep: #1a0c8c;
    --navy: #170c6b;
    --ink: #140b4a;
    --green: #7ed957;
    --green-deep: #2f7d12;      /* green that passes contrast on white */
    --green-tint: #eafbe2;
    --paper: #f4f5fb;
    --white: #ffffff;
    --line: #dfe1f0;
    --line-strong: #c4c7e0;
    --muted: #57547d;
    --danger: #b3261e;

    --font-display: "Bitter", Georgia, "Times New Roman", serif;
    --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --r-sm: 8px;      /* inputs, small chips */
    --r-md: 14px;     /* cards */
    --r-lg: 22px;     /* large panels, hero blocks */
    --r-pill: 999px;  /* buttons */

    --wrap: 1200px;
    --header-h: 72px;
    --shadow-lift: 0 18px 40px -22px rgba(23, 12, 107, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.6; color: var(--ink); background: var(--white); }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--green); color: var(--ink); padding: .6rem 1rem; border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.muted { color: var(--muted); }

/* Buttons ---------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 44px; padding: .6rem 1.25rem; border-radius: var(--r-pill);
    border: 2px solid transparent; font-weight: 700; font-size: .95rem; line-height: 1.2;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-lg { min-height: 52px; padding: .75rem 1.6rem; font-size: 1rem; }
.btn-sm { min-height: 38px; padding: .4rem .95rem; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-green { background: var(--green); color: var(--ink); }
.btn-green:hover:not(:disabled) { background: #93e46f; }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover:not(:disabled) { background: var(--blue-deep); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-outline-dark { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: var(--white); }
.btn-ghost-light { background: transparent; border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-enrolled { background: var(--green-tint); color: var(--green-deep); border-color: transparent; }

/* The select toggle: outline when off, solid green with a tick when on */
.btn-select { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-select:hover:not(:disabled) { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); }
.btn-select .when-on { display: none; align-items: center; gap: .35rem; }
.btn-select.is-selected { background: var(--green); border-color: var(--green); color: var(--ink); }
.btn-select.is-selected .when-on { display: inline-flex; }
.btn-select.is-selected .when-off { display: none; }
.btn-select-lg { min-height: 54px; font-size: 1.05rem; }
.btn.is-busy { opacity: .7; pointer-events: none; }

.link-btn { background: none; border: 0; padding: .25rem 0; color: var(--blue); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn-light { color: rgba(255,255,255,.85); }
.link-quiet { color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.link-quiet:hover { color: var(--blue); text-decoration: underline; }
.inline-form { display: inline; margin: 0; }

.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--white); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.round-btn:hover { border-color: var(--blue); color: var(--blue); }

.badge { display: inline-block; padding: .15rem .6rem; border-radius: var(--r-pill); font-size: .78rem; font-weight: 700; }
.badge-green { background: var(--green-tint); color: var(--green-deep); }
.badge-muted { background: var(--paper); color: var(--muted); }

/* Header ------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(23,12,107,.5); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { border-radius: 10px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1.05; }
.brand-name span { display: block; font-family: var(--font-body); font-weight: 600; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.brand-light { color: var(--white); }
.brand-light .brand-name span { color: rgba(255,255,255,.7); }

.main-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.main-nav > a { padding: .5rem .7rem; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav > a:hover { color: var(--blue); background: var(--paper); }
.main-nav > a.is-current { color: var(--blue); box-shadow: inset 0 -3px 0 var(--green); border-radius: 0; }
.nav-auth { display: none; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.header-link:hover { color: var(--blue); }

.menu-toggle { display: none; width: 44px; height: 44px; border: 2px solid var(--line-strong); border-radius: var(--r-sm); background: var(--white); cursor: pointer; place-items: center; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; } .menu-bars::after { top: 6px; }
[aria-expanded="true"] .menu-bars { background: transparent; }
[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) { .hide-md { display: none; } }
@media (max-width: 1024px) {
    .menu-toggle { display: inline-grid; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
        gap: 0; padding: .75rem 1.25rem 1.5rem; background: var(--white); border-bottom: 1px solid var(--line);
        box-shadow: 0 20px 30px -20px rgba(23,12,107,.35); max-height: calc(100vh - var(--header-h)); overflow-y: auto;
        transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s;
    }
    .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
    .main-nav > a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
    .main-nav > a.is-current { box-shadow: inset 4px 0 0 var(--green); padding-left: .9rem; }
    .nav-auth { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: 1rem; }
    .nav-auth .nav-start { flex-basis: 100%; }
    .nav-auth .btn { flex: 1; }
}
@media (max-width: 640px) {
    .hide-sm { display: none; }
    .brand-name { font-size: .95rem; }
    .header-actions { gap: .6rem; }
    .header-actions .btn-green { padding-inline: 1rem; }
}
@media (max-width: 400px) { .header-actions .btn-green { display: none; } }

/* Flash & toast ---------------------------------------------------------- */
.flash { background: var(--green-tint); color: var(--green-deep); font-weight: 600; padding: .8rem 0; border-bottom: 1px solid #cdeec0; }
.flash-inline { margin: 1rem 1.5rem 0; padding: .8rem 1rem; border-radius: var(--r-sm); border: 1px solid #cdeec0; }
.toast {
    position: fixed; left: 50%; bottom: 104px; z-index: 70; transform: translateX(-50%);
    max-width: min(92vw, 440px); padding: .8rem 1.1rem; border-radius: var(--r-md);
    background: var(--ink); color: var(--white); font-weight: 600; box-shadow: var(--shadow-lift);
    animation: toast-in .2s ease-out;
}
.toast.is-error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Hero -------------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden; color: var(--white);
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(126,217,87,.14), transparent 60%),
        linear-gradient(var(--blue), var(--blue));
}
.hero::before { /* faint grid: graph paper for builders */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 7vw, 6.5rem); }
.hero h1 { color: var(--white); max-width: 14ch; font-size: clamp(2.4rem, 5.4vw, 4.3rem); }
.hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: rgba(255,255,255,.86); max-width: 52ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* The signature: the logo's tick drawn as a learning path */
.hero-path { position: relative; aspect-ratio: 400 / 420; width: 100%; max-width: 480px; justify-self: center; }
.hero-check { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-check path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 40; }
.hero-check-track { stroke: rgba(255,255,255,.08); }
.hero-check-line { stroke: var(--green); stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-check 1.6s cubic-bezier(.65,0,.35,1) .25s forwards; }
@keyframes draw-check { to { stroke-dashoffset: 0; } }

.path-stops { list-style: none; margin: 0; padding: 0; }
.stop {
    position: absolute; display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: center;
    padding: .55rem .9rem .55rem .6rem; border-radius: var(--r-md); background: var(--white); color: var(--ink);
    box-shadow: 0 16px 30px -18px rgba(0,0,0,.6); white-space: nowrap;
    opacity: 0; transform: translateY(8px); animation: stop-in .4s ease-out forwards;
}
.stop strong { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.1; }
.stop span:last-child { grid-column: 2; font-size: .78rem; color: var(--muted); line-height: 1.2; }
.stop-dot { grid-row: span 2; width: 14px; height: 14px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-tint); }
.stop-1 { left: -2%; top: 30%; animation-delay: .45s; }
.stop-2 { left: 10%; top: 56%; animation-delay: .85s; }
.stop-3 { left: 30%; top: 86%; animation-delay: 1.25s; }
.stop-4 { right: -4%; top: -2%; animation-delay: 1.75s; }
.stop-4 .stop-dot { background: var(--blue); box-shadow: 0 0 0 4px #dcd8ff; }
@keyframes stop-in { to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-path { max-width: 380px; }
}
@media (max-width: 480px) {
    .hero-path { max-width: 320px; margin-right: 1rem; }
    .stop { padding: .45rem .7rem .45rem .5rem; }
    .stop strong { font-size: .95rem; }
    .stop span:last-child { font-size: .7rem; }
    .stop-4 { right: -6%; }
}

/* Stats band -------------------------------------------------------------- */
.stats { background: var(--navy); color: var(--white); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; }
.stat { display: flex; flex-direction: column-reverse; padding: 1.75rem 1rem; border-left: 1px solid rgba(255,255,255,.12); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat dt { color: rgba(255,255,255,.72); font-size: .9rem; }
@media (max-width: 860px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-left: 0; }
    .stat:nth-child(-n+2) { border-top: 0; }
}

/* Sections ---------------------------------------------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-tight { padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem); }
.section-paper { background: var(--paper); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head > div { max-width: 60ch; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.section-head-center { flex-direction: column; align-items: center; text-align: center; }
.section-head-center p { max-width: 52ch; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem .45rem .75rem; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; background: var(--white); }
.chip::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.chip span { color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--accent); }

/* Course cards ------------------------------------------------------------ */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.course-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.course-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.course-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.course-card:has(.is-selected) { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }

.course-cover {
    position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
    background-color: var(--accent, var(--blue)); text-decoration: none;
    background-image: radial-gradient(circle at 85% 20%, rgba(255,255,255,.18) 0 18%, transparent 19%),
                      linear-gradient(135deg, transparent 55%, rgba(0,0,0,.18));
}
.course-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-mark { font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; color: rgba(255,255,255,.92); letter-spacing: -.02em; }
.cover-level { position: absolute; left: .75rem; bottom: .75rem; padding: .2rem .6rem; border-radius: var(--r-pill); background: rgba(255,255,255,.95); color: var(--ink); font-size: .75rem; font-weight: 700; }

.course-body { padding: 1.1rem 1.15rem .5rem; flex: 1; }
.course-cat { margin: 0 0 .3rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.course-title { font-size: 1.2rem; margin-bottom: .45rem; }
.course-title a { color: var(--ink); text-decoration: none; }
.course-title a:hover { color: var(--blue); }
.course-desc { color: var(--muted); font-size: .93rem; margin-bottom: .8rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem .9rem; padding: 0; margin: 0; font-size: .83rem; color: var(--muted); }
.course-meta li { position: relative; }
.star { color: #e3a008; }

.course-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; padding: .9rem 1.15rem 1.15rem; border-top: 1px dashed var(--line); margin-top: .75rem; flex-wrap: wrap; }
.course-actions { display: flex; align-items: center; gap: .9rem; }
.price { display: flex; flex-direction: column; line-height: 1.15; }
.price s { color: var(--muted); font-size: .85rem; }
.price strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.price-lg strong { font-size: 2rem; }

/* About / ticks ----------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about-copy p { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.about-copy .btn { margin-top: .75rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.ticks li { display: grid; grid-template-columns: 36px 1fr; gap: .9rem; align-items: start; }
.ticks h3 { margin-bottom: .2rem; font-size: 1.1rem; }
.ticks p { margin: 0; color: var(--muted); }
.tick { width: 32px; height: 32px; }
.tick path { fill: none; stroke: var(--green-deep); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ticks-2col { grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; }
.ticks-2col li { grid-template-columns: 26px 1fr; gap: .6rem; }
.ticks-2col .tick { width: 24px; height: 24px; }
.ticks-2col p { color: var(--ink); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .ticks-2col { grid-template-columns: 1fr; } }

/* How it works: a genuine sequence, so it's numbered ---------------------- */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; margin: 0; position: relative; }
.steps li { counter-increment: step; position: relative; padding: 0 1.5rem 0 0; }
.steps li::before {
    content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.1rem;
    border-radius: 50%; background: var(--blue); color: var(--white); font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
    position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--white);
}
.steps li:last-child::before { background: var(--green); color: var(--ink); }
.steps li::after { content: ""; position: absolute; top: 26px; left: 52px; right: 0; height: 3px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 14px); }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--muted); margin: 0; max-width: 28ch; }
@media (max-width: 860px) {
    .steps { grid-template-columns: 1fr; gap: 1.75rem; }
    .steps li { padding: 0 0 0 72px; min-height: 52px; }
    .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
    .steps li::after { top: 58px; left: 25px; right: auto; bottom: -1.75rem; width: 3px; height: auto; background: repeating-linear-gradient(180deg, var(--line-strong) 0 8px, transparent 8px 14px); }
}

/* Jobs teaser ------------------------------------------------------------- */
.section-jobs { background: var(--navy); color: var(--white); }
.section-jobs h2 { color: var(--white); }
.section-jobs p { color: rgba(255,255,255,.8); font-size: 1.05rem; max-width: 52ch; margin-bottom: 1.5rem; }
.jobs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.jobs-preview { position: relative; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 1rem; }
.job-row { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-radius: var(--r-md); background: rgba(255,255,255,.08); margin-bottom: .6rem; filter: blur(2.5px); }
.job-row:last-of-type { margin-bottom: 0; }
.job-title { font-weight: 700; }
.job-tag { font-size: .8rem; padding: .15rem .6rem; border-radius: var(--r-pill); background: var(--green); color: var(--ink); font-weight: 700; }
.jobs-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; font-weight: 700; color: var(--white); }
.jobs-lock svg { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--green); color: var(--ink); }
@media (max-width: 860px) { .jobs-grid { grid-template-columns: 1fr; } }

/* Testimonials ------------------------------------------------------------ */
.carousel-controls { display: flex; gap: .5rem; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, calc((100% - 3rem) / 3)); gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .75rem; scrollbar-width: thin; }
.quote { scroll-snap-align: start; margin: 0; padding: 1.6rem; border-radius: var(--r-lg); background: var(--paper); display: flex; flex-direction: column; }
.stars { color: #e3a008; letter-spacing: .1em; margin-bottom: .75rem; }
.stars-off { color: var(--line-strong); }
.quote blockquote { margin: 0 0 1.4rem; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.45; flex: 1; }
.quote figcaption { display: flex; align-items: center; gap: .75rem; }
.quote figcaption img { border-radius: 50%; }
.quote figcaption strong { display: block; }
.quote figcaption span span { display: block; color: var(--muted); font-size: .88rem; }
.avatar-initials { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: var(--white); font-weight: 700; font-size: .95rem; flex-shrink: 0; }
@media (max-width: 640px) { .carousel { grid-auto-columns: 86%; } }

/* FAQ --------------------------------------------------------------------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.faq-grid > div:first-child p { color: var(--muted); }
.faq { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; font-weight: 700; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--blue); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); padding-bottom: 1.15rem; margin: 0; max-width: 65ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* CTA --------------------------------------------------------------------- */
.cta { background: var(--green); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(3rem, 6vw, 4.5rem) 0; flex-wrap: wrap; }
.cta h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .3rem; }
.cta p { margin: 0; font-size: 1.1rem; max-width: 46ch; }
.cta-actions { display: flex; gap: .85rem; flex-wrap: wrap; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding-top: 3.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand p { margin-top: 1rem; max-width: 38ch; font-size: .95rem; }
.site-footer h2 { font-family: var(--font-body); font-size: .95rem; font-weight: 700; color: var(--white); margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.site-footer a:hover { color: var(--green); }
.footer-social { display: flex !important; flex-wrap: wrap; gap: .5rem 1rem !important; margin-top: 1rem !important; }
.footer-base { border-top: 1px solid rgba(255,255,255,.12); padding: 1.25rem 0; font-size: .875rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.footer-base p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Cart bar ---------------------------------------------------------------- */
body.has-cart { padding-bottom: 92px; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--navy); color: var(--white); box-shadow: 0 -12px 30px -16px rgba(0,0,0,.5); animation: bar-in .25s ease-out; }
.cart-bar[hidden] { display: none; }
@keyframes bar-in { from { transform: translateY(100%); } }
.cart-bar-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; padding-block: .6rem; }
.cart-toggle { display: flex; align-items: center; gap: .85rem; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; padding: .25rem; border-radius: var(--r-sm); }
.cart-count { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .5rem; border-radius: var(--r-pill); background: var(--green); color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.cart-count.is-bumped { animation: bump .3s ease-out; }
@keyframes bump { 50% { transform: scale(1.18); } }
.cart-label { display: flex; flex-direction: column; font-weight: 700; line-height: 1.25; }
.cart-hint { font-weight: 500; font-size: .85rem; color: rgba(255,255,255,.7); text-decoration: underline; text-underline-offset: 3px; }
.cart-total { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.cart-total span { font-size: .8rem; color: rgba(255,255,255,.7); }
.cart-total strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.cart-panel { position: absolute; left: 0; right: 0; bottom: 100%; background: var(--white); color: var(--ink); border-top: 4px solid var(--green); box-shadow: 0 -20px 40px -20px rgba(23,12,107,.45); max-height: min(60vh, 520px); overflow-y: auto; }
.cart-panel-inner { padding-block: 1.25rem; }
.cart-panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .75rem; }
.cart-panel-head h2 { font-size: 1.3rem; margin: 0; }
.cart-items { list-style: none; margin: 0; padding: 0; }
.cart-items li { display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cart-items a { font-weight: 700; color: var(--ink); text-decoration: none; }
.cart-items a:hover { color: var(--blue); }
.cart-items small { display: block; color: var(--muted); }
.cart-items .price { align-items: flex-end; }
.cart-items .price strong { font-size: 1.05rem; }
.mini-cover { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--accent, var(--blue)); color: var(--white); font-family: var(--font-display); font-weight: 800; font-size: .95rem; flex-shrink: 0; }
.cart-sums { margin: .75rem 0 0; display: grid; gap: .3rem; justify-content: end; }
.cart-sums div { display: flex; gap: 2rem; justify-content: space-between; color: var(--muted); }
.cart-sums dd { margin: 0; font-weight: 700; color: var(--ink); }
.cart-sums [hidden] { display: none; }

@media (max-width: 640px) {
    body.has-cart { padding-bottom: 132px; }
    .cart-bar-inner { flex-wrap: wrap; gap: .6rem 1rem; min-height: 0; padding-block: .75rem; }
    .cart-count { min-width: 38px; height: 38px; font-size: 1.1rem; }
    .cart-total strong { font-size: 1.35rem; }
    .cart-bar-inner .btn { width: 100%; min-height: 48px; }
    .cart-items li { grid-template-columns: 40px 1fr auto; }
    .cart-items .link-btn { grid-column: 2; justify-self: start; }
    .toast { bottom: 148px; }
}

/* Modal ------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,11,74,.62); backdrop-filter: blur(3px); }
.modal-card { position: relative; display: grid; grid-template-columns: 300px 1fr; width: min(100%, 880px); max-height: calc(100vh - 2rem); overflow: auto; background: var(--white); border-radius: var(--r-lg); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-x { position: absolute; top: .75rem; right: .75rem; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; }
.modal-x:hover { background: var(--line); }
.modal-side { background: var(--blue); color: var(--white); padding: 2rem 1.75rem; display: flex; flex-direction: column; }
.modal-side img { border-radius: 12px; margin-bottom: 1.25rem; }
.modal-side h2 { color: var(--white); font-size: 1.6rem; }
.modal-side p { color: rgba(255,255,255,.82); }
.modal-summary { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.2); display: flex; flex-direction: column; }
.modal-summary span { color: rgba(255,255,255,.75); font-size: .9rem; }
.modal-summary strong { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--green); }
.modal-main { padding: 1.75rem 2rem 2rem; }
@media (max-width: 760px) {
    .modal { padding: 0; place-items: end stretch; }
    .modal-card { grid-template-columns: 1fr; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 94vh; }
    .modal-side { padding: 1.25rem 1.25rem 1rem; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
    .modal-side img { width: 40px; height: 40px; margin: 0; }
    .modal-side h2 { font-size: 1.2rem; margin: 0; flex: 1; padding-right: 2.5rem; }
    .modal-side p { display: none; }
    .modal-summary { margin: 0; padding: .6rem 0 0; width: 100%; flex-direction: row; justify-content: space-between; align-items: baseline; }
    .modal-summary strong { font-size: 1.3rem; }
    .modal-main { padding: 1.25rem; }
}

.tabs { display: flex; gap: .25rem; padding: .25rem; border-radius: var(--r-pill); background: var(--paper); margin-bottom: 1.5rem; max-width: 360px; }
.tabs button { flex: 1; min-height: 42px; border: 0; border-radius: var(--r-pill); background: transparent; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(23,12,107,.3); }

/* Forms ------------------------------------------------------------------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }
.field label { font-weight: 600; font-size: .92rem; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .filters input, .filters select {
    width: 100%; min-height: 48px; padding: .65rem .85rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
    background: var(--white); color: var(--ink); font: inherit; font-size: 1rem;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(35,17,176,.15); }
.field.has-error input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .86rem; font-weight: 600; margin: 0; }
.field-error:empty { display: none; }
.field-help { color: var(--muted); font-size: .82rem; margin: 0; }
.check { display: inline-flex; align-items: center; gap: .55rem; font-weight: 500 !important; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* Page heads -------------------------------------------------------------- */
.page-head { background: var(--paper); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }
.page-head-slim { padding-bottom: 1.5rem; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: .75rem; margin-top: 1.5rem; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; } .field-search { grid-column: 1 / -1; } }
.result-count { color: var(--muted); font-weight: 600; margin-bottom: 1rem; }
.pager { margin-top: 2rem; }
.pager nav ul { display: flex; gap: .75rem; list-style: none; padding: 0; }
.pager nav a, .pager nav span { display: inline-block; padding: .55rem 1.1rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); text-decoration: none; font-weight: 600; }

.empty { text-align: center; padding: 3rem 1.5rem; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--white); }
.empty h2, .empty h3 { font-size: 1.35rem; }
.empty p { color: var(--muted); max-width: 46ch; margin-inline: auto; }

/* Course detail ----------------------------------------------------------- */
.course-hero { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.course-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 400px at 0% 0%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 70%); opacity: .7; }
.course-hero-grid { position: relative; display: grid; grid-template-columns: 1fr 360px; gap: 3rem; padding: clamp(2.5rem, 5vw, 4rem) 0; align-items: start; }
.course-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3.1rem); }
.course-hero-lede { font-size: 1.15rem; color: rgba(255,255,255,.85); max-width: 58ch; }
.crumbs { display: flex; gap: .5rem; margin-bottom: 1rem; font-size: .9rem; }
.crumbs a { color: rgba(255,255,255,.75); }
.crumbs span { color: rgba(255,255,255,.4); }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; padding: 0; margin: 1.75rem 0 1.25rem; }
.facts li { display: flex; flex-direction: column-reverse; }
.facts strong { font-family: var(--font-display); font-size: 1.35rem; }
.facts span { font-size: .82rem; color: rgba(255,255,255,.65); }
.instructor { color: rgba(255,255,255,.8); margin: 0; }

.buy-box { background: var(--white); color: var(--ink); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); position: sticky; top: calc(var(--header-h) + 1rem); }
.buy-cover { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--accent); position: relative; }
.buy-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.buy-body { padding: 1.4rem; }
.buy-body .price { margin-bottom: 1rem; }
.buy-note { color: var(--muted); font-size: .88rem; text-align: center; margin: .6rem 0 0; }
.buy-includes { list-style: none; padding: 1rem 0 0; margin: 1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .4rem; font-size: .92rem; }
.buy-includes li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--green); margin-right: .6rem; vertical-align: middle; }

.course-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; }
.course-detail-main { display: grid; gap: 1.5rem; }
@media (max-width: 960px) {
    .course-hero-grid, .course-detail-grid { grid-template-columns: 1fr; }
    .buy-box { position: static; max-width: 520px; }
}

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 1.75rem); }
.panel h2 { font-size: 1.45rem; }
.prose { color: var(--muted); }
.plain-list { margin: 0; padding-left: 1.2rem; color: var(--muted); display: grid; gap: .35rem; }

.curriculum-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.curriculum-head h2 { margin: 0; }
.curriculum-head p { margin: 0; color: var(--muted); }
.module { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: .6rem; background: var(--white); overflow: hidden; }
.module summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: .2rem 1rem; align-items: center; padding: 1rem 1.15rem; background: var(--paper); }
.module summary::-webkit-details-marker { display: none; }
.module-num { grid-row: span 2; font-family: var(--font-display); font-weight: 800; color: var(--blue); font-size: .95rem; }
.module-title { font-weight: 700; }
.module-count { color: var(--muted); font-size: .88rem; grid-column: 2; }
.module summary::after { content: "+"; grid-column: 3; grid-row: 1 / span 2; font-size: 1.4rem; color: var(--blue); transition: transform .2s; }
.module[open] summary::after { transform: rotate(45deg); }
.lesson-list { list-style: none; margin: 0; padding: .25rem 1.15rem .5rem; }
.lesson-list li { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.lesson-list li:last-child { border-bottom: 0; }
.lesson-type { color: var(--muted); font-size: .82rem; font-weight: 600; }
.lesson-time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.lock { color: var(--muted); display: inline-flex; }
@media (max-width: 560px) { .lesson-list li { grid-template-columns: 1fr auto; } .lesson-type { grid-column: 1 / -1; } .lesson-time { display: none; } }

/* Auth pages -------------------------------------------------------------- */
.auth-page { background: var(--paper); padding: clamp(2rem, 6vw, 4.5rem) 1rem; }
.auth-card { display: grid; grid-template-columns: 340px 1fr; width: min(100%, 940px); margin-inline: auto; background: var(--white); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.auth-side { background: var(--blue); color: var(--white); padding: 2.5rem 2rem; }
.auth-side img { border-radius: 14px; margin-bottom: 1.5rem; }
.auth-side h1 { color: var(--white); font-size: 2rem; }
.auth-side p { color: rgba(255,255,255,.82); }
.auth-main { padding: 2.25rem; }
.auth-switch { margin: 1.25rem 0 0; text-align: center; color: var(--muted); }
@media (max-width: 760px) { .auth-card { grid-template-columns: 1fr; } .auth-side { padding: 1.5rem; } .auth-side img { width: 48px; height: 48px; margin-bottom: .75rem; } .auth-side h1 { font-size: 1.5rem; } .auth-main { padding: 1.5rem; } }

/* Checkout ---------------------------------------------------------------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2rem; align-items: start; }
.checkout-items { list-style: none; margin: 0 0 1rem; padding: 0; }
.checkout-items li { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.checkout-items .mini-cover { width: 52px; height: 52px; }
.checkout-item-info a { display: block; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.checkout-item-info span { color: var(--muted); font-size: .88rem; }
.checkout-items .price { align-items: flex-end; }
.summary { position: sticky; top: calc(var(--header-h) + 1rem); }
.sums { margin: 0 0 1.5rem; display: grid; gap: .5rem; }
.sums div { display: flex; justify-content: space-between; color: var(--muted); }
.sums dd { margin: 0; font-weight: 700; color: var(--ink); }
.sums [hidden] { display: none; }
.sums .grand { padding-top: .75rem; margin-top: .25rem; border-top: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.sums .grand dd { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; }
.pay-methods { border: 0; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .6rem; }
.pay-methods legend { font-weight: 700; margin-bottom: .6rem; }
.pay-option { display: flex; gap: .8rem; align-items: center; padding: .85rem 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--blue); background: #f3f2ff; }
.pay-option input { accent-color: var(--blue); width: 18px; height: 18px; }
.pay-option small { display: block; color: var(--muted); }
.dev-note { margin: .75rem 0 0; font-size: .85rem; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
    .checkout-grid { grid-template-columns: 1fr; }
    .summary { position: static; }
    .checkout-items li { grid-template-columns: 44px 1fr auto; }
    .checkout-items .mini-cover { width: 44px; height: 44px; }
    .checkout-items .link-btn { grid-column: 2; justify-self: start; }
}

/* Dashboard --------------------------------------------------------------- */
.dash-body { background: var(--paper); }
.dash { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.dash-side { background: var(--navy); color: var(--white); padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 2rem; position: sticky; top: 0; height: 100vh; }
.dash-side .brand { padding: 0 .5rem; }
.dash-nav { display: grid; gap: .2rem; }
.dash-nav a { color: rgba(255,255,255,.8); text-decoration: none; padding: .7rem .85rem; border-radius: var(--r-sm); font-weight: 600; }
.dash-nav a:hover { background: rgba(255,255,255,.08); color: var(--white); }
.dash-nav a.is-current { background: rgba(126,217,87,.16); color: var(--white); box-shadow: inset 3px 0 0 var(--green); }
.dash-logout { margin-top: auto; padding: 0 .85rem; }
.dash-main { min-width: 0; }
.dash-top { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem; background: var(--white); border-bottom: 1px solid var(--line); }
.dash-title { font-size: 1.4rem; margin: 0; }
.dash-user { margin-left: auto; display: flex; align-items: center; gap: .65rem; }
.dash-user img { border-radius: 50%; }
.dash-user .avatar-initials { width: 38px; height: 38px; font-size: .85rem; }
.dash-user-name { font-weight: 700; line-height: 1.2; font-size: .95rem; }
.dash-user-name small { display: block; font-weight: 500; color: var(--muted); }
.dash-content { padding: 1.5rem; display: grid; gap: 1.5rem; }
.menu-toggle-dark { display: none; }

.welcome { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.75rem; border-radius: var(--r-lg); background: var(--blue); color: var(--white); }
.welcome h2 { color: var(--white); margin-bottom: .2rem; }
.welcome p { margin: 0; color: rgba(255,255,255,.82); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0; }
.tiles-6 { grid-template-columns: repeat(3, 1fr); }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.15rem 1.25rem; display: flex; flex-direction: column-reverse; }
.tile dt { color: var(--muted); font-size: .9rem; }
.tile dd { margin: 0; font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1.15; }
.tile dd small { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 500; color: var(--muted); }
.tile-muted dd { color: var(--muted); }
.dash-section h2 { font-size: 1.4rem; }
.dash-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.my-courses { display: grid; gap: .75rem; }
.my-course { display: grid; grid-template-columns: 56px 1fr auto; gap: 1.1rem; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.15rem; }
.my-course .mini-cover { width: 56px; height: 56px; font-size: 1.1rem; }
.my-course h3 { margin-bottom: .1rem; }
.my-course p { margin: 0 0 .5rem; color: var(--muted); font-size: .9rem; }
.my-course-side { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.my-course-side strong { font-family: var(--font-display); font-size: 1.3rem; }
.progress { height: 8px; border-radius: var(--r-pill); background: var(--paper); overflow: hidden; max-width: 420px; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: inherit; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .82rem; padding: .6rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td small { display: block; color: var(--muted); }
.table a { color: var(--ink); font-weight: 600; text-decoration: none; }
.table a:hover { color: var(--blue); }

@media (max-width: 1100px) { .dash-two { grid-template-columns: 1fr; } .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
    .dash { grid-template-columns: 1fr; }
    .dash-side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
    .dash-side.is-open { transform: none; box-shadow: 20px 0 50px -20px rgba(0,0,0,.6); }
    .menu-toggle-dark { display: inline-grid; }
    .dash-user-name { display: none; }
    .dash-content { padding: 1rem; }
    .my-course { grid-template-columns: 48px 1fr; }
    .my-course .mini-cover { width: 48px; height: 48px; }
    .my-course-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (max-width: 480px) { .tiles, .tiles-6 { grid-template-columns: 1fr 1fr; } .tile dd { font-size: 1.6rem; } }

/* Phase 2: payments ------------------------------------------------------- */
.badge-amber { background: #fff3d6; color: #8a5a00; }
.badge-red { background: #fde8e6; color: var(--danger); }
.text-red { color: var(--danger); font-weight: 600; }
.notice { padding: .9rem 1.1rem; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); margin: 0; }
.notice a { font-weight: 700; }
.notice-amber { background: #fff8e6; border-color: #f3dca3; color: #5c3d00; }
.notice-red { background: #fdf0ef; border-color: #f2c4bf; color: #7a1a14; }
.panel .notice { margin-top: 1rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input[type="file"] { padding: .55rem; border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--paper); width: 100%; font: inherit; }

.checkout-main { display: grid; gap: 1.5rem; min-width: 0; }
.pay-panel { margin-top: 1.25rem; }
.pay-panel[hidden] { display: none; }
.pay-note { color: var(--muted); font-size: .9rem; margin: .75rem 0 0; }
.pay-option:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.bank-box { border: 2px solid var(--blue); border-radius: var(--r-md); padding: 1.1rem 1.25rem; margin-bottom: 1.5rem; background: #f6f5ff; }
.bank-box p { margin-bottom: .6rem; }
.bank-box dl { margin: 0; display: grid; gap: .45rem; }
.bank-box dl div { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.bank-box dt { color: var(--muted); }
.bank-box dd { margin: 0; font-weight: 700; }
.acct { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .04em; }
.form h3 { margin: 0; }

.seg { display: flex; flex-wrap: wrap; gap: .35rem; }
.seg a { padding: .5rem .9rem; border-radius: var(--r-pill); background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; display: inline-flex; gap: .4rem; align-items: center; }
.seg a.is-current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .35rem; border-radius: var(--r-pill); background: var(--green); color: var(--ink); font-size: .75rem; font-weight: 800; margin-left: .35rem; }
.filters-admin { grid-template-columns: 2fr 1fr auto; margin-top: 0; }
@media (max-width: 700px) { .filters-admin { grid-template-columns: 1fr; } }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.panel-head h2 { margin: 0; }
.panel h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.kv { margin: 0; display: grid; gap: .1rem; }
.kv div { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.kv dd small { display: block; font-weight: 400; color: var(--muted); }
@media (max-width: 520px) { .kv div { grid-template-columns: 1fr; gap: .1rem; } }
.proof { display: block; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--paper); }
.proof img { width: 100%; max-height: 520px; object-fit: contain; }
.review-actions { display: grid; gap: 1rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty-flat { border: 0; padding: 2rem 1rem; }
code { font-size: .88em; background: var(--paper); padding: .1rem .35rem; border-radius: 4px; word-break: break-all; }

.receipt { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 4vw, 2.5rem); max-width: 820px; }
.receipt-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.5rem; border-bottom: 3px solid var(--blue); }
.receipt-brand { display: flex; gap: .9rem; align-items: center; }
.receipt-brand img { border-radius: 12px; }
.receipt-brand strong { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.receipt-brand span { display: block; color: var(--muted); font-size: .85rem; }
.receipt-title { text-align: right; }
.receipt-title h2 { margin: 0 0 .35rem; font-size: 1.5rem; }
.receipt-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem 1.5rem; margin: 1.5rem 0; }
.receipt-meta dt { color: var(--muted); font-size: .82rem; }
.receipt-meta dd { margin: 0; font-weight: 700; word-break: break-word; }
.receipt-table tfoot th { text-align: right; font-weight: 600; color: var(--muted); padding: .55rem .75rem; }
.receipt-table tfoot td { padding: .55rem .75rem; font-weight: 700; }
.receipt-table tfoot .grand th, .receipt-table tfoot .grand td { color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; border-top: 2px solid var(--ink); }
.receipt-foot { color: var(--muted); font-size: .9rem; margin: 1rem 0 0; }
.receipt-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
@media (max-width: 640px) { .receipt-meta { grid-template-columns: 1fr 1fr; } .receipt-title { text-align: left; } }

@media print {
    .dash-side, .dash-top, .no-print, .flash, .skip-link { display: none !important; }
    .dash { display: block; }
    .dash-body { background: #fff; }
    .dash-content { padding: 0; }
    .receipt { border: 0; padding: 0; max-width: none; }
    .badge { border: 1px solid currentColor; }
}

/* Phase 3: learning -------------------------------------------------------- */
.learn-body { background: var(--paper); }
.learn-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: .6rem 1.25rem; background: var(--navy); color: var(--white); min-height: 64px; }
.learn-logo img { border-radius: 8px; }
.learn-top-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 1.5rem; }
.learn-top-title > a { color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.learn-progress { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; font-size: .85rem; color: rgba(255,255,255,.8); }
.progress-dark { width: 160px; background: rgba(255,255,255,.15); }
.learn-top-links a { color: rgba(255,255,255,.85); font-weight: 600; text-decoration: none; }
.learn-top-links a:hover { color: var(--green); }
@media (max-width: 720px) {
    .learn-top-title { flex-direction: column; align-items: flex-start; gap: .25rem; }
    .learn-top-title > a { font-size: .95rem; max-width: 100%; }
    .progress-dark { width: 110px; }
}

.learn { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.learn-side { background: var(--white); border-right: 1px solid var(--line); overflow-y: auto; position: sticky; top: 64px; height: calc(100vh - 64px); }
.learn-side-head { display: flex; align-items: baseline; gap: .75rem; padding: 1.1rem 1.25rem .75rem; position: sticky; top: 0; background: var(--white); z-index: 1; border-bottom: 1px solid var(--line); }
.learn-side-head h2 { font-size: 1.05rem; margin: 0; flex: 1; }
.learn-side-head span { color: var(--muted); font-size: .85rem; }
.learn-side-close { display: none; border: 0; background: var(--paper); width: 36px; height: 36px; border-radius: 50%; place-items: center; cursor: pointer; }
.learn-module h3 { font-family: var(--font-body); font-size: .95rem; margin: 0; padding: 1rem 1.25rem .4rem; }
.learn-module h3 span { display: block; font-size: .75rem; color: var(--blue); font-weight: 700; }
.learn-module ol { list-style: none; margin: 0 0 .5rem; padding: 0; }
.learn-module li a { display: grid; grid-template-columns: 22px 1fr; gap: .7rem; padding: .6rem 1.25rem; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.learn-module li a:hover { background: var(--paper); }
.learn-module li.is-current a { background: #f0eeff; border-left-color: var(--blue); }
.ls-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; margin-top: 1px; color: var(--muted); }
.is-done .ls-mark { background: var(--green); border-color: var(--green); color: var(--ink); }
.is-locked .ls-mark { border-color: transparent; background: var(--paper); }
.is-locked .ls-title { color: var(--muted); }
.ls-title { display: block; font-weight: 600; font-size: .93rem; line-height: 1.35; }
.ls-meta { display: flex; flex-wrap: wrap; gap: .2rem .7rem; font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.ls-free { color: var(--green-deep); font-weight: 700; }

.learn-main { min-width: 0; }
.learn-main-inner { max-width: 960px; margin: 0 auto; padding: 1.75rem clamp(1rem, 3vw, 2.5rem) 3rem; }
.learn-toggle { display: none; margin-bottom: 1rem; }
.learn-crumb { color: var(--muted); font-size: .9rem; margin-bottom: .35rem; }
.lesson-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.25rem; }

.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 20px 40px -25px rgba(0,0,0,.6); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-native video { object-fit: contain; background: #000; }
.player-sm { max-width: 480px; margin-top: .75rem; }
.pdf-frame { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; height: min(80vh, 900px); }
.pdf-frame iframe { width: 100%; height: 100%; border: 0; }
.file-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .9rem; }
.resource-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 1.4rem; background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: var(--r-md); }
.resource-card strong { display: block; }
.resource-card span { color: var(--muted); font-size: .9rem; }

.lesson-text { margin-top: 1.75rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(1.25rem, 3vw, 2rem); font-size: 1.05rem; line-height: 1.75; }
.lesson-text > :first-child { margin-top: 0; }
.lesson-text > :last-child { margin-bottom: 0; }
.lesson-text h1, .lesson-text h2, .lesson-text h3 { margin: 1.5em 0 .5em; }
.lesson-text h2 { font-size: 1.45rem; }
.lesson-text h3 { font-size: 1.2rem; }
.lesson-text p, .lesson-text ul, .lesson-text ol { max-width: 72ch; }
.lesson-text li { margin-bottom: .35em; }
.lesson-text code { background: var(--paper); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.lesson-text pre { background: var(--ink); color: #e9e7ff; padding: 1rem 1.2rem; border-radius: var(--r-sm); overflow-x: auto; font-size: .9rem; line-height: 1.55; }
.lesson-text pre code { background: none; padding: 0; color: inherit; }
.lesson-text blockquote { margin: 1em 0; padding: .25em 1em; border-left: 4px solid var(--green); color: var(--muted); }
.lesson-text img { border-radius: var(--r-sm); }

.locked { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1.5rem; background: var(--white); border: 2px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--ink); }
.locked svg { color: var(--blue); margin: 0 auto 1rem; }
.locked h2 { font-size: 1.5rem; }
.locked p { color: var(--muted); max-width: 46ch; margin-inline: auto; }
.locked form { margin-top: 1.25rem; }
.locked-alt { margin-top: 1rem; }

.lesson-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line-strong); }
.lesson-nav-center { text-align: center; }
.lesson-nav-center form { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.lesson-nav-end { text-align: right; }
.done-label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--green-deep); }

@media (max-width: 960px) {
    .learn { grid-template-columns: 1fr; }
    .learn-side { position: fixed; inset: 0 auto 0 0; top: 0; height: 100vh; width: min(88vw, 360px); z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: 20px 0 50px -20px rgba(0,0,0,.5); }
    .learn-side.is-open { transform: none; }
    .learn-side-close { display: grid; }
    .learn-toggle { display: inline-flex; }
    .pdf-frame { height: 70vh; }
}
@media (max-width: 600px) {
    .lesson-nav { grid-template-columns: 1fr 1fr; }
    .lesson-nav-center { grid-column: 1 / -1; grid-row: 1; }
    .lesson-nav-center .btn { width: 100%; }
}

/* Dashboard additions */
.tiles-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .tiles-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .tiles-5 { grid-template-columns: 1fr 1fr; } }
.resume { display: grid; gap: .1rem; padding: 1.1rem 1.4rem; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--green); text-decoration: none; color: var(--ink); }
.resume:hover { border-color: var(--green); }
.resume-label { font-size: .85rem; font-weight: 700; color: var(--green-deep); }
.resume strong { font-family: var(--font-display); font-size: 1.2rem; }
.resume span:last-child { color: var(--muted); font-size: .9rem; }
.last-lesson { display: block; font-size: .85rem; }
.my-course h3 .badge { vertical-align: middle; margin-left: .35rem; }
.buy-second { margin-top: .6rem; }
.buy-notice { margin-bottom: .75rem; }
.lesson-list a.lesson-title { color: var(--ink); font-weight: 600; }
.lesson-list a.lesson-title:hover { color: var(--blue); }

/* Course editor */
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.editor-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.module-panel { display: grid; gap: 1rem; }
.module-panel-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.module-panel-head h2 { flex: 1; margin: 0; font-size: 1.25rem; min-width: 200px; }
.module-panel-head h2 span { display: block; font-family: var(--font-body); font-size: .78rem; color: var(--blue); font-weight: 700; }
.order-btns { display: flex; flex-direction: column; gap: 2px; }
.order-btns form { margin: 0; }
.icon-btn { width: 30px; height: 24px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--white); cursor: pointer; font-size: .85rem; line-height: 1; color: var(--ink); }
.icon-btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link-danger { color: var(--danger); }
.inline-edit summary { list-style: none; cursor: pointer; }
.inline-edit summary::-webkit-details-marker { display: none; }
.inline-edit[open] summary { margin-bottom: .5rem; }
.inline-edit-form, .inline-add { display: flex; gap: .5rem; flex-wrap: wrap; }
.inline-edit-form input, .inline-add input { flex: 1; min-width: 220px; min-height: 44px; padding: .55rem .8rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; }
.lesson-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.lesson-rows li { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--white); }
.lesson-rows li:last-child { border-bottom: 0; }
.lesson-row-title { font-weight: 700; color: var(--ink); text-decoration: none; }
.lesson-row-title:hover { color: var(--blue); }
.lesson-row-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.tag { font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--paper); padding: .1rem .5rem; border-radius: var(--r-pill); }
.table-actions { text-align: right; white-space: nowrap; }
.lesson-form textarea { width: 100%; padding: .75rem .85rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; font-size: .98rem; line-height: 1.6; resize: vertical; }
.lesson-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(35,17,176,.15); }
.field-checks { align-content: center; gap: .6rem; }
.current-file { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .6rem .8rem; background: var(--paper); border-radius: var(--r-sm); font-size: .92rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.danger-zone { margin-top: 1rem; text-align: right; }
[data-show-for][hidden] { display: none !important; }

/* Phase 4: quizzes, assignments, certificates ------------------------------ */
.notice-green { background: var(--green-tint); border-color: #cdeec0; color: #1f5a0b; }
.lesson-text-intro { margin: 0 0 1.25rem; }
.complete-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; margin-bottom: 1.25rem; border-radius: var(--r-md); background: var(--green); color: var(--ink); }
.gated-note { color: var(--muted); font-size: .9rem; font-weight: 600; }

.quiz-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 1.75rem); display: grid; gap: 1rem; justify-items: start; }
.quiz-card .notice { width: 100%; }
.quiz-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0; width: 100%; }
.quiz-facts div { display: flex; flex-direction: column-reverse; }
.quiz-facts dt { color: var(--muted); font-size: .85rem; }
.quiz-facts dd { margin: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }
.quiz-left { margin: -.5rem 0 0; color: var(--muted); font-size: .9rem; }
.quiz-card h3 { margin: .5rem 0 0; font-size: 1rem; }
.attempt-list { list-style: none; margin: 0; padding: 0; width: 100%; }
.attempt-list li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 1rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); font-size: .93rem; }
@media (max-width: 600px) { .quiz-facts { grid-template-columns: 1fr 1fr; } .attempt-list li { grid-template-columns: 1fr auto; } }

.quiz-page { max-width: 820px; margin: 0 auto; padding: 1.75rem clamp(1rem, 3vw, 2rem) 4rem; }
.quiz-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.quiz-page-head .lesson-title { margin-bottom: .35rem; }
.timer { position: sticky; top: 76px; z-index: 5; display: flex; flex-direction: column; align-items: center; padding: .6rem 1.1rem; border-radius: var(--r-md); background: var(--ink); color: var(--white); min-width: 120px; }
.timer span { font-size: .78rem; color: rgba(255,255,255,.7); }
.timer strong { font-family: var(--font-display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.timer.is-low { background: var(--danger); }
.quiz-form { display: grid; gap: 1.1rem; }
.q { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); padding: 1.25rem 1.4rem; margin: 0; }
.q legend { padding: 0; float: left; width: 100%; }
.q legend + * { clear: both; }
.q-num { display: block; font-size: .82rem; font-weight: 700; color: var(--blue); }
.q-text { display: block; font-weight: 700; font-size: 1.1rem; line-height: 1.45; margin: .2rem 0 0; }
.q-hint { color: var(--muted); font-size: .85rem; margin: .4rem 0 .9rem; }
.q-options { display: grid; gap: .5rem; }
.q-option { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .9rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; }
.q-option input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--blue); flex-shrink: 0; }
.q-option:has(input:checked) { border-color: var(--blue); background: #f3f2ff; }
.q.is-unanswered { border-color: var(--danger); }
.quiz-submit { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

.result-hero { text-align: center; padding: 2rem 1.5rem; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--line-strong); margin-bottom: 2rem; }
.result-hero.is-pass { border-top-color: var(--green); }
.result-hero.is-fail { border-top-color: var(--danger); }
.result-label { font-weight: 700; margin: 0; }
.is-pass .result-label { color: var(--green-deep); }
.is-fail .result-label { color: var(--danger); }
.result-score { font-family: var(--font-display); font-size: clamp(3rem, 8vw, 4.5rem); font-weight: 800; line-height: 1.1; margin: .2rem 0; }
.result-actions { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.review-title { font-size: 1.3rem; }
.review-q { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--line-strong); border-radius: var(--r-md); padding: 1.1rem 1.25rem; margin-bottom: .9rem; }
.review-q.is-right { border-left-color: var(--green); }
.review-q.is-wrong { border-left-color: var(--danger); }
.review-q .q-num { display: flex; justify-content: space-between; align-items: center; }
.review-options { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .35rem; }
.review-options li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; border-radius: var(--r-sm); background: var(--paper); font-size: .95rem; }
.review-options li small { font-weight: 700; white-space: nowrap; }
.review-options li.picked { outline: 2px solid var(--line-strong); }
.review-options li.correct { background: var(--green-tint); }
.review-options li.correct small { color: var(--green-deep); }
.review-options li.wrong { background: #fdeceb; }
.review-options li.wrong small { color: var(--danger); }
.explanation { margin: .75rem 0 0; color: var(--muted); }

.assignment-heading { margin-top: 0; font-size: 1.25rem; }
.submission-card { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: var(--r-md); padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.submission-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.submission-head h3 { margin: 0; }
.submission-score { font-size: 1.1rem; }
.submission-score strong { font-family: var(--font-display); font-size: 2rem; }
.feedback { background: var(--paper); border-radius: var(--r-sm); padding: .9rem 1rem; margin: .75rem 0; }
.feedback p { margin: .35rem 0 0; }
.your-answer summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.assignment-form textarea, .form textarea { width: 100%; padding: .75rem .85rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; line-height: 1.6; resize: vertical; }
.answer-box { background: var(--paper); border-radius: var(--r-sm); padding: 1rem; max-height: 480px; overflow: auto; line-height: 1.65; }

.quiz-builder { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); align-items: start; }
.quiz-builder-main { display: grid; gap: 1.5rem; min-width: 0; }
.quiz-settings { position: sticky; top: 1rem; }
.lesson-rows li.is-editing { background: #f3f2ff; }
.options-field, .form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.form legend { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; padding: 0; }
.option-row { display: grid; grid-template-columns: 34px 1fr; gap: .5rem; align-items: center; }
.option-row input[type="text"] { min-height: 44px; padding: .55rem .8rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; width: 100%; }
.option-correct { justify-content: center; }
.option-correct input { width: 22px; height: 22px; accent-color: var(--green-deep); }
.tf-choice { display: flex; gap: 1.5rem; }
[data-q-show][hidden] { display: none !important; }
@media (max-width: 1000px) { .quiz-builder { grid-template-columns: 1fr; } .quiz-settings { position: static; } }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.cert-card { background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--green); border-radius: var(--r-md); padding: 1.25rem; }
.cert-card svg path { stroke: var(--green-deep); }
.cert-card h2 { font-size: 1.2rem; margin: .5rem 0 .25rem; }
.cert-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.cert-card-code { font-family: var(--font-display); font-weight: 700; color: var(--ink) !important; margin-top: .35rem !important; letter-spacing: .04em; }
.cert-card-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

.cert-wrap { display: grid; gap: 1.5rem; justify-items: center; }
.verify-panel { width: 100%; max-width: 1000px; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--white); }
.verify-panel.is-valid { border-color: #cdeec0; background: var(--green-tint); color: #1f5a0b; }
.verify-panel.is-revoked { border-color: #f2c4bf; background: #fdf0ef; color: #7a1a14; }
.verify-panel strong { display: block; }
.verify-panel > div:not(.verify-actions) { flex: 1; min-width: 220px; }
.verify-actions { display: flex; gap: .5rem; }
.lookup-form { margin-top: 1.25rem; max-width: 520px; }
.lookup-form input { text-transform: uppercase; letter-spacing: .05em; }
.lookup-result { margin-top: 1rem; max-width: 520px; }

.certificate { width: 100%; max-width: 1000px; aspect-ratio: 1.414 / 1; background: var(--white); padding: 2.2%; border-radius: 4px; box-shadow: 0 30px 60px -30px rgba(23,12,107,.45); container-type: inline-size; page: cert; }
.cert-inner { position: relative; height: 100%; border: 3px solid var(--navy); outline: 1px solid var(--navy); outline-offset: -10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4% 8%; overflow: hidden; }
.cert-tick { position: absolute; right: -6%; bottom: -12%; width: 46%; opacity: .12; }
.cert-tick path { fill: none; stroke: var(--green); stroke-width: 44; stroke-linecap: round; stroke-linejoin: round; }
.cert-head { display: flex; align-items: center; gap: 1.2cqw; font-family: var(--font-display); font-weight: 800; font-size: 2.1cqw; color: var(--navy); margin-bottom: 2.5cqw; }
.cert-head img { width: 6cqw; height: 6cqw; border-radius: .8cqw; }
.cert-kicker { font-family: var(--font-display); font-size: 4.2cqw; font-weight: 800; color: var(--blue); margin: 0 0 1.6cqw; line-height: 1.1; }
.cert-line { font-size: 1.6cqw; color: var(--muted); margin: 0; }
.cert-name { font-family: var(--font-display); font-size: 5.2cqw; font-weight: 700; color: var(--ink); margin: 1cqw 0 1.2cqw; padding: 0 3cqw .6cqw; border-bottom: 2px solid var(--green); line-height: 1.15; }
.cert-course { font-family: var(--font-display); font-size: 3cqw; font-weight: 700; color: var(--navy); margin: 1cqw 0 0; line-height: 1.2; }
.cert-foot { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; padding-top: 3cqw; position: relative; }
.cert-sign { display: flex; flex-direction: column; align-items: flex-start; border-top: 1.5px solid var(--ink); padding-top: .6cqw; min-width: 24cqw; }
.cert-sign-name { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.7cqw; color: var(--ink); }
.cert-sign-role { font-size: 1.2cqw; color: var(--muted); }
.cert-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 1.15cqw; color: var(--muted); line-height: 1.5; }

@page cert { size: A4 landscape; margin: 0; }
@media print {
    .page-cert .site-header, .page-cert .site-footer, .page-cert .verify-panel, .page-cert .flash, .page-cert .skip-link { display: none !important; }
    .page-cert .section { padding: 0; }
    .page-cert .wrap { width: 100%; }
    .page-cert .certificate { max-width: none; width: 297mm; height: 210mm; aspect-ratio: auto; box-shadow: none; padding: 10mm; }
    .certificate * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Phase 5: admin CMS --------------------------------------------------------- */
.dash-side { overflow-y: auto; }
.dash-nav-group { margin: 1rem 0 .25rem; padding: 0 .85rem; font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.5); }
.dash-nav a.dash-nav-site { margin-top: 1rem; color: rgba(255,255,255,.6); font-size: .9rem; }

.course-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.course-form-main, .course-form-side { display: grid; gap: 1.5rem; min-width: 0; }
.course-form-side { position: sticky; top: 1rem; }
.course-form .panel h2, .settings-form .panel h2 { font-size: 1.2rem; margin: 0; }
@media (max-width: 1000px) { .course-form { grid-template-columns: 1fr; } .course-form-side { position: static; } }
.slug-field { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.slug-field span { display: flex; align-items: center; padding: 0 .6rem; background: var(--paper); color: var(--muted); font-size: .85rem; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.slug-field input { border: 0 !important; border-radius: 0 !important; min-width: 0; }
.thumb-preview { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--accent, var(--blue)); }
.thumb-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge-btn { border: 0; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 700; }
.badge-btn:hover { outline: 2px solid currentColor; }

.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); margin-right: .5rem; vertical-align: middle; }
.color-input { width: 64px; height: 44px; padding: 2px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--white); cursor: pointer; }
.input-short { max-width: 120px; }
.narrow-form { max-width: 680px; }

.profile-grid { align-items: start; }
.profile-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.profile-head h2 { margin: 0 0 .35rem; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; font-size: 1.3rem; object-fit: cover; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.enrol-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.enrol-list li { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.enrol-top { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.enrol-meta { font-size: .85rem; margin: .4rem 0 .5rem; }
.enrol-edit { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .35rem; }
.enrol-edit select, .enrol-edit input { min-height: 38px; padding: .3rem .6rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; font-size: .9rem; background: var(--white); }
.enrol-add { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.enrol-add h3 { margin: 0; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.mini-row-top { align-items: flex-start; }
.mini-row small { display: block; color: var(--muted); font-size: .85rem; }
.mini-quote { margin: .35rem 0 0; font-size: .9rem; }
.round-thumb { border-radius: 50%; object-fit: cover; }

.settings-form { display: grid; gap: 1.5rem; }
.settings-form h3 { font-size: 1rem; margin: .5rem 0 0; }
.stat-rows { display: grid; gap: .5rem; }
.stat-row { display: grid; grid-template-columns: 120px 80px 1fr; gap: .5rem; }
.stat-row-head span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.point-row { display: grid; grid-template-columns: 200px 1fr; gap: .5rem; margin-bottom: .5rem; }
.stat-row input, .point-row input { min-height: 44px; padding: .5rem .75rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; width: 100%; }
@media (max-width: 600px) { .stat-row { grid-template-columns: 1fr 70px; } .stat-row input:last-child { grid-column: 1 / -1; } .point-row { grid-template-columns: 1fr; } }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem 1.5rem; }
.sticky-save { position: sticky; bottom: 0; padding: 1rem 0; background: linear-gradient(transparent, var(--paper) 35%); z-index: 2; }

/* Phase 6: remote jobs ------------------------------------------------------ */
.tiles-8 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .tiles-8 { grid-template-columns: repeat(2, 1fr); } }
.tile-small { font-size: 1.25rem !important; }
.jobs-count { color: var(--white) !important; }
.jobs-count strong { color: var(--green); font-family: var(--font-display); font-size: 1.3rem; }

.jobs-filters { grid-template-columns: 2fr repeat(4, minmax(0, 1fr)) auto; margin-top: 0; }
@media (max-width: 1100px) { .jobs-filters { grid-template-columns: 1fr 1fr; } }
.job-list { display: grid; gap: .75rem; }
.job-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 1rem; align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.25rem; }
.job-card.is-featured { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green); }
.job-logo { width: 52px; height: 52px; border-radius: var(--r-sm); background: var(--paper); display: grid; place-items: center; overflow: hidden; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--blue); }
.job-logo img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.job-main h2 { font-size: 1.15rem; margin: 0 0 .2rem; }
.job-main h2 a { color: var(--ink); text-decoration: none; }
.job-main h2 a:hover { color: var(--blue); }
.job-company { margin: 0 0 .5rem; color: var(--muted); font-weight: 600; }
.job-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.job-chips li { font-size: .8rem; font-weight: 600; padding: .15rem .6rem; border-radius: var(--r-pill); background: var(--paper); color: var(--ink); }
.job-excerpt { margin: .6rem 0 0; color: var(--muted); font-size: .92rem; }
.job-side { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.job-source { font-size: .78rem; }
@media (max-width: 700px) {
    .job-card { grid-template-columns: 44px minmax(0, 1fr); }
    .job-logo { width: 44px; height: 44px; }
    .job-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
.job-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.job-detail-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.job-detail-head h2 { margin: 0; }
.job-detail-head .job-logo { width: 56px; height: 56px; }
.job-description { margin-top: 0; border: 0; padding: 0; }
.job-tags { margin-top: 1.25rem; }
.job-detail-side { position: sticky; top: 1rem; display: grid; gap: 1rem; }
@media (max-width: 960px) { .job-detail { grid-template-columns: 1fr; } .job-detail-side { position: static; } }
.locked-jobs { max-width: 720px; margin: 1rem auto; }
.locked-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }
.jobs-admin { align-items: start; }
.row-muted td { opacity: .55; }

/* Floating job alert, bottom-left: compact green glass card */
.job-alert {
    position: fixed; left: 1rem; bottom: 1rem; z-index: 45; width: min(270px, calc(100vw - 2rem));
    padding: .65rem .75rem .7rem; border-radius: 14px; color: var(--ink);
    background: linear-gradient(140deg, rgba(76,170,40,.72), rgba(46,128,20,.66));
    border: 1px solid rgba(255,255,255,.45);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 16px 34px -18px rgba(23,12,107,.6), inset 0 1px 0 rgba(255,255,255,.4);
    transform: translateY(calc(100% + 2rem)); opacity: 0;
    transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .35s;
    overflow: hidden;
}
/* Browsers without blur: a little more solid so text stays readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .job-alert { background: linear-gradient(140deg, rgba(70,160,36,.94), rgba(46,128,20,.92)); }
}
.job-alert.is-in { transform: none; opacity: 1; }
body.has-cart .job-alert { bottom: calc(84px + 1rem); }
.job-alert > * { position: relative; }
.job-alert-head { display: flex; align-items: center; gap: .45rem; padding-right: 1.6rem; margin-bottom: .4rem; }
.job-alert-logo { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.85); }
.job-alert-brand { display: none; }
.job-alert-label { margin: 0; display: flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--navy); }
.job-alert-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(35,17,176,.25); animation: pulse-dot 1.8s ease-in-out infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 5px rgba(35,17,176,0); } }
.job-alert-title { margin: 0; font-family: var(--font-body); font-weight: 800; font-size: .92rem; line-height: 1.25; color: var(--white); text-shadow: 0 1px 2px rgba(20,70,6,.6);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-alert-meta { margin: .2rem 0 0; display: flex; gap: .55rem; font-size: .72rem; font-weight: 600; color: rgba(20,11,74,.88); white-space: nowrap; overflow: hidden; }
.job-alert-meta span { overflow: hidden; text-overflow: ellipsis; }
.job-alert-meta span + span::before { content: "·"; margin-right: .55rem; }
.job-alert-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .55rem; }
.job-alert-salary { display: inline-flex; align-items: center; gap: .3rem; margin: .4rem 0 0; padding: .18rem .6rem; border-radius: var(--r-pill); background: var(--white); color: var(--navy); font-weight: 800; font-size: .76rem; line-height: 1.3; font-variant-numeric: tabular-nums; box-shadow: 0 4px 10px -6px rgba(23,12,107,.6); }
.job-alert-salary[hidden] { display: none; }
.job-alert-salary::before { content: "Salary"; font-weight: 600; font-size: .68rem; color: var(--muted); }
.job-alert-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: .25rem .8rem; border-radius: var(--r-pill); background: var(--blue); color: var(--white); font-weight: 700; font-size: .76rem; text-decoration: none; white-space: nowrap; transition: background-color .15s; }
.job-alert-btn:hover { background: var(--blue-deep); }
.job-alert-btn:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.job-alert-note { display: none; }
.job-alert-x { position: absolute; top: .45rem; right: .45rem; z-index: 1; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255,255,255,.75); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.job-alert-x svg { width: 12px; height: 12px; }
.job-alert-x:hover { background: var(--white); }
@media (max-width: 640px) { body.has-cart .job-alert { bottom: calc(132px + .6rem); } .job-alert { left: .6rem; bottom: .6rem; } }
@media (prefers-reduced-motion: reduce) { .job-alert-dot { animation: none; } }

.job-chips li.chip-ok { background: var(--green-tint); color: var(--green-deep); }
.job-attribution { margin-top: 1.5rem; font-size: .85rem; color: var(--muted); }
.jobs-filters { grid-template-columns: 2fr repeat(5, minmax(0, 1fr)) auto; }
@media (max-width: 1200px) { .jobs-filters { grid-template-columns: 1fr 1fr; } }

.popup-timing { margin-top: .25rem; }
.timing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; }
.timing-grid label { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; font-weight: 600; }
.timing-grid span { display: flex; align-items: center; gap: .4rem; font-weight: 500; color: var(--muted); }
.timing-button { display: block; margin-top: .6rem; font-size: .88rem; font-weight: 600; }
.timing-button-input { width: 100%; max-width: 260px; min-height: 40px; padding: .4rem .6rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; }
.timing-grid input { width: 90px; min-height: 40px; padding: .4rem .6rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; }
@media (max-width: 520px) { .timing-grid { grid-template-columns: 1fr; } }

/* Phase 7: notifications, support, contact, announcements, reviews, coupons --- */
.bell { position: relative; display: grid; place-items: center; width: 42px; height: 42px; margin-left: auto; border-radius: 50%; color: var(--ink); text-decoration: none; }
.bell:hover { background: var(--paper); }
.bell + .dash-user { margin-left: .25rem; }
.bell-count { position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill); background: var(--danger); color: var(--white); font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--white); }
.verify-banner { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: .7rem 1.5rem; background: #fff8e6; border-bottom: 1px solid #f3dca3; color: #5c3d00; font-size: .92rem; }
.verify-banner form { margin: 0; }

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list a { display: grid; grid-template-columns: 12px 1fr auto; gap: .8rem; align-items: start; padding: .9rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.notif-list a:hover { background: var(--paper); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: .45rem; background: transparent; }
.notif-list .is-unread .notif-dot { background: var(--blue); }
.notif-list .is-unread strong { font-weight: 800; }
.notif-text strong { display: block; }
.notif-text span { display: block; color: var(--muted); font-size: .9rem; }
.notif-list time { color: var(--muted); font-size: .82rem; white-space: nowrap; }

.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.thread-msg { padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); }
.thread-msg.is-staff { background: #f3f2ff; border-color: #d9d5ff; }
.thread-meta { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; font-size: .88rem; }
.thread-meta time { color: var(--muted); }
.thread-body { line-height: 1.65; word-wrap: break-word; }
.thread-file { display: inline-block; margin-top: .6rem; font-weight: 600; font-size: .9rem; }
.support-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); align-items: start; }
.support-side { display: grid; gap: 1.5rem; }
@media (max-width: 1000px) { .support-grid { grid-template-columns: 1fr; } }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row-strong td { font-weight: 700; }

.announce-bar { background: var(--ink); color: var(--white); }
.announce-inner { display: flex; align-items: center; gap: .8rem; min-height: 46px; padding-block: .45rem; }
.announce-inner p { margin: 0; flex: 1; font-size: .92rem; }
.announce-body { color: rgba(255,255,255,.75); }
.announce-tag { flex-shrink: 0; padding: .1rem .55rem; border-radius: var(--r-pill); background: var(--green); color: var(--ink); font-size: .72rem; font-weight: 800; }
.announce-link { flex-shrink: 0; color: var(--green); font-weight: 700; font-size: .9rem; }
.announce-x { flex-shrink: 0; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: rgba(255,255,255,.75); cursor: pointer; display: grid; place-items: center; }
.announce-x:hover { background: rgba(255,255,255,.12); color: var(--white); }
@media (max-width: 640px) { .announce-body { display: none; } }
.dash-announcement { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.25rem; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--blue); }
.dash-announcement > div { flex: 1; }
.dash-announcement p { margin: .25rem 0 0; color: var(--muted); }
.notify-box { padding: .9rem 1rem !important; border: 1px dashed var(--line-strong) !important; border-radius: var(--r-sm); }

.reviews-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.reviews-score { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: 0; }
.reviews-score strong { font-family: var(--font-display); font-size: 2.2rem; }
.rating-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; min-width: 220px; font-size: .82rem; color: var(--muted); }
.rating-bars li { display: grid; grid-template-columns: 30px 1fr 28px; gap: .5rem; align-items: center; }
.rating-bars .bar { height: 7px; border-radius: var(--r-pill); background: var(--paper); overflow: hidden; }
.rating-bars .bar span { display: block; height: 100%; background: #e3a008; }
.review-form { margin: 1.25rem 0; padding: 1rem; border-radius: var(--r-md); background: var(--paper); }
.review-form textarea { background: var(--white); }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 1.9rem; line-height: 1; color: var(--line-strong); cursor: pointer; transition: color .1s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #e3a008; }
.star-input input:focus-visible + label { outline: 2px solid var(--blue); border-radius: 4px; }
.review-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.review-list li { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.review-list p { margin: .5rem 0 0; color: var(--ink); }
.review-top { display: flex; align-items: center; gap: .7rem; }
.review-top > div { flex: 1; display: flex; flex-direction: column; }
.review-top time { color: var(--muted); font-size: .82rem; }
.review-top .avatar-initials { width: 38px; height: 38px; font-size: .82rem; }
.review-setting { margin: 0; }

.coupon-box { margin: 0 0 1.25rem; padding: .9rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.coupon-box p { margin: 0 0 .25rem; }
.coupon-form { display: flex; gap: .5rem; }
.coupon-form input { flex: 1; min-width: 0; min-height: 40px; padding: .45rem .7rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; text-transform: uppercase; letter-spacing: .04em; }
.coupon-row dt, .coupon-row dd { color: var(--green-deep) !important; }
.code, .code-input { font-family: var(--font-display); letter-spacing: .05em; text-transform: uppercase; }

/* Phase 8: analytics, activity --------------------------------------------- */
.analytics-filter { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; }
.custom-range { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.custom-range input { min-height: 38px; padding: .3rem .5rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; font-size: .9rem; }
.chart-box { position: relative; height: 320px; }
.chart-box-sm { height: 260px; }
.report-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.print-only { display: none; }
.dash-shortcut { margin: 0; }
.dash-shortcut a { font-weight: 700; }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { display: grid; grid-template-columns: 170px 1fr auto; gap: 1rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.activity-list time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.activity-tag { justify-self: start; padding: .12rem .6rem; border-radius: var(--r-pill); background: var(--paper); font-size: .75rem; font-weight: 700; color: var(--ink); }
.tag-payment { background: var(--green-tint); color: var(--green-deep); }
.tag-course, .tag-lesson { background: #eceaff; color: var(--blue); }
.tag-user, .tag-staff { background: #fff3d6; color: #8a5a00; }
.tag-settings, .tag-coupon, .tag-report { background: #fde8e6; color: var(--danger); }
@media (max-width: 700px) { .activity-list li { grid-template-columns: 1fr; gap: .25rem; } }
@media print {
    .print-only { display: block; }
    .chart-box { height: 260px; }
    .panel { break-inside: avoid; }
}

/* Course images: show the whole picture (no cropping of text), fill leftover space with a blurred copy */
.course-cover.has-thumb, .buy-cover.has-thumb, .thumb-preview.has-thumb { background: #120a45; overflow: hidden; }
.course-cover.has-thumb::before, .buy-cover.has-thumb::before, .thumb-preview.has-thumb::before {
    content: ""; position: absolute; inset: -24px;
    background: var(--thumb) center / cover no-repeat;
    filter: blur(20px) saturate(1.15) brightness(.8);
}
.course-cover.has-thumb img, .buy-cover.has-thumb img, .thumb-preview.has-thumb img {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
    object-fit: contain; object-position: center;
    transition: transform .35s ease;
}
.course-card:hover .course-cover.has-thumb img { transform: scale(1.03); }
.course-cover .cover-level { z-index: 2; }

/* Homepage v2 --------------------------------------------------------------- */
/* Hero */
.h-hero { position: relative; overflow: hidden; color: var(--white);
    background: radial-gradient(900px 500px at 90% 10%, rgba(126,217,87,.18), transparent 60%), linear-gradient(160deg, #2311b0 0%, #1a0c8c 55%, #140b4a 100%); }
.h-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000 20%, transparent 90%); }
.h-hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(4rem, 7vw, 6rem); }
.h-hero h1 { color: var(--white); font-size: clamp(2.3rem, 5vw, 4rem); max-width: 15ch; margin-bottom: 1rem; }
.h-pill { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem; padding: .35rem .85rem; border-radius: var(--r-pill); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .88rem; font-weight: 600; }
.h-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(126,217,87,.25); }
.h-hero-points { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .92rem; color: rgba(255,255,255,.85); }
.h-hero-points li { display: inline-flex; align-items: center; gap: .45rem; }
.h-hero-points li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23140b4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

.h-hero-visual { position: relative; justify-self: center; width: min(100%, 460px); }
.h-frame { position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; background: #140b4a;
    box-shadow: 0 40px 80px -30px rgba(0,0,0,.65), 0 0 0 6px rgba(255,255,255,.08); }
.h-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08);
    transition: opacity 1.4s ease, transform 7s ease-out; }
.h-slide.is-active { opacity: 1; transform: scale(1); }
.h-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,11,74,.55), transparent 45%); pointer-events: none; }
.h-frame-tag { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: var(--r-pill); background: rgba(255,255,255,.95); color: var(--ink); font-size: .82rem; font-weight: 700; }
.h-live { width: 8px; height: 8px; border-radius: 50%; background: #e5372c; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 6px rgba(229,55,44,0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(229,55,44,.45); } }

.h-float { position: absolute; z-index: 3; display: flex; flex-direction: column; min-width: 128px; padding: .7rem 1rem; border-radius: 16px;
    background: var(--white); color: var(--ink); box-shadow: 0 18px 40px -16px rgba(0,0,0,.55);
    opacity: 0; animation: float-in .7s cubic-bezier(.2,.8,.2,1) forwards, float-bob 5s ease-in-out infinite; }
.h-float strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--blue); font-variant-numeric: tabular-nums; }
.h-float span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.h-float-1 { top: 7%; left: -14%; animation-delay: .5s, 1.2s; }
.h-float-2 { top: 30%; right: -12%; animation-delay: .8s, 2s; border-left: 4px solid var(--green); }
.h-float-3 { bottom: 20%; left: -16%; animation-delay: 1.1s, 1.6s; border-left: 4px solid var(--green); }
.h-float-4 { bottom: -4%; right: -6%; animation-delay: 1.4s, 2.6s; background: var(--green); }
.h-float-4 strong { color: var(--ink); } .h-float-4 span { color: var(--ink); }
@keyframes float-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }

@media (max-width: 960px) {
    .h-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .h-hero-visual { width: min(100%, 420px); }
    .h-float-1 { left: -4%; } .h-float-3 { left: -4%; } .h-float-2 { right: -4%; } .h-float-4 { right: -2%; }
}
@media (max-width: 520px) {
    .h-hero-visual { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
    .h-frame { grid-column: 1 / -1; aspect-ratio: 4 / 4.4; }
    .h-float { position: static; min-width: 0; animation: float-in .7s cubic-bezier(.2,.8,.2,1) forwards; }
    .h-float strong { font-size: 1.35rem; }
}

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Physical training */
.h-physical { background: linear-gradient(180deg, var(--paper), var(--white)); }
.h-physical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.h-collage { position: relative; aspect-ratio: 1 / 1.02; }
.h-collage img { position: absolute; object-fit: cover; border-radius: 22px; box-shadow: 0 24px 50px -24px rgba(23,12,107,.55); border: 5px solid var(--white); }
.h-collage-main { inset: 0 18% 22% 0; width: 82%; height: 78%; }
.h-collage-a { right: 0; bottom: 0; width: 46%; height: 56%; }
.h-collage-b { left: 6%; bottom: 0; width: 40%; height: 34%; }
.h-physical-lede { font-size: 1.08rem; color: var(--muted); max-width: 54ch; }
.h-features { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1.5rem 0; }
.h-feature { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.h-feature:hover { border-color: var(--green); transform: translateY(-2px); }
.h-feature h3 { font-family: var(--font-body); font-size: .98rem; margin: 0 0 .15rem; }
.h-feature p { margin: 0; font-size: .87rem; color: var(--muted); }
.h-ico { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--green-tint); color: var(--green-deep); }
.h-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.h-address { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: 1.25rem; }
.h-address svg { width: 20px; height: 20px; fill: none; stroke: var(--blue); stroke-width: 2; flex-shrink: 0; }
@media (max-width: 900px) { .h-physical-grid { grid-template-columns: 1fr; } .h-collage { max-width: 520px; } }
@media (max-width: 520px) { .h-features { grid-template-columns: 1fr; } }

/* About */
.h-about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.h-about-copy p { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.h-about-side { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
.h-about-img { width: 100%; aspect-ratio: auto; height: auto; object-fit: contain; border-radius: 22px; box-shadow: 0 24px 50px -26px rgba(23,12,107,.55); }
.h-point-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.h-point { display: grid; grid-template-columns: 30px 1fr; gap: .6rem; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--paper); }
.h-point .tick { width: 26px; height: 26px; }
.h-point h3 { font-size: 1rem; margin: 0 0 .1rem; }
.h-point p { margin: 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 960px) { .h-about-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .h-point-grid { grid-template-columns: 1fr; } }

/* How it works */
.h-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.h-steps li { position: relative; padding: 1.5rem 1.25rem 1.35rem; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.h-steps li:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.h-steps li:nth-child(2) { transition-delay: .05s; } .h-steps li:nth-child(3) { transition-delay: .1s; } .h-steps li:nth-child(4) { transition-delay: .15s; }
.h-step-num { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 1rem; border-radius: 14px; background: var(--blue); color: var(--white); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.h-steps li:last-child .h-step-num { background: var(--green); color: var(--ink); }
.h-steps h3 { margin-bottom: .35rem; }
.h-steps p { margin: 0; color: var(--muted); font-size: .94rem; }
@media (max-width: 960px) { .h-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .h-steps { grid-template-columns: 1fr; } }

/* Testimonials ticker: continuous right-to-left scroll */
.h-voices { overflow: hidden; }
.ticker { position: relative; overflow: hidden; padding: .5rem 0 1rem;
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.ticker-track { display: flex; gap: 1.25rem; width: max-content; animation: ticker var(--duration, 45s) linear infinite; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(calc(-50% - .625rem)); } }
.ticker-card { flex: 0 0 auto; width: 340px; margin: 0; padding: 1.4rem 1.5rem; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: 0 12px 30px -24px rgba(23,12,107,.5); }
.ticker-card blockquote { margin: 0 0 1.2rem; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.5; flex: 1; }
.ticker-card figcaption { display: flex; align-items: center; gap: .7rem; }
.ticker-card figcaption img { border-radius: 50%; object-fit: cover; }
.ticker-card figcaption strong { display: block; }
.ticker-card figcaption span span { display: block; color: var(--muted); font-size: .86rem; }
.ticker-card .avatar-initials { width: 42px; height: 42px; }
@media (max-width: 560px) { .ticker-card { width: 280px; } }

/* Final call to action */
.h-cta { padding: clamp(3rem, 6vw, 5rem) 0; }
.h-cta-box { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; padding: clamp(2rem, 5vw, 3.5rem); border-radius: 28px; background: var(--ink); color: var(--white); }
.h-cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.h-cta-box::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(20,11,74,.96) 30%, rgba(35,17,176,.75)); }
.h-cta-copy, .h-cta-choices { position: relative; z-index: 1; }
.h-cta-copy h2 { color: var(--white); font-size: clamp(2rem, 4vw, 2.9rem); }
.h-cta-copy p { color: rgba(255,255,255,.82); font-size: 1.08rem; margin: 0; }
.h-cta-choices { display: grid; gap: .9rem; }
.h-choice { display: grid; gap: .2rem; padding: 1.2rem 1.35rem; border-radius: var(--r-lg); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: var(--white); text-decoration: none; transition: transform .2s, background-color .2s; }
.h-choice:hover { transform: translateY(-3px); background: rgba(255,255,255,.16); }
.h-choice strong { font-family: var(--font-display); font-size: 1.25rem; }
.h-choice span { color: rgba(255,255,255,.8); font-size: .93rem; }
.h-choice em { font-style: normal; font-weight: 700; color: var(--green); margin-top: .35rem; }
.h-choice-green { background: var(--green); border-color: var(--green); color: var(--ink); }
.h-choice-green:hover { background: #93e46f; }
.h-choice-green span { color: rgba(20,11,74,.8); } .h-choice-green em { color: var(--ink); }
@media (max-width: 860px) { .h-cta-box { grid-template-columns: 1fr; } }

/* Course strip on the homepage: continuous right-to-left scroll */
.cat-strip { position: relative; overflow: hidden; margin: 0 0 1.75rem; padding: .35rem 0;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.cat-track { display: flex; width: max-content; animation: cat-scroll var(--duration, 30s) linear infinite; }
.cat-group { display: flex; gap: .75rem; padding-right: .75rem; }
@keyframes cat-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cat-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .6rem 1.1rem .6rem .8rem; border-radius: var(--r-pill);
    background: var(--white); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; white-space: nowrap;
    box-shadow: 0 6px 16px -12px rgba(23,12,107,.5); transition: border-color .2s, background-color .2s, transform .2s; }
.cat-chip:hover, .cat-chip:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, white); transform: translateY(-2px); }
.cat-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); flex-shrink: 0; }
.cat-name { font-weight: 700; font-size: .95rem; }
.cat-count { font-size: .8rem; color: var(--muted); padding-left: .55rem; border-left: 1px solid var(--line); }

/* Category page */
.cat-hero { position: relative; overflow: hidden; color: var(--white); background: var(--ink); }
.cat-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(35,17,176,.7), transparent 75%); background: radial-gradient(800px 380px at 0% 0%, color-mix(in srgb, var(--accent) 75%, transparent), transparent 70%), linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--accent) 35%, transparent)); }
.cat-hero-inner { position: relative; padding: clamp(2.5rem, 5vw, 4rem) 0; }
.cat-hero h1 { color: var(--white); font-size: clamp(2.1rem, 4.5vw, 3.2rem); margin-bottom: .6rem; }
.cat-hero .crumbs a { color: rgba(255,255,255,.8); }
.cat-hero .crumbs span { color: rgba(255,255,255,.6); }
.cat-hero-lede { font-size: 1.12rem; color: rgba(255,255,255,.88); max-width: 62ch; }
.cat-hero-count { display: inline-block; margin: .5rem 0 0; padding: .3rem .85rem; border-radius: var(--r-pill); background: rgba(255,255,255,.14); font-weight: 700; font-size: .9rem; }
.cat-others-title { font-size: 1.4rem; }
.cat-others { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.cat-card { position: relative; overflow: hidden; display: grid; gap: .2rem; padding: 1.1rem 1.2rem 1.1rem 1.5rem; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.cat-card-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); }
.cat-card strong { font-family: var(--font-display); font-size: 1.1rem; }
.cat-card span:last-child { color: var(--muted); font-size: .88rem; }

/* Support chat bubble: sits above the cart bar when it's showing (variables pass into the widget) */
body.has-cart #support-bot { --sb-bottom: 104px; --sb-bottom-m: 146px; }
@media (max-width: 640px) {
    .job-alert { width: min(270px, calc(100vw - 6rem)); } /* leave room for the chat button on the right */
}

/* Physical training page --------------------------------------------------- */
.pt-hero { position: relative; overflow: hidden; color: var(--white); background: linear-gradient(150deg, #2311b0, #140b4a 70%); }
.pt-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(126,217,87,.35), transparent 70%); }
.pt-hero-inner { position: relative; z-index: 1; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 5vw, 4.5rem); }
.pt-hero h1 { color: var(--white); font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 20ch; margin-bottom: .75rem; }
.pt-hero .crumbs a { color: rgba(255,255,255,.8); } .pt-hero .crumbs span { color: rgba(255,255,255,.6); }
.pt-hero-lede { font-size: 1.12rem; color: rgba(255,255,255,.88); max-width: 58ch; }
.pt-facts { list-style: none; margin: 1.5rem 0 1.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.pt-facts li { padding: .55rem .9rem; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .92rem; }
.pt-facts strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }

.pt-gallery-section { padding: 1.75rem 0; background: var(--white); }
.pt-gallery { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.pt-track { display: flex; width: max-content; animation: pt-scroll var(--duration, 60s) linear infinite; }
.pt-group { display: flex; gap: 1rem; padding-right: 1rem; }
.pt-group img { height: 320px; width: auto; max-width: none; border-radius: 18px; object-fit: contain; background: var(--paper); box-shadow: 0 14px 30px -20px rgba(23,12,107,.6); }
@keyframes pt-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 640px) { .pt-group img { height: 210px; border-radius: 14px; } .pt-group { gap: .7rem; padding-right: .7rem; } }

.pt-packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
.pt-pkg { --tone: var(--green-deep); --tone-bg: var(--green-tint); position: relative; display: flex; flex-direction: column; border-radius: 22px; background: var(--white); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 18px 40px -30px rgba(23,12,107,.6); transition: transform .25s, box-shadow .25s; }
.pt-pkg:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(23,12,107,.7); }
.pt-dark { --tone: #140b4a; --tone-bg: #ecebf5; }
.pt-blue { --tone: var(--blue); --tone-bg: #eceaff; border: 2px solid var(--blue); }
.pt-badge { position: absolute; top: 1rem; right: 1rem; padding: .2rem .7rem; border-radius: var(--r-pill); background: var(--green); color: var(--ink); font-size: .75rem; font-weight: 800; }
.pt-pkg-head { padding: 1.5rem 1.5rem 1.25rem; background: var(--tone); color: var(--white); }
.pt-pkg-head h3 { color: var(--white); font-size: 1.25rem; margin: 0 0 .35rem; }
.pt-fee { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; line-height: 1.1; }
.pt-duration { margin: .3rem 0 0; color: rgba(255,255,255,.8); font-size: .9rem; }
.pt-items { list-style: none; margin: 0; padding: 1.25rem 1.5rem .5rem; display: grid; gap: .5rem; flex: 1; }
.pt-items li { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }
.pt-items li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--tone); flex-shrink: 0; }
.pt-green .pt-items li::before { background: #3e9a1e; }
.pt-meta { margin: 0 1.5rem; padding: .9rem 0; border-top: 1px dashed var(--line); display: grid; gap: .3rem; font-size: .88rem; }
.pt-meta div { display: flex; justify-content: space-between; gap: 1rem; }
.pt-meta dt { color: var(--muted); } .pt-meta dd { margin: 0; font-weight: 700; text-align: right; }
.pt-cert { display: flex; align-items: center; gap: .5rem; margin: 0 1.5rem 1rem; padding: .55rem .8rem; border-radius: 10px; background: var(--tone-bg); color: var(--tone); font-weight: 700; font-size: .88rem; }
.pt-cert svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.pt-green .pt-cert { color: var(--green-deep); }
.pt-choose { margin: 0 1.5rem 1.5rem; width: auto; background: var(--tone); border-color: var(--tone); color: var(--white); }
.pt-choose:hover { filter: brightness(1.15); color: var(--white); }
@media (max-width: 1000px) { .pt-packages { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .pt-packages { grid-template-columns: 1fr; } }

.pt-singles { margin-top: 2.5rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 22px; background: var(--ink); color: var(--white); }
.pt-singles-head h3 { color: var(--white); font-size: 1.5rem; margin-bottom: .3rem; }
.pt-singles-head p { color: rgba(255,255,255,.78); margin-bottom: 1.25rem; }
.pt-single-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.pt-single { display: grid; gap: .3rem; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: var(--white); text-decoration: none; transition: background-color .2s, transform .2s; }
.pt-single:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); color: var(--white); }
.pt-key { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--green); color: var(--ink); }
.pt-key svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pt-single-name { font-weight: 600; font-size: .95rem; }
.pt-single strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--green); }
@media (max-width: 900px) { .pt-single-grid { grid-template-columns: 1fr 1fr; } }

.pt-visit { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.pt-address { display: flex; gap: .6rem; align-items: flex-start; font-size: 1.15rem; font-weight: 700; }
.pt-address svg { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: var(--blue); stroke-width: 2; margin-top: .1rem; }
.pt-contact { margin: 1rem 0 1.25rem; }
.pt-map { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 18px 40px -28px rgba(23,12,107,.6); aspect-ratio: 4 / 3; background: var(--paper); }
.pt-map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 860px) { .pt-visit { grid-template-columns: 1fr; } }

.pt-enquire { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.pt-enquire-copy p { color: var(--muted); font-size: 1.05rem; }
.pt-form { margin: 0; }
.btn-wa { background: #168a4a; border-color: #168a4a; color: var(--white); gap: .5rem; }
.btn-wa:hover { background: #0f6f3b; border-color: #0f6f3b; color: var(--white); }
@media (max-width: 860px) { .pt-enquire { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .pt-track { animation: none; } .pt-gallery { overflow-x: auto; mask-image: none; -webkit-mask-image: none; } }

/* Homepage photo strip, tucked right under the hero */
.h-photo-strip { padding: 1.5rem 0 .5rem; }
.h-photo-strip .pt-group img { height: 260px; }
@media (max-width: 640px) { .h-photo-strip .pt-group img { height: 190px; } }

/* Admin gallery */
.gallery-admin { align-items: start; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.gallery-item { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--paper); }
.gallery-item figcaption { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem .6rem; background: var(--white); }
.gallery-item form { margin: 0; }
.hero-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 160px)); margin-bottom: 1rem; }
.hero-grid .gallery-item img { aspect-ratio: 4 / 5; object-fit: cover; }
.hero-upload { margin-top: .5rem; }

/* Policy pages */
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.legal-nav { position: sticky; top: 96px; display: grid; gap: .25rem; }
.legal-nav a { padding: .55rem .8rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.legal-nav a:hover { background: var(--paper); }
.legal-nav a.is-current { background: #eceaff; color: var(--blue); }
.legal-body { max-width: 72ch; font-size: 1.02rem; line-height: 1.75; }
.legal-body h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body ul { padding-left: 1.2rem; }
.legal-body li { margin: .3rem 0; }
.legal-body p, .legal-body li { color: #2e2a5c; }
.legal-editor { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; line-height: 1.55; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-legal a { color: inherit; opacity: .85; }
@media (max-width: 800px) { .legal-layout { grid-template-columns: 1fr; } .legal-nav { position: static; display: flex; flex-wrap: wrap; } }

/* Phase 9: onboarding, profile, CV ------------------------------------------ */
.ob { padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; background: linear-gradient(180deg, var(--paper), var(--white) 60%); }
.ob-wrap { max-width: 860px; }
.ob-progress { margin-bottom: 1.25rem; }
.ob-bar { height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.ob-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .4s; }
.ob-steps { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; color: var(--muted); }
.ob-steps li { display: flex; align-items: center; gap: .4rem; }
.ob-steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink); font-weight: 800; font-size: .72rem; }
.ob-steps .is-current { color: var(--ink); font-weight: 700; }
.ob-steps .is-current span { background: var(--blue); color: var(--white); }
.ob-steps .is-done span { background: var(--green); }
@media (max-width: 640px) { .ob-steps li:not(.is-current) { font-size: 0; gap: 0; } }
.ob-card h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: .35rem; }
.ob-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; margin: 1.25rem 0 1.5rem; }
.ob-pick { position: relative; cursor: pointer; }
.ob-pick input { position: absolute; opacity: 0; }
.ob-pick-box { display: grid; grid-template-columns: 14px 1fr; gap: .1rem .55rem; align-items: center; padding: .75rem .85rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); transition: border-color .15s, background-color .15s; }
.ob-pick-dot { grid-row: span 2; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--accent); }
.ob-pick-box strong { font-size: .92rem; line-height: 1.25; }
.ob-pick-box small { color: var(--muted); font-size: .76rem; }
.ob-pick input:checked + .ob-pick-box { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, white); }
.ob-pick input:checked + .ob-pick-box .ob-pick-dot { background: var(--accent); }
.ob-pick input:focus-visible + .ob-pick-box { outline: 3px solid var(--blue); outline-offset: 2px; }
.ob-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.ob-goal { display: flex; gap: .5rem; align-items: center; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.ob-goal:has(input:checked) { border-color: var(--blue); background: #f3f2ff; }
.ob-photo { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; }
.ob-avatar { flex-shrink: 0; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: #eceaff; color: var(--blue); font-weight: 800; font-size: 1.6rem; border: 3px solid var(--white); box-shadow: 0 6px 18px -10px rgba(23,12,107,.6); }
.ob-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ob-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.ob-actions > div { display: flex; gap: .6rem; flex-wrap: wrap; }

.repeat-list { display: grid; gap: 1rem; margin-bottom: .9rem; }
.repeat-row { margin: 0; padding: 1rem 1.1rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.repeat-row input, .repeat-row select, .repeat-row textarea { background: var(--white); }
.field-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .field-grid-3 { grid-template-columns: 1fr 1fr; } .field-grid-3 > :first-child { grid-column: 1 / -1; } }

.profile-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.profile-meter { flex: 1; min-width: 240px; display: grid; gap: .5rem; }
.profile-meter strong { display: block; }
.meter { height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #3e9a1e); }
.profile-form { display: grid; gap: 1.25rem; }
.interest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .4rem 1rem; }
.sticky-save { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding: .8rem 0; background: linear-gradient(180deg, transparent, var(--paper) 35%); }
#job-alerts { margin-top: 1.5rem; }

.profile-prompt { display: grid; grid-template-columns: 1fr minmax(120px, 220px) auto; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-radius: var(--r-lg); background: linear-gradient(120deg, #2311b0, #140b4a); color: var(--white); }
.profile-prompt-copy strong { display: block; font-size: 1.05rem; }
.profile-prompt-copy span { color: rgba(255,255,255,.8); font-size: .9rem; }
.profile-prompt .meter { background: rgba(255,255,255,.2); }
.profile-prompt-optional { grid-template-columns: 1fr auto; }
.profile-prompt-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.profile-prompt-actions .link-btn { background: none; border: 0; color: rgba(255,255,255,.85); cursor: pointer; font: inherit; font-size: .9rem; text-decoration: underline; padding: 0; }
@media (max-width: 640px) { .profile-prompt-optional { grid-template-columns: 1fr; } }
.profile-prompt-done { grid-template-columns: 1fr auto; background: var(--green-tint); color: var(--ink); border: 1px solid #cbe8bc; }
.profile-prompt-done .profile-prompt-copy span { color: var(--muted); }
@media (max-width: 700px) { .profile-prompt { grid-template-columns: 1fr; } }

.cv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cv-toolbar-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cv-tip { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 12px; background: #fff8e6; border: 1px solid #f3dca3; color: #5c3d00; font-size: .93rem; }
.cv-tip a { font-weight: 700; margin-left: .3rem; }
.cv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.cv-side { position: sticky; top: 88px; }
.cv-side hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
@media (max-width: 1100px) { .cv-layout { grid-template-columns: 1fr; } .cv-side { position: static; } }

/* The CV page itself (screen and print) */
.cv-paper { background: var(--white); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 20px 50px -30px rgba(23,12,107,.5); overflow-x: auto; }
.cv-doc { max-width: 800px; margin: 0 auto; padding: 44px 48px; color: #1b1b2f; font-family: var(--font-body); font-size: 13.5px; line-height: 1.5; }
.cv-head { display: flex; gap: 22px; align-items: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 3px solid var(--blue); }
.cv-photo { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid #eceaff; }
.cv-id h1 { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.15; color: #140b4a; }
.cv-headline { margin: 4px 0 8px; font-size: 15px; font-weight: 700; color: var(--blue); }
.cv-contact { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: #4a4868; }
.cv-contact a { color: inherit; }
.cv-sec { margin-top: 16px; }
.cv-sec h2 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); border-bottom: 1px solid #e3e4f0; padding-bottom: 4px; }
.cv-sec p { margin: 0; }
.cv-skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cv-skills li { padding: 2px 10px; border-radius: 999px; background: #f0effc; color: #140b4a; font-size: 12.5px; }
.cv-item { margin-bottom: 10px; break-inside: avoid; }
.cv-item-head { display: flex; justify-content: space-between; gap: 12px; }
.cv-item-head span { color: #6a6888; white-space: nowrap; font-size: 12.5px; }
.cv-org { color: #4a4868; font-size: 12.5px; }
.cv-org a { color: var(--blue); }
.cv-item ul { margin: 4px 0 0; padding-left: 18px; }
.cv-item li { margin: 2px 0; }
.cv-foot { margin-top: 22px; color: #6a6888; font-size: 12px; }
@media (max-width: 640px) { .cv-doc { padding: 24px 20px; } .cv-head { flex-direction: column; align-items: flex-start; } .cv-id h1 { font-size: 23px; } }

.cv-print-body { background: #e9eaf2; margin: 0; padding: 24px 12px; }
.cv-print-bar { max-width: 800px; margin: 0 auto 14px; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .9rem; color: var(--ink); }
.cv-print-body .cv-paper { max-width: 800px; margin: 0 auto; }
@media print {
    @page { size: A4; margin: 12mm; }
    .cv-print-body { background: #fff; padding: 0; }
    .cv-print-bar { display: none; }
    .cv-print-body .cv-paper { border: 0; box-shadow: none; max-width: none; }
    .cv-doc { padding: 0; max-width: none; }
    .cv-doc a { text-decoration: none; }
    .cv-skills li { background: #f0effc !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cv-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Mobile fixes ------------------------------------------------------------ */
/* Never let anything make the page scroll sideways (clip doesn't break the sticky header). */
html, body { max-width: 100%; overflow-x: clip; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

/* Course cards: compact 2-column grid on phones (description hidden, essentials kept) */
@media (max-width: 600px) {
    .course-grid, .course-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .course-card { border-radius: 12px; }
    .course-cover .cover-mark { font-size: 1.9rem; }
    .cover-level { left: .4rem; bottom: .4rem; padding: .12rem .45rem; font-size: .62rem; }
    .course-body { padding: .65rem .7rem .15rem; }
    .course-cat { display: none; }
    .course-title { font-family: var(--font-body); font-weight: 800; font-size: .93rem; line-height: 1.25; letter-spacing: -.005em; margin-bottom: .35rem;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
    .course-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        margin: 0 0 .15rem; font-size: .78rem; line-height: 1.38; color: var(--muted); }
    .course-meta { display: none; }
    .course-foot { flex-direction: column; align-items: stretch; gap: .45rem; margin-top: .35rem; padding: .55rem .7rem .7rem; }
    .course-foot .price { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .1rem .4rem; }
    .course-foot .price strong { font-family: var(--font-body); font-weight: 800; font-size: 1rem; }
    .course-foot .price s { font-size: .72rem; }
    .course-actions { flex-direction: column; align-items: stretch; gap: .4rem; }
    .course-actions .link-quiet { order: 2; display: flex; align-items: center; justify-content: center; min-height: 34px;
        border-radius: var(--r-pill); background: #eeedff; color: var(--blue); font-size: .78rem; font-weight: 700; text-decoration: none; }
    .course-actions .link-quiet:hover { background: #e2e0ff; text-decoration: none; }
    .course-actions .inline-form { display: block; }
    .course-actions .btn { width: 100%; min-height: 36px; padding: .35rem .5rem; font-size: .8rem; }
}
@media (max-width: 340px) {
    .course-grid, .course-grid-3 { grid-template-columns: 1fr; }
}

/* Header: menu and buttons sit at the right edge when the menu collapses */
@media (max-width: 1024px) {
    .header-actions { margin-left: auto; }
    .header-inner { gap: .75rem; }
}
@media (max-width: 480px) {
    .header-actions .btn-green { display: none; } /* "Start learning" is in the hero and the menu */
    .brand img { width: 38px; height: 38px; }
    .brand-name { font-size: .9rem; }
}

/* Hero on phones and tablets: title → photos and stats → text, buttons and checklist */
@media (max-width: 960px) {
    .h-hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
    .h-hero-copy { display: contents; }
    .h-pill { order: 1; align-self: flex-start; }
    .h-hero h1 { order: 2; max-width: none; margin-bottom: 1.5rem; }
    .h-hero-visual { order: 3; align-self: center; margin-bottom: 2.25rem; }
    .h-hero .hero-lede { order: 4; }
    .h-hero .hero-actions { order: 5; }
    .h-hero-points { order: 6; }
    /* keep floating cards inside the screen edges */
    .h-float-1, .h-float-3 { left: -2%; }
    .h-float-2, .h-float-4 { right: -2%; }
}
@media (max-width: 520px) {
    .h-hero-visual { margin-bottom: 1.75rem; }
    .h-hero .hero-actions { flex-direction: column; }
    .h-hero .hero-actions .btn { width: 100%; }
    .h-hero-points { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cat-track { animation: none; }
    .cat-strip { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
    .ticker-track { animation: none; }
    .ticker { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
    .js .reveal { opacity: 1; transform: none; }
    .h-float { opacity: 1; }
}

/* Motion preferences ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .hero-check-line { stroke-dashoffset: 0; }
    .stop { opacity: 1; transform: none; }
}

/* Web design services strip + details popup */
.h-services { background: var(--paper); }
.h-services .section-head { margin-bottom: 1.4rem; }
.ws-strip { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ws-track { display: flex; width: max-content; animation: pt-scroll var(--duration, 60s) linear infinite; }
.ws-group { display: flex; gap: 1rem; padding: .5rem 1rem .5rem 0; }
.ws-card { display: flex; flex-direction: column; width: 280px; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--white); cursor: pointer; text-align: left; font: inherit; color: var(--ink); box-shadow: 0 14px 30px -24px rgba(23,12,107,.7); transition: transform .2s, box-shadow .2s; }
.ws-card:hover, .ws-card:focus-visible { transform: translateY(-4px); box-shadow: 0 18px 34px -20px rgba(23,12,107,.7); }
.ws-img { display: block; aspect-ratio: 16 / 10; background: var(--ink); }
.ws-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ws-title { display: block; padding: .8rem .95rem; font-weight: 800; font-size: 1rem; line-height: 1.25; }
.ws-modal .ws-modal-card { position: relative; width: min(100%, 560px); max-height: calc(100vh - 2rem); overflow: auto; background: var(--white); border-radius: var(--r-lg); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); animation: modal-in .2s ease-out; }
.ws-modal-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ink); }
.ws-modal-body { padding: 1.25rem 1.4rem 1.5rem; }
.ws-modal-body h3 { margin: 0 0 .4rem; font-size: 1.35rem; }
.ws-modal-summary { margin: 0 0 .8rem; color: var(--muted); }
.ws-modal-features { margin: 0 0 1.2rem; padding: 0; list-style: none; display: grid; gap: .45rem; }
.ws-modal-features li { position: relative; padding-left: 1.6rem; }
.ws-modal-features li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1rem; height: 1rem; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%23140b4a' stroke-width='3'/%3E%3C/svg%3E") center / 70% no-repeat; }
.ws-modal-wa { width: 100%; justify-content: center; gap: .5rem; }
.ws-modal-close { position: absolute; top: .6rem; right: .6rem; z-index: 1; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(20,11,74,.75); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
@media (max-width: 640px) { .ws-card { width: 210px; } .ws-title { font-size: .92rem; padding: .65rem .8rem; } .ws-group { gap: .7rem; padding-right: .7rem; } }
@media (prefers-reduced-motion: reduce) { .ws-track { animation: none; } .ws-strip { overflow-x: auto; mask-image: none; -webkit-mask-image: none; } }
/* Admin: web design services */
.ws-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.ws-admin-item img, .ws-admin-empty { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ws-admin-empty { display: grid; place-items: center; color: var(--muted); }
.ws-admin-item figcaption { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem .7rem 0; }
.ws-admin-upload { display: grid; gap: .45rem; padding: .6rem .7rem; }
.ws-admin-upload input { font-size: .85rem; max-width: 100%; }
.ws-admin-item > form:last-child:not(.ws-admin-upload) { padding: 0 .7rem .7rem; }

.ws-title { padding-bottom: .35rem; }
.ws-btn { align-self: flex-start; margin: 0 .95rem .9rem; padding: .32rem .8rem; border-radius: 999px; background: var(--blue); color: #fff; font-size: .8rem; font-weight: 700; }
.ws-card:hover .ws-btn, .ws-card:focus-visible .ws-btn { background: var(--green); color: var(--ink); }
@media (max-width: 640px) { .ws-btn { margin: 0 .8rem .75rem; font-size: .75rem; } }
