:root {
    color-scheme: light;
    --ink: #25292d;
    --muted: #7a8086;
    --line: #e3e5e8;
    --surface: #fff;
    --green: #68737d;
    --green-dark: #454f58;
    --page: #f3f4f6;
    --orange: #bb5e36;
}

* { box-sizing: border-box; }
html { min-width: 360px; background: var(--page); }
body {
    margin: 0;
    color: var(--ink);
    font: 15px/1.5 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--green-dark); }
.shell { max-width: 1180px; width: calc(100% - 48px); margin: 0 auto; padding: 48px 0 64px; }
.sauna-selector { display: inline-flex; gap: 3px; margin-bottom: 27px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sauna-selector a { padding: 8px 17px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .15s ease, color .15s ease; }
.sauna-selector a:hover { color: var(--ink); background: #f4f5f6; }
.sauna-selector a.selected { color: var(--ink); background: #e9ebed; }
.intro, .section-heading, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.intro { margin-bottom: 32px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1, h2, .metric-card strong { font-family: Manrope, 'DM Sans', sans-serif; }
h1 { margin-bottom: 5px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.045em; line-height: 1.15; }
h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.muted { color: var(--muted); }
.intro .muted, .panel-heading .muted { margin: 7px 0 0; font-size: 13px; }
.date-picker { display: flex; align-items: center; gap: 9px; }
.date-picker label { color: var(--muted); font-size: 12px; font-weight: 600; }
.date-picker input, .date-picker button { height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.date-picker input { padding: 0 10px; }
.date-picker button { padding: 0 15px; border-color: var(--green); background: var(--green); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.date-picker button:hover { background: var(--green-dark); }
.notice { display: flex; align-items: flex-start; gap: 13px; margin: 0 0 22px; padding: 16px 18px; border: 1px solid; border-radius: 10px; }
.notice-error { border-color: #efc7b5; background: #fff5f0; color: #874322; }
.notice-info { border-color: #d7e4dc; background: #f0f7f2; color: #335f47; }
.notice-icon { display: grid; flex: 0 0 23px; height: 23px; place-items: center; border-radius: 50%; background: currentColor; color: #fff; font-weight: 700; }
.notice strong { display: block; font-size: 14px; }
.notice p { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.notice small { display: block; margin-top: 5px; opacity: .8; }
.status-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.status-item { display: flex; min-height: 74px; flex-wrap: wrap; align-content: center; align-items: center; gap: 4px 12px; padding: 14px 20px; }
.status-item + .status-item { border-left: 1px solid var(--line); }
.status-label { width: 100%; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.status-item strong { font-size: 14px; font-weight: 600; }
.result { padding: 2px 8px; border-radius: 99px; background: #f0f1ee; color: #68716d; font-size: 11px; font-weight: 700; }
.result-ok { background: #edf0f2; color: #59636b; }
.result-failed { background: #ffebe2; color: #a44c28; }
.section-heading { align-items: center; margin-bottom: 16px; }
.section-heading h2 { font-size: 22px; text-transform: capitalize; }
.sample-count { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.metric-card { display: flex; min-height: 130px; flex-direction: column; justify-content: center; padding: 19px 21px; }
.metric-label { margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-card strong { font-size: 31px; letter-spacing: -.04em; line-height: 1.15; }
.metric-card strong small { font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 500; letter-spacing: 0; }
.metric-card .muted { margin-top: 5px; font-size: 12px; }
.panel { margin-top: 16px; padding: 22px 24px; }
.panel-heading { align-items: center; margin-bottom: 16px; }
.legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.legend i.heat-legend { width: 92px; height: 9px; border-radius: 2px; background: linear-gradient(90deg, #f0f1f2, #dfe1e4, #c9cdd1, #aeb4ba, #8b939b, #68727b); }
.chart-wrap { width: 100%; overflow-x: auto; }
.occupancy-chart { display: block; width: 100%; min-width: 600px; height: auto; overflow: visible; }
.grid-line { stroke: #e9ede9; stroke-width: 1; }
.axis-label { fill: #89928e; font: 11px 'DM Sans', sans-serif; }
.axis-time { font-size: 11px; }
.chart-line { fill: none; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.chart-point { fill: #fff; stroke: var(--green); stroke-width: 2.5; }
.empty-state { display: grid; min-height: 130px; place-items: center; color: var(--muted); font-size: 13px; text-align: center; }
.heatmap-scroll { overflow-x: auto; }
.heatmap { width: 100%; min-width: 820px; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.heatmap th { color: var(--muted); font-size: 10px; font-weight: 500; text-align: center; }
.heatmap thead th:first-child { width: 40px; }
.heatmap tbody th { color: var(--ink); font-size: 11px; font-weight: 700; }
.heatmap td { height: 32px; border-radius: 4px; color: #4a6557; font-size: 10px; text-align: center; }
.heat-cell { background: #f0f3ef; }
.heat-empty { color: #c4cbc6 !important; background: #f8f9f7; }
.heat-0 { background: #f0f1f2; }
.heat-1 { background: #e3e5e7; }
.heat-2 { background: #d0d3d6; }
.heat-3 { background: #b7bcc1; color: #343a40 !important; }
.heat-4 { background: #929aa2; color: #fff !important; }
.heat-5 { background: #68727b; color: #fff !important; }
.table-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.month-list { display: grid; gap: 13px; }
.month-row { display: grid; grid-template-columns: 150px minmax(100px, 1fr) 92px 96px; align-items: center; gap: 16px; font-size: 12px; }
.month-row time { text-transform: capitalize; }
.month-row strong { text-align: right; font-size: 13px; }
.month-row strong small { font-weight: 400; }
.month-row > .muted { font-size: 11px; text-align: right; }
.month-track { height: 8px; overflow: hidden; border-radius: 99px; background: #edf0ed; }
.month-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.next-update strong { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.site-footer { max-width: 1180px; width: calc(100% - 48px); margin: 0 auto; padding: 0 0 28px; color: #8a938e; font-size: 11px; }
.site-footer span { padding: 0 4px; }

@media (max-width: 720px) {
    .shell { width: calc(100% - 30px); padding-top: 30px; }
    .sauna-selector { display: flex; width: 100%; margin-bottom: 22px; }
    .sauna-selector a { flex: 1; padding-inline: 8px; text-align: center; }
    .intro { align-items: flex-start; flex-direction: column; gap: 18px; }
    .date-picker { width: 100%; flex-wrap: wrap; }
    .date-picker label { width: 100%; }
    .date-picker input { flex: 1; min-width: 0; }
    .status-row { grid-template-columns: 1fr; margin-bottom: 30px; }
    .status-item + .status-item { border-top: 1px solid var(--line); border-left: 0; }
    .metric-grid { grid-template-columns: 1fr; gap: 9px; }
    .metric-card { min-height: 105px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .panel { padding: 18px 15px; }
    .panel-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .month-row { grid-template-columns: 105px minmax(45px, 1fr) 72px; gap: 8px; }
    .month-row > .muted { display: none; }
    .site-footer { width: calc(100% - 30px); }
}

@media (prefers-reduced-motion: no-preference) {
    .metric-card, .panel, .status-row { animation: appear .35s ease both; }
    .metric-card:nth-child(2) { animation-delay: .04s; }
    .metric-card:nth-child(3) { animation-delay: .08s; }
    @keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
}
