:root {
    --user-bg: #f5f8fc;
    --user-surface: #ffffff;
    --user-border: #dce7f5;
    --user-ink: #102033;
    --user-text: #172033;
    --user-muted: #64748b;
    --user-primary: #135bb8;
    --user-primary-dark: #0b3678;
    --user-primary-soft: #e8f2ff;
    --user-accent: #009eb3;
    --user-radius: 10px;
    --user-shadow: 0 14px 34px rgba(16, 63, 128, .08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

body {
    margin: 0;
    padding-top: 70px;
    background: var(--user-bg);
    color: var(--user-text);
    font-family: Poppins, system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

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

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--user-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    isolation: isolate;
}

.header-inner {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    color: var(--user-primary-dark);
    font-weight: 600;
    transform: translateZ(0);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--user-primary);
    color: #fff;
    font-size: 13px;
}

.brand-logo {
    width: auto;
    max-width: 160px;
    height: 44px;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a,
.main-nav button {
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #44546b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.main-nav a:hover,
.main-nav button:hover {
    background: var(--user-primary-soft);
    color: var(--user-primary);
}

.program-choice-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, .34);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.program-choice-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.program-choice-dialog {
    position: relative;
    width: min(620px, 100%);
    padding: 22px;
    border: 1px solid var(--user-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(15, 40, 85, .24);
}

.program-choice-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--user-border);
    border-radius: 999px;
    background: #fff;
    color: #102033;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.program-choice-close:hover {
    border-color: rgba(19, 91, 184, .24);
    background: var(--user-primary-soft);
    color: var(--user-primary);
}

.program-choice-close img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.program-choice-kicker {
    display: none;
    margin-bottom: 8px;
    color: #087f5b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.program-choice-dialog h2 {
    margin: 0;
    color: var(--user-ink);
    padding-right: 44px;
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.18;
}

.program-choice-dialog p {
    max-width: 460px;
    margin: 8px 0 16px;
    color: var(--user-muted);
    font-size: 13px;
    line-height: 1.55;
}

.program-choice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.program-choice-card {
    min-height: 102px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 0;
    border: 1px solid var(--user-border);
    border-radius: 8px;
    background: #f8fbff;
    color: var(--user-ink);
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.program-choice-card img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 102px;
    object-fit: cover;
}

.program-choice-card strong {
    padding: 20px;
    color: var(--user-primary-dark);
    font-size: 18px;
}

.program-choice-card span {
    color: var(--user-muted);
    font-size: 13px;
}

.program-choice-card:hover {
    border-color: rgba(19, 91, 184, .45);
    box-shadow: 0 16px 34px rgba(19, 91, 184, .14);
    transform: translateY(-1px);
}

body.program-choice-open {
    overflow: hidden;
}

body.program-choice-open .site-header {
    z-index: 90;
}

.header-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.desktop-share-toggle {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--user-primary);
    font-family: inherit;
    cursor: pointer;
}

.desktop-share-toggle img {
    width: auto;
    height: 24px;
    max-width: 82px;
    display: block;
    object-fit: contain;
}

.desktop-share-toggle:hover {
    background: var(--user-primary-soft);
}

.mobile-header-actions,
.mobile-menu-toggle,
.mobile-share-toggle,
.mobile-share-panel,
.mobile-header-menu,
.mobile-menu-backdrop {
    display: none;
}

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid var(--user-primary);
    border-radius: 8px;
    background: var(--user-primary);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn.secondary {
    background: #fff;
    color: var(--user-primary);
}

.mobile-share-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 82;
    width: min(330px, calc(100vw - 48px));
    padding: 12px 10px;
    border: 1px solid var(--user-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
    transform: translate3d(0, -4px, 0);
    will-change: transform, opacity;
    contain: layout paint;
}

.mobile-share-panel.is-open {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
    transform: translate3d(0, 0, 0);
}

.mobile-share-panel button {
    min-width: 0;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

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

.mobile-share-panel img {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

.mobile-share-panel span {
    max-width: 100%;
    display: block;
    overflow: hidden;
    color: #2f3b4c;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-share-toast {
    grid-column: 1 / -1;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #e8f8f1;
    color: #087047;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease, max-height .18s ease, padding .18s ease;
}

.mobile-share-toast.is-visible {
    max-height: 42px;
    padding: 7px 10px;
    opacity: 1;
    transform: translateY(0);
}

.mobile-share-toast.is-error {
    background: #fff1f2;
    color: #be123c;
}

.site-footer {
    padding: 44px 0 92px;
    background: #0b3678;
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(180px, .38fr) minmax(320px, .8fr);
    gap: 46px;
    align-items: start;
}

.footer-brand {
    display: grid;
    gap: 10px;
}

.footer-logo {
    width: auto;
    max-width: 260px;
    max-height: 104px;
    display: block;
    object-fit: contain;
    object-position: left center;
}

.footer-menu-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.footer-menu {
    display: grid;
    gap: 8px;
}

.footer-menu a {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.footer-menu a:hover {
    color: #b8dcff;
}

.site-footer h3,
.site-footer p {
    margin: 0 0 8px;
}

.site-footer h3 {
    font-size: 16px;
    line-height: 1.35;
}

.site-footer strong {
    font-size: 14px;
}

.site-footer .muted {
    color: rgba(255,255,255,.72);
}

.footer-credit {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.18);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

.footer-credit a {
    color: #b8dcff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 920px) {
    .site-header {
        z-index: 90;
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .header-inner {
        min-height: 58px;
        justify-content: space-between;
        gap: 12px;
        width: min(100%, calc(100% - 48px));
    }

    .brand-logo {
        width: auto;
        max-width: 136px;
        height: 36px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .main-nav,
    .header-action {
        display: none;
    }

    .mobile-header-actions {
        display: inline-flex;
        align-items: center;
        gap: 20px;
        margin-left: auto;
    }

    .mobile-menu-toggle,
    .mobile-share-toggle {
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--user-primary);
        font-family: inherit;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
    }

    .mobile-share-toggle img,
    .mobile-menu-toggle img {
        width: auto;
        height: 34px;
        display: block;
        object-fit: contain;
    }

    .mobile-share-toggle img {
        height: 21px;
    }

    main,
    .site-footer,
    .user-mobile-footer {
        transition: filter .2s ease, opacity .2s ease;
    }

    body.mobile-menu-open main,
    body.mobile-menu-open .site-footer,
    body.mobile-menu-open .user-mobile-footer,
    body.mobile-share-open main,
    body.mobile-share-open .site-footer,
    body.mobile-share-open .user-mobile-footer {
        filter: blur(4px);
        opacity: .8;
        pointer-events: none;
        user-select: none;
    }

    body.program-choice-open .user-mobile-footer {
        z-index: 90;
    }

    .program-choice-modal {
        place-items: center;
        padding: 74px 24px 78px;
    }

    .program-choice-dialog {
        width: min(340px, 100%);
        padding: 18px;
        border-radius: 12px;
    }

    .program-choice-dialog h2 {
        padding-right: 40px;
        font-size: 21px;
    }

    .program-choice-dialog p {
        margin-bottom: 14px;
        font-size: 12px;
    }

    .program-choice-actions {
        grid-template-columns: 1fr;
    }

    .program-choice-card {
        min-height: 86px;
        padding: 0;
    }

    .program-choice-card img {
        min-height: 86px;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 58px 0 0;
        z-index: 55;
        display: block;
        background: rgba(15, 23, 42, .14);
        backdrop-filter: blur(7px);
        -webkit-backdrop-filter: blur(7px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .18s ease;
    }

    .mobile-menu-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-header-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 80;
        width: min(328px, calc(100vw - 48px));
        padding: 12px;
        border: 1px solid var(--user-border);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
    }

    .mobile-header-menu.is-open {
        display: grid;
        gap: 12px;
    }

    .mobile-menu-head {
        padding: 4px 42px 0 4px;
    }

    .mobile-menu-close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--user-border);
        border-radius: 999px;
        background: #fff;
        color: #102033;
        cursor: pointer;
        box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    }

    .mobile-menu-close:hover {
        border-color: rgba(19, 91, 184, .24);
        background: var(--user-primary-soft);
        color: var(--user-primary);
    }

    .mobile-menu-close svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.5;
        stroke-linecap: round;
    }

    .mobile-menu-close img {
        width: 22px;
        height: 22px;
        display: block;
        object-fit: contain;
    }

    .mobile-menu-head span {
        display: block;
        color: var(--user-primary-dark);
        font-size: 13px;
        font-weight: 800;
    }

    .mobile-menu-head p {
        margin: 2px 0 0;
        color: var(--user-muted);
        font-size: 11px;
        line-height: 1.45;
    }

    .mobile-menu-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-menu-card {
        min-height: 86px;
        display: grid;
        align-content: start;
        gap: 4px;
        padding: 11px;
        border: 1px solid #dce7f5;
        border-radius: 13px;
        background: linear-gradient(180deg, #f8fbff, #fff);
        color: #102033;
        font: inherit;
        text-align: left;
        cursor: pointer;
    }

    .mobile-menu-card:hover {
        border-color: rgba(19, 91, 184, .32);
        background: var(--user-primary-soft);
        color: var(--user-primary-dark);
    }

    .mobile-menu-icon,
    .mobile-menu-mini {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--user-primary);
    }

    .mobile-menu-icon {
        width: 28px;
        height: 28px;
        border-radius: 10px;
        background: #e8f2ff;
    }

    .mobile-menu-icon svg,
    .mobile-menu-mini svg,
    .mobile-menu-icon img,
    .mobile-menu-mini img {
        width: 17px;
        height: 17px;
    }

    .mobile-menu-icon svg,
    .mobile-menu-mini svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-menu-icon img,
    .mobile-menu-mini img {
        display: block;
        object-fit: contain;
    }

    .mobile-menu-card strong {
        color: inherit;
        font-size: 12px;
        line-height: 1.2;
    }

    .mobile-menu-card small {
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.25;
    }

    .mobile-menu-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        padding: 6px;
        border-radius: 13px;
        background: #f8fbff;
    }

    .mobile-menu-list a,
    .mobile-menu-list button {
        width: 100%;
        min-height: 36px;
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 8px 7px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #334155;
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }

    .mobile-menu-list a:hover,
    .mobile-menu-list button:hover {
        background: var(--user-primary-soft);
        color: var(--user-primary);
    }

    .mobile-menu-mini {
        width: 25px;
        height: 25px;
        flex: 0 0 auto;
        border-radius: 9px;
        background: #fff;
    }

    .mobile-menu-login {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--user-primary);
        border-radius: 12px;
        background: var(--user-primary);
        color: #fff;
        font-size: 13px;
        font-weight: 800;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .footer-menu-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 122px;
    }

    body {
        padding-top: 58px;
    }

    .container {
        width: min(1120px, calc(100% - 48px));
    }

    .site-footer {
        padding: 34px 0 calc(126px + env(safe-area-inset-bottom));
    }

    .footer-grid {
        gap: 24px;
    }

    .footer-brand {
        gap: 9px;
    }

    .footer-logo {
        max-width: 220px;
        max-height: 92px;
    }

    .footer-menu-groups {
        gap: 14px;
    }

    .footer-menu a {
        font-size: 13px;
        line-height: 1.45;
    }

    .footer-credit {
        margin-top: 18px;
        font-size: 12px;
    }
}
