/* Public landing page: premium RTL interface for Tahfeezm. */
:root {
    --th-ink: #0b2825;
    --th-ink-2: #123935;
    --th-text: #243b37;
    --th-muted: #667872;
    --th-faint: #8a9994;
    --th-bg: #f6f8f7;
    --th-band: #edf5f2;
    --th-surface: #ffffff;
    --th-surface-2: #fbfdfc;
    --th-line: #dce8e4;
    --th-line-soft: #ecf2f0;
    --th-primary: #0f766e;
    --th-primary-dark: #0a5751;
    --th-primary-soft: #e0f3ef;
    --th-mint: #bfe9df;
    --th-gold: #b8872f;
    --th-gold-dark: #7a5519;
    --th-gold-soft: #fbf2dc;
    --th-blue: #245a7a;
    --th-blue-soft: #e8f1f5;
    --th-danger: #b42318;
    --th-danger-soft: #fff0ee;
    --th-radius: 8px;
    --th-shadow-xs: 0 8px 20px rgba(11, 40, 37, .06);
    --th-shadow: 0 18px 42px rgba(11, 40, 37, .09);
    --th-shadow-lg: 0 28px 70px rgba(11, 40, 37, .15);
    --th-font: 'Readex Pro', 'Tajawal', sans-serif;
    --th-ornament-opacity: .055;
    --th-ornament-opacity-strong: .09;
    --th-ornament-line: rgba(15, 118, 110, .22);
    --th-verse-color: #31544e;
    --th-verse-ref: #8a6a2b;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--th-text);
    background: var(--th-bg);
    font-family: var(--th-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
    padding-right: 0 !important;
}

h1, h2, h3, h4, h5, h6, p {
    letter-spacing: 0;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
.th-btn:focus-visible {
    outline: 3px solid rgba(184, 135, 47, .42);
    outline-offset: 3px;
}

.th-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #fff 0, #fff 520px, var(--th-bg) 520px),
        var(--th-bg);
}

.th-verse {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--th-verse-color);
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.7;
}

.th-verse span {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.th-verse span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--th-gold);
    opacity: .72;
}

.th-verse small {
    color: var(--th-verse-ref);
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.th-verse-divider {
    position: relative;
    isolation: isolate;
    padding: 26px 0;
    background: linear-gradient(180deg, #fff, var(--th-bg));
}

.th-verse-divider::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: var(--th-ornament-opacity);
    background-image:
        linear-gradient(45deg, var(--th-ornament-line) 25%, transparent 25%, transparent 75%, var(--th-ornament-line) 75%),
        linear-gradient(-45deg, var(--th-ornament-line) 25%, transparent 25%, transparent 75%, var(--th-ornament-line) 75%);
    background-position: 0 0, 0 18px;
    background-size: 36px 36px;
    mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}

.th-verse-divider .th-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.th-verse-divider__ornament {
    width: min(170px, 22vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(184, 135, 47, .45), transparent);
}

[x-cloak] {
    display: none !important;
}

.th-container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.reveal-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
    transition-delay: var(--d, 0s);
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.th-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid rgba(220, 232, 228, .86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.th-nav.is-scrolled {
    box-shadow: 0 12px 30px rgba(11, 40, 37, .07);
}

.th-nav__inner {
    width: min(1220px, calc(100% - 32px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.th-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    color: var(--th-ink);
    text-decoration: none;
}

.th-nav__brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.1;
}

.th-nav__brand-copy strong {
    font-size: .98rem;
    font-weight: 900;
    white-space: nowrap;
}

.th-nav__brand-copy small {
    color: var(--th-muted);
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
}

.th-nav__mark {
    width: 42px;
    height: 42px;
    border-radius: var(--th-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--th-primary), var(--th-ink));
    box-shadow: 0 12px 22px rgba(15, 118, 110, .16);
}

.th-nav__mark img,
.th-footer__brand img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(10);
}

.th-nav__menu {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.th-nav__links,
.th-nav__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.th-nav__links {
    justify-content: center;
    min-width: 0;
}

.th-nav__actions {
    justify-content: flex-end;
}

.th-nav__links a,
.th-nav__login,
.th-nav__primary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: var(--th-radius);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.th-nav__links a {
    padding: 0 11px;
    color: #526862;
}

.th-nav__links a:hover {
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
}

.th-nav__login {
    padding: 0 12px;
    color: var(--th-ink-2);
    border: 1px solid var(--th-line);
    background: #fff;
}

.th-nav__login:hover {
    color: var(--th-primary-dark);
    border-color: rgba(15, 118, 110, .24);
    background: var(--th-surface-2);
}

.th-nav__primary {
    padding: 0 16px;
    color: #fff;
    background: var(--th-primary);
    box-shadow: 0 12px 26px rgba(15, 118, 110, .18);
}

.th-nav__primary:hover {
    color: #fff;
    background: var(--th-primary-dark);
    transform: translateY(-1px);
}

.th-nav__toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-inline-start: auto;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
    color: var(--th-ink);
    font-size: 1.35rem;
}

.th-hero {
    position: relative;
    isolation: isolate;
    padding: 72px 0 62px;
    background:
        linear-gradient(135deg, rgba(224, 243, 239, .62), rgba(251, 242, 220, .34) 46%, rgba(255, 255, 255, .88)),
        #fff;
    overflow: hidden;
}

.th-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .42;
    background-image:
        linear-gradient(30deg, rgba(15, 118, 110, .08) 12%, transparent 12.5%, transparent 87%, rgba(15, 118, 110, .08) 87.5%, rgba(15, 118, 110, .08)),
        linear-gradient(150deg, rgba(184, 135, 47, .08) 12%, transparent 12.5%, transparent 87%, rgba(184, 135, 47, .08) 87.5%, rgba(184, 135, 47, .08));
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 76%);
}

.th-hero::after {
    content: "";
    position: absolute;
    top: 94px;
    left: max(24px, calc((100vw - 1160px) / 2));
    width: 210px;
    height: 210px;
    z-index: 0;
    pointer-events: none;
    opacity: .08;
    background-image:
        linear-gradient(45deg, transparent 46%, var(--th-primary) 47%, var(--th-primary) 53%, transparent 54%),
        linear-gradient(-45deg, transparent 46%, var(--th-gold) 47%, var(--th-gold) 53%, transparent 54%);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, #000, transparent 70%);
}

.th-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(340px, .82fr);
    align-items: center;
    gap: 54px;
}

.th-kicker,
.th-section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--th-primary-dark);
    font-size: .84rem;
    font-weight: 900;
}

.th-kicker {
    padding: 9px 13px;
    border: 1px solid rgba(15, 118, 110, .16);
    border-radius: var(--th-radius);
    background: rgba(224, 243, 239, .84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}

.th-section__eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--th-gold));
}

.th-hero h1 {
    max-width: 820px;
    margin: 0;
    color: var(--th-ink);
    font-size: clamp(2.35rem, 5vw, 4.35rem);
    line-height: 1.22;
    font-weight: 900;
}

.th-hero__lead {
    max-width: 700px;
    margin: 22px 0 0;
    color: #51645f;
    font-size: 1.08rem;
    line-height: 2;
}

.th-hero__verse {
    margin-top: 16px;
    padding: 9px 0;
}

.th-hero__actions,
.th-fees__actions,
.th-final__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.th-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: var(--th-radius);
    border: 1px solid transparent;
    font-family: var(--th-font);
    font-size: .92rem;
    font-weight: 900;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.th-btn:hover {
    transform: translateY(-1px);
}

.th-btn--lg {
    min-height: 52px;
    padding: 0 24px;
    font-size: .98rem;
}

.th-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--th-primary), var(--th-primary-dark));
    box-shadow: 0 14px 28px rgba(15, 118, 110, .22);
}

.th-btn--primary:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--th-primary-dark), var(--th-ink));
    box-shadow: 0 18px 34px rgba(15, 118, 110, .28);
}

.th-btn--soft,
.th-btn--outline {
    color: var(--th-ink-2);
    background: #fff;
    border-color: var(--th-line);
}

.th-btn--soft:hover,
.th-btn--outline:hover {
    color: var(--th-primary-dark);
    border-color: rgba(15, 118, 110, .28);
    background: var(--th-primary-soft);
}

.th-btn--disabled {
    color: #879590;
    background: #eef2f0;
    border-color: var(--th-line);
    cursor: not-allowed;
    box-shadow: none;
}

.th-btn--disabled:hover {
    transform: none;
}

.th-btn--wide {
    width: 100%;
}

.th-hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.th-hero__trust span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    color: var(--th-ink-2);
    border: 1px solid rgba(15, 118, 110, .14);
    border-radius: var(--th-radius);
    background: rgba(255, 255, 255, .76);
    font-size: .82rem;
    font-weight: 850;
}

.th-hero__trust i {
    color: var(--th-primary);
}

.th-hero__login {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: var(--th-muted);
    font-size: .88rem;
    font-weight: 800;
}

.th-hero__login a {
    color: var(--th-primary-dark);
    text-decoration: none;
}

.th-hero__login a:hover {
    text-decoration: underline;
}

.th-hero__login span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--th-line);
}

.th-hero__panel {
    display: grid;
    gap: 14px;
}

.th-hero-card,
.th-hero__assurance {
    border: 1px solid rgba(220, 232, 228, .94);
    border-radius: var(--th-radius);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--th-shadow);
}

.th-hero-card--main {
    padding: 24px;
}

.th-hero-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.th-hero-card__icon,
.th-stat-card__icon,
.th-feature-card span,
.th-modal__icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--th-radius);
    color: #fff;
    background: linear-gradient(135deg, var(--th-primary), var(--th-ink));
    font-size: 1.3rem;
}

.th-hero-card h2 {
    margin: 0;
    color: var(--th-ink);
    font-size: 1.55rem;
    line-height: 1.55;
    font-weight: 900;
}

.th-hero-card p {
    margin: 12px 0 0;
    color: var(--th-muted);
    line-height: 1.9;
}

.th-pill {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: var(--th-radius);
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
    font-size: .76rem;
    font-weight: 900;
}

.th-pill--gold {
    color: var(--th-gold-dark);
    background: var(--th-gold-soft);
}

.th-hero-card--schedule {
    padding: 18px;
}

.th-mini-label {
    display: block;
    margin-bottom: 12px;
    color: var(--th-muted);
    font-size: .76rem;
    font-weight: 900;
}

.th-schedule-line {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--th-line-soft);
}

.th-schedule-line:last-child {
    border-bottom: 0;
}

.th-schedule-line strong {
    color: var(--th-ink);
    font-weight: 900;
}

.th-schedule-line span {
    color: var(--th-primary-dark);
    font-size: .82rem;
    font-weight: 850;
}

.th-hero__assurance {
    display: flex;
    gap: 10px;
    padding: 16px 18px;
    color: var(--th-muted);
    line-height: 1.75;
    font-size: .9rem;
}

.th-hero__assurance i {
    color: var(--th-gold);
    margin-top: 4px;
}

.th-section {
    padding: 78px 0;
}

.th-section__head {
    max-width: 720px;
    margin: 0 auto 36px;
    text-align: center;
}

.th-section__head--start {
    margin: 0;
    text-align: start;
}

.th-section__head h2,
.th-fees h2,
.th-final h2 {
    margin: 0;
    color: var(--th-ink);
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.45;
    font-weight: 900;
}

.th-section__head p,
.th-fees p {
    margin: 12px 0 0;
    color: var(--th-muted);
    line-height: 1.95;
}

.th-stats-section {
    background: #fff;
}

.th-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.th-stat-card {
    position: relative;
    min-height: 190px;
    padding: 22px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: var(--th-surface);
    box-shadow: var(--th-shadow-xs);
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.th-stat-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 0;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(90deg, var(--th-primary), var(--th-gold));
    opacity: .74;
}

.th-stat-card:hover,
.th-feature-card:hover,
.th-teacher:hover,
.th-group:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, .28);
    box-shadow: var(--th-shadow);
}

.th-stat-card__icon {
    width: 46px;
    height: 46px;
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
    font-size: 1.18rem;
}

.th-stat-card:nth-child(2) .th-stat-card__icon {
    color: var(--th-blue);
    background: var(--th-blue-soft);
}

.th-stat-card:nth-child(3) .th-stat-card__icon {
    color: var(--th-gold-dark);
    background: var(--th-gold-soft);
}

.th-stat-card strong {
    display: block;
    margin-top: 24px;
    color: var(--th-ink);
    font-size: 2.45rem;
    line-height: 1;
    font-weight: 900;
}

.th-stat-card > span:last-child {
    display: block;
    margin-top: 10px;
    color: var(--th-muted);
    font-size: .9rem;
    font-weight: 850;
}

.th-stat-card--accent {
    background: linear-gradient(135deg, var(--th-ink), var(--th-primary-dark));
}

.th-stat-card--accent strong,
.th-stat-card--accent > span:last-child {
    color: #fff;
}

.th-stat-card--accent .th-stat-card__icon {
    color: var(--th-gold-dark);
    background: var(--th-gold-soft);
}

.th-fees {
    position: relative;
    isolation: isolate;
    background: var(--th-band);
}

.th-fees::before,
.th-teachers::before,
.th-leaderboard::before,
.th-groups::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: var(--th-ornament-opacity);
    pointer-events: none;
    background-image:
        radial-gradient(circle at 1px 1px, var(--th-ornament-line) 1px, transparent 0),
        linear-gradient(135deg, rgba(184, 135, 47, .2) 1px, transparent 1px);
    background-size: 28px 28px, 56px 56px;
    mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.th-fees > .th-container,
.th-teachers > .th-container,
.th-leaderboard > .th-container,
.th-groups > .th-container {
    position: relative;
    z-index: 1;
}

.th-fees__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(330px, .76fr);
    align-items: center;
    gap: 36px;
}

.th-fees__content {
    padding: 34px;
    border: 1px solid rgba(220, 232, 228, .95);
    border-radius: var(--th-radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .82)),
        var(--th-surface);
    box-shadow: var(--th-shadow);
}

.th-fees__benefits {
    display: grid;
    gap: 12px;
}

.th-fees__benefits article {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
    box-shadow: var(--th-shadow-xs);
}

.th-fees__benefits i {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--th-radius);
    color: var(--th-gold-dark);
    background: var(--th-gold-soft);
    font-size: 1.25rem;
}

.th-fees__benefits article:nth-child(2) i {
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
}

.th-fees__benefits article:nth-child(3) i {
    color: var(--th-blue);
    background: var(--th-blue-soft);
}

.th-fees__benefits h3,
.th-feature-card h3,
.th-teacher h3,
.th-group h3 {
    margin: 0;
    color: var(--th-ink);
    font-size: 1.08rem;
    line-height: 1.45;
    font-weight: 900;
}

.th-fees__benefits p,
.th-feature-card p,
.th-teacher p,
.th-group p {
    margin: 8px 0 0;
    color: var(--th-muted);
    line-height: 1.8;
    font-size: .9rem;
}

.th-features,
.th-groups {
    position: relative;
    isolation: isolate;
    background: #fff;
}

.th-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.th-feature-card,
.th-teacher,
.th-group {
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.th-feature-card {
    min-height: 238px;
    padding: 22px;
    box-shadow: var(--th-shadow-xs);
}

.th-feature-card span {
    width: 48px;
    height: 48px;
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
    font-size: 1.2rem;
}

.th-feature-card:nth-child(2) span,
.th-feature-card:nth-child(5) span {
    color: var(--th-blue);
    background: var(--th-blue-soft);
}

.th-feature-card:nth-child(3) span,
.th-feature-card:nth-child(6) span {
    color: var(--th-gold-dark);
    background: var(--th-gold-soft);
}

.th-feature-card h3 {
    margin-top: 18px;
}

.th-section__split {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 30px;
}

.th-teachers {
    position: relative;
    isolation: isolate;
    background: var(--th-bg);
}

.th-teachers__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.th-teacher {
    display: flex;
    flex-direction: column;
    min-height: 332px;
    padding: 20px;
    box-shadow: var(--th-shadow-xs);
}

.th-teacher__header {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 86px;
}

.th-teacher__avatar {
    width: 74px;
    height: 74px;
    border-radius: var(--th-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)),
        linear-gradient(135deg, var(--th-primary), var(--th-ink));
    font-size: 1.55rem;
    font-weight: 900;
}

.th-teacher__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.th-teacher__title {
    min-width: 0;
}

.th-teacher__title .th-pill {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-teacher__title h3 {
    margin-top: 10px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.th-teacher__bio {
    flex: 0 0 auto;
    display: block;
    margin-top: 16px !important;
    height: auto;
    max-height: none;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.9 !important;
    white-space: pre-line;
    text-align: right;
    word-break: break-word;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
}

.th-teacher__meta,
.th-group__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.th-teacher__meta {
    margin-top: auto;
    padding-top: 16px;
}

.th-teacher__meta span,
.th-group__meta span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--th-line-soft);
    border-radius: var(--th-radius);
    color: #526862;
    background: var(--th-surface-2);
    font-size: .78rem;
    font-weight: 850;
}

.th-teacher__meta i,
.th-group__meta i {
    color: var(--th-primary-dark);
}

.th-leaderboard {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(180deg, var(--th-band), #f8fbfa);
}

.th-lb-tabs {
    width: fit-content;
    margin: 0 auto 20px;
    display: flex;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
    box-shadow: var(--th-shadow-xs);
}

.th-lb-tabs button {
    min-width: 150px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--th-muted);
    font-family: var(--th-font);
    font-size: .88rem;
    font-weight: 900;
}

.th-lb-tabs button.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--th-primary), var(--th-primary-dark));
    box-shadow: 0 12px 24px rgba(15, 118, 110, .18);
}

.th-lb-panel {
    max-width: 860px;
    margin: 0 auto;
}

.th-lb-list {
    display: grid;
    gap: 10px;
}

.th-lb-row {
    position: relative;
    width: 100%;
    min-height: 92px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) minmax(100px, .34fr);
    grid-template-areas:
        "rank info meta"
        "rank progress meta";
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
    box-shadow: var(--th-shadow-xs);
    font-family: var(--th-font);
    text-align: start;
    cursor: pointer;
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.th-lb-row:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, .3);
    box-shadow: var(--th-shadow);
}

.th-lb-row__rank {
    grid-area: rank;
    width: 54px;
    height: 54px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--th-radius);
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
    font-size: .8rem;
    font-weight: 900;
}

.th-lb-row__rank i {
    font-size: 1rem;
    line-height: 1;
}

.th-lb-row.rank-1 .th-lb-row__rank,
.th-lb-row.rank-2 .th-lb-row__rank,
.th-lb-row.rank-3 .th-lb-row__rank {
    color: var(--th-gold-dark);
    background: var(--th-gold-soft);
}

.th-lb-row.rank-1 {
    border-color: rgba(184, 135, 47, .42);
}

.th-lb-row__info {
    grid-area: info;
    min-width: 0;
}

.th-lb-row__info strong {
    display: block;
    overflow: hidden;
    color: var(--th-ink);
    font-size: 1rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-lb-row__info small {
    display: block;
    margin-top: 5px;
    color: var(--th-muted);
    font-size: .78rem;
    font-weight: 850;
}

.th-lb-row__progress {
    grid-area: progress;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: var(--th-line-soft);
    overflow: hidden;
}

.th-lb-row__progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--th-primary), var(--th-gold));
}

.th-lb-row__meta {
    grid-area: meta;
    display: grid;
    justify-items: end;
    gap: 7px;
}

.th-lb-row__meta span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    border-radius: var(--th-radius);
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
    font-size: .78rem;
    font-weight: 850;
}

.th-lb-row__meta span:first-child {
    color: var(--th-gold-dark);
    background: var(--th-gold-soft);
}

.th-filter-wrap {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.th-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.th-filter button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
    color: var(--th-muted);
    font-family: var(--th-font);
    font-size: .82rem;
    font-weight: 900;
    transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.th-filter button:hover {
    color: var(--th-primary-dark);
    border-color: rgba(15, 118, 110, .28);
}

.th-filter button.is-active {
    color: #fff;
    border-color: var(--th-primary);
    background: var(--th-primary);
    box-shadow: 0 10px 22px rgba(15, 118, 110, .14);
}

.th-filter--status button:nth-child(3).is-active {
    border-color: #9c342b;
    background: #9c342b;
}

.th-groups__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.th-group {
    display: flex;
    flex-direction: column;
    min-height: 438px;
    overflow: hidden;
    box-shadow: var(--th-shadow-xs);
}

.th-group.is-closed {
    opacity: .72;
    background: #f7f9f8;
}

.th-group.is-closed:hover {
    transform: none;
    box-shadow: var(--th-shadow-xs);
}

.th-group__top {
    min-height: 150px;
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--th-line-soft);
}

.th-group__status {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 13px;
    padding: 0 10px;
    border-radius: var(--th-radius);
    font-size: .76rem;
    font-weight: 900;
}

.th-group__status.is-open {
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
}

.th-group__status.is-closed {
    color: var(--th-danger);
    background: var(--th-danger-soft);
}

.th-group__top p {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    min-height: 28px;
}

.th-group__top p i {
    color: var(--th-primary-dark);
}

.th-group__meta {
    padding: 0 20px;
}

.th-group__schedule {
    flex: 1;
    min-height: 150px;
    padding: 18px 20px;
}

.th-group__schedule h4 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    color: var(--th-ink);
    font-size: .9rem;
    font-weight: 900;
}

.th-group__schedule h4 i {
    color: var(--th-primary-dark);
}

.th-group__schedule .badge {
    border-radius: 6px;
}

.th-group__schedule .text-primary {
    color: var(--th-primary-dark) !important;
}

.th-group h3 {
    display: -webkit-box;
    min-height: 3.05em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.th-group__action {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--th-line-soft);
    background: var(--th-surface-2);
}

.th-empty {
    grid-column: 1 / -1;
    padding: 34px 22px;
    border: 1px dashed var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
    text-align: center;
    color: var(--th-muted);
}

.th-empty--compact {
    padding: 22px;
}

.th-empty i {
    display: block;
    margin-bottom: 10px;
    color: var(--th-primary-dark);
    font-size: 1.8rem;
}

.th-empty h3 {
    margin: 0 0 8px;
    color: var(--th-ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.th-empty p {
    margin: 0;
    line-height: 1.8;
}

.th-final {
    position: relative;
    padding: 70px 0;
    background:
        linear-gradient(135deg, rgba(191, 233, 223, .12), rgba(184, 135, 47, .1) 48%, rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #051c1a, #0a3f3a 58%, #082b28);
    color: #fff;
    overflow: hidden;
}

.th-final::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .1;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, .28) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .24) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(184, 135, 47, .32) 1px, transparent 2px);
    background-size: 34px 34px, 34px 34px, 68px 68px;
    mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent);
}

.th-final__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.th-final__actions {
    margin-top: 0;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.th-final .th-section__eyebrow {
    color: #d6fff7;
}

.th-final h2,
.th-final__copy h2,
.th-final__title {
    max-width: 720px;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}

.th-final__copy > p:not(.th-verse) {
    max-width: 680px;
    margin: 14px 0 0;
    color: #d8efeb;
    line-height: 1.9;
    font-size: .98rem;
    font-weight: 650;
}

.th-final__verse {
    display: flex;
    width: fit-content;
    margin: 0 0 14px;
    padding: 8px 12px;
    color: #eafcf8;
    border: 1px solid rgba(191, 233, 223, .24);
    background: rgba(255, 255, 255, .06);
    border-radius: var(--th-radius);
}

.th-final__verse small {
    color: #efd99e;
}

.th-final .th-btn--outline {
    color: #fff;
    background: transparent;
    border-color: rgba(255, 255, 255, .32);
}

.th-final .th-btn--outline:hover {
    color: var(--th-ink);
    background: #fff;
}

.th-footer {
    padding: 24px 0;
    background: #fff;
    border-top: 1px solid var(--th-line);
}

.th-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.th-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--th-ink);
    font-weight: 900;
}

.th-footer__brand img {
    width: 30px;
    height: 30px;
    padding: 5px;
    border-radius: 6px;
    background: var(--th-primary);
}

.th-footer p {
    margin: 0;
    color: var(--th-muted);
    font-size: .86rem;
    font-weight: 750;
}

.th-footer__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.th-footer__verse {
    color: var(--th-ink-2) !important;
}

.th-footer__verse small {
    color: var(--th-gold-dark);
    font-size: .72rem;
    font-weight: 900;
}

.th-modal {
    border: 0;
    border-radius: var(--th-radius);
    box-shadow: 0 28px 70px rgba(11, 40, 37, .24);
}

.th-modal .modal-body {
    padding: 24px;
}

.th-modal .modal-header {
    border-bottom: 1px solid var(--th-line-soft);
}

.th-modal__icon {
    margin: 0 auto 14px;
    color: var(--th-primary-dark);
    background: var(--th-primary-soft);
}

.th-modal h5 {
    margin: 0;
    color: var(--th-ink);
    text-align: center;
    font-weight: 900;
}

.th-modal p {
    margin: 8px 0 16px;
    color: var(--th-muted);
    text-align: center;
}

.th-modal__schedule {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: var(--th-bg);
}

.th-loading {
    display: grid;
    place-items: center;
    gap: 12px;
    padding: 36px 0;
    color: var(--th-muted);
    text-align: center;
}

.th-loading span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--th-line);
    border-top-color: var(--th-primary);
    animation: thSpin .8s linear infinite;
}

@keyframes thSpin {
    to {
        transform: rotate(360deg);
    }
}

.dir-ltr {
    direction: ltr;
    text-align: left;
}

.last-no-border:last-child {
    border-bottom: 0 !important;
}

#statsModal .student-stat-record__date {
    min-width: 80px;
}

#statsModal .student-stat-record__details {
    min-width: 0;
}

#statsModal .student-stat-record__notes,
#statsModal .student-stat-record__badge,
#statsModal .student-stats-content h4 {
    overflow-wrap: anywhere;
    white-space: normal;
}

@media (max-width: 767.98px) {
    body.modal-open {
        overflow: hidden !important;
        padding-right: 0 !important;
    }

    .modal-backdrop.show {
        opacity: .72;
    }

    #statsModal {
        position: fixed;
        inset: 0;
        z-index: 1060;
        padding: 0 !important;
        overflow: hidden;
    }

    #statsModal,
    #statsModal * {
        box-sizing: border-box;
    }

    #statsModal .modal-dialog {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        min-width: 0;
        margin: 12px auto;
    }

    #statsModal.show .modal-dialog {
        transform: none;
    }

    #statsModal .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 24px);
        overflow: hidden;
        border-radius: 18px;
    }

    #statsModal .modal-header {
        align-items: center;
        justify-content: center;
        padding: 14px 16px;
        gap: 10px;
        flex: 0 0 auto;
    }

    #statsModal .modal-title {
        flex: 1;
        min-width: 0;
        text-align: center;
        font-weight: 900;
        line-height: 1.4;
    }

    #statsModal .btn-close {
        margin: 0;
        flex: 0 0 auto;
    }

    #statsModal .modal-body {
        max-height: calc(100dvh - 82px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px;
    }

    #statsModal .student-stats-content,
    #statsModal .student-stats-summary,
    #statsModal .student-stats-history,
    #statsModal .accordion,
    #statsModal .accordion-item,
    #statsModal .accordion-button,
    #statsModal .accordion-body {
        max-width: 100%;
        overflow-x: hidden;
    }

    #statsModal .student-stats-content h4 {
        font-size: 1.08rem;
        line-height: 1.7;
        margin-inline: auto;
        max-width: 100%;
    }

    #statsModal .student-stats-summary {
        --bs-gutter-x: .75rem;
        --bs-gutter-y: .75rem;
    }

    #statsModal .student-stats-summary .col-6 > div {
        min-height: 98px;
        padding: 14px 10px !important;
    }

    #statsModal .student-stats-summary h3 {
        font-size: 1.45rem;
    }

    #statsModal .student-stats-summary small {
        display: block;
        line-height: 1.5;
        white-space: normal;
    }

    #statsModal .student-stats-month-head {
        gap: 10px;
        flex-wrap: wrap;
        padding-left: 0 !important;
    }

    #statsModal .accordion-button {
        padding: 12px;
        white-space: normal;
    }

    #statsModal .accordion-button::after {
        margin-right: auto;
        margin-left: 0;
        flex: 0 0 auto;
    }

    #statsModal .student-stat-record {
        align-items: stretch !important;
        gap: 10px;
        flex-wrap: wrap;
        padding: 12px !important;
    }

    #statsModal .student-stat-record__main {
        flex: 1 1 100%;
        min-width: 0;
        gap: 10px !important;
        flex-wrap: wrap;
    }

    #statsModal .student-stat-record__date {
        min-width: 0;
        flex: 0 0 auto;
    }

    #statsModal .student-stat-record__details {
        flex: 1 1 150px;
    }

    #statsModal .student-stat-record__badge .badge {
        max-width: 100%;
        white-space: normal;
        line-height: 1.45;
        text-align: right;
    }

    #statsModal .student-stat-record__points {
        margin-inline-start: auto;
        align-self: center;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    #statsModal .student-stats-summary .col-6 {
        width: 100%;
    }

    #statsModal .student-stat-record__main {
        flex-direction: column;
        align-items: stretch !important;
    }

    #statsModal .student-stat-record__date {
        width: fit-content;
    }
}

@media (max-width: 1180px) {
    .th-nav__inner {
        min-height: 70px;
    }

    .th-nav__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .th-nav__menu {
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        left: 16px;
        right: 16px;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
        border: 1px solid var(--th-line);
        border-radius: var(--th-radius);
        background: #fff;
        box-shadow: var(--th-shadow-lg);
    }

    .th-nav__menu.is-open {
        display: grid;
    }

    .th-nav__links,
    .th-nav__actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .th-nav__links a,
    .th-nav__login,
    .th-nav__primary {
        width: 100%;
        min-height: 46px;
    }

    .th-hero__grid,
    .th-fees__grid {
        grid-template-columns: 1fr;
    }

    .th-hero__panel {
        max-width: 720px;
    }

    .th-stats-grid,
    .th-feature-grid,
    .th-teachers__grid,
    .th-groups__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    html {
        scroll-padding-top: 76px;
    }

    .th-container,
    .th-nav__inner {
        width: min(100% - 28px, 1160px);
    }

    .th-nav__brand-copy small {
        display: none;
    }

    .th-nav__links,
    .th-nav__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .th-hero {
        padding: 46px 0 44px;
    }

    .th-hero__grid {
        gap: 34px;
    }

    .th-hero__lead {
        font-size: .98rem;
    }

    .th-hero h1 {
        font-size: 2.15rem;
        line-height: 1.32;
    }

    .th-hero__actions,
    .th-fees__actions,
    .th-final__actions {
        flex-direction: column;
    }

    .th-hero__actions .th-btn,
    .th-fees__actions .th-btn,
    .th-final__actions .th-btn {
        width: 100%;
    }

    .th-section {
        padding: 58px 0;
    }

    .th-stats-grid,
    .th-feature-grid,
    .th-teachers__grid,
    .th-groups__grid {
        grid-template-columns: 1fr;
    }

    .th-section__split,
    .th-final__inner,
    .th-footer__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .th-section__head--start {
        text-align: center;
    }

    .th-verse-divider .th-container {
        gap: 12px;
    }

    .th-verse-divider__ornament {
        width: 16vw;
    }

    .th-lb-tabs {
        width: 100%;
    }

    .th-lb-tabs button {
        flex: 1;
        min-width: 0;
    }

    .th-lb-row {
        grid-template-columns: 50px minmax(0, 1fr);
        grid-template-areas:
            "rank info"
            "rank meta"
            "progress progress";
        align-items: center;
    }

    .th-lb-row__meta {
        justify-items: start;
        display: flex;
        flex-wrap: wrap;
    }

    .th-lb-row__progress {
        margin-top: 2px;
    }

    .th-footer__meta {
        justify-content: flex-start;
    }
}

@media (max-width: 540px) {
    .th-nav__brand-copy strong {
        font-size: .9rem;
    }

    .th-nav__links,
    .th-nav__actions {
        grid-template-columns: 1fr;
    }

    .th-hero-card--main,
    .th-fees__content {
        padding: 22px;
    }

    .th-hero h1 {
        font-size: 1.82rem;
        line-height: 1.36;
    }

    .th-hero-card__top,
    .th-schedule-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .th-hero__trust {
        display: grid;
        grid-template-columns: 1fr;
    }

    .th-stat-card {
        min-height: 165px;
    }

    .th-teacher__header {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .th-teacher__avatar {
        width: 62px;
        height: 62px;
    }

    .th-fees__benefits article {
        grid-template-columns: 1fr;
    }

    .th-lb-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .th-verse {
        display: flex;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .th-verse-divider .th-container {
        flex-direction: column;
    }

    .th-verse-divider__ornament {
        width: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
