/* Home page. Shared chrome and components come from site.css. */

/* ---------- the grid ----------
   Three columns: markets and shortcuts, the news, then the environment. The
   hero above uses the same template so each of its three pieces sits over the
   column it belongs to. */
.home-hero,
.home-grid {
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) minmax(270px, 320px);
  grid-template-areas: "left news right";
  column-gap: 20px;
}
.home-grid { align-items: start; }

.home-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.home-links-col { grid-area: left; }
.home-news-col { grid-area: news; }
.home-stats-col { grid-area: right; }

/* ---------- hero ---------- */
.home-hero {
  align-items: center;
  margin: 6px 0 24px;
  animation: rise-in 0.5s var(--ease) 0.04s both;
}
.hero-greeting { grid-area: left; min-width: 0; }
.hero-date {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-title {
  margin-top: 2px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 20%, #aeb6c1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-search-wrap {
  grid-area: news;
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  height: 54px;
  padding: 0 14px 0 18px;
  gap: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    var(--surface);
  box-shadow: var(--bezel), var(--shadow-md);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.home-search-wrap:hover { border-color: #3a414b; }
.home-search-wrap:focus-within {
  border-color: var(--accent-border);
  box-shadow: var(--bezel), var(--shadow-md), 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent),
              0 0 40px -8px color-mix(in srgb, var(--accent) 35%, transparent);
}
.home-search-icon { width: 19px; height: 19px; color: var(--text-faint); }
.home-search-wrap:focus-within .home-search-icon { color: var(--accent); }
.home-search-wrap .home-search-input,
.home-search-wrap .home-search-input:hover,
.home-search-wrap .home-search-input:focus {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 15.5px;
}
.home-search-input::-webkit-search-cancel-button { cursor: pointer; }
.home-search-wrap:focus-within .home-search-kbd { opacity: 0; }
.home-search-kbd { transition: opacity 0.15s var(--ease); }
@media (pointer: coarse) { .home-search-kbd { display: none; } }

.hero-status {
  grid-area: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
  text-align: right;
}
.hero-clock {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  white-space: nowrap;
}
.hero-time {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hero-time .hero-sec { color: var(--text-faint); font-size: 0.62em; letter-spacing: 0; }
.hero-time .hero-ampm { margin-left: 5px; color: var(--text-muted); font-size: 0.55em; letter-spacing: 0.02em; }
.hero-tz {
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.hero-market {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.hero-countdown { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.hero-market .market-index-state {
  width: auto;
  height: 22px;
  padding: 0 9px 0 8px;
  gap: 6px;
  font-size: 11.5px;
  letter-spacing: 0;
  text-transform: none;
}
.hero-market .market-index-state::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.hero-market .market-index-state.live::before { animation: live-breathe 2.4s ease-in-out infinite; }

/* ---------- cards: load-in ---------- */
.home-col > .card { animation: rise-in 0.5s var(--ease) both; }
.home-links-col > .card:nth-child(1) { animation-delay: 0.08s; }
.home-links-col > .card:nth-child(2) { animation-delay: 0.14s; }
.home-links-col > .card:nth-child(3) { animation-delay: 0.2s; }
.home-news-col > .card:nth-child(1) { animation-delay: 0.1s; }
.home-news-col > .card:nth-child(2) { animation-delay: 0.16s; }
.home-stats-col > .card:nth-child(1) { animation-delay: 0.12s; }
.home-stats-col > .card:nth-child(2) { animation-delay: 0.18s; }
.home-stats-col > .card:nth-child(3) { animation-delay: 0.24s; }

/* ---------- shared status notes ---------- */
.news-status-note, .hn-status-note, .quake-status, .quake-empty {
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- markets ---------- */
.sentiment { margin-bottom: 16px; }
.sentiment-value {
  --sentiment-color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--text-faint);
  font-size: 13px;
}
.sentiment-score {
  color: var(--sentiment-color);
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.sentiment-label {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--sentiment-color) 35%, transparent);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--sentiment-color) 12%, transparent);
  color: var(--sentiment-color);
  font-size: 12px;
  font-weight: 600;
}
.sentiment-gauge { margin-top: 12px; }
.sentiment-track {
  position: relative;
  height: 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--hangup) 70%, var(--well)) 0%,
    color-mix(in srgb, var(--warn) 60%, var(--well)) 35%,
    color-mix(in srgb, #cfd6de 40%, var(--well)) 50%,
    color-mix(in srgb, var(--fresh-lean) 60%, var(--well)) 65%,
    color-mix(in srgb, var(--fresh) 70%, var(--well)) 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}
.sentiment-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--surface);
  opacity: 0.8;
}
/* hidden until a real score lands, so an empty gauge reads "waiting" rather
   than "zero" */
.sentiment-mark {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--light);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 2px 8px rgba(0, 0, 0, 0.6);
  translate: -50% -50%;
  opacity: 0;
  transition: left 0.6s var(--ease), opacity 0.3s var(--ease);
}
.sentiment-mark.is-set { opacity: 1; }
.sentiment-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 11px;
}

.market-index-list {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--well);
  overflow: hidden;
}
.market-index-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "name price change" "state price change";
  align-items: center;
  column-gap: 12px;
  padding: 9px 12px;
}
.market-index-row + .market-index-row { border-top: 1px solid var(--border); }
.market-index-name { grid-area: name; color: var(--text); font-size: 13px; font-weight: 600; }
.market-index-row .market-index-state { grid-area: state; justify-self: start; margin-top: 2px; }
.market-index-price {
  grid-area: price;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.market-index-change {
  grid-area: change;
  min-width: 68px;
  padding: 4px 7px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.market-index-change.up { color: var(--fresh); background: color-mix(in srgb, var(--fresh) 12%, transparent); }
.market-index-change.down { color: var(--hangup); background: color-mix(in srgb, var(--hangup) 12%, transparent); }
.market-index-change.flat { color: var(--text-faint); background: var(--light-soft); }

/* live / last / open / closed */
.market-index-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 17px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.market-index-state.live { color: var(--fresh); border-color: color-mix(in srgb, var(--fresh) 40%, transparent); background: color-mix(in srgb, var(--fresh) 11%, transparent); }
.market-index-state.last { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 36%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.market-index-state.na { color: var(--text-faint); background: transparent; }

/* ---------- next race ---------- */
.nascar-tabs { margin-bottom: 14px; }
.nascar-head { margin-bottom: 12px; }
.nascar-race-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.nascar-track {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12.5px;
}
.nascar-countdown {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.nascar-countdown[hidden] { display: none; }

/* ---------- quick links ---------- */
.links-sublegend {
  margin: 16px 0 8px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.card-head + .links-sublegend { margin-top: 0; }
.quick-links-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quick-links-list li { display: flex; min-width: 0; }
.quick-links-list a {
  --ql-accent: var(--text-faint);
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 36px;
  padding: 0 26px 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--well);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.quick-links-list a::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--ql-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--ql-accent) 55%, transparent);
}
.quick-links-list a::after {
  content: '↗';
  position: absolute;
  right: 10px;
  color: var(--text-faint);
  font-size: 12px;
  opacity: 0;
  translate: -3px 3px;
  transition: opacity 0.15s var(--ease), translate 0.15s var(--ease);
}
.quick-links-list a[target] { overflow: hidden; text-overflow: ellipsis; }
.quick-links-list a:hover {
  border-color: color-mix(in srgb, var(--ql-accent) 45%, var(--border));
  background: color-mix(in srgb, var(--ql-accent) 8%, var(--surface-raised));
  color: var(--text);
}
.quick-links-list a:hover::after { opacity: 1; translate: none; }

.quick-links-list a[href*="youtube.com"] { --ql-accent: #ff4d5e; }
.quick-links-list a[href*="twitch.tv"] { --ql-accent: #a970ff; }
.quick-links-list a[href*="netflix.com"] { --ql-accent: #e9515f; }
.quick-links-list a[href*="primevideo.com"] { --ql-accent: #4ea8ff; }
.quick-links-list a[href*="hbomax.com"] { --ql-accent: #7f7dff; }
.quick-links-list a[href*="claude.ai"] { --ql-accent: #e8875a; }
.quick-links-list a[href*="chatgpt.com"] { --ql-accent: #45c69b; }
.quick-links-list a[href*="gemini.google.com"] { --ql-accent: #7ca5ff; }
.quick-links-list a[href*="reddit.com"] { --ql-accent: #ff6b45; }
.quick-links-list a[href*="wikipedia.org"] { --ql-accent: #b8c2d0; }
.quick-links-list a[href*="thephenomenonfiles.com"] { --ql-accent: #5cffc8; }
.quick-links-list a[href*="aftergrowth"] { --ql-accent: #c9a25f; }
.quick-links-list a[href*="tradingview.com"] { --ql-accent: #4ca9ff; }
.quick-links-list a[href*="github.com"] { --ql-accent: #c2cbd6; }
.quick-links-list a[href*="azerothcore.org"] { --ql-accent: #5fb0e6; }
.quick-links-list a[href*="proton.me"] { --ql-accent: #8c7dff; }
.quick-links-list a[href*="gmail.com"] { --ql-accent: #ff7d73; }
.quick-links-list a[href*="amazon.com"] { --ql-accent: #ffb45c; }

/* ---------- headlines ---------- */
.news-card { padding-bottom: 10px; }
.news-controls { flex: 0 0 auto; }
.news-card .panel-asof { margin-left: 4px; }
.news-list { margin: 0; padding: 0; list-style: none; }
.news-item-card {
  position: relative;
  margin: 0 -10px;
  padding: 12px 10px;
  border-radius: var(--r-md);
  transition: background-color 0.15s var(--ease);
}
.news-item-card + .news-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--border);
}
.news-item-card:hover { background: var(--light-soft); }
.news-item-card:hover::before,
.news-item-card:hover + .news-item-card::before { opacity: 0; }
.news-item-link {
  display: block;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.005em;
}
/* the stretched link makes the whole row the click target */
.news-item-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.news-item-card:hover .news-item-link { color: var(--light); }

/* One story leads, set larger; the rest stay a digest under it. */
.news-item-card:first-child { padding-top: 4px; padding-bottom: 16px; }
.news-item-card:first-child .news-item-link {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.news-item-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 5px;
  color: var(--text-faint);
  font-size: 12px;
}
.news-item-source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-weight: 500;
}
.news-item-age {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- tech pulse ---------- */
.hn-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hn-list li { display: flex; min-width: 0; }
.hn-cell {
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--well);
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.hn-cell:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.hn-score {
  min-width: 46px;
  padding: 3px 6px;
  border-radius: 7px;
  background: var(--gauge-soft);
  color: var(--gauge);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hn-score.hot { background: var(--accent-soft); color: var(--accent-bright); }
.hn-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.hn-cell:hover .hn-title { color: var(--light); }
/* One line; the domain is the part allowed to truncate. */
.hn-meta {
  display: flex;
  gap: 5px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 11.5px;
  white-space: nowrap;
}
.hn-meta-domain { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hn-meta-rest { flex: 0 0 auto; }

/* ---------- weather ---------- */
.weather-city { display: flex; align-items: center; gap: 4px; }
.weather-now {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.weather-now-icon { display: grid; width: 46px; height: 46px; }
.weather-now-icon:empty { display: none; }
.weather-now-icon svg { width: 100%; height: 100%; }
.weather-temp {
  color: var(--text);
  font-size: 46px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.weather-now-side { min-width: 0; text-align: right; }
.weather-desc { color: var(--text); font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.weather-range {
  margin-top: 3px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* weather glyphs: stroked, tinted by what they show */
.wx { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.wx .wx-sun { color: #ffc56b; stroke: #ffc56b; }
.wx .wx-sun-core { fill: color-mix(in srgb, #ffc56b 22%, transparent); }
.wx .wx-moon { stroke: #c9c3ff; fill: color-mix(in srgb, #c9c3ff 14%, transparent); }
.wx .wx-cloud { stroke: #c9d2dd; fill: color-mix(in srgb, #0f1216 70%, transparent); }
.wx .wx-cloud-dark { stroke: #8f9aa7; }
.wx .wx-rain { stroke: #6cb8ff; }
.wx .wx-snow { stroke: #e3f0ff; }
.wx .wx-bolt { stroke: #ffd05a; fill: color-mix(in srgb, #ffd05a 30%, transparent); }
.wx .wx-fog { stroke: #a9b3bf; }

.weather-alerts:empty,
.weather-hourly:empty,
.weather-summary:empty { display: none; }

.weather-alerts { display: grid; gap: 6px; margin-top: 16px; }
.weather-alert,
.weather-alert-none {
  --alert-accent: var(--text-faint);
  display: block;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--alert-accent) 30%, var(--border));
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--alert-accent) 8%, var(--well));
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.weather-alert.severe { --alert-accent: var(--hangup); }
.weather-alert.moderate { --alert-accent: var(--warn); }
.weather-alert.minor { --alert-accent: var(--gauge); }
.weather-alert:hover, .weather-alert-none:hover { background: color-mix(in srgb, var(--alert-accent) 14%, var(--well)); }
.weather-alert-body { display: block; }
.weather-alert-event {
  display: block;
  color: var(--alert-accent);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}
.weather-alert-when {
  display: block;
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 11.5px;
}
.weather-alert-none {
  --alert-accent: var(--fresh);
  color: var(--text-muted);
  font-size: 12px;
}
.weather-alert-none::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: var(--fresh);
}

.weather-hourly {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
}
.weather-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 8px 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--well);
}
.weather-hour:first-child { border-color: color-mix(in srgb, var(--gauge) 30%, var(--border)); background: color-mix(in srgb, var(--gauge) 6%, var(--well)); }
.weather-hour-time { color: var(--text-faint); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.weather-hour-icon { display: grid; width: 20px; height: 20px; }
.weather-hour-icon svg { width: 100%; height: 100%; }
.weather-hour-temp {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* The week as rows, each day's range drawn against the whole week's. */
.weather-summary { display: grid; margin-top: 12px; }
.weather-day {
  display: grid;
  grid-template-columns: 36px 20px 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}
.weather-day + .weather-day { border-top: 1px solid var(--border); }
.weather-day-name { color: var(--text); font-size: 12.5px; font-weight: 500; }
.weather-day-icon { display: grid; width: 20px; height: 20px; }
.weather-day-icon svg { width: 100%; height: 100%; }
.weather-day-lo,
.weather-day-hi {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.weather-day-lo { color: var(--text-faint); }
.weather-day-hi { color: var(--text); }
.weather-day-bar {
  position: relative;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--border);
}
.weather-day-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 5px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gauge), var(--warn));
}

/* ---------- space weather ---------- */
.spacewx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.spacewx-kp {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.spacewx-kp small { margin-right: 6px; color: var(--text-faint); font-size: 0.5em; font-weight: 600; letter-spacing: 0.04em; }
.spacewx-state {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.spacewx-state.calm { color: var(--fresh); border-color: color-mix(in srgb, var(--fresh) 38%, transparent); background: color-mix(in srgb, var(--fresh) 11%, transparent); }
.spacewx-state.active { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 36%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.spacewx-state.storm { color: var(--hangup); border-color: color-mix(in srgb, var(--hangup) 40%, transparent); background: color-mix(in srgb, var(--hangup) 12%, transparent); }

.spacewx-scale {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 3px;
  height: 10px;
}
.spacewx-cell {
  --cell: var(--fresh);
  border-radius: 3px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.spacewx-cell:nth-child(n+3) { --cell: var(--warn); }
.spacewx-cell:nth-child(n+5) { --cell: var(--hangup); }
.spacewx-cell.lit {
  background: var(--cell);
  box-shadow: 0 0 10px -2px color-mix(in srgb, var(--cell) 70%, transparent);
}
.spacewx-legend {
  display: flex;
  justify-content: space-between;
  margin: 6px 0 14px;
  color: var(--text-faint);
  font-size: 11px;
}

/* ---------- seismic ---------- */
.quake-list { display: grid; margin: 0; padding: 0; list-style: none; }
.quake-list li + li { border-top: 1px solid var(--border); }
.quake-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 -8px;
  padding: 8px;
  border-radius: var(--r-md);
  transition: background-color 0.15s var(--ease);
}
.quake-link:hover { background: var(--light-soft); }
.quake-mag {
  --band: var(--gauge);
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--band) 13%, transparent);
  color: var(--band);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.quake-mag.moderate { --band: var(--warn); }
.quake-mag.major { --band: var(--hangup); }
.quake-place {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quake-link:hover .quake-place { color: var(--light); }
.quake-time { display: block; margin-top: 1px; color: var(--text-faint); font-size: 11.5px; }

/* ---------- responsive ---------- */
/* Two columns: the news runs full width, the side columns pair up under it. */
@media (max-width: 1200px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "left right" "news news";
    row-gap: 18px;
  }
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "news news" "left right";
    row-gap: 20px;
  }
}

@media (max-width: 760px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "left" "right" "news";
    margin-top: 0;
    row-gap: 12px;
  }
  .hero-title { font-size: 26px; }
  .hero-status { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .hero-time { font-size: 20px; }
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "news" "left" "right";
  }
  .card { padding: 16px; }
  .news-card .card-head .seg { order: 5; flex: 1 1 100%; }
  .news-card .card-head .seg > button { flex: 1 1 0; }
  .news-item-card:first-child .news-item-link { font-size: 18px; }
  .hn-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .quick-links-list { grid-template-columns: minmax(0, 1fr); }
}
