/* ARE Tahiti palette (aretahiti.com): charcoal, white, lagoon turquoise. */
:root {
    --lagoon: #2bbede;
    --charcoal: #17191b;
    --ink: #17191b;
    --muted: #5b6168;
    --bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e8eaec;
        --muted: #a3a9b0;
        --bg: #111315;
    }
}

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", Arial, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Were inline style="--hero: url(...)" and style="grid-column: ..." (the content security policy allows no inline styles). */
.hero-lagoon { --hero: url('../img/hero-lagoon-outrigger.jpg'); }
.grid-full { grid-column: 1 / -1; }

/* Hero: full-width lagoon photo with a charcoal gradient so white text stays readable. */
.hero {
    min-height: min(78vh, 720px);
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(90deg, rgb(23 25 27 / .78) 0%, rgb(23 25 27 / .35) 55%, rgb(23 25 27 / 0) 100%),
        var(--hero) center 70% / cover no-repeat,
        var(--charcoal);
    color: #fff;
}

.hero-inner {
    max-width: 36rem;
    padding: 3rem 1.25rem 3.5rem;
    margin-inline-start: max(1.25rem, 6vw);
}

.eyebrow {
    margin: 0;
    color: var(--lagoon);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .8rem;
}

.hero h1 {
    font-size: clamp(2.75rem, 8vw, 4.75rem);
    line-height: 1;
    margin: .35rem 0 1rem;
    letter-spacing: -.01em;
}

.lead {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    line-height: 1.55;
    color: rgb(255 255 255 / .88);
    margin: 0 0 1.5rem;
}

.soon {
    display: inline-block;
    margin: 0;
    padding: .55rem 1.1rem;
    border: 1px solid var(--lagoon);
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
}

/* Three-photo strip */
.strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    padding: 2.5rem max(1.25rem, 6vw);
}

.strip figure {
    margin: 0;
}

.strip img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.strip figcaption {
    margin-top: .6rem;
    color: var(--muted);
    font-size: .95rem;
}

footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--muted);
    font-size: .875rem;
}

/* ---- Client portal ---------------------------------------------------------------------------- */

.portal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem max(1.25rem, 4vw);
    background: var(--charcoal);
    color: #fff;
}

.portal-brand {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.portal-brand img { width: 34px; height: 34px; object-fit: contain; }

.portal-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.portal-nav a, .link-button {
    color: #fff;
    text-decoration: none;
    font: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.portal-nav a:hover, .link-button:hover {
    color: var(--lagoon);
}

.portal-narrow {
    max-width: 28rem;
    margin: 3rem auto;
    padding: 0 1.25rem;
}

.portal-page {
    max-width: 60rem;
    margin: 2rem auto 3rem;
    padding: 0 1.25rem;
}

.portal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.portal-page h1, .portal-narrow h1 {
    margin: 0 0 .5rem;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.portal-page h2 {
    margin: 2rem 0 .75rem;
    font-size: 1.2rem;
}

.portal-lead {
    color: var(--muted);
    line-height: 1.55;
}

.portal-note {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.5;
}

.portal-form {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    margin: 1.25rem 0;
}

.portal-form label, .learner-switch label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .95rem;
}

.portal-form input, .learner-switch select {
    font: inherit;
    padding: .65rem .75rem;
    border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
}

.button {
    display: inline-block;
    padding: .7rem 1.2rem;
    border: 1px solid var(--lagoon);
    border-radius: 999px;
    background: var(--lagoon);
    color: var(--charcoal);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:disabled {
    opacity: .6;
    cursor: default;
}

.button-outline {
    background: transparent;
    color: var(--ink);
}

.button-small {
    padding: .35rem .8rem;
}

.crumbs {
    margin: 0 0 .5rem;
    font-size: .9rem;
}

.crumbs a, .prose a {
    color: var(--lagoon);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}

.course-card {
    display: flex;
    flex-direction: column;
    border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
    border-radius: 12px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.course-card:hover {
    border-color: var(--lagoon);
}

.course-cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--charcoal), #1f4f5b);
}

.course-cover img, .course-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.course-hero {
    aspect-ratio: 21 / 9;
    border-radius: 12px;
    margin: 1rem 0;
}

.course-body {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .85rem 1rem 1rem;
}

.course-summary, .course-meta {
    color: var(--muted);
    font-size: .9rem;
}

.course-meta progress {
    display: block;
    width: 100%;
    margin-top: .4rem;
    accent-color: var(--lagoon);
}

.pill {
    display: inline-block;
    padding: .1rem .55rem;
    border: 1px solid var(--lagoon);
    border-radius: 999px;
    font-size: .8rem;
}

/* A coaching call being recorded (LiveKit's room state). */
.pill-live {
    border-color: #c62828;
    background: #c62828;
    color: #fff;
    vertical-align: middle;
}

.lesson-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
}

.lesson-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .75rem .25rem;
    border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
}

.lesson-list a {
    color: inherit;
    font-weight: 600;
}

.lesson-list li.locked {
    color: var(--muted);
}

.lesson-state {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--muted);
    font-size: .88rem;
}

.player {
    margin: 1rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.player video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.lesson-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

.prose {
    line-height: 1.65;
}

.prose table {
    border-collapse: collapse;
}

.prose th, .prose td {
    border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
    padding: .3rem .6rem;
}

.flash {
    padding: .7rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--lagoon);
}

.flash-error {
    border-color: #d9534f;
}

.waiver-text {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
    border-radius: 12px;
}

.waiver-text summary {
    cursor: pointer;
    font-weight: 600;
}

.safety-card {
    margin: 1.25rem 0;
    padding: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
    border-radius: 12px;
}

.safety-card h2 {
    margin-top: 0;
}

.safety-card h3 {
    margin: 1.25rem 0 .5rem;
    font-size: 1rem;
}

.safety-history { list-style: none; margin: 0 0 .5rem; padding: 0; }
.safety-history li { margin: .25rem 0; }

.safety-state.ok::before { content: "✓ "; color: var(--lagoon); }
.safety-state.todo { font-weight: 600; }

.portal-form label.check {
    flex-direction: row;
    align-items: flex-start;
    gap: .5rem;
}

.ec-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    align-items: end;
}

.ec-form label.check, .ec-form .button {
    grid-column: 1 / -1;
    justify-self: start;
}

.slot-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.slot-form {
    display: flex;
    flex-wrap: wrap;   /* the shop's code box + Buy + "Pay in 3 months" don't fit on one line in a card */
    gap: .35rem;
    align-items: center;
}

.slot-form .code-input { flex: 1 1 100%; width: auto; }

.call-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.call-tile {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.call-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.call-name {
    position: absolute;
    left: .5rem;
    bottom: .5rem;
    padding: .1rem .5rem;
    border-radius: 6px;
    background: rgb(0 0 0 / .6);
    color: #fff;
    font-size: .85rem;
}

/* Live captions over the class video (live.js): at most two lines, fade after a few seconds. High contrast on any picture. */
.live-stage { position: relative; }

.live-cc {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: min(100% - 1.5rem, 46rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    pointer-events: none;
    opacity: 1;
    transition: opacity .4s;
}

.live-cc.is-faded { opacity: 0; }

.live-cc-line {
    max-width: 100%;
    padding: .25rem .65rem;
    border-radius: 6px;
    background: rgb(0 0 0 / .82);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.35;
    text-align: center;
}

.cc-lang { padding: .35rem .5rem; border-radius: 8px; border: 1px solid var(--line, #c9ced3); background: transparent; color: inherit; font: inherit; }

.button[aria-pressed="true"] { background: var(--lagoon); color: #06222b; border-color: var(--lagoon); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
    .live-cc { transition: none; }
}

h2.today::after {
    content: " •";
    color: var(--lagoon);
}

.comment {
    margin: .35rem 0;
    padding: .4rem .7rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--muted) 12%, transparent);
    font-size: .92rem;
}

.comment.from-coach {
    border-inline-start: 3px solid var(--lagoon);
}

.offer-price {
    font-size: 1.35rem;
    font-weight: 700;
}

.offer-list {
    margin: .25rem 0 .5rem;
    padding-inline-start: 1.1rem;
    font-size: .92rem;
}

/* ---- Public site ------------------------------------------------------------------------------- */

.portal-bar, .portal-nav {
    flex-wrap: wrap;
}

.portal-nav .nav-cta, .hero-links .nav-cta {
    padding: .35rem .9rem;
    border: 1px solid var(--lagoon);
    border-radius: 999px;
}

.hero {
    position: relative;
}

.hero-nav {
    position: absolute;
    inset: 0 0 auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem max(1.25rem, 4vw);
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.hero-links a {
    color: #fff;
    text-decoration: none;
}

.hero-links a:hover {
    color: var(--lagoon);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 0;
}

.button-ghost {
    background: transparent;
    color: #fff;
}

.public-section {
    max-width: 68rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
}

.public-section h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    margin: 0 0 1.25rem;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 1rem;
}

.section-head a, .privacy-promise a {
    color: var(--lagoon);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.5rem;
}

.feature-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.feature-grid h3 {
    margin: .9rem 0 .35rem;
}

.feature-grid p, .privacy-promise p {
    margin: 0 0 .5rem;
    color: var(--muted);
    line-height: 1.55;
}

.privacy-promise {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
    align-items: center;
}

.privacy-promise img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.course-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}

@media (min-width: 52rem) {
    .course-layout {
        grid-template-columns: minmax(0, 1fr) 18rem;
    }
    .buy-box {
        position: sticky;
        top: 1rem;
        align-self: start;
    }
}

.module-title {
    margin: 1.5rem 0 .5rem;
    font-size: 1.05rem;
}

.buy-box {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    padding: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
    border-radius: 12px;
}

.buy-box h2 {
    margin: 0;
}

.buy-offer {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.coach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1rem;
}

.coach-card {
    padding: 1.1rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
    border-radius: 12px;
}

.coach-card h2 {
    margin: 0 0 .25rem;
}

.coach-bio {
    line-height: 1.55;
    white-space: pre-line;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

footer .link-button {
    color: inherit;
    text-decoration: underline;
}

footer a {
    color: inherit;
}

.legal .prose {
    line-height: 1.6;
}

.legal .prose blockquote {
    margin: 1rem 0;
    padding: .75rem 1rem;
    border-inline-start: 3px solid var(--lagoon);
    color: var(--muted);
}

.portal-form select {
    font: inherit;
    padding: .65rem .75rem;
    border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
}

.portal-form a, .portal-note a {
    color: var(--lagoon);
}

.demo-card {
    display: flex;
    justify-content: space-between;
    padding: .9rem 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--charcoal), #1f4f5b);
    color: #fff;
    font-family: ui-monospace, monospace;
    font-size: .9rem;
}

.code-input {
    font: inherit;
    width: 9rem;
    padding: .55rem .7rem;
    border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
    text-transform: uppercase;
}

/* Quizzes */
.quiz ol, ol.quiz {
    padding-inline-start: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.quiz legend {
    margin-bottom: .4rem;
}

.quiz label.check {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
}

ol.quiz li.wrong strong {
    color: inherit;
}

.quiz-result {
    padding: .9rem 1rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
    margin: 1rem 0;
}

.quiz-result.passed {
    border-color: var(--lagoon);
}

.quiz input.quiz-typed {
    max-width: 24rem;
    padding: .5rem .7rem;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
    font: inherit;
}

/* Courses v2: what comes before a course, locked lessons */
.prerequisites {
    padding: .9rem 1rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
    margin: 1rem 0;
}

.prerequisites h2 {
    margin: 0 0 .3rem;
    font-size: 1.05rem;
}

.prerequisites ul {
    margin: .4rem 0 0;
    padding-inline-start: 1.25rem;
}

.lesson-lock {
    font-style: italic;
}

/* Certificate: a clean printable page */
.certificate-page {
    max-width: 52rem;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

.certificate {
    text-align: center;
    padding: 3rem 2rem;
    border: 6px double var(--lagoon);
    border-radius: 6px;
    background: #fff;
    color: #17191b;
}

.certificate h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: .5rem 0 1.5rem;
}

.certificate-name {
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    font-weight: 700;
    margin: .5rem 0;
}

.certificate-course {
    font-size: 1.35rem;
    font-weight: 600;
    margin: .5rem 0 1.25rem;
}

.certificate-code {
    margin-top: 2rem;
    font-size: .8rem;
    color: #5b6168;
}

@media print {
    header, footer, .no-print {
        display: none !important;
    }
    .certificate-page {
        margin: 0;
    }
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.buy-box .link-button {
    color: var(--lagoon);
    text-decoration: underline;
}

/* Invite link with a copy button */
.copy-row { display: flex; gap: .5rem; margin-top: .25rem; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; }

/* My club: members table and crew lineups */
.table-wrap { overflow-x: auto; margin: .5rem 0 1.5rem; }
.portal-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.portal-table th, .portal-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line, #e5e7eb); vertical-align: top; }
.portal-table th { font-weight: 600; white-space: nowrap; }
.crew-seats { margin: .25rem 0 0 1.25rem; padding: 0; }

/* Community */
.community .post-form textarea { width: 100%; }
.post-card { border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent); border-radius: 12px; padding: 1rem 1.1rem; margin: 1rem 0; background: var(--bg); }
.post-card.pinned { border-color: #2BBEDE; box-shadow: inset 4px 0 0 #2BBEDE; }
.post-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .35rem; }
.post-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline; font-size: .9rem; margin-top: .5rem; }
.post-actions .active { font-weight: 700; }
.post-actions details.report summary { cursor: pointer; list-style: none; }
.comments { list-style: none; margin: .75rem 0 0; padding: 0 0 0 .9rem; border-left: 2px solid color-mix(in srgb, var(--muted) 25%, transparent); }
.comments li { margin: .5rem 0; }
.comments p { margin: .15rem 0; white-space: pre-line; }
.reply-form { display: flex; gap: .4rem; margin-top: .6rem; }
.reply-form input { flex: 1; min-width: 0; font: inherit; padding: .45rem .6rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); }
.space-card { text-decoration: none; color: inherit; }
form.inline { display: inline; }

/* Ocean conditions */
.conditions-card { border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent); border-radius: 12px; padding: 1rem 1.1rem; margin: 1rem 0; }
.conditions-card h2, .conditions-card h3 { margin-top: 0; }
.verdict { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.verdict-go { background: #DDF6E6; color: #145C32; }
.verdict-caution { background: #FFF1CC; color: #7A4B00; }
.verdict-nogo { background: #FDE0E0; color: #8A1C1C; }
.verdict-unknown { background: #ECEFF1; color: #4A5358; }
.alert-box { background: #FFF1CC; color: #5A3A00; border-radius: 8px; padding: .5rem .75rem; margin: .5rem 0; }

/* Live classes */
.call-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Messages with ARE Tahiti */
.message-thread { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.message { border: 1px solid var(--line, #dfe5e8); border-radius: 12px; padding: 12px 14px; max-width: 90%; }
.message-staff { background: #EEF6F8; align-self: flex-start; }
.message-mine { align-self: flex-end; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }

/* Secured course video: the viewer mark sits over the picture (also in fullscreen), never catches clicks. */
.secure-player { position: relative; }
.secure-player .watermark {
    position: absolute; left: 10%; top: 10%; pointer-events: none; user-select: none; z-index: 2;
    color: rgba(255, 255, 255, 0.55); text-shadow: 0 0 3px rgba(0, 0, 0, 0.7); font-size: 0.8rem; white-space: nowrap;
    transition: left 1.5s ease, top 1.5s ease;
}
.secure-player .player-fullscreen {
    position: absolute; right: 10px; top: 10px; z-index: 3; border: 0; border-radius: 6px; padding: 2px 8px;
    background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 1.1rem; cursor: pointer;
}
.secure-player:fullscreen { background: #000; display: flex; align-items: center; }
.secure-player:fullscreen video { width: 100%; height: 100%; max-height: 100vh; }
.secure-player:fullscreen .watermark { font-size: 1.1rem; }

/* Lesson chapters (M22): jump to each part of the video. */
.chapters { margin: 1rem 0; }
.chapters h2 { font-size: 1rem; margin: 0 0 .4rem; }
.chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.chapter {
    display: flex; gap: .6rem; width: 100%; text-align: left; padding: .45rem .6rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
    border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.chapter:hover, .chapter:focus-visible { border-color: var(--lagoon); }
.chapter-time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.2rem; }

/* AI tutor (M18). */
.tutor-form { display: grid; gap: .75rem; max-width: 40rem; }
.tutor-form label { display: grid; gap: .3rem; }
.tutor-form textarea, .tutor-form select { font: inherit; padding: .5rem .6rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); }
.tutor-answer { margin: 1.25rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--lagoon); background: color-mix(in srgb, var(--lagoon) 8%, transparent); border-radius: 8px; }
.tutor-text { white-space: pre-line; margin-top: 0; }
.tutor-sources { margin: .25rem 0 0; }
.lesson-tutor { margin: 1.25rem 0; padding: .75rem 1rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); border-radius: 12px; }
.lesson-tutor summary { cursor: pointer; font-weight: 600; }
.lesson-tutor .tutor-form { margin-top: .75rem; }

/* Search my lessons + lessons like this (M22). */
.lesson-search { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1.25rem; max-width: 40rem; }
.lesson-search input { flex: 1 1 14rem; min-width: 0; font: inherit; padding: .45rem .6rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); }
.search-results { margin: 1rem 0; padding-left: 1.2rem; display: grid; gap: 1rem; }
.search-title { font-weight: 600; margin-right: .35rem; }
.search-moments { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .3rem; overflow-wrap: anywhere; }
.search-moments a { text-decoration: none; margin-right: .3rem; }
.lesson-related { margin: 1.25rem 0; padding: 1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); border-radius: 12px; }
.lesson-related h2 { font-size: 1rem; margin: 0 0 .5rem; }
.lesson-related ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }

/* Lesson files (M13). */
.lesson-files { margin: 1.25rem 0; padding: 1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); border-radius: 12px; }
.lesson-files h2 { font-size: 1rem; margin: 0 0 .5rem; }
.lesson-files ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }

/* Partner program (M6). */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem; }
.stat { padding: .75rem 1rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); border-radius: 12px; display: flex; flex-direction: column; gap: .25rem; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat strong { font-size: 1.15rem; }

/* Funnel pages (M8): the honeypot field bots fill in, kept off screen and out of reach for people. */
.funnel-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.funnel-page .buy-box h2 { font-size: 1.1rem; }

/* Podcasts (M13). */
.podcast-list { display: grid; gap: 1rem; }
.podcast-card { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); border-radius: 12px; }
.podcast-card h2 { font-size: 1.1rem; margin: 0 0 .25rem; }
.podcast-card h2 a { color: inherit; text-decoration: none; }
.podcast-art { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; overflow: hidden; }
.podcast-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.podcast-art-empty { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--charcoal), #1f4f5b); }
.podcast-head { display: grid; grid-template-columns: minmax(0, 12rem) 1fr; gap: 1.25rem; align-items: start; margin: 1rem 0; }
.podcast-head:not(:has(img)) { grid-template-columns: 1fr; }
.podcast-description { white-space: pre-line; }
.podcast-feed { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); border-radius: 12px; }
.podcast-feed summary { cursor: pointer; font-weight: 600; }
.podcast-episodes { list-style: none; padding: 0; display: grid; gap: 1.25rem; }
.podcast-episodes h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.podcast-episodes audio { width: 100%; margin: .5rem 0; }
@media (max-width: 640px) {
    .podcast-card { grid-template-columns: 4.5rem 1fr; }
    .podcast-head { grid-template-columns: 1fr; }
    .podcast-head .podcast-art { max-width: 12rem; }
}

/* Publications: paid newsletter archive (074) */
.pub-box { margin: 1.25rem 0; padding: 1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--muted) 6%, transparent); }
.pub-box h2 { font-size: 1.1rem; margin: 0 0 .35rem; }
.pub-box p { margin: 0 0 .6rem; }
.pub-issues { list-style: none; padding: 0; display: grid; gap: 1.5rem; }
.pub-issues h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.pub-issues h3 a { color: inherit; text-decoration: none; }
.pub-more { font-weight: 600; }
.pub-issue .prose { max-width: 42rem; }
.pub-fade { color: var(--muted); margin-top: -.5rem; }
.pub-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent); }

/* Community challenges and @mentions (062) */
.challenge-learner { padding: .75rem 0; border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent); }
.challenge-learner:last-child { border-bottom: 0; }
.challenge-learner p { margin: .25rem 0; }
.mention-field { position: relative; }
.mention-list { position: absolute; z-index: 20; left: 0; right: 0; margin: .15rem 0 0; padding: .25rem 0; list-style: none; background: var(--bg); border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 10px; box-shadow: 0 6px 18px rgb(0 0 0 / .12); max-height: 16rem; overflow-y: auto; }
.mention-list li { padding: .4rem .75rem; cursor: pointer; }
.mention-list li[aria-selected="true"], .mention-list li:hover { background: color-mix(in srgb, var(--lagoon) 15%, transparent); }
.mention-notices { list-style: none; padding: 0; display: grid; gap: .5rem; }
.mention-notices li { padding: .6rem .8rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); border-radius: 10px; }
.mention-notices li.unread { border-color: var(--lagoon); }
.post-form .mention-field { display: block; }
.reply-form .mention-field { flex: 1; display: flex; min-width: 0; }
.reply-form .mention-field input { width: 100%; }

/* Blog and site pages (M7). */
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.tag-list a { padding: .3rem .8rem; border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 999px; color: inherit; text-decoration: none; font-size: .9rem; }
.tag-list a:hover, .tag-list a[aria-current="page"] { border-color: var(--lagoon); color: var(--lagoon); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin: 2rem 0 0; }
.pager a { color: var(--lagoon); }
.blog-post .prose, .site-page .prose { max-width: 44rem; }
.faq details { border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); padding: .75rem 0; max-width: 44rem; }
.faq summary { cursor: pointer; font-weight: 600; }

/* Checkout confirmation: a free trial's terms, the order bump's checkbox; the upsell after a purchase. */
.trial-terms {
    margin: .4rem 0 0;
    font-weight: 600;
}
.bump-box {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .8rem .9rem;
    border: 1px dashed var(--lagoon);
    border-radius: 10px;
}
.bump-box > span {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.upsell-box {
    margin: 1.25rem 0;
    border-color: var(--lagoon);
}
/* My check-in code: one card per place, the QR code large and on white so any camera reads it. */
.checkin-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    margin: 1rem 0;
}
.checkin-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
    border-radius: 12px;
}
.checkin-qr {
    background: #fff;
    padding: .75rem;
    border-radius: 10px;
    max-width: 320px;
}
.checkin-qr svg {
    display: block;
    width: 100%;
    height: auto;
}

/* My progress: points, streak days and badges */
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.progress-big { font-size: 1.8rem; font-weight: 700; margin: .25rem 0; }
.streak-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: .25rem; margin: .4rem 0 .75rem; max-width: 24rem; }
.streak-day { aspect-ratio: 1; border-radius: .25rem; background: color-mix(in srgb, var(--muted) 20%, transparent); }
.streak-day.on { background: var(--lagoon); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; margin: .5rem 0; }
.badge-card { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; border-radius: .6rem; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); opacity: .65; }
.badge-card.earned { opacity: 1; border-color: var(--lagoon); }
.tab-links { margin: .25rem 0 .75rem; }

/* Signed-in menu: the everyday links, then the rest under "More". */
.nav-more { position: relative; }
.nav-more > summary { color: #fff; cursor: pointer; list-style: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: ""; display: inline-block; margin-left: .4rem; width: .4rem; height: .4rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15rem) rotate(45deg); }
.nav-more[open] > summary::after { transform: translateY(.05rem) rotate(225deg); }
.nav-more > summary:hover, .nav-more[open] > summary { color: var(--lagoon); }
.nav-more-panel {
    position: absolute; right: 0; top: calc(100% + .6rem); z-index: 30; min-width: 12rem;
    display: grid; gap: .1rem; padding: .5rem; background: var(--charcoal, #17191b);
    border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.nav-more-panel a { padding: .45rem .7rem; border-radius: 6px; }
.nav-more-panel a:hover { background: rgba(255, 255, 255, .08); }
@media (max-width: 640px) { .nav-more-panel { right: auto; left: 0; } }
