:root {
    color-scheme: light;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #183432;
    background: #f4f8f7;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --ink: #183432;
    --muted: #718581;
    --teal: #287d73;
    --teal-dark: #1e625b;
    --mint: #e4f1ed;
    --line: #e5eeeb;
    --card: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(215, 237, 230, 0.55), transparent 38rem),
        #f4f8f7;
}

button {
    font: inherit;
}

.page-shell {
    width: min(100% - 40px, 920px);
    margin: 0 auto;
}

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header {
    min-height: 78px;
    border-bottom: 1px solid rgba(24, 52, 50, 0.08);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 720;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.wordmark-mark {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--mint);
    color: var(--teal);
    font-size: 25px;
    line-height: 1;
}

.location-label,
.eyebrow {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.location-label {
    margin: 0;
    font-size: 10px;
}

.header-subscribe {
    display: flex;
    width: min(100%, 290px);
    gap: 7px;
}

.header-subscribe input,
.header-subscribe button {
    min-height: 34px;
    border: 1px solid #dfe8e4;
    border-radius: 7px;
    background: #edf2f0;
    color: #84938f;
    font: inherit;
    font-size: 11px;
}

.header-subscribe input {
    min-width: 0;
    flex: 1;
    padding: 0 10px;
}

.header-subscribe input::placeholder {
    color: #97a49f;
}

.header-subscribe button {
    padding: 0 11px;
    background: #e4ebe8;
    font-weight: 600;
    white-space: nowrap;
}

.header-subscribe input:disabled,
.header-subscribe button:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.intro {
    padding: 62px 0 27px;
    text-align: center;
}

.intro .eyebrow,
.status-content .eyebrow,
.section-heading .eyebrow {
    margin: 0 0 10px;
}

.intro h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(34px, 6vw, 50px);
    font-weight: 650;
    letter-spacing: -0.065em;
    line-height: 1.08;
}

.intro-copy {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.refresh-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
}

.refresh-note {
    color: var(--muted);
    font-size: 12px;
}

.refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #d7e6e1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--teal-dark);
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    transition: background 150ms ease, border-color 150ms ease;
}

.refresh-button:hover {
    border-color: #b8d4cc;
    background: #fff;
}

.refresh-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.refresh-loading {
    display: none;
    color: var(--muted);
    font-weight: 500;
}

.refresh-button.htmx-request .refresh-loading {
    display: inline;
}

.refresh-button.htmx-request .refresh-label,
.refresh-button.htmx-request > span[aria-hidden="true"] {
    display: none;
}

.loading-dots::after {
    content: ".";
    animation: loading-dots 1.2s steps(1, end) infinite;
}

@keyframes loading-dots {
    0%,
    24% {
        content: ".";
    }

    25%,
    49% {
        content: "..";
    }

    50%,
    74% {
        content: "...";
    }

    75%,
    100% {
        content: "";
    }
}

.status-card {
    position: relative;
    display: flex;
    min-height: 230px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 38px 24px;
    border: 1px solid rgba(24, 52, 50, 0.05);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 14px 40px rgba(36, 75, 67, 0.055);
    text-align: center;
}

.status-orbit,
.status-orbit-inner {
    position: absolute;
    width: 196px;
    height: 196px;
    border: 1px solid rgba(40, 125, 115, 0.07);
    border-radius: 50%;
}

.status-orbit {
    top: -119px;
    right: -74px;
}

.status-orbit-inner {
    top: 18px;
    left: 18px;
    width: 158px;
    height: 158px;
}

.status-orbit-dot {
    position: absolute;
    top: 42px;
    left: 36px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a7d9ca;
    box-shadow: 0 0 18px 5px rgba(119, 200, 178, 0.16);
}

.status-content {
    position: relative;
    max-width: 580px;
}

.status-content h2 {
    margin: 0;
    font-size: clamp(34px, 6vw, 46px);
    font-weight: 650;
    letter-spacing: -0.06em;
    line-height: 1.12;
}

.status-detected {
    color: var(--teal-dark);
}

.status-quiet {
    color: #526966;
}

.status-description {
    margin: 12px 0 0;
    color: #667c78;
    font-size: 14px;
    line-height: 1.6;
}

.status-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.legend-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #54a58e;
}

.timeline-section {
    margin-top: 22px;
    padding: 29px 32px 30px;
    border: 1px solid rgba(24, 52, 50, 0.05);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 14px 40px rgba(36, 75, 67, 0.04);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 21px;
    border-bottom: 1px solid var(--line);
}

.section-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.04em;
}

.timeline-year {
    margin: 20px 0 0;
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.timeline-key {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
}

.timeline {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-item {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(100px, 1.5fr) 48px;
    align-items: center;
    gap: 20px;
    min-height: 61px;
    border-bottom: 1px solid #eff3f2;
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-date {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 9px;
}

.timeline-day {
    color: #304c48;
    font-size: 13px;
    font-weight: 600;
}

.timeline-status {
    font-size: 10px;
    font-weight: 650;
}

.timeline-status.confirmed {
    color: var(--teal);
}

.timeline-status.potential {
    color: #9a8a5c;
}

.confidence-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf3f1;
}

.confidence-fill {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, #82c7ae, #388d7d);
}

.confidence-value {
    color: #607873;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.empty-state {
    display: grid;
    min-height: 180px;
    align-content: center;
    justify-items: center;
    color: var(--muted);
    text-align: center;
}

.empty-state-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #f0f6f4;
    color: #79a99d;
    font-size: 17px;
}

.empty-state p {
    margin: 12px 0 5px;
    color: #49625e;
    font-size: 13px;
    font-weight: 600;
}

.empty-state > span:last-child {
    font-size: 12px;
}

.site-footer {
    min-height: 82px;
    color: #8a9a96;
    font-size: 11px;
}

@media (max-width: 600px) {
    .page-shell {
        width: min(100% - 28px, 920px);
    }

    .site-header {
        min-height: 66px;
    }

    .intro {
        padding: 48px 0 23px;
    }

    .refresh-row {
        align-items: flex-start;
    }

    .refresh-note {
        max-width: 130px;
        padding-top: 5px;
        line-height: 1.5;
    }

    .status-card {
        min-height: 215px;
        padding: 30px 18px;
    }

    .status-legend {
        max-width: 290px;
    }

    .timeline-section {
        padding: 24px 18px;
    }

    .timeline-item {
        grid-template-columns: minmax(125px, 1fr) minmax(52px, 0.7fr) 36px;
        gap: 10px;
    }

    @media (max-width: 420px) {
        .site-header {
            flex-wrap: wrap;
            gap: 10px;
            padding: 10px 0;
        }

        .header-subscribe {
            width: 100%;
            justify-content: flex-end;
        }
    }

    .timeline-date {
        gap: 5px;
    }

    .timeline-day {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
