body.sahaba-body {
    --sahaba-primary: var(--school-primary, #123d2e);
    --sahaba-secondary: var(--school-secondary, #f3e8d0);
    --sahaba-accent: var(--school-accent, #c89b3c);
    --sahaba-ink: #16231d;
    --sahaba-muted: #657067;
    --sahaba-paper: #fbf7ed;
    --sahaba-line: rgba(18, 61, 46, 0.14);
    --sahaba-shadow: 0 24px 68px rgba(18, 61, 46, 0.12);
    margin: 0;
    background:
        linear-gradient(90deg, rgba(18, 61, 46, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #fbf7ed 0%, #f5eddc 100%);
    background-size: 28px 28px, auto;
    color: var(--sahaba-ink);
    font-family: "Inter", sans-serif;
}

.sahaba-body a:not(.sahaba-cta):not(.public-register-submit):not(.public-register-add-program) {
    color: inherit;
}

.sahaba-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--sahaba-line);
    background: rgba(251, 247, 237, 0.94);
    backdrop-filter: blur(16px);
}

.sahaba-nav {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.sahaba-logo,
.sahaba-menu a,
.sahaba-footer a {
    text-decoration: none;
}

.sahaba-logo {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--sahaba-primary);
    font-weight: 900;
}

.sahaba-logo-mark {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sahaba-line);
    border-radius: 50%;
    background: var(--sahaba-primary);
    color: #fff;
}

.sahaba-logo-text {
    max-width: min(42vw, 22rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.sahaba-brand-logo,
.sahaba-footer-logo {
    display: block;
    object-fit: contain;
}

.sahaba-brand-logo {
    width: min(12rem, 38vw);
    max-height: 4.2rem;
}

.sahaba-footer-logo {
    width: min(10.5rem, 60vw);
    max-height: 4rem;
    margin-bottom: 1rem;
}

.sahaba-menu {
    gap: 1.35rem;
    color: var(--sahaba-primary);
    font-size: 0.94rem;
    font-weight: 900;
}

.sahaba-menu a {
    position: relative;
    padding-block: 0.35rem;
}

.sahaba-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--sahaba-accent);
    transition: transform 180ms ease;
}

.sahaba-menu a:hover::after {
    transform: scaleX(1);
}

.sahaba-cta,
.sahaba-secondary {
    min-height: 48px;
    border-radius: 4px;
    padding: 0.9rem 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 900;
    line-height: 1;
}

.sahaba-body .sahaba-cta,
.sahaba-body .sahaba-cta:hover,
.sahaba-body .sahaba-cta:focus {
    color: #fff;
    background: var(--sahaba-primary);
    box-shadow: 0 16px 34px rgba(18, 61, 46, 0.22);
}

.sahaba-body .sahaba-secondary,
.sahaba-body .sahaba-secondary:hover,
.sahaba-body .sahaba-secondary:focus {
    color: var(--sahaba-primary);
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--sahaba-line);
}

.sahaba-nav-cta {
    white-space: nowrap;
}

.sahaba-hero {
    padding: 5.5rem 0 4.5rem;
}

.sahaba-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    gap: 4rem;
    align-items: center;
}

.sahaba-eyebrow,
.sahaba-kicker {
    color: var(--sahaba-primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sahaba-display,
.sahaba-about h2,
.sahaba-section-head h2,
.sahaba-fees-copy h2,
.sahaba-calendar h2,
.sahaba-cta-panel h2 {
    color: var(--sahaba-primary);
    font-family: "Alegreya", serif;
    font-weight: 800;
    letter-spacing: 0;
}

.sahaba-display {
    max-width: 11ch;
    margin: 0.7rem 0 1.15rem;
    font-size: 5rem;
    line-height: 0.95;
}

.sahaba-lead {
    max-width: 46rem;
    color: #445249;
    font-size: 1.12rem;
    line-height: 1.75;
}

.sahaba-hero-actions,
.sahaba-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.8rem;
}

.sahaba-hero-panel {
    border: 1px solid var(--sahaba-line);
    padding: 1.25rem;
    background: #fffdf8;
    box-shadow: var(--sahaba-shadow);
}

.sahaba-panel-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.75rem 1rem;
    color: var(--sahaba-primary);
    font-weight: 900;
}

.sahaba-panel-top span {
    color: var(--sahaba-muted);
    font-size: 0.9rem;
}

.sahaba-manuscript {
    min-height: 285px;
    display: grid;
    place-items: center;
    padding: 2rem;
    border: 1px solid color-mix(in srgb, var(--sahaba-accent) 38%, transparent);
    background:
        linear-gradient(180deg, rgba(18, 61, 46, 0.92), rgba(18, 61, 46, 0.78)),
        var(--sahaba-primary);
    color: #fff;
    text-align: center;
}

.sahaba-hero-image {
    width: 100%;
    height: 360px;
    display: block;
    border: 1px solid color-mix(in srgb, var(--sahaba-accent) 30%, transparent);
    object-fit: cover;
    object-position: center;
    background: var(--sahaba-primary);
}

.sahaba-manuscript span {
    display: block;
    font-family: "Alegreya", serif;
    font-size: 5rem;
    line-height: 1;
}

.sahaba-manuscript small {
    display: block;
    color: var(--sahaba-secondary);
    font-weight: 800;
}

.sahaba-hero-facts {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.9rem;
}

.sahaba-hero-facts article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: color-mix(in srgb, var(--sahaba-secondary) 52%, #fff);
    border-left: 4px solid var(--sahaba-accent);
}

.sahaba-hero-facts span,
.sahaba-program-card span,
.sahaba-class-card span,
.sahaba-fee-card span,
.sahaba-contact-grid span {
    color: var(--sahaba-muted);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.sahaba-hero-facts strong {
    color: var(--sahaba-primary);
    text-align: right;
}

.sahaba-section {
    padding-block: 4.75rem;
}

.sahaba-about,
.sahaba-calendar,
.sahaba-cta-panel {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 2.25rem;
    align-items: start;
    border-top: 3px solid var(--sahaba-primary);
    padding-top: 2rem;
}

.sahaba-about h2,
.sahaba-section-head h2,
.sahaba-fees-copy h2,
.sahaba-calendar h2,
.sahaba-cta-panel h2 {
    margin: 0.45rem 0 1rem;
    font-size: 3rem;
    line-height: 1.02;
}

.sahaba-about p,
.sahaba-fees-copy p,
.sahaba-cta-panel p {
    color: var(--sahaba-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.sahaba-note {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-top: 1.3rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--sahaba-line);
    background: #fffdf8;
    color: var(--sahaba-primary);
    font-weight: 800;
}

.sahaba-note i {
    color: var(--sahaba-accent);
    font-size: 1.4rem;
}

.sahaba-presentation-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.85fr);
    gap: 0.85rem;
    margin-top: 1rem;
}

.sahaba-presentation-image {
    min-height: 160px;
    margin: 0;
    border: 1px solid var(--sahaba-line);
    background: #fffdf8;
    overflow: hidden;
}

.sahaba-presentation-image-large {
    grid-row: span 2;
}

.sahaba-presentation-image img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: block;
    object-fit: cover;
    object-position: center;
}

.sahaba-program-band,
.sahaba-fees-band {
    padding: 4rem 0;
    background: var(--sahaba-primary);
    color: #fff;
}

.sahaba-program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.sahaba-program-card {
    min-height: 210px;
    padding: 1.5rem;
    background: var(--sahaba-primary);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.sahaba-program-card:first-child:last-child {
    max-width: 520px;
}

.sahaba-program-card span {
    color: var(--sahaba-accent);
}

.sahaba-program-card h3,
.sahaba-level-row h3,
.sahaba-class-card h3,
.sahaba-fee-card strong,
.sahaba-contact-grid strong {
    margin: 0.55rem 0;
    color: inherit;
    font-weight: 900;
}

.sahaba-program-card p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
}

.sahaba-section-head {
    max-width: 740px;
    margin-bottom: 1.75rem;
}

.sahaba-level-list {
    display: grid;
    border-top: 1px solid var(--sahaba-line);
}

.sahaba-level-row {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--sahaba-line);
}

.sahaba-level-index {
    width: 4.2rem;
    height: 4.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sahaba-secondary);
    color: var(--sahaba-primary);
    font-weight: 900;
}

.sahaba-level-row p,
.sahaba-class-card p,
.sahaba-fee-card p,
.sahaba-timeline p {
    margin: 0;
    color: var(--sahaba-muted);
    line-height: 1.6;
}

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

.sahaba-class-card,
.sahaba-contact-grid article,
.sahaba-empty-state {
    border: 1px solid var(--sahaba-line);
    background: rgba(255, 255, 255, 0.74);
    padding: 1.25rem;
    box-shadow: 0 16px 42px rgba(18, 61, 46, 0.07);
}

.sahaba-class-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.sahaba-class-meta small {
    color: var(--sahaba-primary);
    font-weight: 800;
}

.sahaba-class-meta strong {
    color: var(--sahaba-primary);
    white-space: nowrap;
}

.sahaba-empty-state {
    display: grid;
    gap: 0.5rem;
    color: var(--sahaba-primary);
}

.sahaba-empty-state i {
    color: var(--sahaba-accent);
    font-size: 2rem;
}

.sahaba-fees-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr) minmax(220px, 0.55fr);
    gap: 1rem;
    align-items: stretch;
}

.sahaba-fees-copy h2,
.sahaba-fees-copy p {
    color: #fff;
}

.sahaba-fees-copy .sahaba-kicker {
    color: var(--sahaba-accent);
}

.sahaba-fee-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.35rem;
    background: #fffdf8;
    color: var(--sahaba-primary);
}

.sahaba-fee-card strong {
    display: block;
    font-size: 2rem;
}

.sahaba-timeline {
    display: grid;
    gap: 1rem;
}

.sahaba-timeline article {
    border-left: 4px solid var(--sahaba-accent);
    padding: 0.25rem 0 0.25rem 1rem;
}

.sahaba-timeline span {
    color: var(--sahaba-accent);
    font-weight: 900;
}

.sahaba-timeline strong {
    display: block;
    color: var(--sahaba-primary);
    font-size: 1.1rem;
}

.sahaba-cta-panel {
    padding: 2rem;
    border: 0;
    background: var(--sahaba-secondary);
}

.sahaba-cta-light {
    background: var(--sahaba-primary);
}

.sahaba-secondary-dark {
    background: rgba(255, 255, 255, 0.72);
}

.sahaba-contact-grid article {
    min-height: 140px;
}

.sahaba-contact-grid strong {
    display: block;
    color: var(--sahaba-primary);
    overflow-wrap: anywhere;
}

.sahaba-footer {
    padding: 4rem 0 1.6rem;
    background: #0e2d23;
    color: rgba(255, 255, 255, 0.78);
}

.sahaba-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.55fr) minmax(180px, 0.75fr);
    gap: 2rem;
}

.sahaba-footer-brand,
.sahaba-footer-title {
    color: #fff;
    font-weight: 900;
}

.sahaba-footer-main p {
    max-width: 42rem;
    margin: 0.8rem 0 0;
    line-height: 1.7;
}

.sahaba-footer-list {
    display: grid;
    gap: 0.55rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.sahaba-footer-bottom {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.64);
}

.public-register-hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(180deg, #fbf7ed, #f5eddc);
}

.public-register-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 2rem;
    align-items: center;
}

.public-register-kicker {
    color: var(--sahaba-accent);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.public-register-hero h1,
.public-register-confirm h1 {
    color: var(--sahaba-primary);
    font-family: "Alegreya", serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

.public-register-hero p {
    color: var(--sahaba-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 720px;
}

.public-register-year {
    color: var(--sahaba-primary) !important;
    font-weight: 900;
}

.public-register-section {
    padding: 4rem 0 5rem;
    background: #f5eddc;
}

.public-register-card,
.public-choice-panel {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--sahaba-line);
    border-radius: 4px;
    box-shadow: var(--sahaba-shadow);
    padding: 2rem;
}

.public-register-card-soft span,
.public-register-reference span,
.public-form-section-heading span {
    color: var(--sahaba-accent);
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.public-register-card-soft strong,
.public-register-reference strong {
    color: var(--sahaba-primary);
    display: block;
    font-family: "Alegreya", serif;
    font-size: 2rem;
    line-height: 1;
    margin: 0.5rem 0;
}

.public-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.25rem;
}

.public-form-span {
    grid-column: 1 / -1;
}

.public-register-form label {
    color: var(--sahaba-primary);
    font-weight: 900;
}

.public-register-form .form-control,
.public-register-form .form-select {
    border-color: var(--sahaba-line);
    border-radius: 4px;
    min-height: 48px;
}

.public-program-card,
.public-old-student-search,
.public-form-grid-soft {
    border: 1px solid var(--sahaba-line);
    border-radius: 4px;
    background: color-mix(in srgb, var(--sahaba-secondary) 28%, #fff);
}

.public-old-student-search {
    padding: 1rem;
}

.public-old-student-results {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.public-old-student-item {
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--sahaba-line);
    border-radius: 4px;
    background: #fff;
    color: var(--sahaba-primary);
    text-align: left;
}

.public-old-student-item span {
    color: var(--sahaba-muted);
    font-size: 0.9rem;
}

.public-register-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.8rem;
}

.public-register-submit,
.public-register-link,
.public-register-add-program,
.public-program-remove {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 900;
    padding: 0.9rem 1.3rem;
    text-decoration: none;
}

.sahaba-body .public-register-submit,
.sahaba-body .public-register-submit:hover,
.sahaba-body .public-register-submit:focus,
.sahaba-body .public-register-add-program,
.sahaba-body .public-register-add-program:hover,
.sahaba-body .public-register-add-program:focus {
    border: 0;
    background: var(--sahaba-primary);
    color: #fff;
}

.public-register-link {
    color: var(--sahaba-primary);
}

.public-program-remove {
    border: 0;
    background: #fff7ed;
    color: #9a3412;
}

.public-register-confirm {
    min-height: 70vh;
}

.public-register-confirm-box {
    max-width: 760px;
    text-align: center;
}

.public-register-reference {
    max-width: 420px;
    margin: 1.5rem auto 0;
    padding: 1.4rem;
    border: 1px solid var(--sahaba-line);
    border-radius: 4px;
    background: #fff;
}

.public-register-reference-light {
    background: color-mix(in srgb, var(--sahaba-secondary) 34%, #fff);
}

.public-register-actions-center {
    justify-content: center;
}

.public-choice-panel,
.public-form-shell,
.public-old-flow {
    margin-bottom: 1.35rem;
}

.public-choice-intro h2,
.public-form-section-heading h2 {
    margin: 0.25rem 0 0.45rem;
    color: var(--sahaba-primary);
    font-family: "Alegreya", serif;
    font-size: 2.6rem;
    line-height: 1.02;
}

.public-choice-intro p,
.public-form-section-heading p {
    color: var(--sahaba-muted);
    max-width: 48rem;
}

.public-choice-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.public-choice-card {
    padding: 1.25rem;
    border: 1px solid var(--sahaba-line);
    border-radius: 4px;
    background: #fffdf8;
    color: var(--sahaba-primary);
    text-align: left;
    cursor: pointer;
}

.public-choice-card span {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sahaba-secondary);
    font-weight: 900;
}

.public-choice-card strong {
    display: block;
    margin-top: 0.8rem;
    font-size: 1.2rem;
}

.public-choice-card small {
    display: block;
    margin-top: 0.35rem;
    color: var(--sahaba-muted);
}

.public-choice-card.is-selected {
    border-color: var(--sahaba-primary);
    box-shadow: 0 18px 44px rgba(18, 61, 46, 0.16);
}

.public-form-section-heading {
    margin-bottom: 1.15rem;
}

.public-form-section-spacing {
    margin-top: 2rem;
}

.public-form-choice-hidden {
    display: none;
}

.public-form-grid-soft {
    padding: 1rem;
}

.public-old-student-empty,
.public-old-student-selected {
    padding: 0.8rem 1rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--sahaba-primary);
    font-weight: 900;
}

.public-register-form input[readonly] {
    opacity: 0.88;
    cursor: not-allowed;
}

@media (max-width: 991.98px) {
    .sahaba-hero-grid,
    .sahaba-about,
    .sahaba-calendar,
    .sahaba-cta-panel,
    .sahaba-fees-grid,
    .sahaba-footer-grid,
    .public-register-hero-grid {
        grid-template-columns: 1fr;
    }

    .sahaba-program-grid,
    .sahaba-class-grid,
    .sahaba-contact-grid,
    .sahaba-presentation-gallery {
        grid-template-columns: 1fr;
    }

    .sahaba-presentation-image-large {
        grid-row: auto;
    }

    .sahaba-display {
        font-size: 4rem;
    }

    .sahaba-about h2,
    .sahaba-section-head h2,
    .sahaba-fees-copy h2,
    .sahaba-calendar h2,
    .sahaba-cta-panel h2,
    .public-register-hero h1,
    .public-register-confirm h1 {
        font-size: 2.7rem;
    }
}

@media (max-width: 640px) {
    .sahaba-nav {
        min-height: 76px;
    }

    .sahaba-hero {
        padding: 3.5rem 0 3rem;
    }

    .sahaba-display {
        font-size: 3.05rem;
    }

    .sahaba-section {
        padding-block: 3.25rem;
    }

    .sahaba-level-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .sahaba-class-meta,
    .sahaba-hero-facts article {
        align-items: flex-start;
        flex-direction: column;
    }

    .sahaba-hero-facts strong {
        text-align: left;
    }

    .public-form-grid,
    .public-choice-cards {
        grid-template-columns: 1fr;
    }

    .public-register-card,
    .public-choice-panel {
        padding: 1.15rem;
    }
}
