:root {
  --paper: #e9e4d8;
  --paper-light: #f4f0e7;
  --ink: #163143;
  --ink-soft: #52646d;
  --line: rgba(22, 49, 67, 0.18);
  --blue: #1f5874;
  --blue-light: #80a9b7;
  --accent: #da4b2f;
  --yellow: #f0b84b;
  --radius: 2px;
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", "Avenir Next", sans-serif;
  --shadow: 0 24px 80px rgba(21, 46, 59, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  min-width: 320px;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--paper-light);
  padding: 10px 14px;
}
.skip-link:focus { transform: translateY(0); }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.wordmark {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.79rem;
}

.wordmark-mark {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  position: relative;
}
.wordmark-mark::before,
.wordmark-mark::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.wordmark-mark::before { width: 1px; height: 30px; left: 11px; top: -4px; transform: rotate(35deg); }
.wordmark-mark::after { height: 1px; width: 30px; left: -4px; top: 11px; transform: rotate(-15deg); }

.header-meta { display: flex; align-items: center; gap: 22px; }
.live-chip { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
.live-chip i, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #3a8b67; box-shadow: 0 0 0 4px rgba(58,139,103,.12); display: inline-block; }

.unit-toggle {
  border: 1px solid var(--line);
  background: transparent;
  padding: 3px;
  border-radius: 999px;
  display: flex;
  cursor: pointer;
}
.unit-toggle span { min-width: 31px; padding: 5px 7px; border-radius: 999px; font-size: 0.74rem; transition: background .25s, color .25s; }
.unit-toggle .active { background: var(--ink); color: var(--paper-light); }

main { padding: 0 clamp(20px, 5vw, 76px) 44px; }
.search-region {
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(430px, 1.1fr);
  gap: clamp(40px, 8vw, 140px);
  align-items: end;
  padding: clamp(48px, 7vw, 94px) 0 58px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow.accent { color: var(--accent); }

.search-intro h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.55rem, 5vw, 5.3rem);
  letter-spacing: -0.052em;
  line-height: .94;
  margin: 0;
}
.search-intro h1 em { color: var(--accent); font-weight: 500; }

.search-tools { position: relative; padding-bottom: 2px; }
.search-form { position: relative; }
.search-form > label { display: block; margin-bottom: 9px; font-size: 0.78rem; font-weight: 600; }
.search-input-wrap {
  height: 64px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--ink);
}
.search-input-wrap > svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.search-input-wrap input { border: 0; outline: 0; background: transparent; min-width: 0; font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.45rem); color: var(--ink); }
.search-input-wrap input::placeholder { color: rgba(22,49,67,.45); }
.search-input-wrap:focus-within { border-color: var(--accent); }
.search-input-wrap button {
  border: 0;
  background: var(--ink);
  color: var(--paper-light);
  padding: 12px 17px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  border-radius: var(--radius);
  transition: transform .2s, background .2s;
}
.search-input-wrap button:hover { background: var(--accent); transform: translateY(-2px); }
.search-input-wrap button:focus-visible, .location-button:focus-visible, .unit-toggle:focus-visible { outline: 3px solid rgba(218,75,47,.35); outline-offset: 3px; }

.location-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
}
.location-button:hover { border-color: var(--ink); }
.location-button:disabled { opacity: .5; cursor: wait; }
.location-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#search-hint { display: inline; margin: 0 0 0 18px; color: var(--ink-soft); font-size: .72rem; }

.search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--paper-light);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.result-option { width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; display: flex; justify-content: space-between; gap: 18px; cursor: pointer; }
.result-option:last-child { border-bottom: 0; }
.result-option:hover, .result-option:focus { background: rgba(31,88,116,.08); outline: 0; }
.result-option strong { font-family: var(--display); font-size: 1.04rem; }
.result-option span { font-size: .72rem; color: var(--ink-soft); text-align: right; }

.notice {
  background: #f6d7c8;
  color: #6d271d;
  border-top: 1px solid rgba(109,39,29,.22);
  border-bottom: 1px solid rgba(109,39,29,.22);
  padding: 15px 18px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
}
.notice[hidden] { display: none; }
.notice-icon { width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.notice strong { display: block; font-family: var(--display); font-size: 1rem; }
.notice p { margin: 2px 0 0; font-size: .78rem; }
.notice > button { border: 0; background: transparent; cursor: pointer; font-size: 1.5rem; }

.dashboard-shell { position: relative; min-height: 620px; }
.dashboard-content { opacity: 1; transition: opacity .35s ease; }
.loading-state { display: none; }
.dashboard-shell.loading .dashboard-content { opacity: .12; pointer-events: none; }
.dashboard-shell.loading .loading-state {
  position: absolute;
  z-index: 10;
  inset: 0;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.loading-state p { font-family: var(--display); font-size: 1.1rem; }
.loading-orbit { width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 50%; position: relative; animation: orbit-spin 1.8s linear infinite; }
.loading-orbit::before { content: ""; position: absolute; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; left: 11px; top: 11px; }
.loading-orbit span { width: 12px; height: 12px; background: var(--accent); border-radius: 50%; position: absolute; top: -6px; left: 29px; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.current-section {
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(480px, 1.1fr);
  min-height: 560px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}
.current-copy { padding: clamp(36px, 5.5vw, 76px); display: flex; flex-direction: column; }
.place-line { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.updated-time { margin: 0; color: var(--ink-soft); font-size: .7rem; }
.current-copy h2 { margin: 22px 0 0; font-family: var(--display); font-size: clamp(3rem, 6vw, 6.4rem); line-height: .9; letter-spacing: -.055em; font-weight: 500; }
.place-detail { margin: 13px 0 0; font-size: .78rem; color: var(--ink-soft); }

.current-reading { margin: auto 0 35px; display: flex; align-items: flex-end; gap: 22px; }
.current-temp { font-family: var(--display); font-size: clamp(5rem, 10vw, 9.6rem); line-height: .76; letter-spacing: -.08em; }
.condition-label { font-family: var(--display); font-size: clamp(1.2rem, 2vw, 1.7rem); line-height: 1.05; margin: 0 0 7px; }
.feels-like { color: var(--ink-soft); font-size: .78rem; margin: 0 0 8px; }

.current-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin: 0; padding-top: 17px; gap: 16px; }
.current-metrics div { min-width: 0; }
.current-metrics dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.current-metrics dd { margin: 5px 0 0; font-family: var(--display); font-size: 1.05rem; }

.sky-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 520px;
  background: #8db6c1;
  transition: background 1s ease;
}
.sky-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(244,240,231,.55), transparent 45%, rgba(31,88,116,.24));
  z-index: -1;
}
.sky-stage.night { background: #284653; }
.sky-stage.cloudy { background: #91a7aa; }
.sky-stage.rain, .sky-stage.storm { background: #5c7882; }
.sky-stage.snow { background: #afc4c6; }
.sky-orbit { position: absolute; border: 1px solid rgba(244,240,231,.32); border-radius: 50%; }
.orbit-one { width: 520px; height: 520px; right: -120px; top: -150px; }
.orbit-two { width: 720px; height: 720px; right: -205px; top: -250px; }
.celestial { position: absolute; width: 142px; height: 142px; border-radius: 50%; background: var(--yellow); right: 19%; top: 18%; box-shadow: 0 0 0 28px rgba(240,184,75,.13); animation: celestial-drift 7s ease-in-out infinite alternate; }
.celestial span { position: absolute; inset: -54px; border: 1px dashed rgba(244,240,231,.5); border-radius: 50%; animation: orbit-spin 25s linear infinite; }
.night .celestial { background: #e6e0cb; box-shadow: -17px 8px 0 2px #284653, 0 0 0 26px rgba(230,224,203,.08); }
.cloudy .celestial, .rain .celestial, .storm .celestial, .snow .celestial { opacity: .4; }
@keyframes celestial-drift { to { transform: translate(8px, -9px); } }

.cloud { position: absolute; display: flex; align-items: flex-end; opacity: .08; transition: opacity .8s; animation: cloud-drift 10s ease-in-out infinite alternate; }
.cloud i { display: block; background: var(--paper-light); border-radius: 999px 999px 10px 10px; }
.cloud i:nth-child(1) { width: 90px; height: 50px; margin-right: -25px; }
.cloud i:nth-child(2) { width: 110px; height: 84px; }
.cloud i:nth-child(3) { width: 85px; height: 58px; margin-left: -28px; }
.cloud-one { top: 48%; left: 11%; transform: scale(.9); }
.cloud-two { top: 66%; right: -2%; transform: scale(.62); animation-delay: -4s; }
.cloudy .cloud, .rain .cloud, .storm .cloud, .snow .cloud { opacity: .76; }
.storm .cloud { filter: brightness(.72); }
@keyframes cloud-drift { to { translate: 18px 4px; } }

.precipitation { position: absolute; inset: 61% 8% 8% 12%; display: flex; justify-content: space-around; opacity: 0; transition: opacity .6s; }
.rain .precipitation, .storm .precipitation, .snow .precipitation { opacity: .72; }
.precipitation i { width: 2px; height: 42px; background: var(--paper-light); transform: rotate(12deg); animation: rain-fall 1.1s linear infinite; }
.precipitation i:nth-child(2n) { animation-delay: -.5s; }
.precipitation i:nth-child(3n) { animation-delay: -.8s; }
.snow .precipitation i { width: 7px; height: 7px; border-radius: 50%; transform: none; animation-duration: 2.4s; }
@keyframes rain-fall { from { translate: 0 -24px; opacity: 0; } 30% { opacity: 1; } to { translate: -10px 80px; opacity: 0; } }

.sky-caption { position: absolute; bottom: 24px; left: 28px; right: 28px; padding-top: 12px; border-top: 1px solid rgba(244,240,231,.48); display: flex; justify-content: space-between; color: var(--paper-light); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }

.days-section, .comparison-section, .details-section { padding: clamp(70px, 10vw, 140px) 0 0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 32px; }
.section-heading h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(2.15rem, 4vw, 4rem); letter-spacing: -.045em; line-height: .98; }
.section-heading > p { margin: 0 0 3px; max-width: 310px; font-size: .76rem; color: var(--ink-soft); text-align: right; }

.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.day-card { padding: 20px 14px 19px; border-right: 1px solid var(--line); min-width: 0; }
.day-card:last-child { border-right: 0; }
.day-card.today { background: var(--ink); color: var(--paper-light); margin-top: -8px; padding-top: 28px; }
.day-name { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; }
.day-name strong { font-family: var(--display); font-size: 1.04rem; }
.day-name span { font-size: .61rem; text-transform: uppercase; letter-spacing: .08em; opacity: .68; }
.weather-symbol { height: 58px; display: flex; align-items: center; font-family: var(--display); font-size: 1.55rem; color: var(--accent); }
.today .weather-symbol { color: var(--yellow); }
.day-condition { min-height: 32px; margin: 0 0 20px; font-size: .69rem; color: var(--ink-soft); }
.today .day-condition { color: rgba(244,240,231,.68); }
.day-temps { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); }
.day-temps strong { font-size: 1.45rem; font-weight: 500; }
.day-temps span { font-size: .9rem; opacity: .58; }
.rain-chance { margin: 8px 0 0; font-size: .63rem; opacity: .68; }

.comparison-heading { align-items: start; }
.model-method { width: min(430px, 42%); border-top: 1px solid var(--accent); padding-top: 11px; }
.model-method span { display: block; color: var(--accent); font-size: .62rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; margin-bottom: 6px; }
.model-method p { margin: 0; font-size: .74rem; }

.chart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; background: var(--paper-light); border-top: 3px solid var(--ink); }
.chart-frame { min-width: 0; padding: clamp(22px, 3.5vw, 45px); }
.chart-topline { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.chart-legend { display: flex; gap: 21px; flex-wrap: wrap; font-size: .69rem; font-weight: 600; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 21px; height: 2px; display: inline-block; }
.official-key, .pressure-key { background: var(--blue); }
.northcast-key { background: var(--accent); }
.humidity-key { background: var(--yellow); }
.chart-unit { font-size: .65rem; color: var(--ink-soft); }
.chart { width: 100%; min-height: 330px; position: relative; }
.chart-empty { min-height: 300px; display: grid; place-items: center; border: 1px dashed var(--line); color: var(--ink-soft); padding: 28px; text-align: center; }
.chart-empty p { max-width: 390px; font-family: var(--display); font-size: 1.1rem; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--ink-soft); font-family: var(--body); font-size: 10px; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-line { stroke: rgba(22,49,67,.45); stroke-width: 1; }
.chart .official-line { fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .model-line { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: rgba(31,88,116,.07); }
.chart .pressure-line { fill: none; stroke: var(--blue); stroke-width: 2.3; }
.chart .humidity-line { fill: none; stroke: #d59626; stroke-width: 2.3; stroke-dasharray: 6 4; }
.chart .focus-dot { stroke: var(--paper-light); stroke-width: 2; }

.model-summary { background: var(--ink); color: var(--paper-light); padding: 37px 30px 30px; display: flex; flex-direction: column; }
.summary-kicker { font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 9px; color: rgba(244,240,231,.7); }
.summary-number { font-family: var(--display); font-size: 4.2rem; letter-spacing: -.07em; line-height: 1; margin: 0; color: var(--yellow); }
.summary-explain { font-size: .7rem; color: rgba(244,240,231,.66); margin: 7px 0 30px; }
.model-summary dl { margin: 0; border-top: 1px solid rgba(244,240,231,.2); }
.model-summary dl div { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid rgba(244,240,231,.2); }
.model-summary dt { font-size: .69rem; color: rgba(244,240,231,.7); }
.model-summary dd { margin: 0; font-family: var(--display); font-size: .9rem; }
.model-note { margin: auto 0 0; padding-top: 28px; font-size: .61rem; color: rgba(244,240,231,.52); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr); border-top: 1px solid var(--ink); }
.atmosphere-chart-frame { padding-left: 0; }
.field-notes { border-left: 1px solid var(--line); display: grid; grid-template-rows: repeat(3, 1fr); }
.field-notes > div { padding: 24px 28px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.field-notes > div:last-child { border-bottom: 0; }
.field-notes span { font-size: .63rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.field-notes strong { font-family: var(--display); font-size: 1.75rem; font-weight: 500; margin: 3px 0; }
.field-notes p { margin: 0; font-size: .66rem; color: var(--ink-soft); }

.data-footer { border-top: 1px solid var(--ink); margin-top: clamp(72px, 10vw, 140px); padding: 19px 0 0; display: flex; justify-content: space-between; gap: 30px; font-size: .67rem; color: var(--ink-soft); }
.data-footer p { margin: 0; }
.data-footer a { text-underline-offset: 3px; }
.live-dot { margin-right: 8px; width: 6px; height: 6px; }

.reveal { animation: reveal-in .7s cubic-bezier(.22,1,.36,1) both; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .14s; }
.reveal:nth-child(4) { animation-delay: .2s; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1050px) {
  .search-region { grid-template-columns: 1fr; gap: 36px; align-items: initial; }
  .current-section { grid-template-columns: 1fr; }
  .sky-stage { min-height: 430px; }
  .current-reading { margin-top: 60px; }
  .day-strip { overflow-x: auto; grid-template-columns: repeat(7, minmax(130px, 1fr)); }
  .chart-layout { grid-template-columns: 1fr; }
  .model-summary { min-height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
  .model-summary dl { grid-column: 2; grid-row: 1 / span 3; }
  .model-note { grid-column: 1; margin: 0; }
}

@media (max-width: 720px) {
  .site-header { height: 62px; }
  .header-meta { gap: 11px; }
  .live-chip { display: none; }
  main { padding-inline: 14px; }
  .search-region { padding: 43px 6px 44px; min-height: 0; }
  .search-intro h1 { font-size: clamp(2.7rem, 13vw, 4.5rem); }
  .search-input-wrap { grid-template-columns: 21px 1fr; height: auto; padding: 10px 0; }
  .search-input-wrap button { grid-column: 1 / -1; width: 100%; margin-top: 7px; }
  .location-button { margin-top: 15px; }
  #search-hint { display: block; margin: 8px 0 0; }
  .current-section { margin-inline: -14px; }
  .current-copy { padding: 34px 22px 31px; }
  .place-line { align-items: flex-start; }
  .current-copy h2 { font-size: clamp(3.3rem, 17vw, 5.4rem); }
  .current-reading { margin: 72px 0 31px; align-items: flex-end; gap: 15px; }
  .current-temp { font-size: clamp(5.1rem, 26vw, 8rem); }
  .current-metrics { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .current-metrics div:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 13px; }
  .sky-stage { min-height: 400px; }
  .celestial { width: 105px; height: 105px; right: 17%; }
  .section-heading { display: block; }
  .section-heading > p { text-align: left; margin-top: 10px; }
  .days-section, .comparison-section, .details-section { padding-top: 86px; }
  .day-strip { margin-inline: -14px; padding-left: 14px; }
  .model-method { width: 100%; margin-top: 25px; }
  .chart-layout { margin-inline: -14px; }
  .chart-frame { padding: 25px 16px; overflow: hidden; }
  .chart-topline { align-items: flex-start; }
  .chart-unit { display: none; }
  .chart { min-height: 250px; overflow-x: auto; }
  .chart svg { min-width: 620px; }
  .model-summary { display: block; padding: 30px 22px; }
  .model-summary dl { margin-top: 24px; }
  .model-note { margin-top: 6px; }
  .detail-grid { grid-template-columns: 1fr; }
  .field-notes { border-left: 0; border-top: 1px solid var(--line); grid-template-rows: none; }
  .atmosphere-chart-frame { padding-left: 0; padding-right: 0; }
  .data-footer { display: block; }
  .data-footer p + p { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
