/* Heritage Fields Farm weather page. Loaded only by weather.html, on top of site.css. */

/* ---------- the sky ---------- */
.wx-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; min-height: clamp(470px, 74vh, 700px); display: flex; align-items: flex-end;
	--orb-x: 70%; --orb-y: 28%; --orb-o: 1; --cloud: 0.3; --drift: 1; }
.wx-sky, .wx-sky i, .wx-hero__fx, .wx-fog, .wx-flash, .wx-clouds { position: absolute; inset: 0; }
.wx-sky { z-index: -6; background: #5d86b0; }
.wx-sky i { opacity: 0; transition: opacity 1.6s ease; }
.wx-sky__day { background: linear-gradient(180deg, #1f6fc4 0%, #5aa9e6 46%, #cfe9fb 100%); }
.wx-sky__grey { background: linear-gradient(180deg, #5c6e80 0%, #8b9aa8 50%, #c9d1d8 100%); }
.wx-sky__storm { background: linear-gradient(180deg, #1f2733 0%, #3d4958 52%, #6d7887 100%); }
.wx-sky__glow { background: linear-gradient(180deg, #24336b 0%, #6f4a86 34%, #e0728a 62%, #f8b56a 86%, #fde2a6 100%); }
.wx-sky__night { background: linear-gradient(180deg, #030817 0%, #0b1736 48%, #1b2f5c 100%); }
.wx-hero[data-sky="day"] .wx-sky__day, .wx-hero[data-sky="grey"] .wx-sky__grey, .wx-hero[data-sky="storm"] .wx-sky__storm,
.wx-hero[data-sky="glow"] .wx-sky__glow, .wx-hero[data-sky="night"] .wx-sky__night { opacity: 1; }

/* sun and moon share one spot on the arc */
.wx-orb { position: absolute; z-index: -5; left: var(--orb-x); top: var(--orb-y); width: clamp(86px, 13vw, 150px); aspect-ratio: 1; transform: translate(-50%, -50%);
	opacity: var(--orb-o); transition: left 1.4s ease, top 1.4s ease, opacity 1.2s ease; }
.wx-orb svg { width: 100%; height: 100%; overflow: visible; display: block; }
.wx-orb__sun, .wx-orb__moonwrap { transition: opacity 1.2s ease; }
.wx-orb__moonwrap { opacity: 0; }
.wx-hero[data-phase="night"] .wx-orb__sun { opacity: 0; }
.wx-hero[data-phase="night"] .wx-orb__moonwrap { opacity: 1; }
.wx-hero[data-phase="dawn"] .wx-orb__disc, .wx-hero[data-phase="dusk"] .wx-orb__disc { fill: #ffb35c; }
.wx-orb__rays { transform-origin: 50px 50px; }
.wx-orb__halo { transform-origin: 50px 50px; }

.wx-hero__fx { z-index: -3; width: 100%; height: 100%; pointer-events: none; }

/* clouds */
.wx-clouds { z-index: -4; pointer-events: none; }
.wx-cloud { position: absolute; left: 0; width: clamp(220px, 34vw, 520px); opacity: 0; transition: opacity 1.8s ease; will-change: transform; }
.wx-cloud svg { display: block; width: 100%; height: auto; fill: #fff; filter: drop-shadow(0 14px 18px rgba(20, 40, 70, 0.14)); }
.wx-cloud:nth-child(1) { top: 6%; --d: 92s; --s: -10s; }
.wx-cloud:nth-child(2) { top: 24%; --d: 128s; --s: -70s; width: clamp(180px, 26vw, 400px); }
.wx-cloud:nth-child(3) { top: 12%; --d: 110s; --s: -44s; width: clamp(260px, 40vw, 620px); }
.wx-cloud:nth-child(4) { top: 34%; --d: 150s; --s: -100s; }
.wx-cloud:nth-child(5) { top: 2%; --d: 136s; --s: -84s; width: clamp(240px, 38vw, 560px); }
.wx-cloud:nth-child(6) { top: 20%; --d: 104s; --s: -26s; width: clamp(280px, 44vw, 660px); }
.wx-cloud:nth-child(7) { top: 40%; --d: 120s; --s: -58s; width: clamp(240px, 36vw, 540px); }
.wx-hero[data-sky="grey"] .wx-cloud svg { fill: #e3e8ec; }
.wx-hero[data-kind="rain"] .wx-cloud svg, .wx-hero[data-kind="snow"] .wx-cloud svg { fill: #b9c3cd; }
.wx-hero[data-kind="storm"] .wx-cloud svg { fill: #6b7786; }
.wx-hero[data-kind="storm"] .wx-cloud, .wx-hero[data-kind="rain"] .wx-cloud { filter: blur(1.500px); }
.wx-hero[data-sky="night"] .wx-cloud svg { fill: #33466d; filter: none; }
.wx-hero[data-sky="glow"] .wx-cloud svg { fill: #f7c9c0; }
.wx-cloud { transform: translateX(30vw); }
.wx-cloud:nth-child(2n) { transform: translateX(62vw); }
.wx-cloud:nth-child(3n) { transform: translateX(4vw); }

/* fog and lightning */
.wx-fog { z-index: -2; opacity: 0; transition: opacity 1.6s ease; pointer-events: none;
	background: linear-gradient(180deg, rgba(232, 236, 240, 0) 20%, rgba(232, 236, 240, 0.72) 62%, rgba(232, 236, 240, 0.9) 100%); }
.wx-fog { inset: 0 -6%; } /* wider than the hero, so the sideways drift never brings an edge into view */
.wx-hero[data-kind="fog"] .wx-fog { opacity: 1; }
.wx-flash { z-index: -2; background: #fff; opacity: 0; pointer-events: none; }

/* the farm along the bottom */
.wx-land { position: absolute; left: 0; right: 0; bottom: -1px; z-index: -4; width: 100%; height: clamp(180px, 33vw, 400px); display: block; object-fit: cover; object-position: 50% 0; transition: filter 1.6s ease; }
.wx-hero[data-sky="grey"] .wx-land { filter: saturate(0.72) brightness(0.86); }
.wx-hero[data-sky="storm"] .wx-land { filter: saturate(0.5) brightness(0.6); }
.wx-hero[data-sky="glow"] .wx-land { filter: saturate(0.9) brightness(0.62) sepia(0.25); }
.wx-hero[data-sky="night"] .wx-land { filter: saturate(0.5) brightness(0.3) hue-rotate(20deg); }
.wx-land__window { opacity: 0; transition: opacity 1.6s ease; }
.wx-hero[data-sky="night"] .wx-land__window, .wx-hero[data-sky="glow"] .wx-land__window { opacity: 1; }
.wx-hero[data-kind="snow"] .wx-land { filter: saturate(0.25) brightness(1.5); }
.wx-hero[data-kind="snow"][data-sky="night"] .wx-land { filter: saturate(0.2) brightness(0.62); }

/* words over the sky */
.wx-hero__in { position: relative; width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; padding-block: clamp(28px, 5vw, 56px) clamp(110px, 21vw, 220px);
	text-shadow: 0 2px 18px rgba(8, 18, 34, 0.45); }
.wx-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(8, 20, 40, 0.5) 0%, rgba(8, 20, 40, 0.22) 46%, rgba(8, 20, 40, 0) 72%), linear-gradient(0deg, rgba(8, 18, 12, 0.3) 0%, rgba(8, 18, 12, 0) 45%); }
.wx-hero .crumbs { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0 0 18px; font-size: 0.9rem; opacity: 0.92; }
.wx-hero .crumbs li + li::before { content: "/"; margin-right: 10px; opacity: 0.6; }
.wx-hero .crumbs a { color: inherit; }
.wx-hero h1 { font-size: clamp(1.05rem, 2vw, 1.3rem); font-family: var(--sans); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin: 0 0 6px; }
.wx-hero__when { margin: 0; font-size: 1rem; opacity: 0.95; }
.wx-hero__row { display: flex; align-items: flex-end; gap: clamp(14px, 3vw, 30px); flex-wrap: wrap; margin-top: 4px; }
.wx-hero__temp { font-family: var(--serif); font-weight: 600; font-size: clamp(5.4rem, 17vw, 10.5rem); line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wx-hero__cond { font-family: var(--serif); font-size: clamp(1.5rem, 3.4vw, 2.5rem); line-height: 1.1; margin: 0 0 8px; max-width: 16ch; }
.wx-hero__meta { margin: 0 0 12px; font-size: 1.05rem; font-weight: 600; }
.wx-hero__meta span + span::before { content: " · "; }
.wx-hero__meta span:empty { display: none; }
.wx-hero__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 14px; font-size: 0.9rem; }
.wx-hero__foot > span { opacity: 0.9; }
.wx-live { display: inline-flex; align-items: center; gap: 8px; }
.wx-live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #7dffa0; box-shadow: 0 0 0 0 rgba(125, 255, 160, 0.7); }
.wx-back { font: inherit; font-weight: 700; color: #10243d; background: #fff; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; text-shadow: none; }
.wx-back[hidden] { display: none; }
.is-loading .wx-hero__temp { opacity: 0.35; }

@media (prefers-reduced-motion: no-preference) {
	.wx-cloud { animation: wx-drift calc(var(--d) * var(--drift)) linear infinite; animation-delay: var(--s); }
	.wx-orb__rays { animation: wx-spin 90s linear infinite; }
	.wx-orb__halo { animation: wx-pulse 7s ease-in-out infinite; }
	.wx-fog { animation: wx-fog 16s ease-in-out infinite alternate; }
	.wx-hero[data-kind="storm"] .wx-flash { animation: wx-flash 11s linear infinite; }
	.wx-live::before { animation: wx-ping 2.4s ease-out infinite; }
	.wx-dial__needle, .wx-compass__arrow { transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
	@keyframes wx-drift { from { transform: translateX(-60vw); } to { transform: translateX(110vw); } }
	@keyframes wx-spin { to { transform: rotate(360deg); } }
	@keyframes wx-pulse { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.14); opacity: 1; } }
	@keyframes wx-fog { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
	@keyframes wx-flash { 0%, 61%, 63.5%, 65%, 100% { opacity: 0; } 62% { opacity: 0.55; } 64% { opacity: 0.28; } 88% { opacity: 0; } 88.600% { opacity: 0.4; } 89.400% { opacity: 0; } }
	@keyframes wx-ping { 0% { box-shadow: 0 0 0 0 rgba(125, 255, 160, 0.7); } 100% { box-shadow: 0 0 0 12px rgba(125, 255, 160, 0); } }
}

/* ---------- alerts ---------- */
.wx-alerts { display: grid; gap: 10px; padding-top: 22px; }
.wx-alerts[hidden] { display: none; }
.wx-alert { border-radius: var(--radius-sm); background: #fff4d6; border: 1px solid #e9c46a; border-left: 8px solid #e0a100; padding: 0 18px; }
.wx-alert--severe, .wx-alert--extreme { background: #fde4df; border-color: #e8a59a; border-left-color: var(--tomato); }
.wx-alert summary { cursor: pointer; padding: 14px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.wx-alert summary strong { font-size: 1.08rem; }
.wx-alert summary span { color: var(--muted); font-size: 0.92rem; }
.wx-alert p { margin: 0 0 12px; max-width: 78ch; }
.wx-alert__head { font-weight: 600; }
.wx-alert__do { background: rgba(255, 255, 255, 0.6); border-radius: 10px; padding: 10px 14px; }
.wx-alert__src { font-size: 0.85rem; color: var(--muted); }

/* ---------- cards and gauges ---------- */
.wx-section { padding-block: clamp(34px, 5vw, 60px); }
.wx-section + .wx-section { padding-top: 0; }
.wx-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin: 0 0 18px; }
.wx-h h2 { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.wx-h p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.wx-card { background: var(--paper); border-radius: var(--radius); border: 1px solid rgba(15, 51, 32, 0.08); box-shadow: 0 18px 46px -30px rgba(15, 51, 32, 0.5); padding: clamp(18px, 2.4vw, 26px); min-width: 0; }
.wx-card[hidden] { display: none; }
.wx-card h3 { margin: 0 0 4px; font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--leaf); }
.wx-big { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.05; margin: 0; font-variant-numeric: tabular-nums; }
.wx-note { margin: 4px 0 0; color: var(--muted); font-size: 0.93rem; }

.wx-gauges { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .wx-gauges { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .wx-gauges { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.wx-gauge { text-align: center; display: flex; flex-direction: column; align-items: center; }
.wx-gauge__art { position: relative; width: min(100%, 150px); aspect-ratio: 1; display: grid; place-items: center; margin: 6px 0 4px; }
.wx-gauge__art--dial { aspect-ratio: 120 / 74; margin-top: 22px; margin-bottom: 14px; }
.wx-gauge__art--compass { aspect-ratio: 1; width: min(100%, 120px); margin: 6px 0 4px; }
.wx-gauge__art svg { width: 100%; height: 100%; display: block; }
.wx-gauge__art .wx-big { position: absolute; }
.wx-gauge__art--dial .wx-big { position: static; }
.wx-dial { color: var(--ink); }
.wx-compass__l { font: 700 11px var(--sans); fill: var(--muted); }
.wx-gauge .wx-big--sm { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }

/* ---------- next 24 hours ---------- */
.wx-hours { overflow-x: auto; padding: 0; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.wx-hours__track { position: relative; padding: 14px 0 12px; }
.wx-hours__chart { position: absolute; left: 0; top: 82px; pointer-events: none; }
.wx-hours__t { font: 700 13px var(--sans); fill: var(--ink); }
.wx-hours__row { display: flex; }
.wx-hour { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; border-radius: 14px; padding: 8px 0; font: inherit; color: inherit; cursor: pointer; }
.wx-hour:hover, .wx-hour:focus-visible { background: rgba(47, 125, 54, 0.09); }
.wx-hour.is-on { background: rgba(224, 120, 47, 0.16); box-shadow: inset 0 0 0 2px var(--clay); }
.wx-hour__time { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.wx-ico { width: 34px; height: 34px; flex: none; }
.wx-hour__gap { height: 96px; }
.wx-hour__pop { width: 10px; height: 34px; border-radius: 6px; background: rgba(61, 143, 214, 0.14); display: flex; align-items: flex-end; overflow: hidden; }
.wx-hour__pop i { display: block; width: 100%; background: #3d8fd6; border-radius: 6px; }
.wx-hour__pct { font-size: 0.75rem; font-weight: 700; color: #2b6fae; min-height: 1.1em; }
.wx-hint { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }

/* ---------- in the field ---------- */
.wx-field { display: grid; gap: 14px; }
@media (min-width: 860px) { .wx-field { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wx-frost__chart, .wx-rain__chart { display: block; width: 100%; height: auto; margin-top: 12px; }
.wx-frost__v, .wx-rain__v { font: 700 11px var(--sans); fill: var(--ink); }
.wx-frost__d, .wx-rain__d { font: 600 10px var(--sans); fill: var(--muted); }
.wx-rain__d.is-today { fill: var(--tomato); font-weight: 800; }
.wx-frost__mark { font: 600 9px var(--sans); fill: #2b6fae; }
.wx-card.is-cold { background: linear-gradient(180deg, #eef6fd 0%, #fff 70%); border-color: #b9d8f2; }
.wx-card.is-freeze { background: linear-gradient(180deg, #dcecfb 0%, #fff 75%); border-color: #8fbfe8; }
.wx-pair { display: flex; gap: clamp(16px, 4vw, 40px); flex-wrap: wrap; margin-top: 10px; }
.wx-pair > div { min-width: 0; }
.wx-pair small { display: block; color: var(--muted); font-size: 0.85rem; }
.wx-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.wx-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #2f86d1; margin-right: 6px; vertical-align: -1px; }
.wx-key i.is-next { background: repeating-linear-gradient(45deg, #6bb3ea 0 3px, #bfe0f7 3px 6px); }
.wx-soil { display: grid; grid-template-columns: auto auto 1fr; gap: 6px clamp(10px, 2vw, 22px); align-items: start; margin-top: 8px; }
.wx-soil__t { text-align: center; }
.wx-soil__t .wx-thermo { width: clamp(84px, 12vw, 108px); height: auto; display: block; }
.wx-thermo__n { font: 600 10px var(--sans); fill: var(--muted); }
.wx-soil__t b { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.wx-soil__t small { color: var(--muted); font-size: 0.8rem; }
.wx-spark { display: block; width: 100%; height: 70px; }
.wx-moist { margin-top: 12px; }
.wx-moist[hidden] { display: none; }
.wx-moist__bar { height: 22px; border-radius: 11px; overflow: hidden; background: repeating-linear-gradient(90deg, #d9c3a5 0 6px, #cfb694 6px 12px); }
.wx-moist__bar i { display: block; height: 100%; background: linear-gradient(90deg, #6a4a2b, #3d7fb8); border-radius: 11px; transition: width 1s ease; }
.wx-moist p { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); }
.wx-moist p b { color: var(--ink); }
.wx-marks { margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.82rem; color: var(--muted); }
.wx-marks li::before { content: ""; display: inline-block; width: 16px; border-top: 2px dashed var(--clay); margin-right: 8px; vertical-align: middle; }

/* ---------- seven days ---------- */
.wx-days { display: grid; gap: 0; padding-block: 6px; }
.wx-day { border-top: 1px solid var(--line); }
.wx-day:first-child { border-top: 0; }
.wx-day summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(84px, 1.1fr) 38px 42px 38px minmax(70px, 3fr) 38px; align-items: center; gap: 8px; padding: 12px 4px; }
.wx-day summary::-webkit-details-marker { display: none; }
.wx-day summary:hover { background: rgba(47, 125, 54, 0.05); }
.wx-day__name { font-weight: 700; }
.wx-day__pop { font-size: 0.85rem; font-weight: 700; color: #2b6fae; }
.wx-day__lo { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.wx-day__hi { font-weight: 700; font-variant-numeric: tabular-nums; }
.wx-day__bar { position: relative; height: 10px; border-radius: 5px; background: rgba(52, 69, 42, 0.1); }
.wx-day__bar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.wx-day__more { padding: 0 4px 14px; color: var(--muted); }
.wx-day__more p { margin: 0 0 8px; max-width: 78ch; }
.wx-day__more strong { color: var(--ink); }

/* ---------- sun, moon and season ---------- */
.wx-skycards { display: grid; gap: 14px; }
@media (min-width: 860px) { .wx-skycards { grid-template-columns: 3fr 2fr; } }
.wx-sunarc { display: block; width: 100%; max-width: 420px; margin: 4px auto 0; height: auto; }
.wx-suntimes { display: flex; justify-content: space-between; max-width: 420px; margin: 0 auto; font-weight: 700; }
.wx-suntimes small { display: block; font-weight: 500; color: var(--muted); font-size: 0.82rem; }
.wx-suntimes div:last-child { text-align: right; }
.wx-mooncard { background: radial-gradient(120% 120% at 20% 0%, #24365c 0%, #0f1a36 70%); color: #e9eefb; border-color: transparent; text-align: center; }
.wx-mooncard h3 { color: #ffd35c; }
.wx-mooncard .wx-note { color: #b9c4dd; }
.wx-moon { width: clamp(110px, 16vw, 150px); height: auto; display: block; margin: 12px auto; filter: drop-shadow(0 0 22px rgba(243, 236, 210, 0.3)); }
.wx-season { margin-top: 14px; }
.wx-season__bar { position: relative; height: 34px; border-radius: 17px; background: linear-gradient(90deg, #bcd9f2, #dbe9f5); margin: 28px 0 6px; }
.wx-season__free { position: absolute; top: 0; bottom: 0; border-radius: 17px; background: linear-gradient(90deg, #8bbf6a, #2f7d36 50%, #c9a23a); }
.wx-season__today { position: absolute; top: -8px; bottom: -8px; width: 3px; margin-left: -1.500px; background: var(--tomato); border-radius: 2px; }
.wx-season__today::after { content: "Today"; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 0.72rem; font-weight: 800; color: var(--tomato); white-space: nowrap; padding-bottom: 2px; }
.wx-season__months { display: grid; grid-template-columns: repeat(12, 1fr); font-size: 0.72rem; font-weight: 600; color: var(--muted); text-align: center; }
.wx-facts { display: grid; gap: 10px 26px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 18px 0 0; padding: 0; list-style: none; }
.wx-facts b { display: block; font-family: var(--serif); font-size: 1.35rem; }
.wx-facts span { color: var(--muted); font-size: 0.9rem; }

.wx-sources { color: var(--muted); font-size: 0.88rem; max-width: 86ch; }
.wx-sources a { color: inherit; }
.wx-error { background: #fff4d6; border: 1px solid #e9c46a; border-radius: var(--radius-sm); padding: 14px 18px; margin-top: 22px; }
.wx-error[hidden] { display: none; }

@media (max-width: 520px) {
	.wx-day summary { grid-template-columns: minmax(74px, 1fr) 32px 36px 32px minmax(50px, 2fr) 32px; gap: 5px; }
	.wx-soil { grid-template-columns: 1fr 1fr; }
	.wx-soil__side { grid-column: 1 / -1; }
}

/* ---------- radar, futurecast and outlook tabs ---------- */
.wx-tabs { padding-top: clamp(12px, 1.6vw, 18px); }
.wx-tabs__bar { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 18px; padding-bottom: 2px; border-bottom: 1px solid rgba(15, 51, 32, 0.12); scrollbar-width: none; }
.wx-tabs__bar::-webkit-scrollbar { display: none; }
.wx-tabs__bar button { flex: none; font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.wx-tabs__bar button:hover { color: var(--green-deep); }
.wx-tabs__bar button[aria-selected="true"] { color: var(--green-deep); border-bottom-color: var(--clay); }
.wx-tabs__panel[hidden] { display: none; }
.wx-tabs__panel h4 { margin: 18px 0 10px; font-family: var(--serif); font-size: 1.25rem; }
.wx-tabs__panel h4:first-child { margin-top: 0; }
.wx-radar { display: grid; place-items: center; background: #0e1a14; border-radius: var(--radius-sm); overflow: hidden; min-height: 220px; }
.wx-radar img { display: block; width: 100%; max-width: 720px; height: auto; }
.wx-maps { display: grid; gap: 14px; }
@media (min-width: 720px) { .wx-maps { grid-template-columns: 1fr 1fr; } }
.wx-maps figure { margin: 0; }
.wx-maps a { display: block; background: #f1efe6; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid rgba(15, 51, 32, 0.1); }
.wx-maps img { display: block; width: 100%; height: auto; }
.wx-maps figcaption { margin-top: 6px; font-size: 0.9rem; color: var(--muted); }
.wx-tabs .wx-note { margin-top: 14px; }

.wx-fc[hidden] { display: none; }
.wx-fc__stage {
	display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; align-items: center; padding: clamp(18px, 3vw, 28px); border-radius: var(--radius-sm); color: #fff;
	background: linear-gradient(180deg, #4d9be0 0%, #9fd0f5 100%); transition: background 0.4s; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}
.wx-fc__stage[data-phase="night"] { background: linear-gradient(180deg, #0f1b36 0%, #2a3d68 100%); }
.wx-fc__stage[data-phase="dusk"] { background: linear-gradient(180deg, #51437a 0%, #e98b54 100%); }
.wx-fc__stage[data-phase="day"][data-kind="cloudy"], .wx-fc__stage[data-phase="day"][data-kind="fog"] { background: linear-gradient(180deg, #7f909f 0%, #c3cdd5 100%); }
.wx-fc__stage[data-phase="day"][data-kind="rain"], .wx-fc__stage[data-phase="day"][data-kind="storm"] { background: linear-gradient(180deg, #51616f 0%, #8d9ba6 100%); }
.wx-fc__stage[data-phase="day"][data-kind="snow"] { background: linear-gradient(180deg, #8ea3b6 0%, #dbe5ee 100%); }
.wx-fc__icon .wx-ico { width: clamp(64px, 12vw, 104px); height: auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25)); }
.wx-fc__when { margin: 0; font-weight: 700; letter-spacing: 0.04em; }
.wx-fc__temp { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(3rem, 8vw, 4.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.wx-fc__cond { margin: 2px 0 0; font-size: 1.1rem; min-height: 1.4em; }
.wx-fc__stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0 0; }
@media (min-width: 620px) { .wx-fc__stats { grid-template-columns: repeat(4, 1fr); } }
.wx-fc__stats div { background: rgba(255, 255, 255, 0.16); border-radius: 12px; padding: 8px 12px; }
.wx-fc__stats dt { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.wx-fc__stats dd { margin: 0; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.wx-fc__controls { display: flex; align-items: center; gap: 14px; margin: 16px 0 8px; }
.wx-fc__play { flex: none; min-width: 92px; font: inherit; font-weight: 700; color: #fff; background: var(--green); border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer; }
.wx-fc__play.is-on { background: var(--tomato); }
.wx-fc__controls input { flex: 1; min-width: 0; accent-color: var(--green); height: 28px; }
.wx-fc__chart { position: relative; cursor: pointer; }
.wx-fc__svg { display: block; width: 100%; height: 170px; background: #f6f3e8; border-radius: 12px; }
.wx-fc__days { position: relative; height: 22px; margin-top: -20px; pointer-events: none; }
.wx-fc__days span { position: absolute; top: 0; padding-left: 6px; font-size: 0.8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.wx-fc__legend { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.wx-fc__legend .k { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-left: 10px; }
.wx-fc__legend .k:first-child { margin-left: 0; }
.k--temp { background: #d4361f; height: 3px !important; }
.k--rain { background: #2f86c9; }
.k--cloud { background: #7d8a99; opacity: 0.7; }
.k--night { background: #1c2b4a; opacity: 0.25; }

/* ---------- sunrise and sunset through the year, and the moon calendar ---------- */
.wx-year, .wx-mooncal { margin-top: 18px; }
.wx-year__svg { display: block; width: 100%; height: auto; margin-top: 10px; }
.wx-year__axis { font-family: var(--sans); font-size: 11.5px; fill: var(--muted); }
.wx-year__today { font-family: var(--sans); font-size: 12.5px; font-weight: 700; fill: #fff; }
.wx-mooncal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px 6px; margin-top: 14px; }
@media (min-width: 900px) { .wx-mooncal__grid { grid-template-columns: repeat(14, 1fr); } }
.wx-mooncal__day { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 6px 2px; border-radius: 12px; }
.wx-mooncal__day svg { width: 100%; max-width: 46px; height: auto; }
.wx-mooncal__day b { font-size: 0.76rem; line-height: 1.2; }
.wx-mooncal__day small { font-size: 0.72rem; color: var(--muted); line-height: 1.2; }
.wx-mooncal__day.is-key { background: #f4efd9; }
.wx-mooncal__day.is-key small { color: var(--green-deep); font-weight: 700; }
.wx-mooncal__day.is-today { outline: 2px solid var(--clay); }
@media (max-width: 640px) {
	.wx-year__axis { font-size: 21px; }
	.wx-year__axis--odd { display: none; }
	.wx-year__today { font-size: 22px; }
	.wx-mooncal__day b { font-size: 0.66rem; white-space: nowrap; }
	.wx-mooncal__day small { font-size: 0.64rem; }
	.wx-mooncal__grid { gap: 8px 2px; }
}

/* ---------- The weather since 1999 (weather-history.html). Charts are drawn by build.py. ---------- */
.cl-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: clamp(24px, 4vw, 40px); }
.cl-tile { background: var(--paper); border: 1px solid rgba(15, 51, 32, 0.08); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: 0 18px 46px -34px rgba(15, 51, 32, 0.5); display: grid; gap: 2px; }
.cl-tile b { font-family: var(--serif); font-size: clamp(1.9rem, 3.6vw, 2.5rem); line-height: 1; color: var(--green); letter-spacing: -0.02em; }
.cl-tile span { font-weight: 700; font-size: 0.95rem; color: var(--ink, #23301f); margin-top: 6px; }
.cl-tile small { color: var(--muted); font-size: 0.85rem; }
.cl-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cl-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cl-card--wide { grid-column: 1 / -1; } }
.cl-card .wx-note { margin-bottom: 12px; }
.cl-svg { display: block; width: 100%; height: auto; max-width: 620px; margin-inline: auto; overflow: visible; font-family: var(--sans); }
.cl-card--wide .cl-svg { max-width: 760px; }
.cl-y { font-size: 11px; font-weight: 700; fill: #46543f; }
.cl-v { font-size: 10.5px; font-weight: 600; fill: #46543f; }
.cl-m { font-size: 10.5px; font-weight: 700; fill: #7a8573; }
.cl-cell { font-size: 10px; font-weight: 800; fill: #fff; }
.cl-avg { stroke: #17402a; stroke-width: 1.2; stroke-dasharray: 3 4; }
.cl-avgt { font-size: 10.5px; font-weight: 700; fill: #17402a; }
.cl-grid line, line.cl-grid { stroke: rgba(15, 51, 32, 0.16); stroke-width: 1; stroke-dasharray: 2 4; }
.cl-span { stroke: #c9cfc2; stroke-width: 3; stroke-linecap: round; }
.cl-avgline { fill: none; stroke: #17402a; stroke-width: 1.6; stroke-dasharray: 4 4; }
.cl-thisline { fill: none; stroke: #d4361f; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.cl-this { font-size: 12px; font-weight: 800; fill: #d4361f; }
.cl-source { margin: 26px auto 0; max-width: 78ch; font-size: 0.92rem; color: var(--muted); text-align: center; }
.cl-teaser { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.cl-teaser p { margin: 0; max-width: 60ch; }

/* Softer clouds that stay clear of the top edge, and a real photo of the fields under the sky */
.wx-cloud svg { opacity: 0.8; filter: blur(5px); }
.wx-hero[data-sky="glow"] .wx-cloud svg, .wx-hero[data-sky="night"] .wx-cloud svg { opacity: 0.5; filter: blur(7px); }
.wx-hero[data-kind="rain"] .wx-cloud svg, .wx-hero[data-kind="storm"] .wx-cloud svg { opacity: 0.6; filter: blur(8px); }
.wx-cloud:nth-child(1) { top: 9%; } .wx-cloud:nth-child(3) { top: 14%; } .wx-cloud:nth-child(5) { top: 7%; }
.wx-cloud:nth-child(4) { top: 26%; } .wx-cloud:nth-child(7) { top: 30%; }
.wx-cloud { width: clamp(200px, 28vw, 440px) !important; }
.wx-hero__in { text-shadow: 0 1px 14px rgba(6, 16, 30, 0.45); }

/* ---- Readability pass: larger labels, stronger contrast, text that holds up over every sky ---- */
.wx-hero::after { background: linear-gradient(90deg, rgba(6, 16, 32, 0.62) 0%, rgba(6, 16, 32, 0.34) 42%, rgba(6, 16, 32, 0) 74%), linear-gradient(0deg, rgba(8, 18, 12, 0.34) 0%, rgba(8, 18, 12, 0) 45%); }
.wx-hero[data-kind="snow"]::after, .wx-hero[data-kind="fog"]::after { background: linear-gradient(90deg, rgba(6, 16, 32, 0.72) 0%, rgba(6, 16, 32, 0.46) 46%, rgba(6, 16, 32, 0.1) 80%), linear-gradient(0deg, rgba(8, 18, 12, 0.4) 0%, rgba(8, 18, 12, 0) 45%); }
.wx-hero__in { text-shadow: 0 1px 2px rgba(4, 12, 24, 0.7), 0 2px 18px rgba(4, 12, 24, 0.55); }
.wx-hero .crumbs { font-size: 1rem; opacity: 1; }
.wx-hero__when { font-size: 1.15rem; font-weight: 600; opacity: 1; }
.wx-hero__meta { font-size: clamp(1.1rem, 1.8vw, 1.3rem); font-weight: 700; }
.wx-hero__foot { font-size: 1.02rem; font-weight: 600; }
.wx-hero__foot > span { opacity: 1; }
.wx-h p { font-size: 1.02rem; }
.wx-card h3 { font-size: 0.9rem; letter-spacing: 0.11em; color: var(--green); }
.wx-mooncard h3 { color: #ffd35c; }
.wx-note { font-size: 1.02rem; color: #46523f; }
.wx-mooncard .wx-note { color: #dbe3f5; font-size: 1.02rem; }
.wx-hint, .wx-moist p, .wx-facts span, .wx-maps figcaption, .wx-fc__legend, .wx-sources { font-size: 1rem; color: #46523f; }
.wx-pair small, .wx-soil__t small, .wx-suntimes small, .wx-key, .wx-marks { font-size: 0.95rem; color: #46523f; }
.wx-hour__time { font-size: 0.95rem; color: var(--ink); }
.wx-hour__pct { font-size: 0.9rem; color: #1f5a92; }
.wx-hours__t { font-size: 14.5px; }
.wx-day__name { font-size: 1.05rem; }
.wx-day__pop { font-size: 0.95rem; color: #1f5a92; }
.wx-day__lo { color: #46523f; font-weight: 600; }
.wx-day__lo, .wx-day__hi { font-size: 1.05rem; }
.wx-day__more { color: #3d4937; }
.wx-compass__l { font-size: 13px; fill: var(--ink); }
.wx-frost__v, .wx-rain__v { font-size: 13px; }
.wx-frost__d, .wx-rain__d { font-size: 12px; fill: #46523f; }
.wx-frost__mark { font-size: 11px; font-weight: 700; fill: #1f5a92; }
.wx-thermo__n { font-size: 11.5px; fill: #46523f; }
.wx-season__months { font-size: 0.85rem; color: #46523f; }
.wx-season__today::after { font-size: 0.85rem; }
.wx-fc__stats dt { font-size: 0.82rem; opacity: 1; }
.wx-fc__days span { font-size: 0.9rem; color: #46523f; }
.wx-year__axis { font-size: 13px; fill: #46523f; }
.wx-year__today { font-size: 14px; }
.wx-mooncal__day b { font-size: 0.86rem; }
.wx-mooncal__day small { font-size: 0.82rem; color: #46523f; }
.wx-alert summary span { font-size: 1rem; }
.wx-alert__src { font-size: 0.92rem; }
@media (max-width: 640px) {
	.wx-hero__meta { font-size: 1.12rem; }
	.wx-frost__v, .wx-rain__v { font-size: 18px; }
	.wx-frost__d { font-size: 17px; }
	.wx-rain__d { font-size: 15px; }
	.wx-frost__mark { font-size: 15px; }
	.wx-thermo__n { font-size: 12.5px; }
	.wx-year__axis { font-size: 24px; }
	.wx-year__today { font-size: 25px; }
	.wx-mooncal__grid { gap: 12px 2px; }
	.wx-mooncal__day b { font-size: 0.74rem; letter-spacing: -0.01em; white-space: nowrap; }
	.wx-mooncal__day small { font-size: 0.74rem; }
	.wx-season__months { font-size: 0.72rem; }
	.wx-day summary { grid-template-columns: minmax(96px, 1fr) 30px 36px 34px minmax(34px, 2fr) 34px; gap: 5px; }
	.wx-day__name { font-size: 1rem; }
}

/* ---- Place switch under the big temperature: Irmo stand or Kinards ---- */
.wx-loc[hidden] { display: none; }
.wx-loc { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(10, 25, 45, 0.45); backdrop-filter: blur(6px); text-shadow: none; }
.wx-loc button { font: inherit; font-size: 0.9rem; font-weight: 700; color: #fff; background: transparent; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.wx-loc button[aria-pressed="true"] { background: #fff; color: #10243d; cursor: default; }
.wx-loc button:focus-visible { outline: 2px solid #ffd35c; outline-offset: 2px; }

/* ---- Drought watch (U.S. Drought Monitor) ---- */
[data-wx-drought][hidden] { display: none; }
.dr__top { display: grid; gap: 14px 34px; align-items: center; }
@media (min-width: 760px) { .dr__top { grid-template-columns: minmax(220px, 300px) 1fr; } }
.dr__dial svg { display: block; width: 100%; max-width: 300px; margin-inline: auto; overflow: visible; }
.dr__needle { transform-origin: 110px 112px; transition: transform 1.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
.dr__say h3 span { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); }
.dr__facts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.dr__facts li { position: relative; padding-left: 18px; }
.dr__facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.dr__h { margin-top: 26px !important; }
.dr__strip { display: flex; align-items: flex-end; gap: 1px; height: 120px; margin-top: 10px; padding: 0 0 2px; border-bottom: 2px solid rgba(15, 51, 32, 0.25); touch-action: pan-y; }
.dr__wk { flex: 1 1 0; min-width: 0; border-radius: 2px 2px 0 0; transform-origin: bottom; animation: dr-grow 0.7s both cubic-bezier(0.2, 0.8, 0.3, 1); box-shadow: inset 0 0 0 0.5px rgba(27, 36, 23, 0.18); }
.dr__wk:hover { filter: brightness(0.9); outline: 2px solid var(--ink); outline-offset: 0; }
@keyframes dr-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.dr__axis { position: relative; height: 20px; font-size: 0.74rem; color: var(--muted); }
.dr__axis span { position: absolute; top: 3px; white-space: nowrap; padding-left: 4px; border-left: 1px solid rgba(15, 51, 32, 0.3); }
.dr__read { margin: 6px 0 0; min-height: 1.5em; font-weight: 600; }
.dr__key { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.86rem; color: var(--muted); }
.dr__key li { display: inline-flex; align-items: center; gap: 6px; }
.dr-c { width: 14px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(27, 36, 23, 0.25); }
.dr-c--n { background: #dfe8d2; } .dr-c--0 { background: #ffe93b; } .dr-c--1 { background: #fcd37f; } .dr-c--2 { background: #ffaa00; } .dr-c--3 { background: #e60000; } .dr-c--4 { background: #730000; }
.dr__src { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .dr__wk { animation: none; } .dr__needle { transition: none; } }
@media (max-width: 600px) { .dr__axis .dr__minor { display: none; } .dr__strip { height: 96px; gap: 0; } }

/* ---------- John's weather notes ---------- */
.wx-brief[hidden] { display: none; }
.wx-brief__card { position: relative; display: grid; gap: 18px clamp(24px, 4vw, 48px); padding-left: clamp(26px, 3.4vw, 40px); background: linear-gradient(180deg, #fffdf6 0%, var(--paper) 60%); overflow: hidden; }
.wx-brief__card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7px; background: linear-gradient(180deg, var(--sun), var(--leaf) 55%, var(--green-deep)); }
.wx-brief__head { margin: 6px 0 14px; font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; color: var(--green-deep); text-wrap: balance; }
.wx-brief__body p { margin: 0 0 12px; font-size: clamp(1.06rem, 1.5vw, 1.16rem); line-height: 1.6; color: var(--ink); max-width: 66ch; }
.wx-brief__body p:last-child { margin-bottom: 0; }
.wx-brief__field { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--radius-sm); background: #eef5e6; color: #24361f; font-size: 1.04rem; line-height: 1.5; }
.wx-brief__field b { display: block; font-size: 0.8rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--green); margin-bottom: 2px; }
/* About John sits in its own strip under the note, so the side column stays as short as the note. */
.wx-brief__who { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: start; padding-top: 18px; border-top: 1px solid var(--line); }
.wx-brief__who .wx-note { margin: 0; font-size: 0.98rem; line-height: 1.6; max-width: 92ch; }
.wx-brief__who b { color: var(--green-deep); }
.wx-brief__face { margin: 0; text-align: center; }
.wx-brief__face img { display: block; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #f6f0e2; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 16px rgba(40, 50, 30, 0.16); }
.wx-brief__face figcaption { margin-top: 6px; font-size: 0.72rem; line-height: 1.2; color: var(--muted, #6b6b5f); }
.wx-brief__listen { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.wx-brief__listen[hidden], .wx-brief__play[hidden], .wx-brief__audio[hidden] { display: none; }
.wx-brief__play { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 20px; border: 2px solid var(--green-deep); border-radius: 999px; background: var(--green-deep); color: #fff; font: inherit; font-weight: 700; font-size: 1.02rem; cursor: pointer; }
.wx-brief__play:hover { background: var(--green); border-color: var(--green); }
.wx-brief__play:disabled { opacity: 0.75; cursor: progress; }
.wx-brief__audio { width: min(100%, 420px); }
.wx-brief__voice { margin: 0; flex: 1 1 220px; font-size: 0.92rem; }
.wx-brief__src { margin: 0; font-size: 0.95rem; }
@media (max-width: 559px) {
	/* On a phone the words wrap around the portrait instead of squeezing into a narrow column. */
	.wx-brief__who { display: block; }
	.wx-brief__who::after { content: ""; display: block; clear: both; }
	.wx-brief__face { float: left; width: 84px; margin: 4px 14px 6px 0; }
}
@media (min-width: 940px) {
	.wx-brief__card { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; }
	.wx-brief__side { padding-top: 30px; }
	.wx-brief__who { grid-column: 1 / -1; grid-template-columns: 108px minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 6px; padding-top: 22px; }
	.wx-brief__face img { width: 108px; height: 108px; }
}
