:root {
    --forest-950: #09261c;
    --forest-900: #123d2d;
    --forest-700: #246348;
    --forest-100: #e9f3ee;
    --ink: #17231e;
    --muted: #66756e;
    --line: #dce6e1;
    --surface: #ffffff;
    --background: #f2f6f4;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(72, 155, 110, .12), transparent 34rem),
        var(--background);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
    color: #fff;
    background: linear-gradient(120deg, var(--forest-950), var(--forest-700));
    box-shadow: 0 8px 30px rgba(9, 38, 28, .16);
}

.topbar__inner {
    width: min(1120px, calc(100% - 32px));
    min-height: 78px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__icon { display: grid; place-items: center; width: 44px; height: 44px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; font-size: 23px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 17px; }
.brand span { margin-top: 2px; color: rgba(255,255,255,.7); font-size: 13px; }

.refresh { padding: 9px 14px; color: #fff; border: 1px solid rgba(255,255,255,.32); border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 700; }
.refresh:hover { background: rgba(255,255,255,.1); }

.page { width: min(1120px, calc(100% - 32px)); margin: 30px auto 50px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr); gap: 22px; }
.gauge-card, .weather-card, .forecast-section, .error-card { background: var(--surface); border: 1px solid rgba(18, 61, 45, .08); border-radius: 22px; box-shadow: 0 14px 38px rgba(31, 58, 47, .08); }
.gauge-card, .weather-card { padding: 24px; }

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.section-heading h1, .section-heading h2 { margin: 3px 0 0; letter-spacing: -.025em; }
.section-heading h1 { font-size: clamp(23px, 3vw, 31px); }
.section-heading h2 { font-size: 23px; }
.eyebrow { color: var(--forest-700); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.date-pill { padding: 7px 10px; background: var(--forest-100); color: var(--forest-700); border-radius: 9px; font-size: 12px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }

.gauge { position: relative; max-width: 510px; margin: 8px auto -2px; }
.gauge svg { display: block; width: 100%; overflow: visible; }
.gauge__arc { fill: none; stroke-width: 32; }
.gauge__needle { stroke: #21322b; stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 2px 2px rgba(0,0,0,.18)); }
.gauge__hub { fill: #21322b; stroke: #fff; stroke-width: 4; }
.gauge__value { position: absolute; left: 50%; bottom: 1%; transform: translateX(-50%); text-align: center; }
.gauge__value strong, .gauge__value span { display: block; }
.gauge__value strong { font-size: clamp(42px, 7vw, 61px); line-height: .9; letter-spacing: -.06em; }
.gauge__value span { margin-top: 9px; font-size: 13px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.gauge__min, .gauge__max { position: absolute; bottom: 2%; color: var(--muted); font-size: 11px; font-weight: 700; }
.gauge__min { left: 4%; }
.gauge__max { right: 2%; }
.updated { margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 12px; }

.weather-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.metric { min-height: 96px; padding: 15px; display: flex; align-items: center; gap: 12px; background: #f7faf8; border: 1px solid #edf2ef; border-radius: 14px; }
.metric > span { font-size: 23px; }
.metric small, .metric strong { display: block; }
.metric small { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.metric strong { font-size: 17px; white-space: nowrap; }

.technical { margin-top: 16px; border-top: 1px solid var(--line); }
.technical summary { padding: 16px 2px 4px; color: var(--forest-700); cursor: pointer; font-size: 13px; font-weight: 750; }
.technical__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding-top: 10px; }
.technical__grid span { padding: 8px 5px; background: var(--forest-100); border-radius: 8px; color: var(--muted); text-align: center; font-size: 10px; }
.technical__grid strong { display: block; margin-top: 2px; color: var(--ink); font-size: 12px; }

.forecast-section { margin-top: 22px; padding: 24px; }
.forecast-grid { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 10px; margin-top: 20px; overflow-x: auto; padding-bottom: 3px; }
.forecast-day { min-width: 92px; padding: 15px 9px; display: flex; align-items: center; flex-direction: column; background: #f8faf9; border: 1px solid #edf2ef; border-radius: 14px; }
.forecast-day--today { background: var(--forest-100); border-color: #cbe1d5; }
.forecast-day__date { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.forecast-day__dot { width: 10px; height: 10px; margin: 13px 0 7px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(0,0,0,.04); }
.forecast-day strong { font-size: 24px; letter-spacing: -.04em; }
.forecast-day small { margin-top: 3px; font-size: 10px; font-weight: 850; text-transform: uppercase; }

.notice { margin-bottom: 16px; padding: 12px 15px; background: #e9f3ee; border-left: 4px solid var(--forest-700); border-radius: 8px; color: #315445; font-size: 13px; }
.notice--warning { background: #fff3cd; border-color: #e0a800; color: #694f00; }
.disclaimer { max-width: 820px; margin: 22px auto 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.55; }
.disclaimer a { color: var(--forest-700); font-weight: 700; }
.error-card { max-width: 720px; margin: 70px auto; padding: 30px; }
.error-card h1 { margin-top: 0; }
.error-card p { color: var(--muted); line-height: 1.6; }
.error-card code { padding: 2px 5px; background: #edf2ef; border-radius: 5px; }

@media (max-width: 820px) {
    .hero-grid { grid-template-columns: 1fr; }
    .forecast-grid { grid-template-columns: repeat(7, 105px); }
}

@media (max-width: 520px) {
    .page, .topbar__inner { width: min(100% - 20px, 1120px); }
    .page { margin-top: 14px; }
    .topbar__inner { min-height: 70px; }
    .brand strong { font-size: 14px; }
    .gauge-card, .weather-card, .forecast-section { padding: 17px; border-radius: 17px; }
    .weather-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .metric { min-height: 84px; padding: 10px; gap: 7px; }
    .metric > span { font-size: 18px; }
    .metric strong { font-size: 14px; }
    .technical__grid { grid-template-columns: repeat(3, 1fr); }
    .gauge__arc { stroke-width: 28; }
}
