:root {
    color-scheme: light;
    --bg: #edf4f2;
    --ink: #17201c;
    --muted: #66736d;
    --line: #cfdbd6;
    --panel: #ffffff;
    --accent: #24747f;
    --accent-strong: #126070;
    --fresh: #2f8f6b;
    --warm: #d14b2f;
    --shadow: 0 18px 45px rgba(28, 58, 54, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(160deg, rgba(36, 116, 127, .14), transparent 36%),
        linear-gradient(0deg, #f8faf9, var(--bg));
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.page--narrow {
    width: min(820px, calc(100% - 32px));
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar__actions form {
    margin: 0;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: .98;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    padding: 0 16px;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(18, 96, 112, .18);
}

.button--muted {
    background: #596862;
}

.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
}

.station-card {
    display: block;
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.station-card:hover {
    border-color: rgba(36, 116, 127, .35);
    box-shadow: 0 22px 56px rgba(28, 58, 54, .18);
    transform: translateY(-2px);
}

.station-card__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.station-card h2 {
    margin-bottom: 4px;
    font-size: 21px;
}

.station-card p,
.wind {
    color: var(--muted);
}

.status {
    align-self: flex-start;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    background: #95513f;
    font-size: 13px;
    font-weight: 700;
}

.status.ok {
    background: var(--fresh);
}

.metrics,
.detail-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.metrics {
    margin-top: 22px;
}

.metrics div,
.detail-band div,
.chart-panel,
.table-wrap,
.notice,
.form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
}

.metrics div,
.detail-band div {
    padding: 14px 15px;
    background: linear-gradient(180deg, #fff, #f8fbfa);
}

.metrics strong,
.detail-band strong {
    display: block;
    font-size: 27px;
    line-height: 1.1;
}

.metrics span,
.detail-band span {
    color: var(--muted);
    font-size: 13px;
}

.empty-reading,
.error-note {
    margin-top: 18px;
    font-size: 14px;
}

.error-note {
    border-left: 3px solid var(--warm);
    padding-left: 10px;
    color: #7c2c1d;
}

.detail-band,
.chart-panel {
    margin-bottom: 18px;
}

.chart-panel {
    padding: 18px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.actions form {
    margin: 0;
}

.actions button {
    min-height: 34px;
    background: var(--warm);
}

.notice {
    padding: 14px;
}

.notice--error {
    border-color: #d8a59a;
    color: #7c2c1d;
}

.form {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
}

textarea {
    min-height: 120px;
}

.check {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    flex-direction: row;
}

.check input {
    width: auto;
    min-height: 0;
}

@media (max-width: 640px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    h1 {
        font-size: 34px;
    }
}
