:root {
    --page-bg: #efe8d7;
    --surface: rgba(255, 251, 244, 0.92);
    --surface-strong: #f8f1e2;
    --ink: #14261f;
    --muted: #516158;
    --green: #285f45;
    --green-deep: #173d2d;
    --green-soft: #d7e6d5;
    --gold: #b48b3e;
    --gold-soft: #e5d5ac;
    --red: #bc4034;
    --red-soft: #c85a4d;
    --border: rgba(20, 38, 31, 0.12);
    --shadow: 0 22px 50px rgba(22, 36, 29, 0.12);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --container: 1180px;
}

/* Authenticated Home navigation stays a single compact row at every width. */
.home-hero-nav--authenticated {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(0.3rem, 1vw, 0.75rem);
    white-space: nowrap;
}
.home-hero-nav.home-hero-nav--authenticated a {
    display: inline-block;
}
@media (max-width: 599px) {
    .home-hero-nav.home-hero-nav--authenticated a { font-size: clamp(0.68rem, 2.8vw, 0.9rem); }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(229, 213, 172, 0.42), transparent 24%),
        radial-gradient(circle at top right, rgba(53, 101, 72, 0.18), transparent 28%),
        linear-gradient(180deg, #fbf7f0 0%, var(--page-bg) 48%, #f5efdf 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

p,
li {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.65;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(251, 247, 240, 0.9);
    border-bottom: 1px solid rgba(20, 38, 31, 0.08);
}

.header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    padding: 0.45rem 0;
}

/* Authenticated pages have one action.  Keep the existing logo width while
   trimming the unused header space around the single logout control. */
.site-header--authenticated .header-inner {
    gap: 0.75rem;
    padding: 0.28rem 0;
}

.site-header--authenticated .header-actions .button {
    min-height: 44px;
    padding: 0.6rem 1rem;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 0.35rem;
}

.brand-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.brand-logo--standard {
    width: clamp(180px, 16vw, 220px);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #f2c94c;
    outline-offset: 3px;
}

.header-nav,
.header-actions,
.header-logout-form,
.support-links,
.voice-feature-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.header-logout-form {
    margin: 0;
}

.header-nav {
    justify-content: center;
    flex-wrap: wrap;
    min-width: 0;
}

.header-nav a {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--muted);
    padding: 0.35rem 0;
    white-space: nowrap;
}

.header-nav--public a,
.hiw-topbar .home-topnav a {
    color: #111;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.22em;
    text-shadow: none;
}

.header-nav--public a:hover,
.hiw-topbar .home-topnav a:hover {
    color: var(--green-deep);
}

.hiw-topbar .home-topnav a:focus-visible {
    outline: 3px solid #f2c94c;
    outline-offset: 3px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.82rem 1.22rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, #2f6c4e 0%, var(--green-deep) 100%);
    box-shadow: 0 18px 32px rgba(23, 61, 45, 0.18);
}

.button-secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.62);
    border-color: var(--border);
}

.hero-section {
    padding: 0;
}

.content-section,
.benefits-section,
.showcase-section,
.voice-band-section,
.compliance-section,
.page-hero {
    padding: 4.5rem 0;
}

.hero-stage {
    position: relative;
    min-height: clamp(34rem, 78vh, 46rem);
    overflow: hidden;
    background: linear-gradient(180deg, #f4c98a 0%, #d9b878 42%, #6f8f57 100%);
}

.hero-stage-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
}

.hero-stage-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12, 24, 18, 0.18) 0%, rgba(12, 24, 18, 0.08) 28%, rgba(12, 24, 18, 0.18) 62%, rgba(12, 24, 18, 0.42) 100%),
        linear-gradient(90deg, rgba(12, 24, 18, 0.34) 0%, rgba(12, 24, 18, 0.08) 48%, rgba(12, 24, 18, 0.18) 100%);
}

.hero-stage-content {
    position: relative;
    z-index: 2;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2.4rem, 7vh, 4.8rem) 0 clamp(2.8rem, 8vh, 5rem);
}

.hero-stage-copy {
    max-width: 16ch;
    color: #f8f6ef;
    text-shadow: 0 10px 30px rgba(10, 18, 14, 0.28);
}

.hero-stage-copy h1 {
    margin: 0;
    display: grid;
    gap: 0.35rem;
    font-size: clamp(2.7rem, 6.4vw, 5.2rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
}

.hero-stage-copy h1 span {
    display: block;
}

.hero-support {
    margin: 1.35rem 0 0;
    max-width: 18ch;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.45;
    color: rgba(248, 246, 239, 0.92);
}

.hero-course-count {
    margin: 0;
    width: fit-content;
    max-width: 18rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(248, 246, 239, 0.94);
    padding: 0.72rem 1rem;
    border-radius: 999px;
    background: rgba(18, 34, 27, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.hero-kicker,
.section-kicker,
.slide-label,
.benefit-chip-label,
.narrative-step {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.14rem;
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 700;
}

.page-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.02;
    margin: 0.45rem 0 1rem;
}

.page-lead {
    font-size: 1.08rem;
    max-width: 60ch;
    color: #31453a;
}

.voice-feature-row {
    flex-wrap: wrap;
    margin: 1.15rem 0 0;
}

.voice-feature-row span {
    padding: 0.48rem 0.82rem;
    border-radius: 999px;
    background: rgba(40, 95, 69, 0.08);
    border: 1px solid rgba(40, 95, 69, 0.12);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #294638;
}

.benefit-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.benefit-strip-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.benefit-chip,
.narrative-card,
.support-card,
.terms-card,
.phone-card,
.placeholder-shell,
.compliance-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.benefit-chip,
.narrative-card,
.support-card,
.terms-card,
.phone-card {
    padding: 1.45rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(20, 38, 31, 0.08);
    box-shadow: 0 12px 30px rgba(20, 38, 31, 0.08);
}

.benefit-chip {
    background:
        linear-gradient(180deg, rgba(255, 249, 240, 0.95), rgba(244, 235, 218, 0.95));
}

.benefit-chip h3,
.narrative-card h2,
.support-card h2,
.terms-card h2,
.phone-card h3 {
    margin: 0.28rem 0 0;
}

.section-intro {
    max-width: 56rem;
    margin-bottom: 1.85rem;
}

.section-intro h2,
.voice-band-copy h2 {
    margin: 0.18rem 0 0.8rem;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.02;
}

.narrative-grid,
.support-grid,
.terms-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.narrative-card {
    background: rgba(255, 252, 246, 0.88);
}

.narrative-step {
    margin: 0;
}

.phone-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(250px, 1fr));
    gap: 1rem;
    overflow-x: auto;
    padding: 0.1rem 0 0.6rem;
    scrollbar-width: thin;
}

.phone-card {
    background:
        linear-gradient(180deg, rgba(255, 250, 244, 0.96), rgba(243, 235, 223, 0.96));
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.phone-card-note {
    margin: 0.9rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.phone-frame {
    position: relative;
    margin-top: 0.95rem;
    border-radius: 28px;
    background: linear-gradient(180deg, #1d2a24 0%, #101814 100%);
    padding: 0.72rem 0.62rem 0.85rem;
    box-shadow: 0 18px 36px rgba(16, 24, 20, 0.22);
    flex: 1 1 auto;
}

.phone-notch {
    width: 42%;
    height: 0.42rem;
    margin: 0 auto 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.phone-screen {
    min-height: 24rem;
    border-radius: 20px;
    background:
        linear-gradient(180deg, #f4f1e8 0%, #ebe4d4 100%);
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    overflow: hidden;
}

.phone-thread-meta {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5d6b61;
    text-align: center;
    margin-bottom: 0.15rem;
}

.sms-bubble {
    max-width: 100%;
    border-radius: 16px;
    padding: 0.7rem 0.8rem;
    box-shadow: 0 8px 18px rgba(20, 38, 31, 0.06);
}

.sms-inbound {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid rgba(20, 38, 31, 0.08);
}

.sms-outbound {
    align-self: flex-end;
    background: rgba(40, 95, 69, 0.12);
    border: 1px solid rgba(40, 95, 69, 0.14);
}

.sms-text {
    margin: 0;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.74rem;
    line-height: 1.45;
    color: #1b2b23;
}

.voice-band {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(290px, 1.04fr);
    gap: 1.4rem;
    padding: 1.35rem;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, #dcebd4 0%, #84aa68 26%, #3a6c46 67%, #1f4c34 100%);
    box-shadow: var(--shadow);
}

.voice-band-copy {
    padding: 1.35rem;
    border-radius: 26px;
    background: rgba(250, 247, 237, 0.18);
    color: #f8f8f2;
}

.voice-band-copy .section-kicker,
.voice-band-copy p,
.voice-band-copy .voice-feature-row span {
    color: #eff6ea;
}

.voice-band-copy .voice-feature-row span {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
}

.voice-band-scene {
    position: relative;
    min-height: 320px;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(180deg, #a2d2e7 0%, #dbeaf3 35%, #3a5b42 100%);
}

.voice-band-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-narrow .container,
.placeholder-shell {
    max-width: 58rem;
}

.placeholder-shell,
.compliance-banner {
    padding: 2.2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr 1fr;
    gap: 1rem;
    padding: 2.8rem 0 3rem;
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(20, 38, 31, 0.08);
    background: rgba(255, 249, 241, 0.62);
}

.footer-brand h2 {
    margin: 0.25rem 0 0.75rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.08;
}

.footer-compliance-box {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(40, 95, 69, 0.08);
    border: 1px solid rgba(40, 95, 69, 0.12);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li + li {
    margin-top: 0.55rem;
}

.footer-copy,
.compliance-copy,
.legal-bridge-note {
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.35rem;
}

.support-links {
    margin-top: 1.25rem;
}

.legal-bridge-note a {
    color: var(--green-deep);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.sms-consent-card .sms-consent-copy {
    margin: 0;
    line-height: 1.65;
    color: var(--muted);
}

ul {
    padding-left: 1.1rem;
}

@media (max-width: 1100px) {
    .benefit-strip-six {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .site-header .header-inner {
        grid-template-columns: auto minmax(0, 1fr) auto;
        justify-items: stretch;
        gap: 0.5rem 0.7rem;
    }

    .site-header .header-nav {
        width: auto;
        justify-content: center;
    }

    .site-header .header-actions {
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .header-inner,
    .benefit-strip,
    .benefit-strip-six,
    .voice-band,
    .footer-grid,
    .narrative-grid,
    .support-grid,
    .terms-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        justify-items: start;
    }

    .header-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .header-nav,
    .header-actions,
    .support-links,
    .voice-feature-row {
        flex-wrap: wrap;
    }

    .brand {
        align-items: flex-start;
    }

    .hero-stage {
        min-height: clamp(32rem, 86vh, 42rem);
    }

    .hero-stage-copy {
        max-width: 14ch;
    }

    .voice-band-copy {
        order: 2;
    }

    .voice-band-scene {
        order: 1;
        min-height: 280px;
    }

    .phone-gallery {
        grid-template-columns: repeat(5, minmax(280px, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header .header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "nav nav";
    }

    .site-header .brand-logo {
        grid-area: brand;
        width: min(10rem, 40vw);
    }

    .site-header .header-nav {
        grid-area: nav;
        justify-content: flex-start;
    }

    .site-header .header-actions {
        grid-area: actions;
        width: auto;
    }

    .site-header .header-actions .button {
        flex: 0 0 auto;
    }

    .placeholder-shell,
    .compliance-banner,
    .voice-band-copy {
        padding: 1.5rem;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .button {
        flex: 1 1 auto;
    }

    .header-nav {
        gap: 0.9rem;
    }

    .brand-title {
        font-size: 1.18rem;
    }

    .brand-tagline,
    .brand-orbit {
        display: none;
    }

    .hero-stage-content {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .hero-stage-copy {
        max-width: 12ch;
    }

    .hero-support {
        max-width: 16ch;
    }
}


/* Homepage hero: the approved desktop composition uses the image at its native
 * 1672 x 941 ratio, with independently positioned live HTML controls. */
.home-hard-reset main {
    display: block;
}

.home-hard-reset {
    overflow-x: hidden;
}

.home-hero {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    aspect-ratio: 1672 / 941;
    background: #1a2818;
    overflow: hidden;
}

.home-hard-reset .home-hero-image,
.home-hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.home-hero-overlay a,
.home-hero-overlay button {
    pointer-events: auto;
}

.home-hero-topbar {
    position: absolute;
    inset: 0;
}

.brand-logo--home {
    position: absolute;
    top: 0.5%;
    left: -8.7%;
    width: 52%;
    transform: scaleY(0.76);
    transform-origin: top left;
    z-index: 0;
    background: transparent;
    box-shadow: none;
    filter: none;
}

.home-hero-nav {
    position: absolute;
    top: 7.25%;
    left: 46.2%;
    z-index: 1;
}

.home-hero-nav a {
    display: block;
    padding: 0 0 0.5rem;
    border-bottom: 3px solid #0a4229;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(1rem, 1.42vw, 1.45rem);
    font-weight: 700;
    color: #121812;
    text-shadow: none;
}

.home-hero-nav a:hover {
    color: #0a4229;
}

.home-hero-actions {
    position: absolute;
    top: 4.9%;
    right: 3.5%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.35rem;
    z-index: 1;
}

.home-free-badge {
    position: absolute;
    top: 7.35rem;
    right: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14.2rem;
    height: 4.7rem;
    border: 4px double #a71816;
    border-radius: 0.55rem;
    color: #a71816;
    background: rgba(255, 248, 235, 0.84);
    box-shadow: 0 1px 1px rgba(100, 27, 20, 0.25);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.9rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    transform: rotate(-9deg) skew(-4deg);
}

.home-hero-actions .home-hero-auth-btn {
    min-width: 10.9rem;
    min-height: 3.95rem;
    padding: 0.75rem 1.45rem;
    border-radius: 0.55rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.home-hero-actions .home-hero-auth {
    position: static;
    display: contents;
}

.home-hero-features {
    margin: 1.15rem 0 0;
    color: #fff;
    font-size: clamp(1rem, 1.62vw, 1.72rem);
    font-weight: 400;
    line-height: 1.62;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.65);
}

.home-hero-features span {
    display: block;
}

.home-hero-copy {
    position: absolute;
    top: 48.5%;
    left: 4.7%;
    max-width: 50%;
    margin: 0;
    z-index: 1;
}

.home-hero-title {
    display: grid;
    gap: 0.05em;
    margin: 0;
    color: #fff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(2.1rem, 3vw, 3.2rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.62);
}

.home-hero-auth-btn--login {
    color: #10271d;
    background: rgba(255, 249, 238, 0.14);
    border: 2px solid #174632;
}

@media (max-width: 1120px) {
    .brand-logo--home { width: 52%; }
    .home-hero-nav { left: 43%; }
    .home-hero-actions { right: 2.25%; gap: 0.6rem; }
    .home-hero-actions .home-hero-auth-btn { min-width: 7rem; min-height: 3rem; padding: 0.55rem 0.8rem; font-size: 1rem; }
    .home-free-badge { top: 9rem; right: 1.25rem; width: 8rem; height: 3.2rem; border-width: 3px; font-size: 1.8rem; }
    .home-hero-copy { top: 45.5%; max-width: 48%; }
    .home-hero-title { font-size: clamp(1.75rem, 3vw, 2.5rem); }
}

@media (max-width: 820px) {
    .home-hero-topbar {
        position: static;
    }
    .home-hero { aspect-ratio: auto; overflow: visible; }
    .home-hero-image { height: auto; min-height: 17rem; object-position: 58% center; }
    .home-hero-overlay { position: relative; background: #f8f1e2; padding: 0.85rem 1rem 1.2rem; }
    .brand-logo--home, .home-hero-nav, .home-hero-actions, .home-hero-copy, .home-free-badge { position: static; }
    .brand-logo--home { display: block; width: min(15rem, 48vw); filter: none; }
    .home-hero-topbar { display: grid; grid-template-columns: 1fr auto; gap: 0.7rem; align-items: start; }
    .home-hero-actions { grid-column: 2; grid-row: 1; display: flex; gap: 0.4rem; }
    .home-hero-nav { grid-column: 1 / -1; grid-row: 2; }
    .home-hero-nav a { width: fit-content; border-bottom-width: 2px; font-size: 1rem; }
    .home-free-badge { order: -1; width: 3.5rem; height: 2.25rem; border-width: 2px; border-radius: 0.3rem; font-size: 1rem; transform: rotate(-8deg); }
    .home-hero-actions .home-hero-auth-btn { min-width: 4.8rem; min-height: 2.7rem; padding: 0.45rem 0.65rem; font-size: 0.9rem; }
    .home-hero-copy { max-width: 35rem; margin-top: 1.1rem; }
    .home-hero-title { color: var(--green-deep); font-size: clamp(1.8rem, 5.5vw, 2.55rem); text-shadow: none; }
    .home-hero-features { margin-top: 0.9rem; color: var(--ink); font-size: 1rem; line-height: 1.5; text-shadow: none; }
    .home-hero-scroll-cue { display: none; }
}

@media (max-width: 500px) {
    .home-hero-image { min-height: 13rem; }
    .home-hero-overlay { padding: 0.8rem; }
    .home-hero-topbar { grid-template-columns: 1fr; }
    .brand-logo--home { width: min(13.5rem, 65vw); }
    .home-hero-actions { grid-column: 1; grid-row: 2; justify-content: flex-start; flex-wrap: wrap; }
    .home-hero-nav { grid-row: 3; }
    .home-hero-copy { margin-top: 0.85rem; }
    .home-hero-title { font-size: clamp(1.65rem, 8.4vw, 2.05rem); line-height: 1.1; }
    .home-hero-title span { white-space: normal; }
    .home-hero-features { font-size: 0.98rem; }
}

/* Auth controls live in the homepage topbar, not ordinary document flow. */
    }
}

@media (max-width: 640px) {
    .home-hero-overlay {
        position: relative;
        padding: 0.75rem;
        color: var(--ink);
        background: #f8f1e2;
    }

    .home-hero-topbar {
        grid-template-columns: auto 1fr;
        gap: 0.55rem;
    }

    .brand-logo--home {
        width: clamp(180px, 50vw, 280px);
    }

    .home-hero-actions {
        gap: 0.35rem;
    }

    .home-free-badge {
        min-width: 2.8rem;
        min-height: 2.35rem;
        font-size: 0.78rem;
    }

    .home-hero-actions .home-hero-auth-btn {
        min-height: 2.75rem;
        min-width: 4.9rem;
        padding: 0.45rem 0.65rem;
        font-size: 0.88rem;
    }

    .home-hero-nav {
        justify-content: flex-start;
    }

    .home-hero-nav a {
        color: var(--green-deep);
        text-shadow: none;
    }

    .home-hero-copy {
        position: static;
        max-width: none;
        margin-top: 1rem;
        text-shadow: none;
    }

    .home-hero-title {
        color: var(--green-deep);
        font-size: clamp(1.3rem, 6vw, 1.75rem);
    }

    .home-hero-features {
        color: var(--ink);
        font-size: 0.95rem;
        text-shadow: none;
    }

    .home-hero-scroll-cue {
        display: none;
    }
}

@media (max-width: 430px) {
    .home-hero-topbar {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "actions"
            "nav";
    }

    .home-hero-actions {
        justify-content: flex-start;
    }
}

/* Keep these final handset overrides after the legacy tablet rules above. */
@media (max-width: 599px) {
    .home-hard-reset .home-hero,
    .home-hero {
        height: clamp(27rem, 121vw, 31rem);
        min-height: clamp(27rem, 121vw, 31rem);
        overflow: hidden;
    }

    .home-hard-reset .home-hero-image,
    .home-hero-image {
        height: 100%;
        min-height: 0;
        object-fit: cover;
        object-position: 58% center;
    }

    .home-hero-overlay { position: absolute; inset: 0; padding: 0; background: transparent; }
    .home-hero-topbar { position: absolute; inset: 0; display: block; }
    .brand-logo--home { position: absolute; top: 1.55rem; left: -1.65rem; width: min(17.8rem, 72vw); transform: scaleY(0.76); }
    .home-hero-nav { position: absolute; top: 0.85rem; left: 50%; z-index: 2; transform: translateX(-50%); }
    .home-hero-nav a { padding-bottom: 0.2rem; border-bottom: 2px solid #111; color: #111; font-size: clamp(0.76rem, 3.5vw, 0.9rem); text-shadow: none; white-space: nowrap; }
    .home-hero-actions { position: absolute; top: 0.45rem; right: 0.4rem; display: grid; grid-template-areas: "register login" "free free"; gap: 0.25rem; }
    .home-hero-actions .home-hero-auth-btn { min-width: 0; min-height: 2.35rem; padding: 0.4rem 0.45rem; border-width: 1px; font-size: clamp(0.72rem, 3.25vw, 0.82rem); }
    .home-hero-auth-btn--register { grid-area: register; }
    .home-hero-auth-btn--login { grid-area: login; }
    .home-free-badge { position: static; grid-area: free; justify-self: end; width: 4.25rem; height: 2.2rem; min-width: 0; min-height: 0; border-width: 2px; border-radius: 0.3rem; font-size: 1rem; }
    .home-hero-copy { position: absolute; top: 42%; left: 0.75rem; width: min(56%, 13.5rem); max-width: none; margin: 0; color: #fff; }
    .home-hero-title { color: #fff; font-size: clamp(1.2rem, 5.9vw, 1.52rem); line-height: 1.04; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.82); }
    .home-hero-title span { white-space: normal; }
    .home-hero-features { margin-top: 0.55rem; color: #fff; font-size: clamp(0.75rem, 3.25vw, 0.88rem); line-height: 1.32; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.88); }
    .home-hero-scroll-cue { display: none; }

    .hiw-topbar { padding: 0.25rem 0.4rem; }
    .hiw-topbar-inner { width: 100%; grid-template-columns: minmax(5.9rem, 29vw) minmax(0, 1fr) minmax(4.1rem, 20vw); grid-template-areas: "brand nav actions"; gap: 0.25rem; }
    .hiw-topbar .brand-logo { grid-area: brand; width: 100%; max-width: none; }
    .hiw-topbar .home-topnav { grid-area: nav; justify-content: center; gap: 0.35rem; flex-wrap: nowrap; }
    .hiw-topbar .home-topnav a { padding: 0.35rem 0.05rem; font-size: clamp(0.7rem, 3vw, 0.82rem); line-height: 1.1; text-align: center; white-space: nowrap; }
    .hiw-topbar .home-top-actions { grid-area: actions; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 0.2rem; width: 100%; }
    .hiw-topbar .home-btn { min-height: 2rem; padding: 0.3rem 0.4rem; font-size: clamp(0.68rem, 2.9vw, 0.78rem); line-height: 1.05; }
    .hiw-page-surface { padding-top: 0.65rem; }
    .hiw-hero-card { padding: 0.9rem 0.85rem; }
    .hiw-hero h1 { font-size: clamp(1.6rem, 8vw, 2rem); line-height: 1.05; white-space: nowrap; }
    .hiw-course-count { margin-top: 0.65rem; font-size: 0.88rem; }
    .hiw-page-nav { overflow: visible; margin-bottom: 0.75rem; padding: 0.65rem 0.45rem; }
    .hiw-page-nav-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
    .hiw-page-nav-list li { flex: 1 1 calc((100% - 0.7rem) / 3); min-width: 0; }
    .hiw-page-nav-list a { display: flex; align-items: center; justify-content: center; min-height: 2.7rem; padding: 0.3rem 0.25rem; font-size: clamp(0.68rem, 3vw, 0.76rem); line-height: 1.12; text-align: center; white-space: normal; }
}

/* Final cascade for the phone hero after all tablet fallbacks. */
@media (max-width: 599px) {
    .brand-logo--home { top: 1.55rem; width: min(17.8rem, 72vw); }
    .home-hero-nav a { border-bottom-color: #111; color: #111; text-shadow: none; }
}

/* Keep this after all legacy handset rules so the approved mobile logo wins. */
@media (max-width: 599px) {
    .brand-logo--home {
        top: 1.55rem;
        width: min(17.8rem, 72vw);
    }

    .home-hero-nav a {
        border-bottom-color: #111;
        color: #111;
        text-shadow: none;
    }
}

/* Final mobile branding refinements. */
@media (max-width: 599px) {
    .brand-logo--home { top: 1.55rem; width: min(17.8rem, 72vw); }
    .home-hero-nav a { border-bottom-color: #111; color: #111; text-shadow: none; }
}

.contact-header { padding: 0.3rem 0; background: rgba(251, 247, 240, 0.9); border-bottom: 1px solid rgba(20, 38, 31, 0.08); }
.contact-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.contact-header .brand-logo { width: clamp(180px, 16vw, 220px); }
.contact-header nav a { color: #111; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.contact-page-surface { min-height: calc(100vh - 8rem); padding: clamp(2rem, 8vw, 5rem) 1rem; background: linear-gradient(118deg, rgba(236, 244, 235, .58), rgba(244, 247, 240, .48)), url("../images/auth-golf-course.jpg") center / cover no-repeat; }
.contact-card { width: min(100%, 42rem); margin: 0 auto; padding: clamp(1.5rem, 5vw, 2.75rem); background: rgba(255,255,255,.96); border: 1px solid #d7e0d4; border-radius: 14px; box-shadow: 0 12px 30px rgba(34, 62, 39, .13); }
.contact-card h1 { margin-top: 0; color: var(--green-deep); text-align: center; }
.contact-card h2 { margin: 1.4rem 0 .35rem; color: var(--green-deep); font-size: 1.08rem; }
.contact-card p { margin: 0; }
.contact-card a { color: #1e653a; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 599px) { .contact-header { padding: .25rem .4rem; } .contact-header .brand-logo { width: min(10rem, 42vw); } .contact-page-surface { min-height: calc(100vh - 6rem); padding: 1rem .65rem 1.5rem; } .contact-card { padding: 1.25rem; } }

/* Phone-only overlay and header composition.  Tablet and desktop retain the
 * approved layouts above; these rules undo the older document-flow hero only
 * on narrow handsets. */
@media (max-width: 599px) {
    .home-hard-reset .home-hero,
    .home-hero {
        height: clamp(27rem, 121vw, 31rem);
        min-height: clamp(27rem, 121vw, 31rem);
        overflow: hidden;
    }

    .home-hard-reset .home-hero-image,
    .home-hero-image {
        height: 100%;
        min-height: 0;
        object-fit: cover;
        object-position: 58% center;
    }

    .home-hero-overlay {
        position: absolute;
        inset: 0;
        padding: 0;
        background: transparent;
    }

    .home-hero-topbar {
        position: absolute;
        inset: 0;
        display: block;
    }

    .brand-logo--home {
        position: absolute;
        top: 0.15rem;
        left: -1.65rem;
        display: block;
        width: min(13.6rem, 55vw);
        transform: scaleY(0.76);
        transform-origin: top left;
    }

    .home-hero-nav {
        position: absolute;
        top: 0.85rem;
        left: 50%;
        z-index: 2;
        transform: translateX(-50%);
    }

    .home-hero-nav a {
        padding-bottom: 0.2rem;
        border-bottom: 2px solid #fff;
        color: #fff;
        font-size: clamp(0.76rem, 3.5vw, 0.9rem);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
        white-space: nowrap;
    }

    .home-hero-actions {
        position: absolute;
        top: 0.45rem;
        right: 0.4rem;
        display: grid;
        grid-template-areas:
            "register login"
            "free free";
        gap: 0.25rem;
        align-items: center;
    }

    .home-hero-actions .home-hero-auth-btn {
        min-width: 0;
        min-height: 2.35rem;
        padding: 0.4rem 0.45rem;
        border-width: 1px;
        font-size: clamp(0.72rem, 3.25vw, 0.82rem);
    }

    .home-hero-auth-btn--register { grid-area: register; }
    .home-hero-auth-btn--login { grid-area: login; }

    .home-free-badge {
        position: static;
        grid-area: free;
        justify-self: end;
        width: 4.25rem;
        height: 2.2rem;
        min-width: 0;
        min-height: 0;
        border-width: 2px;
        border-radius: 0.3rem;
        font-size: 1rem;
    }

    .home-hero-copy {
        position: absolute;
        top: 42%;
        left: 0.75rem;
        width: min(56%, 13.5rem);
        max-width: none;
        margin: 0;
        color: #fff;
    }

    .home-hero-title {
        color: #fff;
        font-size: clamp(1.2rem, 5.9vw, 1.52rem);
        line-height: 1.04;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.82);
    }

    .home-hero-title span { white-space: normal; }

    .home-hero-features {
        margin-top: 0.55rem;
        color: #fff;
        font-size: clamp(0.75rem, 3.25vw, 0.88rem);
        line-height: 1.32;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.88);
    }

    .home-hero-scroll-cue { display: none; }

    .hiw-topbar,
    .site-header {
        padding: 0.25rem 0.4rem;
    }

    .hiw-topbar-inner,
    .site-header .header-inner {
        width: 100%;
        grid-template-columns: minmax(5.9rem, 29vw) minmax(0, 1fr) minmax(4.1rem, 20vw);
        grid-template-areas: "brand nav actions";
        gap: 0.25rem;
        align-items: center;
    }

    .hiw-topbar .brand-logo,
    .site-header .brand-logo {
        grid-area: brand;
        width: 100%;
        max-width: none;
    }

    .hiw-topbar .home-topnav,
    .site-header .header-nav {
        grid-area: nav;
        justify-content: center;
        gap: 0.35rem;
        flex-wrap: nowrap;
    }

    .hiw-topbar .home-topnav a,
    .site-header .header-nav a {
        padding: 0.35rem 0.05rem;
        font-size: clamp(0.7rem, 3vw, 0.82rem);
        line-height: 1.1;
        text-align: center;
        white-space: nowrap;
    }

    .hiw-topbar .home-top-actions,
    .site-header .header-actions {
        grid-area: actions;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 0.2rem;
        width: 100%;
    }

    .hiw-topbar .home-btn,
    .site-header .header-actions .button {
        min-height: 2rem;
        padding: 0.3rem 0.4rem;
        font-size: clamp(0.68rem, 2.9vw, 0.78rem);
        line-height: 1.05;
    }

    .hiw-page-surface { padding-top: 0.65rem; }
    .hiw-hero-card { padding: 0.9rem 0.85rem; }
    .hiw-hero h1 { font-size: clamp(1.6rem, 8vw, 2rem); line-height: 1.05; white-space: nowrap; }
    .hiw-course-count { margin-top: 0.65rem; font-size: 0.88rem; }

    .hiw-page-nav {
        overflow: visible;
        margin-bottom: 0.75rem;
        padding: 0.65rem 0.45rem;
    }

    .hiw-page-nav-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

    .hiw-page-nav-list li {
        flex: 1 1 calc((100% - 0.7rem) / 3);
        min-width: 0;
    }

    .hiw-page-nav-list a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 2.7rem;
        padding: 0.3rem 0.25rem;
        font-size: clamp(0.68rem, 3vw, 0.76rem);
        line-height: 1.12;
        text-align: center;
        white-space: normal;
    }
}

/*
 * Auth controls live in the topbar grid, not absolutely positioned.
 */

/* HIW topbar uses these shared components */
.home-topnav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.75rem, 2.5vw, 1.4rem);
    min-width: 0;
    flex-wrap: wrap;
}

.home-topnav a {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(0.95rem, 2.3vw, 1.08rem);
    font-weight: 600;
    color: rgba(247, 243, 234, 0.98);
    text-decoration: none;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55),
        0 2px 10px rgba(8, 14, 10, 0.55),
        0 0 16px rgba(8, 14, 10, 0.3);
    padding: 0.25rem 0;
    white-space: nowrap;
}

.home-topnav a:hover,
.home-topnav a:focus-visible {
    color: #fff;
    outline: none;
}

.home-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.55rem;
    padding: 0.55rem 1.05rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.home-btn:hover,
.home-btn:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.home-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #2f6c4e 0%, #173d2d 100%);
    box-shadow: 0 12px 24px rgba(12, 24, 18, 0.24);
}

.home-btn-secondary {
    color: #14261f;
    background: rgba(255, 252, 246, 0.92);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 20px rgba(12, 24, 18, 0.14);
}



.home-hero-auth-form {
    margin: 0;
}

.home-hero-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    min-width: 5.4rem;
    padding: 0.42rem 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(10, 16, 12, 0.2);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.home-hero-auth-btn:hover,
.home-hero-auth-btn:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.home-hero-auth-btn--register,
.home-hero-auth-btn--logout {
    color: #fff;
    background: linear-gradient(135deg, #2f6c4e 0%, #173d2d 100%);
    border-color: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.home-hero-auth-btn--login {
    color: #14261f;
    background: rgba(255, 252, 246, 0.96);
    border-color: rgba(255, 255, 255, 0.55);
}

.home-hero-scroll-cue {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.85rem;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
}

.home-scroll-cue {
    pointer-events: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.95rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(16, 28, 22, 0.42);
    color: #f7f3ea;
    text-decoration: none;
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 24px rgba(10, 16, 12, 0.22);
}

.home-scroll-cue:hover,
.home-scroll-cue:focus-visible {
    color: #fff;
    background: rgba(16, 28, 22, 0.58);
    outline: none;
}

.home-scroll-cue-label {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.home-scroll-cue-arrow {
    width: 0.7rem;
    height: 0.7rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -0.1rem;
    animation: home-scroll-bounce 1.6s ease-in-out infinite;
}

@media (max-width: 820px) {
    .home-hero-scroll-cue {
        display: none;
    }
}

@keyframes home-scroll-bounce {
    0%,
    100% {
        transform: translateY(0) rotate(45deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(0.25rem) rotate(45deg);
        opacity: 1;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Shared public-page motif: keep the approved home hero untouched and begin
 * the decorative course treatment only after it. */
.home-below-hero,
.hiw-page-surface {
    background-color: #e8eee5;
    background-image:
        linear-gradient(180deg, rgba(242, 247, 239, 0.46), rgba(230, 238, 226, 0.42)),
        url("../images/auth-golf-course.jpg");
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
}

.home-below-hero {
    padding: 1.1rem 0 2.8rem;
}

.home-motif-card,
.hiw-hero-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(20, 38, 31, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: 0 18px 42px rgba(22, 50, 32, 0.14);
}

/* "How it works" lands just above this heading, with room for the caption below the deck. */
#see-in-action {
    scroll-margin-top: 0.75rem;
}

.home-gallery-carousel {
    position: relative;
    display: grid;
    gap: 0.55rem;
    justify-items: center;
    /* Nudge the whole carousel (phones + caption + dots) slightly upward. */
    margin-top: -0.35rem;
}

.home-gallery-nav {
    position: absolute;
    top: 42%;
    z-index: 4;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(20, 38, 31, 0.12);
    border-radius: 999px;
    background: rgba(255, 252, 246, 0.94);
    color: var(--green-deep);
    box-shadow: 0 8px 18px rgba(16, 24, 20, 0.12);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    line-height: 1;
}

.home-gallery-nav--prev {
    left: max(0.2rem, calc(50% - min(13.5rem, 46vw)));
}

.home-gallery-nav--next {
    right: max(0.2rem, calc(50% - min(13.5rem, 46vw)));
}

.home-gallery-nav:hover,
.home-gallery-nav:focus-visible {
    background: #fff;
    outline: none;
}

.home-gallery-dots {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    min-height: 1.25rem;
}

.home-gallery-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: rgba(20, 38, 31, 0.22);
    cursor: pointer;
}

.home-gallery-dot.is-active {
    width: 1.15rem;
    background: var(--green-deep);
}

.home-gallery-carousel:not(.is-enhanced) .home-gallery-nav,
.home-gallery-carousel:not(.is-enhanced) .home-gallery-dots {
    display: none;
}

.home-gallery-card,
.home-benefits-card,
.home-accuracy-card {
    padding: clamp(1.4rem, 3vw, 2.6rem);
}

.home-headline-section {
    padding: 0 0 1.35rem;
}

.home-headline-card {
    padding: clamp(1.4rem, 3vw, 2.35rem);
}

.home-headline-card .home-section-intro {
    margin-bottom: 0;
}

.home-feature-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr);
    gap: clamp(1rem, 2.4vw, 1.8rem);
    align-items: start;
    padding-bottom: 1.35rem;
}

.home-feature-side {
    display: grid;
    gap: clamp(1rem, 2.4vw, 1.8rem);
    align-content: start;
}

.home-section-intro {
    max-width: 40rem;
    margin: 0 auto 1.35rem;
    text-align: center;
}

.home-section-intro h2 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.55rem, 2.6vw, 2.05rem);
    line-height: 1.15;
}

.home-benefits-card .home-section-intro h2 {
    font-size: clamp(1.15rem, 2.35vw, 1.9rem);
    white-space: normal;
    overflow-wrap: anywhere;
}

.home-section-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.home-gallery-intro-list {
    margin: 0.85rem auto 0;
    padding-left: 1.15rem;
    max-width: 40rem;
    text-align: left;
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.45;
}

/*
 * Stacked deck carousel:
 * - One readable top/focus card
 * - Cards underneath show only edge peeks (not readable)
 * - Rotation brings the next card to the top, covering the previous top card
 */
.home-phone-gallery {
    --phone-base: clamp(15rem, 26vw, 19rem);
    --caption-slot: 4.25rem;
    position: relative;
    display: block;
    width: min(100%, 28rem);
    /* Extra bottom room so the active caption sits fully below the deck. */
    min-height: calc(clamp(28.5rem, 58vw, 38rem) + var(--caption-slot));
    margin: 0 auto;
    padding: 0.85rem 1.6rem calc(1.35rem + var(--caption-slot));
}

.home-phone-card {
    margin: 0;
    display: block;
    width: var(--phone-base);
    position: absolute;
    left: 50%;
    top: 1.1rem;
    transform: translateX(-50%);
    transform-origin: 50% 100%;
    transition:
        transform 420ms cubic-bezier(0.22, 0.8, 0.24, 1),
        opacity 320ms ease,
        filter 320ms ease,
        z-index 0s linear 160ms;
    pointer-events: none;
}

.home-phone-card.is-stack-top {
    pointer-events: auto;
    /* Keep the top card shell at stack origin; caption is positioned below the deck. */
}

.home-phone-card .home-phone-shell {
    width: 100%;
}

/* No-JS fallback: static stacked peeks */
.home-gallery-carousel:not(.is-enhanced) .home-phone-card {
    width: var(--phone-base);
}

.home-gallery-carousel:not(.is-enhanced) .home-phone-card:nth-child(1) {
    z-index: 6;
    transform: translateX(-50%) translateY(0) rotate(0deg) scale(1);
    opacity: 1;
    filter: none;
}

.home-gallery-carousel:not(.is-enhanced) .home-phone-card:nth-child(2) {
    z-index: 5;
    transform: translateX(calc(-50% + 0.7rem)) translateY(0.55rem) rotate(3.5deg) scale(0.97);
    opacity: 0.95;
    filter: brightness(0.96);
}

.home-gallery-carousel:not(.is-enhanced) .home-phone-card:nth-child(3) {
    z-index: 4;
    transform: translateX(calc(-50% + 1.35rem)) translateY(1.05rem) rotate(6.5deg) scale(0.94);
    opacity: 0.9;
    filter: brightness(0.93);
}

.home-gallery-carousel:not(.is-enhanced) .home-phone-card:nth-child(4) {
    z-index: 3;
    transform: translateX(calc(-50% + 1.95rem)) translateY(1.5rem) rotate(9deg) scale(0.91);
    opacity: 0.84;
    filter: brightness(0.9);
}

.home-gallery-carousel:not(.is-enhanced) .home-phone-card:nth-child(5),
.home-gallery-carousel:not(.is-enhanced) .home-phone-card:nth-child(6) {
    z-index: 2;
    transform: translateX(calc(-50% + 2.45rem)) translateY(1.9rem) rotate(11deg) scale(0.88);
    opacity: 0.75;
    filter: brightness(0.88);
}

.home-gallery-carousel:not(.is-enhanced) .home-phone-card:nth-child(n + 2) figcaption {
    display: none;
}

/* JS-enhanced stacked depths (0 = top/focus) */
.home-phone-card.is-stack-top,
.home-phone-card.is-stack-depth-1,
.home-phone-card.is-stack-depth-2,
.home-phone-card.is-stack-depth-3,
.home-phone-card.is-stack-depth-4,
.home-phone-card.is-stack-depth-5,
.home-phone-card.is-stack-buried {
    width: var(--phone-base);
}

.home-phone-card.is-stack-top {
    z-index: 30;
    opacity: 1;
    filter: none;
    transform: translateX(-50%) translateY(0) rotate(0deg) scale(1);
}

.home-phone-card.is-stack-depth-1 {
    z-index: 20;
    opacity: 0.96;
    filter: brightness(0.96);
    transform: translateX(calc(-50% + 0.72rem)) translateY(0.55rem) rotate(3.4deg) scale(0.97);
}

.home-phone-card.is-stack-depth-2 {
    z-index: 18;
    opacity: 0.92;
    filter: brightness(0.93);
    transform: translateX(calc(-50% + 1.35rem)) translateY(1.05rem) rotate(6.2deg) scale(0.945);
}

.home-phone-card.is-stack-depth-3 {
    z-index: 16;
    opacity: 0.86;
    filter: brightness(0.9);
    transform: translateX(calc(-50% + 1.9rem)) translateY(1.5rem) rotate(8.6deg) scale(0.92);
}

.home-phone-card.is-stack-depth-4 {
    z-index: 14;
    opacity: 0.78;
    filter: brightness(0.88);
    transform: translateX(calc(-50% + 2.35rem)) translateY(1.9rem) rotate(10.5deg) scale(0.9);
}

.home-phone-card.is-stack-depth-5,
.home-phone-card.is-stack-buried {
    z-index: 12;
    opacity: 0.68;
    filter: brightness(0.86);
    transform: translateX(calc(-50% + 2.7rem)) translateY(2.2rem) rotate(12deg) scale(0.88);
}

/* Keep legacy class names harmless if residual styles remain */
.home-phone-card.is-hidden {
    display: none;
}

.home-phone-shell {
    position: relative;
    width: 100%;
    border-radius: 1.45rem;
    /* Uniform narrow black reveal around every screenshot. */
    padding: 0.28rem;
    background:
        linear-gradient(165deg, #2a2d32 0%, #111317 48%, #3a3f46 100%);
    box-shadow:
        0 18px 34px rgba(16, 24, 20, 0.18),
        0 2px 0 rgba(255, 255, 255, 0.08) inset;
    overflow: hidden;
}

.home-phone-shell::before {
    content: "";
    position: absolute;
    inset: 0.12rem;
    border-radius: 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 1;
}

.home-phone-notch {
    position: absolute;
    top: 0.42rem;
    left: 50%;
    z-index: 2;
    width: 28%;
    height: 0.38rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(10, 12, 14, 0.88);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.home-phone-shell img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    /* Assets are pre-normalized to 9:16; cover fills the screen with no uneven letterbox. */
    object-fit: cover;
    object-position: top center;
    border-radius: 1.2rem;
    background: #0f1411;
    image-rendering: auto;
}

.home-phone-card figcaption {
    position: absolute;
    left: 50%;
    /* Closer under the deck so captions are visible after "How it works" scroll. */
    top: calc(100% + 2.65rem);
    transform: translateX(-50%);
    width: max(var(--phone-base), 14rem);
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--green-deep);
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    z-index: 40;
}

/* Only the top card caption is shown; lower cards stay in the deck without captions. */
.home-phone-card:not(.is-stack-top) figcaption {
    display: none;
}

.home-gallery-carousel:not(.is-enhanced) .home-phone-card:not(:nth-child(1)) figcaption {
    display: none;
}

.home-benefits-card {
    text-align: center;
}

.home-benefit-list {
    margin: 0 auto;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.6rem;
    max-width: min(38rem, 92vw);
    width: fit-content;
    text-align: left;
}

.home-benefit-list li {
    color: var(--ink);
    font-size: 1.1rem;
    line-height: 1.45;
    text-align: left;
}

.home-accuracy-note,
.home-sms-notice {
    margin: 0 0 1rem;
    max-width: 48rem;
    color: var(--muted);
}

.home-accuracy-note {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.5;
}

.home-sms-notice {
    /* Center the block under the benefits list; keep text left-justified inside. */
    margin: 0 auto;
    max-width: min(38rem, 92vw);
    width: fit-content;
    font-size: 0.96rem;
    line-height: 1.55;
    text-align: left;
    white-space: normal;
}

.home-minimal-footer {
    border-top: 1px solid rgba(20, 38, 31, 0.08);
    background: rgba(251, 247, 240, 0.92);
}

.home-minimal-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0 1.6rem;
}

.home-minimal-footer-brand {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green-deep);
}

.home-minimal-footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    margin: 0;
    padding: 0;
}

.home-minimal-footer-links a {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.92rem;
    color: var(--muted);
}

.home-minimal-footer-links a:hover {
    color: var(--green-deep);
}

@media (max-width: 980px) {
    .home-phone-gallery {
        --phone-base: clamp(13rem, 34vw, 17rem);
        min-height: calc(clamp(27rem, 70vw, 36rem) + var(--caption-slot));
        width: min(100%, 24rem);
    }

    .home-gallery-nav--prev {
        left: 0.15rem;
    }

    .home-gallery-nav--next {
        right: 0.15rem;
    }

}

@media (max-width: 820px) {

    .home-hero-title {
        font-size: clamp(1.4rem, 6.4vw, 2.05rem);
    }

    .home-hero-title span {
        white-space: nowrap;
    }

    .home-hero-features {
        font-size: clamp(0.92rem, 3.4vw, 1.05rem);
        gap: 0.14rem;
    }
}

@media (max-width: 800px) {
    .home-feature-row {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

}

@media (max-width: 720px) {
    .home-hard-reset .home-hero,
    .home-hero {
        min-height: 0;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .home-hard-reset .home-hero-image,
    .home-hero-image {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        object-fit: contain;
        object-position: left top;
    }

    .home-hero-copy {
        max-width: min(19rem, 92vw);
        margin-top: 0.45rem;
        align-self: start;
    }

    .home-hero-title {
        font-size: clamp(1.28rem, 6.8vw, 1.7rem);
        gap: 0.08rem;
    }

    .home-gallery-nav {
        top: 38%;
        width: 2.15rem;
        height: 2.15rem;
    }

    .home-phone-gallery {
        --phone-base: min(78vw, 18rem);
        width: min(100%, 22rem);
        min-height: calc(clamp(30rem, 118vw, 38rem) + var(--caption-slot));
        padding: 1rem 1.1rem calc(1.25rem + var(--caption-slot));
        overflow: visible;
    }

    .home-phone-card {
        width: var(--phone-base);
    }

    .home-phone-card figcaption {
        font-size: 0.78rem;
        white-space: normal;
    }

    .home-minimal-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ── How It Works page ── */

/* ── HIW custom topbar (matches home page brand feel) ── */
.hiw-topbar {
    position: relative;
    width: 100%;
    padding: 0.3rem 0.65rem 0.45rem;
    margin: 0;
    border-radius: 0 0 1rem 1rem;
    background: linear-gradient(
        180deg,
        rgba(8, 14, 10, 0.46) 0%,
        rgba(8, 14, 10, 0.28) 48%,
        rgba(8, 14, 10, 0.08) 78%,
        rgba(8, 14, 10, 0) 100%
    );
}

.hiw-topbar-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem 1rem;
}

.hiw-page-surface {
    padding: 1.2rem 0 3rem;
    min-height: 100%;
}

.hiw-hero {
    padding: 0 0 1rem;
}

.hiw-hero-card {
    padding: clamp(1.5rem, 4vw, 3rem);
}

.hiw-hero .page-lead {
    margin-bottom: 0.5rem;
}

.hiw-course-count {
    display: block;
    margin-top: 1rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: 400;
    color: inherit;
}

/* ── On this page nav ── */
.hiw-page-nav {
    max-width: var(--container);
    margin: 0 auto 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(40, 95, 69, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 12px 30px rgba(22, 50, 32, 0.1);
}

.hiw-page-nav-list {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hiw-page-nav-list a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(40, 95, 69, 0.06);
    border: 1px solid rgba(40, 95, 69, 0.09);
    color: var(--green-deep);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 140ms ease, border-color 140ms ease;
}

.hiw-page-nav-list a:hover,
.hiw-page-nav-list a:focus-visible {
    background: rgba(40, 95, 69, 0.13);
    border-color: rgba(40, 95, 69, 0.22);
    outline: none;
}

@media (max-width: 1180px) {
    .hiw-page-nav {
        overflow-x: auto;
        scrollbar-width: thin;
    }
}

/* ── Sections ── */
.hiw-section {
    padding: 0 0 1rem;
}

.hiw-section + .hiw-section {
    padding-top: 0;
}

.hiw-section > .container,
.hiw-explanatory > .container {
    padding: clamp(1.35rem, 3vw, 2.35rem);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(20, 38, 31, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: 0 18px 42px rgba(22, 50, 32, 0.12);
}

.hiw-section-heading {
    margin: 0 0 1.2rem;
    font-size: clamp(1.55rem, 2.8vh, 2rem);
    line-height: 1.1;
    color: var(--green-deep);
}

/* ── Process grid ── */
.hiw-process-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

/* ── Cards ── */
.hiw-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ── Step labels ── */
.hiw-step-label {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hiw-card-title {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.18;
    color: var(--ink);
}

.hiw-card-subtitle {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.94rem;
    line-height: 1.5;
    color: var(--muted);
}

.hiw-card p {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
}

.hiw-card-list {
    margin: 0.1rem 0 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.2rem;
}

.hiw-card-list li {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--muted);
}

.hiw-card-footnote {
    margin-top: 0.35rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--green);
    line-height: 1.45;
}

.hiw-sms-examples {
    margin: 0.45rem 0 0.15rem;
    display: grid;
    gap: 0.32rem;
}

.hiw-sms-example {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(40, 95, 69, 0.06);
    border: 1px solid rgba(40, 95, 69, 0.12);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    color: var(--green-deep);
    line-height: 1.35;
}

.hiw-voice-callout {
    margin: 0.45rem 0 0.15rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(40, 95, 69, 0.08), rgba(180, 139, 62, 0.08));
    border: 1px solid rgba(40, 95, 69, 0.14);
}

.hiw-voice-example {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.98rem;
    font-style: italic;
    color: var(--green-deep);
    line-height: 1.4;
}

.hiw-safety-copy {
    margin-top: 0.35rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--red);
    line-height: 1.4;
}

/* ── Back to top ── */
.hiw-back-to-top {
    display: inline-block;
    margin-top: 1rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color 140ms ease;
}

.hiw-back-to-top:hover,
.hiw-back-to-top:focus-visible {
    color: var(--green);
    outline: none;
}

/* ── Explanatory section ── */
.hiw-explanatory {
    padding: 0;
}

.hiw-explanatory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.hiw-explanatory-card {
    background: rgba(255, 252, 246, 0.78);
    border: 1px solid rgba(20, 38, 31, 0.07);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem;
}

.hiw-explanatory-card h2 {
    margin: 0 0 0.55rem;
    font-size: 1.18rem;
    line-height: 1.18;
    color: var(--green-deep);
}

.hiw-explanatory-card p {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 0 0 0.55rem;
}

.hiw-explanatory-card p:last-child {
    margin-bottom: 0;
}

.hiw-explanatory-card ul {
    margin: 0 0 0.55rem;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.2rem;
}

.hiw-explanatory-card ul li {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--muted);
}

.hiw-explanatory-card--cta {
    background: linear-gradient(180deg, rgba(40, 95, 69, 0.07), rgba(180, 139, 62, 0.06));
    border-color: rgba(40, 95, 69, 0.14);
}

.hiw-explanatory-closing {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.02rem;
    font-style: italic;
    font-weight: 700;
    color: var(--green);
}

/* ── Home page CTA ── */
.home-cta-section {
    padding: 0.6rem 0 1.2rem;
}

.home-cta-section .container {
    display: flex;
    justify-content: center;
}

.home-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.9rem 1.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #2f6c4e 0%, var(--green-deep) 100%);
    color: #fff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(23, 61, 45, 0.16);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.home-cta-link:hover,
.home-cta-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(23, 61, 45, 0.22);
    outline: none;
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .hiw-process-grid,
    .hiw-explanatory-grid {
        grid-template-columns: 1fr;
    }

    .hiw-section {
        padding: 1.6rem 0;
    }

    .hiw-section + .hiw-section {
        padding-top: 0.4rem;
    }

    .hiw-topbar-inner {
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem 0.7rem;
    }
}

@media (max-width: 640px) {
    .hiw-topbar-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "nav nav";
    }

    .hiw-topbar .brand-logo {
        grid-area: brand;
        width: min(10rem, 40vw);
    }

    .hiw-topbar .home-topnav {
        grid-area: nav;
        justify-content: flex-start;
    }

    .hiw-topbar .home-top-actions {
        grid-area: actions;
    }

    .home-below-hero,
    .hiw-page-surface {
        background-position: 66% top;
    }

    .home-below-hero {
        padding: 0.8rem 0 1.8rem;
    }

    .home-motif-card,
    .hiw-hero-card,
    .hiw-section > .container,
    .hiw-explanatory > .container {
        border-radius: var(--radius-lg);
    }

    .home-gallery-card,
    .home-benefits-card,
    .home-accuracy-card {
        padding: 1.2rem 1rem;
    }

    .hiw-page-surface {
        padding: 0.8rem 0 1.8rem;
    }

    .hiw-page-nav {
        margin-bottom: 0.8rem;
        padding: 0.7rem;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .hiw-card {
        padding: 1rem 1.1rem;
    }

    .hiw-section-heading {
        font-size: 1.35rem;
    }

    .hiw-page-nav-list a {
        font-size: 0.78rem;
        padding: 0.28rem 0.6rem;
    }
}

@media (max-width: 430px) {
    .home-brand-title {
        font-size: 1rem;
    }

    .home-topnav a {
        font-size: 0.98rem;
    }

    .home-btn {
        min-height: 2.65rem;
        padding: 0.55rem 0.9rem;
        font-size: 0.92rem;
    }

    .home-hero-title span {
        white-space: nowrap;
    }

    .home-hero-title {
        font-size: clamp(1.18rem, 7vw, 1.45rem);
    }
}

/* Cascade after legacy tablet rules: the overlay is phone-only. */
@media (max-width: 599px) {
    .home-hard-reset .home-hero,
    .home-hero { height: clamp(27rem, 121vw, 31rem); min-height: clamp(27rem, 121vw, 31rem); overflow: hidden; }
    .home-hard-reset .home-hero-image,
    .home-hero-image { height: 100%; min-height: 0; object-fit: cover; object-position: 34% center; }
    .home-hero-overlay { position: absolute; inset: 0; padding: 0; background: transparent; }
    .home-hero-topbar { position: absolute; inset: 0; display: block; }
    .brand-logo--home { position: absolute; top: 1.55rem; left: -1.65rem; width: min(20.5rem, 83vw); transform: scaleY(0.76); }
    .home-hero-nav { position: absolute; top: 0.85rem; left: 50%; z-index: 2; transform: translateX(-50%); }
    .home-hero-nav a { padding-bottom: 0.2rem; border-bottom: 2px solid #111; color: #111; font-size: clamp(0.76rem, 3.5vw, 0.9rem); text-shadow: none; white-space: nowrap; }
    .home-hero-actions { position: absolute; top: 0.45rem; right: 0.4rem; display: grid; grid-template-areas: "register login" "free free"; gap: 0.25rem; }
    .home-hero-actions .home-hero-auth-btn { min-width: 0; min-height: 2.35rem; padding: 0.4rem 0.45rem; border-width: 1px; font-size: clamp(0.72rem, 3.25vw, 0.82rem); }
    .home-hero-auth-btn--register { grid-area: register; }
    .home-hero-auth-btn--login { grid-area: login; }
    .home-free-badge { position: static; grid-area: free; justify-self: end; width: 4.25rem; height: 2.2rem; min-width: 0; min-height: 0; border-width: 2px; border-radius: 0.3rem; font-size: 1rem; }
    .home-hero-copy { position: absolute; top: 42%; left: 0.75rem; width: min(56%, 13.5rem); max-width: none; margin: 0; color: #fff; }
    .home-hero-title { color: #fff; font-size: clamp(1.2rem, 5.9vw, 1.52rem); line-height: 1.04; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.82); }
    .home-hero-title span { white-space: normal; }
    .home-hero-features { margin-top: 0.55rem; color: #fff; font-size: clamp(0.75rem, 3.25vw, 0.88rem); line-height: 1.32; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.88); }
    .home-hero-scroll-cue { display: none; }

    .hiw-topbar { padding: 0.25rem 0.4rem; }
    .hiw-topbar-inner { width: 100%; grid-template-columns: minmax(5.9rem, 29vw) minmax(0, 1fr) minmax(4.1rem, 20vw); grid-template-areas: "brand nav actions"; gap: 0.25rem; }
    .hiw-topbar .brand-logo { grid-area: brand; width: 100%; max-width: none; }
    .hiw-topbar .home-topnav { grid-area: nav; justify-content: center; gap: 0.35rem; flex-wrap: nowrap; }
    .hiw-topbar .home-topnav a { padding: 0.35rem 0.05rem; font-size: clamp(0.7rem, 3vw, 0.82rem); line-height: 1.1; text-align: center; white-space: nowrap; }
    .hiw-topbar .home-top-actions { grid-area: actions; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 0.2rem; width: 100%; }
    .hiw-topbar .home-btn { min-height: 2rem; padding: 0.3rem 0.4rem; font-size: clamp(0.68rem, 2.9vw, 0.78rem); line-height: 1.05; }
    .hiw-page-surface { padding-top: 0.65rem; }
    .hiw-hero-card { padding: 0.9rem 0.85rem; }
    .hiw-hero h1 { font-size: clamp(1.6rem, 8vw, 2rem); line-height: 1.05; white-space: nowrap; }
    .hiw-course-count { margin-top: 0.65rem; font-size: 0.88rem; }
    .hiw-page-nav { overflow: visible; margin-bottom: 0.75rem; padding: 0.65rem 0.45rem; }
    .hiw-page-nav-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
    .hiw-page-nav-list li { flex: 1 1 calc((100% - 0.7rem) / 3); min-width: 0; }
    .hiw-page-nav-list a { display: flex; align-items: center; justify-content: center; min-height: 2.7rem; padding: 0.3rem 0.25rem; font-size: clamp(0.68rem, 3vw, 0.76rem); line-height: 1.12; text-align: center; white-space: normal; }
}
