:root {
  --bg: #0f1216;
  --panel: #161b21;
  --panel2: #1c232b;
  --line: #232a33;
  --text: #e7ecf0;
  --dim: #8b97a3;
  --faint: #5b6570;
  --accent: #6ec6ff;
  --snow: #b7e3ff;
  --warm: #e0b36a;
  --bar: #2f6f9e;
  --serif: "Bitter", Georgia, "Times New Roman", serif;
  --sans: "Ubuntu", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg);
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="260" height="260"><g fill="none" stroke="%236ec6ff" stroke-opacity="0.045" stroke-width="1"><path d="M0 40 Q 65 10 130 40 T 260 40"/><path d="M0 90 Q 65 55 130 90 T 260 90"/><path d="M0 140 Q 65 110 130 140 T 260 140"/><path d="M0 190 Q 65 155 130 190 T 260 190"/><path d="M0 240 Q 65 210 130 240 T 260 240"/></g></svg>');
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.55;
  padding: 2.5rem 1.25rem 4rem;
  display: flex;
  justify-content: center;
}

main { width: 100%; max-width: 64rem; }

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
h1 { font-size: 2rem; font-weight: 700; letter-spacing: 0.01em; display: flex; align-items: center; gap: 0.6rem; }
.mark { width: 2.6rem; height: auto; flex: none; }
h1::after { content: "°"; color: var(--accent); }
h2 { font-weight: 600; font-size: 1.1rem; margin-bottom: 0.7rem; letter-spacing: 0.01em; }
.tag { color: var(--dim); margin-top: 0.35rem; font-size: 0.95rem; font-style: italic; max-width: 44ch; }
.meta { font-family: var(--sans); text-align: right; font-size: 0.8rem; color: var(--dim); display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }
.demo-toggle { cursor: pointer; user-select: none; }
.demo-toggle input { accent-color: var(--accent); margin-right: 0.3rem; }

#synthetic-banner {
  font-family: var(--sans);
  border-radius: 3px;
  background: color-mix(in srgb, var(--warm) 14%, var(--panel));
  border: 1px solid var(--warm);
  color: var(--warm);
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
}

/* best bets */
#bets { margin-bottom: 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.7rem; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 3px 3px;
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}
.card .who { font-weight: 600; font-size: 0.95rem; }
.card .why { font-family: var(--sans); color: var(--dim); font-size: 0.78rem; margin-top: 0.2rem; }
.card .num { font-family: var(--sans); font-size: 1.7rem; font-weight: 700; color: var(--snow); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* table */
.tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.controls { font-family: var(--sans); display: flex; gap: 0.4rem; align-items: center; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
.controls .label { color: var(--faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 0.3rem; }
button.sort {
  font: inherit; font-size: 0.78rem;
  background: transparent; color: var(--dim);
  border: none; border-bottom: 2px solid transparent;
  padding: 0.25rem 0.15rem; cursor: pointer;
}
button.sort:hover { color: var(--text); }
button.sort.active { color: var(--text); border-bottom-color: var(--accent); }
.controls { gap: 0.9rem; }

.scroll { overflow-x: auto; }
table { font-family: var(--sans); border-collapse: collapse; width: 100%; min-width: 46rem; font-variant-numeric: tabular-nums; }
th, td { padding: 0.55rem 0.7rem; text-align: right; font-size: 0.88rem; }
th { color: var(--faint); font-weight: 500; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 3px double var(--dim); }
td { border-top: 1px solid var(--line); }
.left { text-align: left; }
tr.resort { cursor: pointer; }
tr.resort:hover td { background: var(--panel2); }
td.left { font-weight: 600; white-space: nowrap; }
.state { font-family: var(--sans); color: var(--faint); font-weight: 400; font-size: 0.75rem; margin-left: 0.4rem; }
.total { color: var(--snow); font-weight: 700; }
.zero { color: var(--faint); font-weight: 400; }
.range { color: var(--snow); white-space: nowrap; }
.prob { color: var(--warm); }

.daycell { min-width: 3rem; }
.daycell .in { display: block; line-height: 1.1; }
.daycell .bar { display: block; height: 3px; margin-top: 3px; border-radius: 2px; background: var(--bar); margin-left: auto; }
.daycell.snowy .in { color: var(--snow); font-weight: 600; }

/* expanded detail */
tr.detail td { background: var(--panel2); padding: 1rem 1.2rem; }
.detail-grid { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; }
.detail-days { font-family: var(--sans); display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }
.dday { text-align: center; font-size: 0.75rem; color: var(--dim); }
.dday .dn { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.65rem; color: var(--faint); }
.dday .ds { font-size: 1rem; font-weight: 700; color: var(--snow); margin: 0.2rem 0; }
.dday .ds.zero { color: var(--faint); font-weight: 400; }
.nbm-mini { font-family: var(--sans); font-size: 0.78rem; color: var(--dim); }
.nbm-mini table { min-width: 0; }
.nbm-mini th, .nbm-mini td { padding: 0.25rem 0.6rem; font-size: 0.78rem; border: none; }
.nbm-mini th { border-bottom: 1px solid var(--line); }

.note { font-family: var(--sans); color: var(--faint); font-size: 0.78rem; margin: 0.8rem 0.2rem 0; }

#afds-section { margin-top: 2rem; }
#afds { display: grid; gap: 0.8rem; }
.afd { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 1rem 1.2rem; }
.afd summary { font-family: var(--sans); cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.afd summary span { color: var(--faint); font-weight: 400; font-size: 0.78rem; margin-left: 0.5rem; }
.afd pre { white-space: pre-wrap; font-family: var(--mono); font-size: 0.78rem; line-height: 1.55; color: var(--dim); margin-top: 0.8rem; }

.alerts-teaser {
  margin-top: 2.5rem;
  background: transparent;
  border: none;
  border-top: 3px double var(--dim);
  padding-left: 0; padding-right: 0;
  padding: 1.1rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.alerts-teaser p { color: var(--dim); font-size: 0.88rem; max-width: 52ch; }
.soon { font-family: var(--sans); color: var(--accent); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

footer { font-family: var(--sans); margin-top: 2.5rem; color: var(--faint); font-size: 0.78rem; max-width: 64ch; }

/* mobile: stacked resort cards replace the table */
#mobile-list { display: none; }

@media (max-width: 700px) {
  body { padding: 1.25rem 0.8rem 3rem; }
  h1 { font-size: 1.6rem; }
  .mark { width: 2rem; }
  header { align-items: center; }
  .meta { font-size: 0.72rem; }
  .scroll { display: none; }
  #mobile-list { display: block; }
  .controls { flex-wrap: wrap; }

  .mcard { padding: 0.8rem 0.9rem; border-top: 1px solid var(--line); cursor: pointer; }
  .mcard:first-child { border-top: none; }
  .mcard.open { background: var(--panel2); }
  .mhead { display: flex; justify-content: space-between; align-items: baseline; }
  .mname { font-family: var(--serif); font-weight: 600; font-size: 1rem; }
  .mtotal { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; color: var(--snow); font-variant-numeric: tabular-nums; }
  .mtotal.zero { color: var(--faint); font-weight: 400; }

  .mstrip { display: flex; gap: 0.35rem; margin-top: 0.5rem; font-family: var(--sans); }
  .mday { flex: 1; text-align: center; }
  .mbarwrap { height: 2.2rem; display: flex; align-items: flex-end; justify-content: center; }
  .mbar { width: 70%; border-radius: 2px 2px 0 0; background: var(--line); }
  .mbar.on { background: var(--bar); }
  .min { font-size: 0.68rem; color: var(--snow); min-height: 0.9rem; font-variant-numeric: tabular-nums; }
  .mdn { font-size: 0.6rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }

  .mnbm { font-family: var(--sans); font-size: 0.75rem; color: var(--dim); margin-top: 0.45rem; }
  .mnbm b { color: var(--warm); font-weight: 700; }

  .mdetail { margin-top: 0.6rem; border-top: 1px dashed var(--line); padding-top: 0.5rem; font-family: var(--sans); }
  .mdrow { display: grid; grid-template-columns: 3.2rem 2.5rem 1fr auto; gap: 0.5rem; font-size: 0.78rem; color: var(--dim); padding: 0.15rem 0; }
  .mdrow .snowy { color: var(--snow); font-weight: 700; }
  .mdrow .zero { color: var(--faint); }

  .cards { grid-template-columns: 1fr; }
  .card { padding: 0.7rem 0.9rem; }
  .alerts-teaser { flex-direction: column; align-items: flex-start; }
}

/* morning reports */
#reports-section { margin-top: 2rem; }
#reports { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.report { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 0.9rem 1.1rem; }
.rhead { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; font-family: var(--sans); }
.rname { font-family: var(--serif); font-weight: 700; font-size: 0.95rem; }
.rlink { color: var(--accent); font-size: 0.75rem; text-decoration: none; white-space: nowrap; }
.rlink:hover { text-decoration: underline; }
.rblurb { color: var(--dim); font-size: 0.88rem; line-height: 1.55; margin-top: 0.5rem; font-style: italic; }
.rattr { font-family: var(--sans); color: var(--faint); font-size: 0.7rem; margin-top: 0.5rem; }

/* tablet: stack the expanded detail before the table flips to cards */
@media (max-width: 980px) {
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  #reports { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  button.sort { padding: 0.45rem 0.3rem; font-size: 0.85rem; }
  .demo-toggle input { width: 1.1rem; height: 1.1rem; }
  .afd summary { padding: 0.2rem 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .mcard, tr.resort td { transition: background 0.15s ease; }
}

/* pass filter + badges */
.controls .sep { margin-left: 0.9rem; }
button.pfilter {
  font: inherit; font-size: 0.78rem;
  background: transparent; color: var(--dim);
  border: none; border-bottom: 2px solid transparent;
  padding: 0.25rem 0.15rem; cursor: pointer;
}
button.pfilter:hover { color: var(--text); }
button.pfilter.active { color: var(--text); border-bottom-color: var(--warm); }
.pbadge {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-left: 0.45rem; padding: 0.08rem 0.35rem;
  border-radius: 2px; vertical-align: 1px;
}
.pbadge.epic { color: #7ab0f5; border: 1px solid #7ab0f5; }
.pbadge.ikon { color: #e8a33d; border: 1px solid #e8a33d; }
.pbadge.indy { color: #e07a7a; border: 1px solid #e07a7a; }
@media (max-width: 700px) {
  .controls .sep { margin-left: 0; flex-basis: 100%; }
  button.pfilter { padding: 0.45rem 0.3rem; font-size: 0.85rem; }
}

/* ambient snowfall canvas sits behind everything */
#snowfall { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

/* the instant answer */
#verdict { margin-bottom: 1.3rem; }
#verdict-line { font-size: 1.35rem; font-weight: 600; line-height: 1.35; text-wrap: balance; }
#verdict-line::first-letter { color: var(--snow); }
#verdict-sub { font-family: var(--sans); color: var(--dim); font-size: 0.9rem; margin-top: 0.35rem; }
@media (max-width: 700px) {
  #verdict-line { font-size: 1.2rem; }
}

/* iOS add-to-home banner */
#ios-banner {
  font-family: var(--sans);
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
}
#ios-banner[hidden] { display: none; }
#ios-banner-close { background: none; border: none; color: var(--dim); font-size: 1rem; cursor: pointer; padding: 0.2rem 0.4rem; }

/* alerts form */
.alert-actions { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.alert-actions button {
  font: inherit; font-family: var(--sans); font-size: 0.85rem;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 0.5rem 1rem; cursor: pointer;
}
.alert-actions button.primary { border-color: var(--accent); color: var(--accent); }
.alert-actions button:hover { border-color: var(--accent); }
.alert-form { font-family: var(--sans); font-size: 0.88rem; }
.af-row { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.45rem; }
.af-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.af-row label { cursor: pointer; }
.af-row input[type="radio"], .af-resorts input { accent-color: var(--accent); }
.af-row select { font: inherit; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 0.15rem 0.4rem; }
.af-resorts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.25rem 0.8rem; margin-left: 1.4rem; max-height: 12rem; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 3px; padding: 0.6rem 0.8rem;
}
.af-chip { font-size: 0.82rem; color: var(--dim); }
.af-status { color: var(--warm); font-size: 0.82rem; margin-top: 0.5rem; min-height: 1em; }

/* the morning read */
#read-section { margin-top: 2rem; }
#read-text { font-size: 0.95rem; line-height: 1.6; max-width: 68ch; font-style: italic; color: #b9c2ca; }
#read-text.clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { background: none; border: none; color: var(--accent); font-family: var(--sans); font-size: 0.78rem; cursor: pointer; padding: 0.15rem 0; }

/* tabs + stars + auth */
.tabs { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.8rem; font-family: var(--sans); }
.tab {
  font: inherit; font-size: 0.9rem; font-weight: 500;
  background: transparent; color: var(--dim);
  border: none; border-bottom: 2px solid transparent;
  padding: 0.45rem 0.6rem; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 700; }
#auth-area { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; color: var(--dim); }
.auth-link { background: none; border: none; color: var(--accent); font: inherit; font-size: 0.78rem; cursor: pointer; padding: 0.2rem; }
.auth-who { color: var(--faint); }

button.star {
  background: none; border: none; cursor: pointer; padding: 0.15rem 0.3rem 0 0;
  color: var(--faint); vertical-align: -2px;
}
button.star:hover { color: var(--warm); }
button.star.on { color: var(--warm); }

.empty-mine { color: var(--dim); font-family: var(--sans); font-size: 0.9rem; padding: 1.2rem !important; text-align: center !important; }

/* per-resort morning blurb inside the expanded detail */
.detail-blurb {
  margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px dashed var(--line);
  font-family: var(--serif); font-style: italic; font-size: 0.9rem;
  line-height: 1.6; color: var(--dim); max-width: 68ch;
}
.detail-blurb .rattr { display: block; font-family: var(--sans); font-style: normal; font-size: 0.72rem; color: var(--faint); margin-top: 0.4rem; }
#read-section { margin: -0.3rem 0 1.4rem; }

/* HRRR hourly strip */
.hstrip-wrap { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px dashed var(--line); }
.hstrip-title { font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 1rem; }
.htitle { white-space: nowrap; }
.hkey { text-transform: none; letter-spacing: 0; display: flex; gap: 0.6rem; align-items: center; }
.hk { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 2px; margin-right: 0.25rem; vertical-align: -1px; }
.hk.snow { background: var(--snow); } .hk.mix { background: #b48ede; } .hk.rain { background: #6f9e8a; }
.hstrip { display: flex; gap: 2px; margin-top: 0.5rem; align-items: flex-start; }
.hcol { flex: 1; text-align: center; min-width: 0; }
.hbarwrap { height: 3rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; }
.hbar { width: 100%; border-radius: 2px 2px 0 0; background: var(--line); }
.hbar.snow { background: var(--snow); }
.hbar.mix { background: #b48ede; }
.hbar.frz { background: #b48ede; }
.hbar.rain { background: #6f9e8a; }
.hlab { font-family: var(--sans); font-size: 0.58rem; color: var(--faint); display: block; margin-top: 2px; white-space: nowrap; }
.dday .ds.rain { color: #7fb8a3; }

/* email capture */
.digest { font-family: var(--sans); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; font-size: 0.82rem; color: var(--dim); margin-bottom: 0.8rem; }
.digest input { font: inherit; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 0.4rem 0.6rem; min-width: 14rem; }
.digest button { font: inherit; background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0.4rem 0.8rem; cursor: pointer; }
#digest-msg { color: var(--warm); }
footer p a { color: var(--accent); }

.site-nav { display: flex; gap: 0.9rem; }
.site-nav a { color: var(--dim); text-decoration: none; font-size: 0.8rem; }
.site-nav a:hover { color: var(--accent); }

/* fall rain mode */
.daycell.rainy .in { color: #7fb8a3; font-weight: 600; }
.bar.rain, .mbar.rain { background: #4a7d6a; }
.total.rain, .mtotal.rain { color: #7fb8a3; }
.card.rain { border-top-color: #4a7d6a; }
.card.rain .num { color: #7fb8a3; }

.daycell.outlook .in { opacity: 0.75; font-style: italic; }
.bar.hollow, .mbar.hollow { background: transparent; border: 1px solid #4a7d6a; border-bottom-width: 2px; }

.afd-covers { font-family: var(--sans); color: var(--faint); font-size: 0.78rem; margin-top: 0.6rem; }

.hbar.dry { height: 3px; background: var(--line); }

.hval { font-family: var(--sans); font-size: 0.56rem; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar { width: 70%; }

/* mixed-day tell: thin green underbar below the snow bar */
.mixbar { display: block; height: 3px; margin-top: 2px; border-radius: 2px; background: #4a7d6a; margin-left: auto; width: 60%; }
.rainonly { font-family: var(--sans); font-size: 0.65rem; color: #7fb8a3; font-style: italic; }
