﻿:root {
    --bg-0: #ecf2f4;
    --bg-1: #d7e4e8;
    --surface: #ffffff;
    --surface-soft: #f4f8fa;
    --text: #15242b;
    --muted: #4b5f69;
    --brand: #0b4d53;
    --brand-strong: #07383d;
    --accent: #d3872f;
    --danger: #9d2f36;
    --border: #c7d7dd;
    --ring: #ffbf69;
    --shadow: 0 18px 40px -24px rgba(5, 27, 34, 0.35);
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    line-height: 1.5;
    font-family: "Aptos", "Segoe UI", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(11, 77, 83, 0.2), transparent 40%),
        radial-gradient(circle at 90% 20%, rgba(211, 135, 47, 0.16), transparent 35%),
        linear-gradient(170deg, var(--bg-0), var(--bg-1));
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.page-shell {
    width: min(1100px, 92vw);
    margin: clamp(1rem, 2.2vw, 2rem) auto 2.4rem;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 0.65rem 1rem;
    border-radius: 0 0 10px 10px;
    background: var(--brand-strong);
    color: #ffffff;
    text-decoration: none;
}

.skip-link:focus {
    left: 0.8rem;
}

.hero-panel,
.status-panel,
.calendar-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    animation: rise-in 480ms ease-out both;
}

.status-panel {
    animation-delay: 80ms;
}

.calendar-panel {
    animation-delay: 160ms;
    content-visibility: auto;
    contain-intrinsic-size: 700px;
}

.hero-panel {
    padding: clamp(1.2rem, 2.4vw, 2rem);
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--brand);
    font-weight: 700;
    font-size: 0.83rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 1.4rem;
    align-items: center;
}

.hero-copy h1 {
    margin: 0;
    line-height: 1.1;
    font-size: clamp(1.85rem, 3.5vw, 3rem);
    font-family: "Bahnschrift", "Segoe UI Semibold", "Segoe UI", Arial, sans-serif;
}

.hero-subtitle {
    margin: 0.95rem 0 1.2rem;
    max-width: 62ch;
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: linear-gradient(145deg, #e7f1f4, #f8fbfc);
}

.logo-card .hero-media,
.logo-card img {
    width: 100%;
    max-width: 360px;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 12px 24px -16px rgba(3, 35, 40, 0.45);
    background: #d9e6eb;
}

.status-panel,
.calendar-panel {
    margin-top: 1rem;
    padding: clamp(1rem, 2vw, 1.5rem);
}

.status-panel h2,
.calendar-header h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-family: "Bahnschrift", "Segoe UI Semibold", "Segoe UI", Arial, sans-serif;
}

#nextPayMessage {
    margin: 0.9rem 0 0;
    padding: 0.9rem 1rem;
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    background: var(--surface-soft);
    text-wrap: balance;
}

#nextPayMessage ul {
    margin: 0.55rem 0 0;
    padding-left: 1.2rem;
}

#nextPayMessage li + li {
    margin-top: 0.35rem;
}

.btn {
    border: 0;
    border-radius: 999px;
    min-height: 44px;
    padding: 0.72rem 1.15rem;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 10px 20px -15px rgba(7, 56, 61, 0.65);
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--brand-strong);
    background: #e4eff2;
}

.btn-secondary:hover {
    background: #d7e7ec;
    transform: translateY(-1px);
}

.calendar-header p {
    margin: 0.45rem 0 0;
    color: var(--muted);
}

.table-wrap {
    margin-top: 1rem;
    overflow: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: #ffffff;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.86rem 1rem;
    text-align: left;
    color: #ffffff;
    background: var(--brand);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

tbody th,
tbody td {
    padding: 0.78rem 1rem;
    border-bottom: 1px solid #e3ecef;
    text-align: left;
}

tbody th {
    font-weight: 600;
    color: #1e3440;
}

tbody tr:nth-child(even) {
    background: #f7fbfc;
}

tbody tr:hover {
    background: #ecf5f8;
}

.calendar-actions {
    margin-top: 1rem;
}

.red-bold {
    color: var(--danger);
    font-weight: 700;
}

.hidden {
    display: none !important;
}

.site-footer {
    margin-top: 1rem;
    color: #51626c;
    font-size: 0.92rem;
    text-align: center;
}

.site-footer a {
    color: var(--brand-strong);
    font-weight: 600;
}

.site-footer a:hover {
    color: var(--brand);
}

.hero-panel-compact {
    margin-bottom: 1rem;
}

.policy-panel {
    margin-top: 1rem;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.policy-panel h2 {
    margin: 0;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-family: "Bahnschrift", "Segoe UI Semibold", "Segoe UI", Arial, sans-serif;
}

.policy-list {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
}

.policy-list li + li {
    margin-top: 0.35rem;
}

.btn-inline {
    width: auto;
}

.noscript-msg {
    margin: 1rem auto;
    width: min(1100px, 92vw);
    border: 1px solid #f3cf9a;
    border-radius: 12px;
    background: #fff4e4;
    color: #553106;
    padding: 0.8rem 1rem;
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .hero-copy {
        order: 1;
    }

    .logo-card {
        order: 2;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(1100px, 94vw);
    }

    .btn {
        width: 100%;
    }

    table {
        min-width: 560px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .logo-card .hero-media {
        animation: none !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --border: #819aa3;
        --muted: #324b57;
        --surface-soft: #eef4f7;
    }

    .hero-panel,
    .status-panel,
    .calendar-panel {
        box-shadow: none;
    }

    thead th {
        background: #083b40;
    }
}
