:root {
    --background: #f5f6f7;
    --surface: #ffffff;
    --surface-soft: #eef1f3;

    --text: #17212b;
    --text-soft: #64717c;
    --text-light: #8a959d;

    --primary: #173f5f;
    --primary-dark: #102f47;
    --accent: #d96c4f;

    --border: #dfe4e7;

    --shadow-small: 0 2px 8px rgba(23, 33, 43, 0.06);
    --shadow-medium: 0 8px 24px rgba(23, 33, 43, 0.10);

    --radius-small: 10px;
    --radius-medium: 16px;
    --radius-large: 22px;

    --header-height: 68px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;

    background: var(--background);
    color: var(--text);

    line-height: 1.55;

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    height: var(--header-height);

    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    width: 100%;
    max-width: 1100px;
    height: 100%;

    margin: 0 auto;
    padding: 0 20px;

    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
}


/* Back button */

.header-back {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    color: var(--text);
}

.back-arrow {
    font-size: 27px;
    line-height: 1;
    font-weight: 300;
}


/* Empty space when no back button */

.header-spacer {
    width: 42px;
    height: 42px;
}


/* Brand */

.header-brand {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    color: var(--text);
    font-weight: 700;
}

.header-logo {
    width: 30px;
    height: 30px;

    object-fit: contain;
}

.header-title {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 15px;
    letter-spacing: -0.01em;
}


/* Hamburger */

.menu-button {
    width: 42px;
    height: 42px;

    padding: 9px 7px;

    border: 0;
    background: transparent;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 5px;

    cursor: pointer;
}

.menu-button span {
    display: block;

    width: 100%;
    height: 2px;

    background: var(--text);

    border-radius: 2px;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


/* =========================================================
   SIDE MENU
   ========================================================= */

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;

    background: rgba(15, 25, 33, 0.42);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1200;

    width: min(88vw, 390px);
    height: 100vh;
    height: 100dvh;

    display: flex;
    flex-direction: column;

    background: var(--surface);

    box-shadow: -12px 0 40px rgba(23, 33, 43, 0.16);

    transform: translateX(100%);

    transition: transform 0.28s ease;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
}

body.menu-open .side-menu {
    transform: translateX(0);
}


/* Menu header */

.side-menu-header {
    min-height: var(--header-height);

    padding: 0 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);

    color: var(--text-soft);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.menu-close {
    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;
    background: transparent;

    color: var(--text);

    font-size: 32px;
    font-weight: 200;
    line-height: 1;

    cursor: pointer;
}


/* Menu links */

.side-menu-nav {
    padding: 12px 0;

    overflow-y: auto;
}

.menu-link {
    min-height: 62px;

    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(223, 228, 231, 0.7);

    color: var(--text);

    font-size: 17px;
    font-weight: 600;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.menu-link:hover,
.menu-link:focus {
    background: var(--surface-soft);
}

.menu-link span:last-child {
    color: var(--text-light);

    font-size: 20px;
    font-weight: 300;
}

.menu-link-primary {
    color: var(--primary);
}

.menu-divider {
    height: 18px;
}


/* Menu footer */

.side-menu-footer {
    margin-top: auto;

    padding: 20px 24px 28px;

    color: var(--text-light);

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    padding: 0 20px;
}


/* =========================================================
   TYPOGRAPHY
   ========================================================= */

.eyebrow {
    margin: 0;

    color: var(--accent);

    font-size: 11px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--text);
}

h2 {
    font-size: clamp(27px, 5vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

h3 {
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}


/* =========================================================
   HOME – HERO
   ========================================================= */

.home-hero {
    padding: 12px 10px 8px;

    text-align: center;
}

.home-hero .eyebrow {
    margin-bottom: 12px;

    text-align: center;
}

.home-hero h1 {
    margin: 0 0 8px;

    color: var(--primary);

    font-size: 42px;
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-weight: 750;

    text-align: center;
}

.home-date {
    margin: 0;

    color: var(--text-soft);

    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;

    text-align: center;
}


/* =========================================================
   HOME – PROGRAM
   ========================================================= */

.home-program {
    max-width: 760px;

    margin: 0 auto;
    padding-top: 8px;
}

.program-panel {
    display: block;

    padding: 18px 20px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    box-shadow: var(--shadow-medium);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.program-panel:hover {
    transform: translateY(-2px);

    box-shadow: 0 12px 30px rgba(23, 33, 43, 0.13);
}

.program-panel-label {
    margin-bottom: 5px;

    color: var(--accent);

    font-size: 10px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.program-time {
    margin-bottom: 5px;

    color: var(--text-light);

    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
}

.program-current h3,
.program-next h3 {
    margin: 0 0 3px;

    color: var(--text);

    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.program-current p,
.program-next p {
    margin: 0;

    color: var(--text-soft);

    font-size: 14px;
}

.program-divider {
    height: 1px;

    margin: 16px 0;

    background: var(--border);
}

.program-panel-footer {
    margin-top: 16px;
    padding-top: 13px;

    border-top: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--primary);

    font-size: 14px;
    font-weight: 700;
}

.program-arrow {
    font-size: 22px;
    font-weight: 300;
}


/* =========================================================
   HOME – ICON LINKS
   ========================================================= */

.home-links {
    max-width: 760px;

    margin: 20px auto 0;

    display: grid;
    grid-template-columns: repeat(5, 1fr);

    background: transparent;
}

.home-link {
    min-height: 88px;

    padding: 12px 6px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    background: var(--background);

    border: 0;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.home-link:hover {
    background: var(--surface-soft);
}


/*
 * Desktop: remove the right border
 * from the final item in each row.
 */

.home-link:nth-child(5n) {
    border-right: 0;
}


.home-link-icon {
    width: 29px;
    height: 29px;

    margin-bottom: 6px;

    color: var(--primary);
}

.home-link-icon svg {
    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-link-icon .icon-fill {
    fill: currentColor;
    stroke: none;
}

.home-link-label {
    color: var(--text);

    font-size: 11px;
    line-height: 1.25;
    font-weight: 650;
}


/* =========================================================
   HOME – OTHER SECTIONS
   ========================================================= */

.home-section {
    margin-top: 18px;
    padding-top: 38px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 5px 0 0;
}


/* =========================================================
   GENERAL CARDS
   ========================================================= */

.feature-card,
.info-card,
.secondary-link-card {
    position: relative;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    box-shadow: var(--shadow-small);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.feature-card:hover,
.info-card:hover,
.secondary-link-card:hover {
    transform: translateY(-2px);

    border-color: #cbd3d8;

    box-shadow: var(--shadow-medium);
}

.feature-card:active,
.info-card:active,
.secondary-link-card:active {
    transform: translateY(0);
}


/* Large feature card */

.feature-card {
    min-height: 150px;

    margin-bottom: 14px;
    padding: 24px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    text-align: left;
}

.feature-card-content {
    flex: 1;
}

.feature-card h3 {
    margin: 7px 0 8px;
}

.feature-card p {
    max-width: 650px;

    margin: 0;

    color: var(--text-soft);

    font-size: 15px;
}


/* Smaller cards */

.info-card {
    min-height: 150px;

    padding: 21px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    text-align: left;
}

.info-card h3 {
    margin: 8px 0 20px;
}

.info-card .card-arrow {
    align-self: flex-end;
}


/* Secondary card */

.secondary-link-card {
    min-height: 92px;

    padding: 21px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    text-align: left;
}

.secondary-link-card h3 {
    margin: 5px 0 0;
}


/* Card label */

.card-label {
    display: block;

    color: var(--text-light);

    font-size: 10px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.12em;
}


/* Arrow */

.card-arrow {
    flex: 0 0 auto;

    color: var(--primary);

    font-size: 25px;
    font-weight: 300;
    line-height: 1;
}


/* Home grid */

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;

    align-items: stretch;
}


/* =========================================================
   CONTENT PAGES
   ========================================================= */

.page-intro {
    max-width: 760px;

    padding: 48px 0 34px;
}

.page-intro h1 {
    margin: 7px 0 14px;

    color: var(--primary);

    font-size: clamp(38px, 8vw, 60px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.page-intro p:last-child {
    margin-bottom: 0;

    color: var(--text-soft);

    font-size: 17px;
    line-height: 1.6;
}

.page-section {
    margin-top: 5px;
}


/* =========================================================
   MESSAGES
   ========================================================= */

.message {
    margin: 20px 0;
    padding: 18px 20px;

    background: var(--surface-soft);

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    color: var(--text-soft);

    font-size: 15px;
}


/* =========================================================
   IMAGES
   ========================================================= */

.full-width-image {
    width: 100%;
    height: auto;

    border-radius: var(--radius-medium);

    box-shadow: var(--shadow-small);
}


/* =========================================================
   INSTALL CARD
   ========================================================= */

.install-card {
    width: 100%;

    margin: 20px 0;
    padding: 18px;

    display: flex;
    align-items: center;
    gap: 15px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    box-shadow: var(--shadow-small);

    color: var(--text);

    text-align: left;

    cursor: pointer;
}

.install-card img {
    width: 44px;
    height: 44px;

    flex: 0 0 auto;

    border-radius: 10px;
}


/* =========================================================
   FOCUS
   ========================================================= */

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(217, 108, 79, 0.35);
    outline-offset: 3px;
}


/* =========================================================
   RESPONSIVE – TABLET
   ========================================================= */

@media (min-width: 700px) {

    .main-content {
        padding-left: 32px;
        padding-right: 32px;
    }

    .home-hero {
        padding-top: 90px;
        padding-bottom: 75px;
    }

    .home-section {
        margin-top: 30px;
        padding-top: 48px;
    }

    .feature-card {
        padding: 30px;
    }

    .info-card {
        padding: 26px;
    }

    .page-intro {
        padding-top: 65px;
        padding-bottom: 45px;
    }
}


/* =========================================================
   RESPONSIVE – MOBILE
   ========================================================= */

@media (max-width: 600px) {

    :root {
        --header-height: 62px;
    }

    .header-inner {
        padding-left: 14px;
        padding-right: 14px;

        grid-template-columns: 42px 1fr 42px;
    }

    .header-title {
        font-size: 14px;
    }

    .header-logo {
        width: 27px;
        height: 27px;
    }

    .main-content {
        padding-left: 16px;
        padding-right: 16px;
    }


    /* Home */

    .home-hero {
        padding-top: 10px;
        padding-bottom: 6px;
    }

    .home-hero h1 {
        font-size: 36px;
    }

    .home-date {
        font-size: 13px;
    }

    .home-program {
        padding-top: 6px;
    }

    .program-panel {
        padding: 16px 18px;
    }


    /* Icon links */

    .home-links {
        grid-template-columns: repeat(3, 1fr);

        margin-top: 18px;
    }

    .home-link {
        min-height: 78px;
    }


    /*
     * Reset the desktop 5-column rules.
     */

    .home-link:nth-child(5n) {
        border-right: 1px solid var(--border);
    }

    /*
     * Every third item is the last item
     * in its mobile row.
     */

    .home-link:nth-child(3n) {
        border-right: 0;
    }

    /*
     * Remove the bottom line from the final
     * three actual items.
     */

    .home-link:nth-last-child(-n + 3) {
        border-bottom: 0;
    }


    /* General pages */

    .home-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 135px;
        padding: 20px;
    }

    .info-card {
        min-height: 130px;
    }

    .page-intro {
        padding-top: 38px;
        padding-bottom: 28px;
    }

    .page-intro h1 {
        font-size: 43px;
    }

    .page-intro p:last-child {
        font-size: 16px;
    }

    .side-menu {
        width: min(92vw, 390px);
    }
}


/* =========================================================
   RESPONSIVE – VERY SMALL PHONES
   ========================================================= */

@media (max-width: 400px) {

    .home-links {
        grid-template-columns: repeat(2, 1fr);
    }


    /*
     * Reset the mobile 3-column rules.
     */

    .home-link:nth-child(3n) {
        border-right: 1px solid var(--border);
    }

    /*
     * Every second item is the last item
     * in its row.
     */

    .home-link:nth-child(2n) {
        border-right: 0;
    }

    /*
     * Remove the bottom line from the final
     * two actual items.
     */

    .home-link:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    /*
     * Five items means the fifth item spans
     * the remaining full row.
     */

    .home-link:nth-child(5) {
        grid-column: span 2;

        border-right: 0;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* =========================================================
   HOME – REMOVE BOTTOM GAP
   ========================================================= */

body:has(.home-hero) .main-content {
    padding-bottom: 0;
}

body:has(.home-hero) .home-links {
    margin-bottom: 0;
}

body:has(.home-hero) .home-links:last-child {
    margin-bottom: 0;
}