:root {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fafc;
  background: #0f172a;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  line-height: 1.45;
  background: radial-gradient(circle at top left, rgba(96,165,250,.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(34,197,94,.14), transparent 30rem), #0f172a;
}
button { font: inherit; }
a { color: #a8cdfd; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 40px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.eyebrow, .label { color: #cbd5e1; font-size: .86rem; text-transform: uppercase; letter-spacing: .09em; }
.eyebrow { margin: 0 0 10px; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.05em; line-height: 1; margin: 0; }
.sub { color: #cbd5e1; max-width: 820px; margin: 12px 0 0; }
.toolbar { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pill { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); border-radius: 999px; padding: 9px 13px; font-size: .88rem; white-space: nowrap; }
.refresh { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: #f8fafc; background: #273954; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 9px 13px; }
.refresh:hover, .refresh:focus-visible { background: #375174; }
.refresh:disabled { cursor: wait; color: #94a3b8; background: #202b3c; border-color: #41506a; }
.refresh-glyph { font-size: 1.2rem; line-height: 1; }
[hidden] { display: none !important; }
.spinner { display: inline-block; flex: none; width: 16px; height: 16px; border: 3px solid #59687a; border-top-color: currentColor; border-right-color: currentColor; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.location-picker { max-width: 540px; margin: 14px 0 20px; }
.location-picker label { display: block; margin-bottom: 8px; font-size: .92rem; font-weight: 750; }
.search-wrap { position: relative; }
#location-query { width: 100%; min-height: 44px; padding: 10px 13px; font: inherit; color: #f8fafc; background: #1c2a40; border: 1px solid #64748b; border-radius: 12px; }
#location-query::placeholder { color: #bac8d9; }
#location-query:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
#location-options { position: absolute; z-index: 10; top: calc(100% + 5px); left: 0; right: 0; max-height: 280px; overflow-y: auto; margin: 0; padding: 5px; list-style: none; background: #1c2a40; border: 1px solid #64748b; border-radius: 12px; box-shadow: 0 18px 38px rgba(0,0,0,.4); }
#location-options[hidden] { display: none; }
#location-options li { margin: 0; }
#location-options button { display: block; width: 100%; border: 0; border-radius: 8px; padding: 10px 11px; text-align: left; color: #f8fafc; background: transparent; cursor: pointer; }
#location-options button:hover, #location-options button:focus-visible, #location-options button.active { background: #375174; outline: none; }
.location-hint { margin: 7px 0 0; color: #cbd5e1; font-size: .82rem; }
.location-reset { margin-top: 7px; padding: 0; color: #a8cdfd; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .84rem; }
.location-reset:hover, .location-reset:focus-visible { color: #dbeafe; }
.ride-options { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.ride-option { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 12px; border: 1px solid #8396a3; border-radius: 999px; color: #cbd5e1; font-size: .86rem; cursor: pointer; }
.ride-option::after { content: "○"; font-size: 1rem; }
.ride-option:has(:checked) { background: #19554f; border-color: #6fe0cd; color: #f0fdfa; }
.ride-option:has(:checked)::after { content: "✓"; }
.ride-option:hover { border-color: #b4e9df; }
.ride-option:has(:focus-visible) { outline: 2px solid #60a5fa; outline-offset: 3px; }
.option-switch, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Compact forecast status: loading, retrying, failed, missing data and done states. */
.status { margin: 12px 0 18px; padding: 0 0 14px; border-bottom: 1px solid #3b4f69; font-size: .9rem; }
.status-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-message { font-weight: 650; }
.status-spinner { width: 20px; height: 20px; color: #93c5fd; }
.status-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border: 2px solid currentColor; border-radius: 50%; font-size: .8rem; font-weight: 750; }
.status-attempt { color: #dbeafe; border-left: 1px solid #5b6a80; padding-left: 12px; font-size: .82rem; font-variant-numeric: tabular-nums; }
.status-elapsed { margin-left: auto; color: #e2e8f0; font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-description { color: #cbd5e1; margin: 6px 0 0; font-size: .86rem; }
.status:not(.is-busy) .status-spinner { display: none; }
.status.is-retrying { border-left: 3px solid #fbbf24; border-bottom-color: #806135; padding-left: 12px; }
.status.is-retrying .status-message, .status.is-retrying .status-elapsed { color: #fef3c7; }
.status.is-retrying .status-spinner, .status.is-retrying .status-attempt { color: #fbbf24; }
.status.is-retrying .status-description { color: #e7d5b5; }
.status.is-failed { background: #3b232c; border: 0; border-left: 3px solid #fb7185; border-radius: 10px; padding: 14px; }
.status.is-failed .status-icon { color: #fda4af; }
.status.is-failed .status-message { color: #ffe4e6; }
.status.is-failed .status-attempt, .status.is-failed .status-elapsed { color: #fecdd3; }
.status.is-failed .status-description { color: #edcbd3; }
.status.is-warning { background: rgba(245,158,11,.11); border: 0; border-left: 3px solid #f59e0b; border-radius: 10px; padding: 14px; }
.status.is-warning .status-icon, .status.is-warning .status-message { color: #fde68a; }
.status.is-warning .status-description { color: #fde68a; }
.status.is-done .status-icon, .status.is-done .status-message { color: #bbf7d0; }
.dashboard-section { padding: 20px; border: 1px solid rgba(255,255,255,.16); border-radius: 26px; margin-bottom: 28px; }
.highlights-section { background: rgba(59,130,246,.11); border-color: rgba(96,165,250,.4); }
.forecast-section { background: rgba(255,255,255,.035); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.03em; }
.section-heading p { color: #cbd5e1; margin: 4px 0 0; font-size: .92rem; }
.scope-tag { flex: none; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #dbeafe; font-size: .8rem; white-space: nowrap; }
.highlights-section .scope-tag { border-color: rgba(96,165,250,.55); }
.grid { display: grid; gap: 16px; }
.top-grid { grid-template-columns: 1.35fr 1fr; }
.days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { min-width: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; padding: 18px; background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)), #172033; box-shadow: 0 20px 60px rgba(0,0,0,.28); }
.best { outline: 2px solid #60a5fa; outline-offset: 3px; }
.card h2, .card h3 { margin: 0; letter-spacing: -.03em; }
.label { margin-bottom: 9px; }
.headline { font-size: 1.55rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.18; }
.summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.summary-head .headline { min-width: 0; }
.meta { color: #cbd5e1; margin: 8px 0 0; font-size: .94rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); border-radius: 999px; padding: 7px 10px; font-size: .86rem; }
.day-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.badge { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07); border-radius: 999px; padding: 8px 11px; font-size: .82rem; color: #cbd5e1; text-align: center; white-space: nowrap; }
.slot { border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 15px; margin-top: 12px; }
.slot.good { background: rgba(34,197,94,.18); border-color: rgba(34,197,94,.55); }
.slot.caution { background: rgba(245,158,11,.20); border-color: rgba(245,158,11,.58); }
.slot.avoid { background: rgba(239,68,68,.20); border-color: rgba(239,68,68,.58); }
.slot.unavailable { background: rgba(255,255,255,.045); }
.slot.past { padding: 0; background: rgba(148,163,184,.055); border-color: rgba(148,163,184,.16); color: #94a3b8; }
.slot.past summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; min-height: 48px; padding: 12px 15px; list-style: none; cursor: pointer; }
.slot.past summary::-webkit-details-marker { display: none; }
.slot.past summary:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; border-radius: 18px; }
.slot.past .slot-title { font-size: .98rem; font-weight: 650; }
.slot.past .slot-line { grid-column: 1; margin-top: 0; color: #7f8da1; font-size: .82rem; white-space: nowrap; }
.past-heading { display: contents; }
.past-label { color: #cbd5e1; font-size: .82rem; font-weight: 700; }
.past-reason { grid-column: 1 / -1; margin-top: 5px; color: #a9b5c7; font-size: .84rem; }
.past-action { grid-column: 1 / -1; display: flex; align-items: center; gap: 5px; margin-top: 5px; color: #a8cdfd; font-size: .8rem; font-weight: 700; }
.collapse-label { display: none; }
.past-chevron { font-size: 1rem; line-height: 1; transition: transform .15s ease; }
.slot.past[open] .expand-label { display: none; }
.slot.past[open] .collapse-label { display: inline; }
.slot.past[open] .past-chevron { transform: rotate(180deg); }
.past-details { padding: 0 15px 13px; border-top: 1px solid rgba(148,163,184,.13); }
.rating-reason { margin: 5px 0 0; color: #e2e8f0; font-size: .9rem; }
.slot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slot-title { font-size: 1.1rem; font-weight: 750; }
.rating { font-size: 1rem; font-weight: 800; text-align: right; }
.score-text { max-width: 145px; font-size: 1.1rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.score-text.good { color: #bbf7d0; }
.score-text.caution { color: #fde68a; }
.score-text.avoid { color: #fecdd3; }
.score-badge { display: inline-flex; flex: none; align-items: center; gap: 8px; padding: 6px 10px; min-width: 108px; border: 1px solid; border-radius: 14px; font-variant-numeric: tabular-nums; }
.score-badge.good { background: #123d2a; border-color: #4ade80; color: #bbf7d0; }
.score-badge.caution { background: #493413; border-color: #fbbf24; color: #fde68a; }
.score-badge.avoid { background: #4a1f25; border-color: #fb7185; color: #fecdd3; }
.score-number { font-size: 1.9rem; font-weight: 850; line-height: 1; letter-spacing: -.06em; white-space: nowrap; }
.score-total { font-size: .85rem; font-weight: 750; letter-spacing: 0; }
.score-label { max-width: 92px; font-size: .7rem; font-weight: 750; line-height: 1.1; }
.gust-route-warning { margin: 10px 0 0; padding: 9px 11px; border-left: 3px solid #fb7185; border-radius: 8px; background: rgba(239,68,68,.12); color: #ffe4e6; font-size: .87rem; }
.gust-route-warning strong { color: #fecdd3; }
.slot-line { margin-top: 8px; color: #cbd5e1; font-size: .9rem; }
.ride-out { margin-top: 9px; color: #bfdbfe; font-weight: 750; font-size: .94rem; }
.conditions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.16); border-radius: 16px; }
.condition { font-size: .88rem; min-width: 0; }
.condition span { color: #cbd5e1; }
.route { margin: 12px 0 0; font-size: .9rem; }
.route strong { color: #fff; }
.note { color: #cbd5e1; font-size: .88rem; margin: 6px 0 0; }
.final { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.footer-note { color: #cbd5e1; font-size: .85rem; margin: 18px 0 0; }
@media (max-width: 920px) {
  .page-head { flex-direction: column; }
  .toolbar { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .top-grid, .days { grid-template-columns: 1fr; }
  .final { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .wrap { width: min(100% - 26px, 1180px); padding-top: 22px; }
  .toolbar { align-items: flex-start; }
  .pill { white-space: normal; }
  .final { grid-template-columns: 1fr; }
  .conditions { gap: 8px 6px; }
  .summary-head { align-items: center; }
  .score-badge { min-width: 98px; gap: 6px; padding: 5px 7px; }
  .score-number { font-size: 1.65rem; }
  .dashboard-section { padding: 14px; margin-bottom: 24px; }
  .section-heading { flex-direction: column; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
@media (max-width: 480px) { .status-elapsed { margin-left: 0; } }
@media print {
  :root { color: #111827; background: white; }
  body { background: white; }
  .card, .slot { box-shadow: none; }
  .refresh, .status { display: none; }
}

#forecast-comparison { margin-top: 16px; }
