:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #102b32;
  background: #f7f8f3;
  --muted: #425d60;
  --line: #dce6df;
  --lime: #bceb73;
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }
.top { background: #102b32; color: white; }
.top-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { color: white; text-decoration: none; font-size: 1.5rem; font-weight: 800; letter-spacing: -.06em; }
.brand span { color: var(--lime); }
.top-links { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 4px 12px; }
.top-link { color: #e9f5f2; font-size: .82rem; font-weight: 650; text-decoration: none; border: 1px solid #638382; border-radius: 30px; padding: 6px 10px; white-space: nowrap; }
.top-link:hover { background: #24454b; }
.status { font-size: .81rem; color: #dceae8; text-align: right; }
.status[data-kind="live"] { color: var(--lime); }
.status[data-kind="stale"] { color: #ffdfa3; }
.intro { padding: 36px 0 22px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4.8vw, 2.8rem); line-height: 1.06; letter-spacing: -.045em; }
.location { color: var(--muted); margin-top: 8px; font-size: .9rem; }
:focus-visible { outline: 3px solid #16796d; outline-offset: 4px; }
.summary { display: grid; grid-template-columns: minmax(184px, .8fr) minmax(332px, 1.5fr) minmax(210px, 1.06fr); gap: 12px; }
.current { background: #d9f0e9; border-radius: 18px; padding: 22px 24px; container-type: inline-size; }
.current h2, .wind h2 { font-size: 1rem; font-weight: 650; }
.temperature { display: block; white-space: nowrap; font-size: clamp(2.5rem, 5vw, 4.35rem); font-size: clamp(2.25rem, 28cqi, 4.35rem); letter-spacing: -.055em; line-height: 1.1; margin: 9px 0; }
.temperature-unit { font-size: .53em; letter-spacing: -.035em; }
.sky { display: flex; align-items: center; gap: 8px; min-height: 49px; margin-top: 11px; }
.sky svg { flex: 0 0 45px; width: 45px; height: 45px; }
.sky strong, .sky small { display: block; }
.sky strong { font-size: .85rem; line-height: 1.12; }
.sky small { color: var(--muted); font-size: .72rem; margin-top: 3px; }
.sky-symbol { display: none; fill: none; stroke: #4d7171; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sky:not([data-kind]) .sky-neutral, .sky[data-kind="neutral"] .sky-neutral,
.sky[data-kind="sun"] .sky-sun, .sky[data-kind="partial"] .sky-partial,
.sky[data-kind="cloud"] .sky-cloud, .sky[data-kind="night"] .sky-night { display: inline; }
.sky-sun, .sky-partial .sun-shape { stroke: #9d6608; }
.sky-sun circle, .sky-partial circle { fill: #ffdf8b; }
.cloud-shape { fill: #f7fbff; stroke: #587383; }
.sky-night { fill: #b8c6e6; stroke: #4c5e91; }
.observation { margin-top: 14px; font-size: .82rem; color: var(--muted); }
.wind { background: #e6f0f3; border: 1px solid #d1e4e8; border-radius: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(142px, 1fr); grid-template-rows: auto 1fr; gap: 5px 10px; align-items: center; padding: 18px; }
.wind-header { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 10px; }
.wind-value { display: block; font-size: clamp(1.65rem, 3.5vw, 2.9rem); letter-spacing: -.055em; line-height: 1.13; margin: 7px 0 16px; }
.wind-detail { margin: 0; display: flex; flex-wrap: wrap; gap: 9px 16px; }
.wind-detail dt { color: #425d60; font-size: .74rem; }
.wind-detail dd { font-size: .9rem; white-space: nowrap; }
.wind-compass { display: grid; justify-items: center; align-content: center; }
.wind-compass svg { display: block; width: min(100%, 144px); }
.compass-ring { fill: #f9fcfb; stroke: #7fa2a7; }
.compass-mid, .compass-axes { fill: none; stroke: #a5bec1; stroke-width: 1; }
.compass-axes { stroke-dasharray: 2 4; }
.compass-text { fill: #284b51; font-size: 13px; font-weight: 700; text-anchor: middle; }
.compass-center { fill: #f9fcfb; }
.compass-degrees { fill: #102b32; font-size: 29px; font-weight: 750; font-variant-numeric: tabular-nums; text-anchor: middle; }
.compass-cardinal { fill: #3a666c; font-size: 11px; letter-spacing: .12em; font-weight: 700; text-anchor: middle; }
.wind-direction-time { min-height: 1em; margin: 7px 0 0; text-align: center; font-size: .69rem; color: #425d60; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.metrics div { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
dt { color: var(--muted); font-size: .83rem; }
dd { font-size: clamp(1.04rem, 2vw, 1.39rem); font-weight: 700; margin: 5px 0 0; overflow-wrap: anywhere; }
.metric-note { color: var(--muted); font-size: .72rem; font-weight: 450; line-height: 1.25; }
.history { margin-top: clamp(24px, 5vw, 40px); }
.history-head { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.period-control { display: inline-flex; gap: 3px; min-width: 0; padding: 4px; margin: 0; border: 1px solid #a9c2b8; border-radius: 999px; background: #e5efea; }
.period-control label { position: relative; cursor: pointer; }
.period-control span { display: block; padding: 8px 14px; border-radius: 999px; color: #244c4d; font-size: .85rem; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.period-control input:checked + span { background: #102b32; color: var(--lime); }
.period-control input:focus-visible + span { outline: 2px solid #16796d; outline-offset: 2px; }
.wind-units { padding: 3px; background: #f4f9fa; border-color: #b6ccd0; }
.wind-units span { padding: 7px 9px; font-size: .76rem; }
.sun-panel { margin-top: 14px; padding: 16px 18px; border: 1px solid #e6dfc9; border-radius: 15px; background: #fffcf2; }
.sun-panel h2 { font-size: 1rem; }
.sun-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; margin: 12px 0 0; }
.sun-metrics > div + div { padding-left: 14px; border-left: 1px solid #e6dfc9; }
.uv-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-top: 9px; }
.uv-scale i { height: 5px; background: var(--uv-color); opacity: .24; border-radius: 8px; }
.uv-scale i[data-active] { opacity: 1; outline: 1px solid #263c3a; outline-offset: 1px; }
.uv-scale i:nth-child(1) { --uv-color: #25856a; }
.uv-scale i:nth-child(2) { --uv-color: #a37813; }
.uv-scale i:nth-child(3) { --uv-color: #b65322; }
.uv-scale i:nth-child(4) { --uv-color: #b44155; }
.uv-scale i:nth-child(5) { --uv-color: #7549a5; }
.history h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); letter-spacing: -.025em; }
.chart-range, .chart-summary, .plot-detail { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.history-card { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 12px; box-shadow: 0 3px 13px #102b3209; }
.history-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.card-head { display: flex; align-items: start; gap: 6px 14px; justify-content: space-between; flex-wrap: wrap; }
.card-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.03rem; }
.card-head h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--series); }
.chart-latest { text-align: right; padding: 4px 9px; border-radius: 9px; background: color-mix(in srgb, var(--series) 7%, white); }
.chart-latest span { display: block; color: var(--muted); font-size: .67rem; }
.chart-latest strong { font-size: 1.03rem; color: var(--series); white-space: nowrap; }
.chart-summary { min-height: 1.25em; margin-top: 8px; }
.chart { margin-top: 6px; min-height: 100px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.grid-line { stroke: #dce6df; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.axis-text { fill: #425d60; font-size: 11px; }
.series { fill: none; stroke: var(--series); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-fill-top { stop-color: var(--series); stop-opacity: .2; }
.chart-fill-bottom { stop-color: var(--series); stop-opacity: .02; }
.series-point { fill: var(--series); }
.marker { fill: var(--series); stroke: white; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-wind-arrow { fill: none; stroke: var(--series); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chart-guide { stroke: var(--series); stroke-opacity: .55; stroke-dasharray: 3 4; stroke-width: 1; pointer-events: none; }
.wind-chart-legend { margin: 2px 0 5px; color: var(--muted); font-size: .72rem; }
.chart-controls { padding: 6px 9px 3px; border-radius: 10px; background: #f3f7f4; }
.plot-detail { min-height: 1.25em; margin: 0; font-variant-numeric: tabular-nums; }
.reading-selector { display: block; width: 100%; min-height: 24px; margin: 0; accent-color: var(--series); cursor: ew-resize; }
.reading-selector:disabled { cursor: default; }
.location-panel { display: grid; grid-template-columns: minmax(190px, .72fr) minmax(0, 1.7fr); margin-top: clamp(24px, 5vw, 40px); background: #e7f0e9; border: 1px solid #d3e2db; overflow: hidden; border-radius: 18px; }
.location-copy { padding: clamp(20px, 4vw, 40px); align-self: center; }
.location-copy h2 { font-size: clamp(1.3rem, 2.8vw, 1.9rem); letter-spacing: -.035em; }
.location-copy p { margin-top: 10px; }
.location-details { font-size: .87rem; line-height: 1.5; color: var(--muted); }
.map-link { display: inline-block; margin-top: 17px; padding: 8px 13px; border-radius: 30px; background: #102b32; color: #fff; text-decoration: none; font-weight: 650; font-size: .84rem; }
.location-map { margin: 0; background: #dbece4; color: #274f52; }
.location-map img { display: block; width: 100%; height: auto; }
.location-map figcaption { padding: 6px 12px 8px; font-size: .72rem; text-align: right; }
.location-map a { color: inherit; }
footer { display: flex; justify-content: space-between; gap: 12px; padding-block: 20px 26px; font-size: .82rem; color: var(--muted); }
footer a { color: #17675e; }
@media (max-width: 700px) { .chart-grid { grid-template-columns: 1fr; } }
@media (max-width: 840px) {
  .summary { grid-template-columns: minmax(155px, .7fr) minmax(290px, 1.3fr); }
  .metrics { grid-column: 1 / -1; }
}
@media (max-width: 570px) {
  .summary, .chart-grid, .location-panel { grid-template-columns: 1fr; }
  .current, .wind { padding: 18px; }
  .wind-detail { gap: 8px 12px; }
  .sun-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sun-metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 430px) {
  .wrap { width: calc(100% - 24px); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { flex-direction: column; gap: 5px; }
}
