@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;1,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,400&display=swap');

/* ============================================================
   THE ALMANAC — weather over a rotating world
   Full-bleed photography, frosted glass, live weather effects.
   ============================================================ */

:root {
  --veil-1: rgba(247, 245, 241, .66);
  --veil-2: rgba(247, 245, 241, .34);
  --glass:   rgba(255, 255, 255, .62);
  --glass-2: rgba(255, 255, 255, .44);
  --glass-hi: rgba(255, 255, 255, .82);

  --ink:   #14120E;
  --ink-2: #413C33;
  --ink-3: #6A6358;
  --rule:  rgba(20, 18, 14, .14);
  --rule-soft: rgba(20, 18, 14, .08);

  --critical: #96231A;
  --warning:  #D4541F;
  --advisory: #1A6DAA;
  --critical-bg: rgba(150, 35, 26, .10);
  --warning-bg:  rgba(212, 84, 31, .10);
  --advisory-bg: rgba(26, 109, 170, .10);

  --grid: rgba(20, 18, 14, .10);
  --shadow: 0 2px 6px rgba(10,12,16,.06), 0 16px 40px -20px rgba(10,12,16,.34);
  --focus: #1A6DAA;
  /* lifts loose text off the photograph where there is no card behind it */
  --glow: 0 1px 16px rgba(247,245,241,.95), 0 0 34px rgba(247,245,241,.7);

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:  'Archivo', ui-sans-serif, system-ui, sans-serif;

  --gut: clamp(1.15rem, 3.2vw, 2.5rem);
  --maxw: 1220px;
}

[data-theme="dark"] {
  --veil-1: rgba(9, 10, 13, .74);
  --veil-2: rgba(9, 10, 13, .44);
  --glass:   rgba(255, 255, 255, .085);
  --glass-2: rgba(255, 255, 255, .05);
  --glass-hi: rgba(255, 255, 255, .14);

  --ink:   #F6F3EC;
  --ink-2: #C4BDAF;
  --ink-3: #918A7C;
  --rule:  rgba(255, 255, 255, .15);
  --rule-soft: rgba(255, 255, 255, .08);

  --critical: #E4614C;
  --warning:  #E0A02B;
  --advisory: #5FA9E0;
  --critical-bg: rgba(228, 97, 76, .13);
  --warning-bg:  rgba(224, 160, 43, .13);
  --advisory-bg: rgba(95, 169, 224, .13);

  --grid: rgba(255, 255, 255, .12);
  --shadow: 0 2px 6px rgba(0,0,0,.35), 0 18px 44px -20px rgba(0,0,0,.8);
  --focus: #5FA9E0;
  --glow: 0 1px 16px rgba(9,10,13,.95), 0 0 34px rgba(9,10,13,.75);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: #23262b;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ============================================================ BACKGROUND */

.bg { position: fixed; inset: 0; z-index: -3; overflow: hidden; background: #23262b; }
.bg-layer {
  position: absolute; inset: -2%;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  will-change: opacity, transform;
  animation: drift 34s ease-in-out infinite alternate;
}
.bg-layer.on { opacity: 1; }
@keyframes drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.11) translate3d(-1.2%, -1%, 0); }
}

/* legibility veil — stronger at the top where the masthead sits */
.veil {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(to bottom, var(--veil-1) 0%, var(--veil-2) 32%, var(--veil-1) 78%);
}

/* place credit */
.credit {
  position: fixed; right: max(.7rem, env(safe-area-inset-right)); bottom: .7rem; z-index: 30;
  display: flex; align-items: center; gap: .5rem;
  font-size: .7rem; color: var(--ink-2);
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: .32rem .72rem; max-width: min(90vw, 460px);
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(6px); transition: opacity .6s, transform .6s;
}
.credit.on { opacity: 1; transform: none; }
.credit b { font-weight: 600; color: var(--ink); }
.credit a { color: var(--ink-3); text-decoration: none; }
.credit a:hover { color: var(--ink); text-decoration: underline; }
.credit .sep { opacity: .4; }
.credit button {
  color: var(--ink-3); display: grid; place-items: center;
  width: 17px; height: 17px; border-radius: 50%; flex: none;
}
.credit button:hover { color: var(--ink); background: var(--glass-hi); }
.credit svg { width: 11px; height: 11px; }
@media (max-width: 700px) { .credit .region, .credit .lic { display: none; } }

/* ============================================================ WEATHER FX */

.fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* sun */
.sun {
  position: absolute; top: -14vh; right: 8vw;
  width: 52vmin; height: 52vmin; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,222,146,.42) 0%, rgba(255,202,106,.17) 38%, rgba(255,190,90,0) 68%);
  opacity: 0; transition: opacity 1.4s;
  animation: breathe 9s ease-in-out infinite;
}
.sun.on { opacity: 1; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.09); } }

.sun::after {
  content: ""; position: absolute; inset: 18%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255,220,140,.24) 0 8deg, transparent 8deg 45deg);
  animation: spin 70s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* moon */
.moon {
  position: absolute; top: 7vh; right: 11vw;
  width: 15vmin; height: 15vmin; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, rgba(228,236,255,.55), rgba(190,205,240,.10) 62%, transparent 72%);
  box-shadow: 0 0 9vmin 3vmin rgba(190,210,255,.11);
  opacity: 0; transition: opacity 1.6s;
  animation: breathe 14s ease-in-out infinite;
}
.moon.on { opacity: 1; }

/* drifting clouds */
.cloud {
  position: absolute; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, rgba(255,255,255,.5), rgba(255,255,255,.16) 55%, transparent 72%);
  filter: blur(6px);
  opacity: 0; transition: opacity 2s;
  will-change: transform;
}
[data-theme="dark"] .cloud {
  background: radial-gradient(ellipse at 50% 60%, rgba(196,206,226,.24), rgba(160,172,196,.08) 55%, transparent 72%);
}
.cloud.on { opacity: 1; }
@keyframes sail { from { transform: translateX(-40vw); } to { transform: translateX(125vw); } }

/* fog banks */
.fogbank {
  position: absolute; left: -30%; width: 160%; height: 34vh;
  background: linear-gradient(to bottom, transparent, rgba(226,228,232,.5) 45%, transparent);
  filter: blur(16px); opacity: 0; transition: opacity 2s;
}
[data-theme="dark"] .fogbank { background: linear-gradient(to bottom, transparent, rgba(150,158,172,.34) 45%, transparent); }
.fogbank.on { opacity: 1; }

/* lightning */
.flash {
  position: absolute; inset: 0; background: rgba(255,252,235,.7);
  opacity: 0; mix-blend-mode: screen;
}
.flash.zap { animation: zap 1.1s ease-out; }
@keyframes zap {
  0% { opacity: 0; } 4% { opacity: .85; } 9% { opacity: .1; }
  14% { opacity: .65; } 22% { opacity: 0; } 100% { opacity: 0; }
}

/* ============================================================ SHELL */

.wrap { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

.kicker {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-3);
}

.card {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* ============================================================ MASTHEAD */

.masthead {
  position: sticky; top: 0; z-index: 40;
  background: var(--glass-2);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--rule);
}
.masthead .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 62px; padding-top: .5rem; padding-bottom: .5rem; flex-wrap: wrap;
}

.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.32rem;
  letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  display: flex; align-items: baseline; gap: .5rem;
}
.wordmark em { font-style: italic; font-weight: 300; font-size: .66em; color: var(--ink-3); letter-spacing: .02em; }

.mast-tools { margin-left: auto; display: flex; align-items: center; gap: .45rem; }
.navlink {
  text-decoration: none; font-size: .82rem; font-weight: 500; color: var(--ink-2);
  padding: .35rem .1rem; border-bottom: 1px solid transparent;
}
.navlink:hover { color: var(--ink); border-bottom-color: var(--ink); }

.seg {
  display: inline-flex; border: 1px solid var(--rule); border-radius: 999px;
  overflow: hidden; background: var(--glass-2);
}
.seg button { padding: .34rem .66rem; font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--glass-hi); }
[data-theme="dark"] .seg button[aria-pressed="true"] { color: #14120E; background: var(--ink); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--ink); }

.iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--glass-2); color: var(--ink-2);
}
.iconbtn:hover { color: var(--ink); border-color: var(--ink-3); }
.iconbtn svg { width: 16px; height: 16px; }

/* ============================================================ SEARCH */

.searchwrap { position: relative; flex: 1 1 240px; max-width: 380px; }
.searchbar {
  display: flex; align-items: center; gap: .5rem;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--glass); padding: .34rem .5rem .34rem .85rem;
  backdrop-filter: blur(14px); transition: border-color .15s;
}
.searchwrap:focus-within .searchbar { border-color: var(--ink-3); }
.searchbar input { flex: 1; border: none; background: none; outline: none; font-size: .88rem; min-width: 0; padding: .16rem 0; }
.searchbar input::placeholder { color: var(--ink-3); }
.searchbar svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }

.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; max-height: 320px; overflow-y: auto;
}
[data-theme="dark"] .suggest { background: rgba(18,20,24,.86); }
.suggest[hidden] { display: none; }
.suggest ul { margin: 0; padding: .3rem; }
.suggest li { list-style: none; }
.suggest button { width: 100%; text-align: left; padding: .5rem .65rem; border-radius: 10px; display: flex; align-items: baseline; gap: .5rem; }
.suggest button:hover, .suggest button.active { background: var(--glass-hi); }
.suggest .s-name { font-weight: 500; font-size: .9rem; }
.suggest .s-meta { font-size: .74rem; color: var(--ink-3); margin-left: auto; white-space: nowrap; }
.suggest .s-empty { padding: .8rem .9rem; font-size: .84rem; color: var(--ink-3); }

/* saved chips */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; padding: .8rem 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: .28rem .4rem .28rem .72rem; font-size: .78rem;
  background: var(--glass-2); color: var(--ink-2); backdrop-filter: blur(10px);
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); color: var(--glass-hi); border-color: var(--ink); }
[data-theme="dark"] .chip[aria-current="true"] { color: #14120E; }
.chip .x { opacity: .55; width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; }
.chip .x:hover { opacity: 1; background: color-mix(in srgb, currentColor 20%, transparent); }
.chip .x svg { width: 9px; height: 9px; }

/* ============================================================ HERO */

.hero { padding: clamp(1.8rem, 5vw, 3.6rem) 0 1.6rem; }
.hero-head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.hero-place { flex: 1 1 auto; min-width: 0; }
.hero-place h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  margin: .25rem 0 0; letter-spacing: -.015em; line-height: 1.1;
  text-shadow: var(--glow);
}
.hero-place .sub { font-size: .84rem; color: var(--ink-3); margin-top: .3rem; text-shadow: var(--glow); }
.hero-place .kicker, .hero-spark .kicker { text-shadow: var(--glow); }
.cond, .feels { text-shadow: var(--glow); }

.starbtn {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: .36rem .78rem; font-size: .76rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2);
  background: var(--glass-2); white-space: nowrap; backdrop-filter: blur(10px);
}
.starbtn:hover { border-color: var(--ink-3); color: var(--ink); }
.starbtn svg { width: 13px; height: 13px; }
.starbtn[aria-pressed="true"] { background: var(--ink); color: var(--glass-hi); border-color: var(--ink); }
[data-theme="dark"] .starbtn[aria-pressed="true"] { color: #14120E; }

.hero-main {
  display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3.2rem); align-items: end;
  margin-top: clamp(.8rem, 2vw, 1.4rem);
  padding-bottom: 1.6rem; border-bottom: 1px solid var(--rule);
}

.bigtemp {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(6rem, 20vw, 13.5rem);
  line-height: .82; letter-spacing: -.05em;
  color: var(--temp-accent, var(--ink));
  display: flex; align-items: flex-start;
  font-variant-numeric: lining-nums tabular-nums;
  text-shadow: 0 2px 26px rgba(0,0,0,.16);
}
[data-theme="dark"] .bigtemp { text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.bigtemp .deg { font-size: .3em; line-height: 1; margin-top: .16em; margin-left: .04em; letter-spacing: 0; }

.hero-side { padding-bottom: .6rem; min-width: 0; }
.cond {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.3rem, 2.7vw, 2rem); letter-spacing: -.01em; line-height: 1.15;
}
.cond .wicon { flex: none; width: clamp(34px, 5vw, 46px); height: clamp(34px, 5vw, 46px); color: var(--temp-accent, var(--ink-2)); }
.feels { font-size: .92rem; color: var(--ink-2); margin-top: .55rem; }
.hero-spark { margin-top: 1.1rem; }
.hero-spark .kicker { display: block; margin-bottom: .35rem; }

@media (max-width: 620px) {
  .hero-main { grid-template-columns: 1fr; gap: .6rem; align-items: start; }
  .hero-side { padding-bottom: 0; }
  .bigtemp { font-size: clamp(5.5rem, 33vw, 9rem); }
}

/* ============================================================ SECTIONS */

section.band { padding: clamp(2rem, 5vw, 3.4rem) 0; border-bottom: 1px solid var(--rule); }
section.band:last-of-type { border-bottom: none; }
.sec-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin: 0; letter-spacing: -.015em; text-shadow: var(--glow); }
.sec-head .note { margin-left: auto; font-size: .78rem; color: var(--ink-3); text-shadow: var(--glow); }

/* ============================================================ BULLETINS */

.bulletins { display: grid; gap: .7rem; }
.bulletin {
  border: 1px solid var(--rule); border-left: 3px solid var(--lvl, var(--advisory));
  border-radius: 14px; background: var(--lvl-bg, var(--glass));
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  padding: .9rem 1.1rem; box-shadow: var(--shadow);
}
.bulletin summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.bulletin summary::-webkit-details-marker { display: none; }
.bul-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--lvl); flex: none;
}
.bul-badge svg { width: 12px; height: 12px; }
.bul-title { font-weight: 600; font-size: .95rem; }
.bul-when { margin-left: auto; font-size: .74rem; color: var(--ink-3); white-space: nowrap; }
.bul-area { font-size: .8rem; color: var(--ink-2); margin-top: .4rem; }
.bulletin p {
  margin: .7rem 0 0; font-size: .86rem; line-height: 1.6; color: var(--ink-2);
  white-space: pre-wrap; border-top: 1px solid var(--rule-soft); padding-top: .7rem;
}
.bul-none {
  display: flex; align-items: center; gap: .6rem;
  border: 1px dashed var(--rule); border-radius: 14px;
  padding: .95rem 1.1rem; font-size: .88rem; color: var(--ink-3);
  background: var(--glass-2); backdrop-filter: blur(12px);
}
.bul-none svg { width: 16px; height: 16px; flex: none; }

/* ============================================================ STATS */

.statgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--rule); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow);
}
.stat { padding: .95rem 1rem 1rem; min-width: 0; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.stat dt { font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.stat dd { margin: .4rem 0 0; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.1; }
.stat dd small { font-size: .5em; color: var(--ink-3); font-family: var(--sans); letter-spacing: 0; margin-left: .15em; }
.stat .fine { font-size: .74rem; color: var(--ink-3); margin-top: .3rem; font-family: var(--sans); }

.aqi-pill {
  display: inline-block; font-family: var(--sans); font-size: .68rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; padding: .12rem .45rem;
  border-radius: 999px; border: 1px solid currentColor; margin-top: .35rem;
}

.sunarc { grid-column: span 2; }
@media (max-width: 560px) { .sunarc { grid-column: span 1; } }
.sunarc svg { width: 100%; height: 62px; overflow: visible; display: block; margin-top: .3rem; }
.sunarc .times { display: flex; justify-content: space-between; font-size: .74rem; color: var(--ink-3); margin-top: .1rem; }

/* ============================================================ CHARTS */

.chartcard {
  border: 1px solid var(--rule); border-radius: 16px; background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  padding: 1.1rem 1.1rem .6rem; position: relative; box-shadow: var(--shadow);
}
.chart-host { position: relative; }
.chart-host svg { display: block; width: 100%; height: auto; touch-action: pan-y; }

.chart-line { fill: none; stroke: var(--temp-accent, var(--ink)); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart-grid { stroke: var(--grid); stroke-width: 1; }
.chart-axis { fill: var(--ink-3); font-size: 10.5px; font-family: var(--sans); letter-spacing: .04em; }
.chart-hit { fill: transparent; }
.chart-cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.chart-dot { fill: var(--glass-hi); stroke: var(--temp-accent, var(--ink)); stroke-width: 2.5; opacity: 0; }
.chart-host.on .chart-cross, .chart-host.on .chart-dot { opacity: 1; }
.chart-peak { fill: var(--ink-2); font-size: 11px; font-weight: 600; font-family: var(--sans); }
.chart-peakdot { fill: var(--ink-2); }

.tip {
  position: absolute; z-index: 20; pointer-events: none; opacity: 0;
  transform: translate(-50%, -118%); transition: opacity .1s;
  background: var(--ink); color: var(--glass-hi);
  border-radius: 9px; padding: .45rem .6rem; white-space: nowrap;
  box-shadow: var(--shadow); font-size: .78rem; line-height: 1.35;
}
[data-theme="dark"] .tip { color: #14120E; }
.chart-host.on .tip { opacity: 1; }
.tip b { font-size: .92rem; font-weight: 600; }
.tip span { display: block; opacity: .72; font-size: .72rem; }

.strip { display: flex; gap: .4rem; overflow-x: auto; scroll-snap-type: x proximity; margin-top: .9rem; padding-bottom: .5rem; scrollbar-width: thin; }
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 99px; }
.hourcell {
  flex: 0 0 auto; width: 74px; scroll-snap-align: start;
  border: 1px solid var(--rule-soft); border-radius: 12px;
  padding: .6rem .35rem .55rem; text-align: center; background: var(--glass-2);
}
.hourcell.now { border-color: var(--ink-3); background: var(--glass-hi); }
[data-theme="dark"] .hourcell.now { background: rgba(255,255,255,.14); }
.hourcell .h { font-size: .68rem; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.hourcell .wicon { width: 24px; height: 24px; margin: .35rem auto .2rem; display: block; color: var(--ink-2); }
.hourcell .t { font-family: var(--serif); font-size: 1.08rem; }
.hourcell .p { font-size: .68rem; color: var(--advisory); margin-top: .1rem; min-height: 1em; }

/* ============================================================ WEEK */

.week {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--rule); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow);
}
.dayrow {
  display: grid;
  grid-template-columns: 4.6rem 30px 2.6rem 3.1rem minmax(90px, 1fr) 3.1rem;
  align-items: center; gap: .8rem;
  padding: .8rem 1.05rem; border-bottom: 1px solid var(--rule-soft);
  animation: rise .5s cubic-bezier(.2,.7,.3,1) backwards;
}
.dayrow:last-child { border-bottom: none; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } }
.dayrow .dname { font-weight: 500; font-size: .88rem; }
.dayrow .dname small { display: block; font-size: .7rem; color: var(--ink-3); font-weight: 400; }
.dayrow .wicon { width: 26px; height: 26px; color: var(--ink-2); }
.dayrow .lo, .dayrow .hi { font-family: var(--serif); font-size: 1.06rem; }
.dayrow .lo { color: var(--ink-3); text-align: right; }
.dayrow .hi { text-align: right; }

.rangetrack { position: relative; height: 7px; border-radius: 999px; background: var(--rule-soft); }
[data-theme="dark"] .rangetrack { background: rgba(255,255,255,.10); }
.rangefill { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.rangenow { position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--glass-hi); border: 2px solid var(--ink); }
.wk-precip { font-size: .72rem; color: var(--advisory); }

@media (max-width: 620px) {
  .dayrow { grid-template-columns: 3.3rem 22px 2.2rem 2.4rem minmax(48px, 1fr) 2.4rem; gap: .45rem; padding: .75rem .8rem; }
  .dayrow .dname small { display: none; }
  .dayrow .lo, .dayrow .hi { font-size: .95rem; }
  .wk-precip { font-size: .66rem; }
}

/* ============================================================ PREFS */

.prefs {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
}
.prefrow { padding: .95rem 1.1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--rule-soft); }
.prefrow:last-child { border-bottom: none; }
.prefrow .lab { font-size: .88rem; font-weight: 500; }
.prefrow .lab small { display: block; font-weight: 400; font-size: .76rem; color: var(--ink-3); margin-top: .12rem; }
.prefrow .ctl { margin-left: auto; }

/* ============================================================ MISC */

.skeleton { color: transparent !important; position: relative; }
.skeleton::after {
  content: ""; position: absolute; inset: .15em 0 .2em;
  background: linear-gradient(90deg, var(--glass-2), var(--glass-hi), var(--glass-2));
  background-size: 200% 100%; border-radius: 6px; animation: shim 1.3s linear infinite;
}
@keyframes shim { to { background-position: -200% 0; } }

.errorbar {
  display: flex; align-items: center; gap: .6rem;
  border: 1px solid var(--critical); background: var(--critical-bg); color: var(--critical);
  border-radius: 12px; padding: .8rem 1rem; font-size: .87rem; margin: 1rem 0;
  backdrop-filter: blur(12px);
}
.errorbar svg { width: 16px; height: 16px; flex: none; }
.errorbar[hidden] { display: none; }

footer.foot {
  border-top: 1px solid var(--rule); padding: 2rem 0 4.2rem;
  font-size: .78rem; color: var(--ink-3);
  display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: baseline;
}
footer.foot a { color: var(--ink-2); }
footer.foot .sp { margin-left: auto; }

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tablewrap { margin-top: 1rem; }
.tablewrap summary { font-size: .78rem; color: var(--ink-3); cursor: pointer; }
.tablewrap summary:hover { color: var(--ink); }
.tablewrap table { width: 100%; border-collapse: collapse; margin-top: .7rem; font-size: .8rem; }
.tablewrap th, .tablewrap td { text-align: right; padding: .3rem .5rem; border-bottom: 1px solid var(--rule-soft); }
.tablewrap th:first-child, .tablewrap td:first-child { text-align: left; }
.tablewrap th { color: var(--ink-3); font-weight: 600; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }

/* ============================================================ ABOUT */

.about-hero { padding: clamp(2rem, 6vw, 4rem) 0 2rem; border-bottom: 1px solid var(--rule); }
.about-hero h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 7vw, 4.6rem); letter-spacing: -.035em; line-height: .95; margin: .5rem 0 0; }
.about-hero .lede { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.05rem, 2.2vw, 1.4rem); color: var(--ink-2); max-width: 46ch; margin: 1.1rem 0 0; line-height: 1.45; }

.cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
}
.col { padding: 1.3rem 1.25rem 1.5rem; border-right: 1px solid var(--rule-soft); }
.col h3 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; margin: .5rem 0 .6rem; letter-spacing: -.01em; }
.col ul { margin: 0; padding-left: 1.05rem; }
.col li { font-size: .87rem; color: var(--ink-2); line-height: 1.55; margin-bottom: .35rem; }
.col p { font-size: .87rem; color: var(--ink-2); line-height: 1.6; margin: 0; }

.factbox {
  border: 1px solid var(--rule); border-radius: 16px; background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  padding: clamp(1.4rem, 4vw, 2.4rem); margin-top: 1.4rem;
  display: flex; gap: 1.2rem; align-items: flex-start; box-shadow: var(--shadow);
}
.factbox svg { width: 26px; height: 26px; color: var(--ink-3); flex: none; margin-top: .2rem; }
.factbox .f { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.1rem, 2.6vw, 1.6rem); line-height: 1.35; margin: 0; letter-spacing: -.01em; }
.factbox button { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); margin-top: .9rem; }
.factbox button:hover { color: var(--ink); }

/* ============================================================ MOTION */

@media (prefers-reduced-motion: reduce) {
  .bg-layer, .sun, .sun::after, .moon, .cloud, .fogbank, .flash, .dayrow, .skeleton::after {
    animation: none !important;
  }
  * { transition-duration: .01ms !important; }
}
