/* =========================================================
   HOMEPAGE (index.php) — scoped under .hm
   ========================================================= */

.hm {
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e8edf3;
    --soft: #f8fafc;
    --mint: #f0fdfa;
    --teal: #0d9488;
    --teal-2: #14b8a6;
    --teal-d: #0f766e;
    --teal-dd: #0b4f4a;
    --star: #f59e0b;
    --radius: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 32px -14px rgba(15, 23, 42, 0.18);
    --shadow-lg: 0 30px 60px -24px rgba(15, 23, 42, 0.28);
    --font-h: 'Outfit', sans-serif;
    --font-ui: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--ink-2);
    background: #ffffff;
}

.hm a:focus,
.hm button:focus {
    box-shadow: none;
}

.hm a:focus-visible,
.hm button:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

.hm h1,
.hm h2,
.hm h3 {
    color: var(--ink);
}

/* ---------- Shared bits ---------- */
.hm .hm-section {
    padding: clamp(64px, 7vw, 112px) 0;
}

.hm-head {
    margin-bottom: clamp(32px, 4vw, 52px);
}

.hm-head-center {
    text-align: center;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.hm-head-split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.hm-head-split > div:first-child {
    max-width: 640px;
}

.hm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal-d);
}

.hm-kicker::before {
    content: '';
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.hm-head-center .hm-kicker::after {
    content: '';
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.hm-kicker-light {
    color: #5eead4;
}

.hm .hm-h2 {
    font-family: var(--font-h);
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.hm .hm-h2-light {
    color: #ffffff;
}

.hm-accent {
    color: var(--teal);
}

.hm-lead {
    margin-top: 14px;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--muted);
}

.hm-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--teal-d);
}

.hm-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.hm-link:hover {
    color: var(--teal);
}

.hm-link:hover svg {
    transform: translateX(3px);
}

.hm-link-strong {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.hm-link-strong:hover {
    border-color: rgba(13, 148, 136, 0.4);
    background: var(--mint);
}

.hm-chip-soft {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--mint);
    color: var(--teal-d);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ---------- Buttons ---------- */
.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-ui);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hm-btn svg {
    width: 18px;
    height: 18px;
}

.hm-btn:hover {
    transform: translateY(-2px);
}

.hm-btn:active {
    transform: translateY(0) scale(0.98);
}

.hm-btn-primary {
    padding: 0 6px 0 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-2) 0%, var(--teal) 45%, var(--teal-d) 100%);
    box-shadow: 0 14px 28px -12px rgba(13, 148, 136, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hm-btn-primary:hover {
    color: #ffffff;
    box-shadow: 0 18px 34px -12px rgba(13, 148, 136, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hm-btn-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease;
}

.hm-btn-primary:hover .hm-btn-arrow {
    transform: translateX(3px);
}

.hm-btn-ghost {
    color: var(--ink);
    background: #ffffff;
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}

.hm-btn-ghost svg {
    color: var(--teal);
}

.hm-btn-ghost:hover {
    color: var(--ink);
    border-color: rgba(13, 148, 136, 0.4);
    background: var(--mint);
}

.hm-btn-outline {
    color: var(--teal-d);
    background: #ffffff;
    border-color: rgba(13, 148, 136, 0.35);
}

.hm-btn-outline:hover {
    color: #ffffff;
    background: var(--teal);
    border-color: var(--teal);
}

.hm-btn-light {
    color: var(--teal-dd);
    background: #ffffff;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.45);
}

.hm-btn-light:hover {
    color: var(--teal-dd);
    background: #f0fdfa;
}

.hm-btn-ghost-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(6px);
}

.hm-btn-ghost-light:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.hm-btn-block {
    width: 100%;
}

/* ---------- Avatars / stars ---------- */
.hm-avatar {
    --av: #0d9488;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--av);
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hm-proof-stars,
.hm-review-stars {
    display: inline-flex;
    gap: 2px;
}

.hm-proof-stars svg,
.hm-review-stars svg {
    width: 16px;
    height: 16px;
    color: #e2e8f0;
    fill: #e2e8f0;
}

.hm-proof-stars svg.on,
.hm-review-stars svg.on {
    color: var(--star);
    fill: var(--star);
}

/* =========================================================
   1. HERO
   ========================================================= */
.hm .hm-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 6vw, 88px) 0 clamp(40px, 5vw, 64px);
    background:
        radial-gradient(60% 70% at 85% 20%, rgba(20, 184, 166, 0.14) 0%, rgba(20, 184, 166, 0) 70%),
        radial-gradient(40% 50% at 0% 100%, rgba(254, 205, 211, 0.35) 0%, rgba(254, 205, 211, 0) 70%),
        linear-gradient(180deg, #f6fdfb 0%, #ffffff 100%);
}

.hm-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.hm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(13, 148, 136, 0.2);
    box-shadow: var(--shadow-sm);
    color: var(--teal-d);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
}

.hm-eyebrow-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal-2);
}

.hm-eyebrow-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--teal-2);
    opacity: 0;
    animation: hm-ping 2s ease-out infinite;
}

.hm .hm-hero-title {
    margin-top: 20px;
    font-family: var(--font-h);
    font-size: clamp(2.4rem, 4.6vw, 3.9rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--ink);
}

.hm-hero-sub {
    margin-top: 20px;
    max-width: 540px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--muted);
}

.hm-hero-actions {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hm-proof {
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hm-avatar-stack {
    display: flex;
}

.hm-avatar-stack .hm-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.72rem;
    border: 3px solid #ffffff;
    margin-left: -10px;
}

.hm-avatar-stack .hm-avatar:first-child {
    margin-left: 0;
}

.hm-proof-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.88rem;
    color: var(--muted);
}

.hm-proof-text strong {
    color: var(--ink);
}

/* Visual */
.hm-hero-visual {
    position: relative;
    padding: 28px 8px 36px 28px;
}

.hm-hero-blob {
    position: absolute;
    inset: 6% -6% 0 10%;
    border-radius: 42% 58% 55% 45% / 45% 40% 60% 55%;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.22), rgba(13, 148, 136, 0.08));
    animation: hm-morph 14s ease-in-out infinite;
}

.hm-hero-photo {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 5 / 4;
    box-shadow: var(--shadow-lg);
    border: 6px solid #ffffff;
    background: #e2e8f0;
}

.hm-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hm-float {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 12px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(8px);
    animation: hm-float 6s ease-in-out infinite;
}

.hm-float strong {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--ink);
}

.hm-float small {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
}

.hm-float-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #fff1f2;
    color: #e11d48;
}

.hm-float-icon svg {
    width: 20px;
    height: 20px;
}

.hm-float-icon-live {
    background: var(--mint);
    color: var(--teal);
}

.hm-float-top {
    top: 4px;
    left: 0;
}

.hm-float-bottom {
    right: -8px;
    bottom: 8px;
    animation-delay: -3s;
}

.hm-doodle {
    position: absolute;
    top: -8px;
    right: 8px;
    font-family: 'Caveat', cursive;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--teal-d);
    transform: rotate(-4deg);
}

/* Stats */
.hm-stats {
    list-style: none;
    margin-top: clamp(40px, 5vw, 64px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.hm-stats li {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.hm-stats li + li {
    border-left: 1px solid var(--line);
}

.hm-stat-num {
    font-family: var(--font-h);
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.1;
}

.hm-stat-label {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Subjects ticker */
.hm-ticker-block {
    margin-top: clamp(36px, 4vw, 56px);
    display: grid;
    gap: 12px;
}

.hm-ticker-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.hm-ticker-pill svg {
    width: 16px;
    height: 16px;
    color: var(--teal);
}

.mo-rev .hm-ticker-pill {
    background: var(--ink);
    border-color: var(--ink);
    color: #ffffff;
}

.mo-rev .hm-ticker-pill svg {
    color: #5eead4;
}

/* =========================================================
   2. EXPERTISE
   ========================================================= */
.hm .hm-expertise {
    background: #ffffff;
}

.hm-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 24px;
}

.hm-pillar {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 3vw, 36px);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hm-pillar::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.14) 0%, rgba(20, 184, 166, 0) 70%);
    pointer-events: none;
}

.hm-pillar:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 148, 136, 0.3);
    box-shadow: var(--shadow-md);
}

.hm-pillar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hm-pillar-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, var(--teal-2), var(--teal-d));
    box-shadow: 0 10px 20px -8px rgba(13, 148, 136, 0.6);
}

.hm-pillar-icon svg {
    width: 26px;
    height: 26px;
}

.hm .hm-pillar-title {
    margin-top: 20px;
    font-family: var(--font-h);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hm-pillar-sub {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.hm-subjects {
    list-style: none;
    margin: 22px 0 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hm-subjects li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px 7px 9px;
    border-radius: 10px;
    background: var(--soft);
    border: 1px solid var(--line);
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--ink-2);
}

.hm-subjects svg {
    width: 14px;
    height: 14px;
    color: var(--teal);
    stroke-width: 3;
}

.hm-pillar .hm-link {
    margin-top: auto;
}

/* =========================================================
   3. HOW IT WORKS
   ========================================================= */
.hm .hm-steps-section {
    background: var(--soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.hm-steps {
    list-style: none;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    counter-reset: none;
}

.hm-steps::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 16%;
    right: 16%;
    border-top: 2px dashed rgba(13, 148, 136, 0.3);
}

.hm-step {
    position: relative;
    text-align: center;
    padding: 28px 24px 30px;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.hm-step-icon {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--mint);
    color: var(--teal-d);
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.hm-step-icon svg {
    width: 22px;
    height: 22px;
}

.hm-step-num {
    position: absolute;
    top: 14px;
    left: 16px;
    font-family: var(--font-h);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: #eef2f6;
}

.hm .hm-step h3 {
    margin-top: 18px;
    font-family: var(--font-h);
    font-size: 1.15rem;
    font-weight: 700;
}

.hm-step p {
    margin-top: 8px;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--muted);
}

/* =========================================================
   4. COURSES
   ========================================================= */
.hm .hm-courses {
    background: #ffffff;
}

.hm-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.hm-filters::-webkit-scrollbar {
    display: none;
}

.hm-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 9px 12px 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink-2);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hm-filter:hover {
    border-color: rgba(13, 148, 136, 0.4);
    color: var(--teal-d);
}

.hm-filter-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: var(--soft);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.hm-filter.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #ffffff;
}

.hm-filter.is-active .hm-filter-count {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.hm-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 22px;
}

.hm-course {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hm-course[hidden] {
    display: none;
}

.hm-course:hover {
    color: inherit;
    transform: translateY(-5px);
    border-color: rgba(13, 148, 136, 0.3);
    box-shadow: var(--shadow-md);
}

/* 16:9 = the shape of the course banners, so none of their text is cropped. */
.hm-course-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e2e8f0;
}

.hm-course-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hm-course:hover .hm-course-media img {
    transform: scale(1.06);
}

/* Sits above the title (not over the image) so it never hides banner artwork. */
.hm-course-tag {
    align-self: flex-start;
    margin-bottom: 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.1);
    color: var(--teal-d);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hm-course-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 0;
}

.hm .hm-course-title {
    font-family: var(--font-h);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-course-desc {
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-course-meta {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hm-course-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--soft);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-course-meta svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--teal);
}

.hm-course-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 20px 0;
    padding: 14px 0 18px;
    border-top: 1px solid var(--line);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
}

.hm-course-go {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--mint);
    color: var(--teal-d);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.hm-course-go svg {
    width: 16px;
    height: 16px;
}

.hm-course:hover .hm-course-go {
    background: var(--teal);
    color: #ffffff;
    transform: rotate(45deg);
}

.hm-course.hm-pop {
    animation: hm-pop 0.35s ease both;
}

.hm-empty {
    margin-top: 12px;
    padding: 28px;
    border-radius: var(--radius);
    border: 1px dashed var(--line);
    text-align: center;
    color: var(--muted);
}

/* =========================================================
   5. PRICING
   ========================================================= */
.hm .hm-pricing {
    background: linear-gradient(180deg, var(--soft) 0%, #ffffff 100%);
    border-top: 1px solid var(--line);
}

.hm-billing {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.hm-billing-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hm-billing-btn.is-active {
    background: var(--ink);
    color: #ffffff;
}

.hm-save {
    padding: 2px 7px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.68rem;
    font-weight: 800;
}

.hm-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: stretch;
}

.hm-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 28px 28px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hm-plan:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.hm-plan-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--mint);
    color: var(--teal-d);
}

.hm-plan-icon svg {
    width: 22px;
    height: 22px;
}

.hm .hm-plan-name {
    margin-top: 18px;
    font-family: var(--font-h);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.hm-plan-desc {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--muted);
}

.hm-price {
    margin: 22px 0 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-h);
    color: var(--ink);
}

.hm-price-cur {
    font-size: 1.5rem;
    font-weight: 700;
    align-self: flex-start;
    margin-top: 6px;
}

.hm-price-val,
.hm-price-static {
    display: inline-block;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.hm-price-per {
    margin-left: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
}

.hm-price-val.hm-bump {
    animation: hm-bump 0.35s ease;
}

.hm-plan-list {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.hm-plan-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.93rem;
    color: var(--ink-2);
}

.hm-plan-list svg {
    width: 18px;
    height: 18px;
    padding: 3px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--mint);
    color: var(--teal);
    stroke-width: 3;
}

.hm-plan .hm-btn {
    margin-top: auto;
}

/* Trial plan (highlighted) */
.hm-plan-trial {
    color: #ccfbf1;
    border: none;
    background:
        radial-gradient(80% 60% at 100% 0%, rgba(94, 234, 212, 0.25) 0%, rgba(94, 234, 212, 0) 60%),
        linear-gradient(160deg, var(--teal-d) 0%, var(--teal-dd) 100%);
    box-shadow: 0 30px 50px -24px rgba(13, 148, 136, 0.65);
}

.hm .hm-plan-trial .hm-plan-name,
.hm-plan-trial .hm-price {
    color: #ffffff;
}

.hm-plan-trial .hm-plan-desc,
.hm-plan-trial .hm-price-per {
    color: rgba(204, 251, 241, 0.8);
}

.hm-plan-trial .hm-price {
    border-bottom-color: rgba(255, 255, 255, 0.14);
}

.hm-plan-trial .hm-plan-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #5eead4;
}

.hm-plan-trial .hm-plan-list li {
    color: #e6fffa;
}

.hm-plan-trial .hm-plan-list svg {
    background: rgba(94, 234, 212, 0.18);
    color: #5eead4;
}

.hm-plan-ribbon {
    position: absolute;
    top: 22px;
    right: 22px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #fbbf24;
    color: #422006;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* =========================================================
   6. COLLABORATIVE LEARNING
   ========================================================= */
.hm .hm-collab {
    background: #ffffff;
}

.hm-collab-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
    padding: clamp(20px, 3vw, 36px);
    border-radius: 32px;
    color: rgba(236, 253, 245, 0.85);
    background:
        radial-gradient(60% 80% at 100% 0%, rgba(94, 234, 212, 0.18) 0%, rgba(94, 234, 212, 0) 60%),
        linear-gradient(150deg, #0f766e 0%, #0b4f4a 60%, #083b37 100%);
    box-shadow: var(--shadow-lg);
}

.hm-collab-media {
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hm-collab-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hm-collab-copy {
    padding: clamp(0px, 2vw, 16px) clamp(0px, 2vw, 24px) clamp(0px, 2vw, 16px) 0;
}

.hm-collab-copy > p {
    margin-top: 14px;
    font-size: 1rem;
    line-height: 1.7;
}

.hm-collab-features {
    list-style: none;
    margin: 26px 0 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hm-collab-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hm-collab-features li > span {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(94, 234, 212, 0.15);
    color: #5eead4;
}

.hm-collab-features svg {
    width: 18px;
    height: 18px;
}

.hm-collab-features strong {
    display: block;
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: 0.92rem;
}

.hm-collab-features small {
    display: block;
    font-size: 0.78rem;
    color: rgba(204, 251, 241, 0.75);
}

/* =========================================================
   7. REVIEWS
   ========================================================= */
.hm .hm-reviews {
    background: var(--soft);
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.hm-rating-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.hm-rating-num {
    font-family: var(--font-h);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.hm-rating-card small {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--muted);
}

.hm-rating-card a {
    font-weight: 700;
    color: var(--teal-d);
}

.hm-marquee {
    display: flex;
    gap: 20px;
    width: max-content;
    padding: 8px 0 12px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.hm-marquee-group {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
    animation: hm-marquee 60s linear infinite;
}

.hm-marquee:hover .hm-marquee-group {
    animation-play-state: paused;
}

.hm-review {
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.hm-review blockquote {
    position: relative;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-review figcaption {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.hm-review figcaption strong {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    color: var(--ink);
}

.hm-review figcaption small {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

/* =========================================================
   8. CTA
   ========================================================= */
.hm .hm-cta-section {
    padding-top: clamp(56px, 6vw, 96px);
    background: #ffffff;
}

.hm-cta {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
    gap: 32px;
    align-items: center;
    padding: clamp(32px, 5vw, 64px);
    border-radius: 32px;
    color: rgba(236, 253, 245, 0.85);
    background: #0b3b37;
    isolation: isolate;
}

.hm-cta-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    z-index: -2;
}

.hm-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(50% 80% at 100% 100%, rgba(20, 184, 166, 0.45) 0%, rgba(20, 184, 166, 0) 70%),
        linear-gradient(100deg, rgba(8, 47, 44, 0.96) 0%, rgba(11, 79, 74, 0.8) 100%);
}

.hm-cta-copy > p {
    margin-top: 14px;
    max-width: 520px;
    font-size: 1.02rem;
    line-height: 1.7;
}

.hm-cta-points {
    list-style: none;
    display: grid;
    gap: 10px;
}

.hm-cta-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.92rem;
    backdrop-filter: blur(6px);
}

.hm-cta-points svg {
    width: 18px;
    height: 18px;
    color: #5eead4;
}

/* ---------- Keyframes ---------- */
@keyframes hm-ping {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

@keyframes hm-morph {
    0%, 100% { border-radius: 42% 58% 55% 45% / 45% 40% 60% 55%; }
    50% { border-radius: 55% 45% 40% 60% / 55% 60% 40% 45%; }
}

@keyframes hm-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes hm-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes hm-bump {
    0% { transform: translateY(-6px); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

@keyframes hm-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - 20px)); }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
    .hm-plans {
        grid-template-columns: 1fr 1fr;
    }

    .hm-plan-trial {
        grid-column: 1 / -1;
    }
}

@media (max-width: 992px) {
    .hm-hero-grid {
        grid-template-columns: 1fr;
    }

    .hm-hero-visual {
        max-width: 560px;
        width: 100%;
        margin: 0 auto;
    }

    .hm-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hm-stats li:nth-child(3) {
        border-left: none;
    }

    .hm-stats li:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .hm-steps {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .hm-steps::before {
        top: 30px;
        bottom: 30px;
        left: 50%;
        right: auto;
        border-top: none;
        border-left: 2px dashed rgba(13, 148, 136, 0.3);
    }

    .hm-collab-card,
    .hm-cta {
        grid-template-columns: 1fr;
    }

    .hm-collab-media {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 640px) {
    .hm .container {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .hm .hm-hero-title {
        font-size: 2.3rem;
    }

    .hm-hero-actions .hm-btn {
        width: 100%;
    }

    .hm-hero-visual {
        padding: 24px 0 28px;
    }

    .hm-float {
        padding: 9px 12px 9px 9px;
        gap: 9px;
    }

    .hm-float-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .hm-float strong {
        font-size: 0.8rem;
    }

    .hm-float small {
        font-size: 0.7rem;
    }

    .hm-float-bottom {
        right: 0;
    }

    .hm-doodle {
        display: none;
    }

    .hm-stats li {
        padding: 16px 12px;
    }

    .hm-plans {
        grid-template-columns: 1fr;
    }

    /* Courses become a swipeable row on phones */
    .hm-course-grid {
        display: flex;
        gap: 14px;
        margin: 0 -16px;
        padding: 4px 16px 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 16px;
        scrollbar-width: none;
    }

    .hm-course-grid::-webkit-scrollbar {
        display: none;
    }

    .hm-course {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }

    .hm-course:hover {
        transform: none;
    }

    .hm-collab-features {
        grid-template-columns: 1fr;
    }

    .hm-review {
        width: 290px;
        padding: 20px;
    }

    .hm-head-split {
        align-items: flex-start;
    }

    .hm-cta,
    .hm-collab-card {
        border-radius: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-eyebrow-dot::after,
    .hm-hero-blob,
    .hm-float,
    .hm-marquee-group,
    .hm-course.hm-pop,
    .hm-price-val.hm-bump {
        animation: none;
    }

    .hm-marquee {
        width: auto;
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
        padding-left: 16px;
        padding-right: 16px;
    }

    .hm-marquee-group[aria-hidden="true"] {
        display: none;
    }
}

/* =====================================================================
   Course card v2 (includes/course_card.php) — home, Courses page, related courses.
   Banner stays clean; tag + lessons on one row; 2-line title/description so cards line up;
   two "what they'll learn" topics; ages/level as separate wrapping chips; CTA pinned to the bottom.
   ===================================================================== */
.cc-card { border-radius: 22px; }
.cc-card:hover { border-color: rgba(13, 148, 136, .35); box-shadow: 0 26px 50px -24px rgba(15, 23, 42, .35); }
.cc-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform .9s ease;
    pointer-events: none;
}
.cc-card:hover .cc-media::after { transform: translateX(120%); }

.cc-body { padding: 18px 20px 0; }
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-width: 0; }
.cc-tag {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(13, 148, 136, .1);
    color: var(--teal-d);
    font-family: var(--font-ui);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.cc-tag.is-hot { background: #fef3c7; color: #b45309; }
.cc-tag.is-hot::before { content: '★ '; }
.cc-lessons { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; font-size: .76rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cc-lessons svg { width: 14px; height: 14px; color: var(--teal); }

.cc-card .hm-course-title { min-height: 2.6em; font-size: 1.12rem; }
.cc-card .hm-course-desc { min-height: 3.1em; }

.cc-topics { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 7px; }
.cc-topics li { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.cc-topics li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-topics svg { width: 18px; height: 18px; padding: 3px; flex-shrink: 0; border-radius: 50%; background: var(--mint); color: var(--teal-d); stroke-width: 3; }
.cc-topics .cc-more { padding-left: 26px; font-size: .76rem; color: var(--muted); }

.cc-meta { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--soft); font-size: .76rem; font-weight: 600; line-height: 1.3; color: var(--ink-2); }
.cc-meta svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--teal); }

.cc-foot { margin: 16px 20px 0; padding: 14px 0 18px; }
.cc-cta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-cta strong { font-size: .92rem; color: var(--ink); transition: color .2s ease; }
.cc-cta small { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; color: var(--teal-d); }
.cc-cta small svg { width: 12px; height: 12px; }
.cc-card:hover .cc-cta strong { color: var(--teal-d); }

@media (prefers-reduced-motion: reduce) {
    .cc-media::after { display: none; }
}

/* ---------- Course card v2.1: large banners (2 per row on desktop) ----------
   Rails are sized via data-rail-w (half the row on desktop, ~82% on phones).
   Filtered/wrapped grids get the same two-up layout. Cards wider than 440px switch to
   a roomier layout via container queries; narrow (phone) cards keep the compact one. */
#hmCourseGrid, .pg-grid, .cd-related-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.hm .mo-rail-wrap.mo-grid-mode .mo-rail:is(#hmCourseGrid, .pg-grid, .cd-related-grid) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)) !important; }

.cc-card { container-type: inline-size; }
@container (min-width: 440px) {
    .cc-body { padding: 22px 26px 0; }
    .cc-top { margin-bottom: 10px; }
    .cc-tag { font-size: .7rem; padding: 5px 12px; }
    .cc-lessons { font-size: .82rem; }
    .cc-card .hm-course-title { font-size: 1.32rem; min-height: 0; -webkit-line-clamp: 1; }
    .cc-card .hm-course-desc { font-size: .92rem; min-height: 3.1em; }
    .cc-topics { grid-template-columns: 1fr 1fr; column-gap: 16px; margin-top: 16px; padding-top: 14px; }
    .cc-topics .cc-more { grid-column: 1 / -1; }
    .cc-meta { padding-top: 16px; }
    .cc-meta span { font-size: .8rem; padding: 7px 12px; }
    .cc-foot { margin: 18px 26px 0; padding: 16px 0 20px; }
    .cc-cta strong { font-size: 1rem; }
    .cc-card .hm-course-go { width: 42px; height: 42px; }
}

/* ---------- Course card v2.2: topic chips (replaces the two ticked topics) ----------
   Narrow cards: 3 chips + "+N more". Wide cards (container ≥ 440px): 6 chips + "+N more". */
.cc-chips { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 7px; }
.cc-chips li {
    max-width: 100%;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--mint);
    border: 1px solid rgba(13, 148, 136, .18);
    color: var(--teal-d);
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.cc-chips .cc-chip-more { background: var(--soft); border-color: var(--line); color: var(--muted); }
.cc-card:hover .cc-chips li:not(.cc-chip-more) { border-color: rgba(13, 148, 136, .35); }
.cc-chips .cc-x, .cc-chips .cc-more-w { display: none; }
@container (min-width: 440px) {
    .cc-chips { gap: 8px; margin-top: 16px; padding-top: 16px; }
    .cc-chips li { font-size: .8rem; padding: 6px 13px; }
    .cc-chips .cc-x { display: block; }
    .cc-chips .cc-more-n { display: none; }
    .cc-chips .cc-more-w { display: block; }
}

/* ---------- Course card v2.3: bottom action bar ----------
   Ages/level chips + "View course" button share one tinted bar pinned to the card bottom
   (replaces the separate meta row + "View course / 3 free trial classes" footer). */
.cc-body { padding-bottom: 20px; }
.cc-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 14px 20px;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-top: 1px solid var(--line);
}
.cc-bar .cc-meta { margin: 0; padding: 0; gap: 6px; min-width: 0; }
.cc-bar .cc-meta span { background: #ffffff; border: 1px solid var(--line); }
.cc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 10px 16px 10px 18px;
    border-radius: 999px;
    background: var(--teal-d, #0f766e);
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 18px -8px rgba(13, 148, 136, .7);
    transition: background-color .25s ease, box-shadow .25s ease;
}
.cc-btn svg { width: 16px; height: 16px; transition: transform .25s ease; }
.cc-card:hover .cc-btn { background: var(--teal, #0d9488); box-shadow: 0 10px 22px -8px rgba(13, 148, 136, .85); }
.cc-card:hover .cc-btn svg { transform: translateX(4px); }
@container (min-width: 440px) {
    .cc-body { padding-bottom: 22px; }
    .cc-bar { padding: 16px 26px; }
    .cc-btn { font-size: .9rem; padding: 11px 18px 11px 20px; }
}
/* Narrow (phone) cards: chips on one line, full-width button below */
@container (max-width: 439px) {
    .cc-bar { padding: 12px 16px 14px; gap: 10px; }
    .cc-bar .cc-meta { flex-wrap: nowrap; width: 100%; }
    .cc-bar .cc-meta span { padding: 5px 8px; font-size: .72rem; gap: 4px; white-space: nowrap; }
    .cc-btn { width: 100%; justify-content: center; margin-left: 0; }
}

/* =========================================================
   2b. EXAM BOARDS — dark "exam hall" with exam-paper cards
   ========================================================= */
.hm .hm-boards {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 88% 0%, rgba(20, 184, 166, 0.20), transparent 60%),
        radial-gradient(700px 420px at 0% 100%, rgba(94, 234, 212, 0.08), transparent 60%),
        #0b1220;
    color: #cbd5e1;
}

/* faint grid, like squared exam paper */
.hm .hm-boards::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%);
    pointer-events: none;
}

.hm-boards > .container { position: relative; }

.hm-eb-wrap {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(36px, 5vw, 76px);
    align-items: center;
}

.hm-boards .hm-lead { color: #94a3b8; }
.hm-boards .hm-accent { color: #5eead4; }

/* ---- Region tabs (vertical list) ---- */
.hm-eb-tabs { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; }

.hm-eb-tab {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px 12px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
    font-family: var(--font-ui);
    text-align: left;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hm-eb-tab:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); }

.hm-eb-tab-flag {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
}
.hm-eb-tab-flag img { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); }
.hm-eb-tab-flag svg { width: 22px; height: 22px; color: #5eead4; }

.hm-eb-tab-text b { display: block; font-family: var(--font-h); font-size: 1.02rem; font-weight: 700; color: #ffffff; }
.hm-eb-tab-text small { display: block; margin-top: 1px; font-size: 0.8rem; color: #94a3b8; }

.hm-eb-tab-arrow { margin-left: auto; width: 18px; height: 18px; color: #5eead4; opacity: 0; transform: translateX(-6px); transition: opacity 0.25s ease, transform 0.25s ease; }

.hm-eb-tab.is-active {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.24), rgba(20, 184, 166, 0.05));
    border-color: rgba(94, 234, 212, 0.45);
    box-shadow: inset 3px 0 0 #5eead4;
}
.hm-eb-tab.is-active .hm-eb-tab-arrow { opacity: 1; transform: none; }

/* ---- Promise list ---- */
.hm-eb-promise { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.hm-eb-promise li { display: flex; align-items: center; gap: 12px; color: #cbd5e1; font-size: 0.93rem; }
.hm-eb-promise svg { flex-shrink: 0; width: 18px; height: 18px; color: #5eead4; }

/* ---- Exam papers ---- */
.hm-eb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 22px; }
.hm-eb-grid[hidden] { display: none; }

.hm-eb-paper {
    --r: -1.2deg;
    position: relative;
    padding: 18px 20px 20px;
    border-radius: 4px;
    background-color: #ffffff;
    background-image: repeating-linear-gradient(180deg, transparent 0 27px, #f1f5f9 27px 28px);
    background-position: 0 10px;
    color: var(--ink-2);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 22px 44px -20px rgba(0, 0, 0, 0.75);
    transform: rotate(var(--r));
    transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s ease;
}
.hm-eb-paper:nth-child(2n) { --r: 1deg; }
.hm-eb-paper:nth-child(3n) { --r: -0.5deg; }

/* folded corner */
.hm-eb-paper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 22px;
    height: 22px;
    background: linear-gradient(225deg, #0d1626 50%, #e2e8f0 50%);
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.12);
}

.hm-eb-paper:hover {
    transform: translateY(-8px) rotate(0deg);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 34px 60px -24px rgba(0, 0, 0, 0.85), 0 0 0 2px rgba(94, 234, 212, 0.55);
    z-index: 1;
}

.hm-eb-paper-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 26px 10px 0;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--ink);
}
.hm-eb-paper-tag { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.hm-eb-barcode {
    width: 58px;
    height: 16px;
    opacity: 0.75;
    background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 13px);
}

.hm .hm-eb-name {
    padding-right: 54px;
    font-family: var(--font-h);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
}
.hm-eb-desc { margin-top: 6px; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

.hm-eb-candidate { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.hm-eb-candidate span { margin-right: 6px; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #94a3b8; }
.hm-eb-candidate i { width: 17px; height: 20px; border: 1.5px solid #cbd5e1; border-radius: 3px; background: #ffffff; }

.hm-eb-levels { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hm-eb-levels li {
    padding: 4px 9px;
    border-radius: 6px;
    border: 1px solid rgba(13, 148, 136, 0.2);
    background: var(--mint);
    color: var(--teal-d);
    font-size: 0.74rem;
    font-weight: 700;
}

.hm-eb-stamp {
    position: absolute;
    top: 52px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid rgba(13, 148, 136, 0.6);
    color: var(--teal);
    opacity: 0.9;
    transform: rotate(-14deg);
}
.hm-eb-stamp svg { width: 22px; height: 22px; stroke-width: 3; }

/* ---- GCSE Science explainer ---- */
.hm-sci {
    margin-top: clamp(44px, 6vw, 72px);
    padding: clamp(22px, 3vw, 36px);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.hm-sci-head { display: flex; align-items: center; gap: 16px; }
.hm-sci-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, var(--teal-2), var(--teal-d));
    box-shadow: 0 10px 24px -8px rgba(20, 184, 166, 0.6);
}
.hm-sci-icon svg { width: 24px; height: 24px; }
.hm .hm-sci-title { font-family: var(--font-h); font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; color: #ffffff; }
.hm-sci-sub { margin-top: 2px; color: #94a3b8; font-size: 0.93rem; }

.hm-sci-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: 28px; }
.hm-sci-label { display: block; margin-bottom: 14px; color: #5eead4; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.hm-sci-route {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.hm-sci-route + .hm-sci-route { margin-top: 10px; }

.hm-sci-subj { display: flex; gap: 6px; padding: 3px; border-radius: 10px; border: 1px solid transparent; transition: gap 0.7s cubic-bezier(.2, .8, .2, 1), background 0.7s ease, border-color 0.7s ease; transition-delay: calc(0.2s + var(--d, 0) * 0.25s); }
.hm-sci-subj span { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-h); font-size: 0.85rem; font-weight: 800; }
.hm-sci-subj span:nth-child(1) { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.hm-sci-subj span:nth-child(2) { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.hm-sci-subj span:nth-child(3) { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; }
.hm-sci-subj.is-joined { gap: 0; background: rgba(255, 255, 255, 0.06); border-color: rgba(94, 234, 212, 0.35); }
.hm-sci-subj.is-joined span { border-radius: 0; }
.hm-sci-subj.is-joined span:first-child { border-radius: 7px 0 0 7px; }
.hm-sci-subj.is-joined span:last-child { border-radius: 0 7px 7px 0; }

.hm-sci-route-text b { display: block; color: #ffffff; font-size: 1rem; }
.hm-sci-route-text small { display: block; margin-top: 2px; color: #94a3b8; font-size: 0.82rem; line-height: 1.45; }

.hm-sci-certs { display: flex; align-items: center; gap: 1px; }
.hm-sci-certs svg { width: 18px; height: 18px; color: #fbbf24; }
.hm-sci-certs em { margin-left: 8px; padding: 5px 10px; border-radius: 999px; background: #ffffff; color: var(--ink); font-style: normal; font-size: 0.78rem; font-weight: 800; white-space: nowrap; }

/* grade ruler with Higher bracket above and Foundation bracket below */
.hm-ruler { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: 5px; row-gap: 10px; padding: 14px 0; }
.hm-ruler-scale { display: contents; }
.hm-ruler-scale span { grid-row: 2; height: 42px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-h); font-size: 1.05rem; font-weight: 800; color: #ffffff; }
.hm-ruler-scale .is-f { background: rgba(94, 234, 212, 0.16); color: #99f6e4; }
.hm-ruler-scale .is-both { background: linear-gradient(135deg, rgba(94, 234, 212, 0.45), rgba(13, 148, 136, 0.85)); }
.hm-ruler-scale .is-h { background: rgba(13, 148, 136, 0.6); }

.hm-ruler-br { position: relative; height: 16px; transition: transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.hm-ruler-br span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
    color: #042f2e;
}
.hm-ruler-br.is-high { grid-row: 1; grid-column: 4 / 10; border: 2px solid #14b8a6; border-bottom: 0; border-radius: 10px 10px 0 0; transform-origin: right; transition-delay: 0.3s; }
.hm-ruler-br.is-high span { top: -13px; background: #14b8a6; color: #ffffff; }
.hm-ruler-br.is-found { grid-row: 3; grid-column: 1 / 6; border: 2px solid #5eead4; border-top: 0; border-radius: 0 0 10px 10px; transform-origin: left; transition-delay: 0.55s; }
.hm-ruler-br.is-found span { bottom: -13px; background: #5eead4; }

.hm-ruler-key { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: #94a3b8; font-size: 0.82rem; }
.hm-ruler-key span { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, rgba(94, 234, 212, 0.45), rgba(13, 148, 136, 0.85)); }

.hm-sci-note {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-top: 28px;
    padding: 14px 14px 14px 18px;
    border-radius: 16px;
    background: rgba(94, 234, 212, 0.08);
    border: 1px solid rgba(94, 234, 212, 0.18);
    color: #e2e8f0;
    font-size: 0.93rem;
}
.hm-sci-note > svg { flex-shrink: 0; width: 20px; height: 20px; color: #5eead4; }
.hm .hm-sci-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 10px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.hm .hm-sci-cta:hover { background: #5eead4; transform: translateX(2px); }
.hm-sci-cta svg { width: 16px; height: 16px; }

/* ---- Motion (only when allowed; JS adds .eb-js / .is-in / .eb-seen) ---- */
@media (prefers-reduced-motion: no-preference) {
    .eb-js .hm-eb-grid:not(.is-in) .hm-eb-paper { opacity: 0; }
    .hm-eb-grid.is-in .hm-eb-paper { animation: hm-eb-drop 0.65s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 90ms) backwards; }
    .hm-eb-grid.is-in .hm-eb-stamp { animation: hm-eb-stamp 0.4s cubic-bezier(.3, 1.4, .5, 1) calc(var(--i) * 90ms + 0.5s) backwards; }

    .eb-js .hm-sci:not(.eb-seen) .hm-sci-subj.is-joined { gap: 10px; background: transparent; border-color: transparent; }
    .eb-js .hm-sci:not(.eb-seen) .hm-sci-subj:not(.is-joined) { gap: 0; }
    .eb-js .hm-sci:not(.eb-seen) .hm-ruler-br { transform: scaleX(0); }
    .eb-js .hm-sci:not(.eb-seen) .hm-sci-certs svg { transform: scale(0); }
    .hm-sci-certs svg { transition: transform 0.4s cubic-bezier(.3, 1.4, .5, 1) calc(0.6s + var(--d, 0) * 0.25s); }
}

@keyframes hm-eb-drop {
    from { opacity: 0; transform: translateY(-30px) rotate(calc(var(--r) * -5)) scale(1.04); }
    to { opacity: 1; transform: rotate(var(--r)); }
}

@keyframes hm-eb-stamp {
    from { opacity: 0; transform: rotate(-14deg) scale(2.2); }
    to { opacity: 0.9; transform: rotate(-14deg) scale(1); }
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .hm-eb-wrap { grid-template-columns: 1fr; }
    .hm-eb-tabs { flex-direction: row; flex-wrap: wrap; }
    .hm-eb-tab { flex: 1 1 200px; width: auto; }
    .hm-eb-tab-arrow { display: none; }
}

@media (max-width: 760px) {
    .hm-sci-cols { grid-template-columns: 1fr; }
    .hm-sci-route { grid-template-columns: auto minmax(0, 1fr); }
    .hm-sci-certs { grid-column: 1 / -1; }
    .hm .hm-sci-cta { margin-left: 0; }
}

@media (max-width: 560px) {
    .hm-eb-grid { grid-template-columns: 1fr; gap: 18px; }
    .hm-eb-tab { flex-basis: 100%; padding: 8px 12px 8px 8px; }
    .hm-eb-tab-flag { width: 36px; height: 36px; }
    .hm-ruler-scale span { height: 36px; font-size: 0.95rem; }
    .hm-ruler-br span { font-size: 0.68rem; padding: 2px 8px; }
}
@media (max-width: 560px) {
    .hm-eb-paper { --r: -0.6deg; }
    .hm-eb-paper:nth-child(2n) { --r: 0.5deg; }
    .hm-eb-candidate { display: none; }
}
