:root { color-scheme: light; --bg:#f4f6f8; --weather-accent:#7637cc; --weather-accent-text:#7637cc; --weather-accent-soft:#eee5fa; --weather-accent-line:#d8c5f1; --panel:#fff; --text:#0b1726; --muted:#5c6b7a; --line:rgba(0,0,0,.09); --soft:#eef1f5; --sun:#be831b; --rain:#537a9d; --glow:#fff6df; --shadow:0 12px 35px rgba(0,0,0,.035); }
    :root.dark-mode { color-scheme:dark; --bg:#242424; --weather-accent-text:#c7a4f5; --weather-accent-soft:#352a45; --weather-accent-line:#5f477e; --panel:#2c2c2c; --text:#f1f1f1; --muted:#b5b5b5; --line:rgba(255,255,255,.1); --soft:#353535; --sun:#efc267; --rain:#a6c8e3; --glow:#393329; --shadow:0 12px 35px rgba(0,0,0,.12); }
    * { box-sizing:border-box; }
    body { margin:0; background:var(--bg); color:var(--text); font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; line-height:1.5; }
    a { color:inherit; }
    button { font:inherit; cursor:pointer; }
    a,button { -webkit-tap-highlight-color:transparent; }
    :focus-visible { outline:3px solid var(--rain); outline-offset:4px; }
    .topbar { max-width:1320px; margin:auto; padding:26px 36px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
    .brand { font-family:Montserrat,sans-serif; font-size:32px; font-weight:300; letter-spacing:-1.5px; text-decoration:none; }
    .brand-wrap,.top-actions { display:flex; align-items:center; gap:20px; }
    .breadcrumb { border-left:1px solid var(--line); padding-left:20px; color:var(--muted); font-size:14px; }
    .pill { min-height:42px; display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid var(--line); border-radius:999px; padding:9px 18px; background:var(--panel); color:var(--text); text-decoration:none; font-size:14px; transition:background .2s,box-shadow .2s; }
    .pill:hover { background:var(--soft); box-shadow:var(--shadow); }
    .theme-toggle { width:44px; padding:0; font-size:20px; }
    .page { max-width:1180px; margin:24px auto 0; padding:0 28px 36px; }
    .page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:28px; margin-bottom:28px; }
    .eyebrow { margin:0 0 10px; text-transform:uppercase; letter-spacing:.16em; font-size:11px; font-weight:600; color:var(--muted); }
    h1,h2,h3,p { margin-top:0; }
    h1 { font-family:Montserrat,sans-serif; font-size:clamp(36px,5vw,54px); font-weight:400; letter-spacing:-2px; line-height:1.15; margin-bottom:9px; }
    .location-meta { color:var(--muted); font-size:14px; margin:0; }
    
    
    
    
    .current { background:var(--panel); border:1px solid var(--line); border-radius:26px; padding:32px; box-shadow:var(--shadow); display:grid; grid-template-columns:1.1fr 1fr; gap:36px; }
    .current-main { min-width:0; }
    .current-reading { display:flex; align-items:center; gap:26px; margin:16px 0 18px; }
    .current-icon { width:112px; height:112px; flex-shrink:0; border-radius:50%; background:var(--glow); display:grid; place-items:center; }
    .current-icon svg { width:90px; height:90px; }
    .temperature { font-size:clamp(50px,7vw,76px); font-weight:300; letter-spacing:-4px; line-height:1.1; font-variant-numeric:tabular-nums; }
    .condition { font-size:18px; margin:6px 0 0; }
    .details { color:var(--muted); font-size:12px; max-width:450px; margin:0; }
    .current-next { border-left:1px solid var(--line); padding-left:36px; display:flex; flex-direction:column; justify-content:center; min-width:0; }
    .next-summary { font-size:16px; line-height:1.7; margin-bottom:20px; }
    .range { display:flex; gap:30px; font-variant-numeric:tabular-nums; }
    .range-label { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin-bottom:3px; }
    .range-value { font-size:28px; font-weight:400; }
    .low { color:var(--muted); }
    .metrics { display:flex; gap:28px; border-top:1px solid var(--line); padding-top:20px; margin-top:24px; font-size:14px; }
    .metrics span { color:var(--muted); margin-right:7px; }
    .forecast-head { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin:38px 0 18px; }
    h2 { font-family:Montserrat,sans-serif; font-weight:500; letter-spacing:-.5px; font-size:22px; margin:0; }
    .updated { color:var(--muted); font-size:12px; }
    .forecast-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(138px,1fr)); gap:12px; align-items:stretch; }
    .forecast-card { background:var(--panel); border:1px solid var(--line); border-radius:20px; padding:20px 16px; min-width:0; }
    .forecast-card:first-child { border-color:var(--rain); }
    .period { font-size:14px; font-weight:600; margin:0 0 14px; }
    .forecast-icon { width:54px; height:54px; margin-bottom:12px; }
    .forecast-icon svg { width:100%; height:100%; }
    .forecast-condition { font-size:14px; color:var(--muted); line-height:1.5; min-height:36px; margin-bottom:18px; }
    .forecast-card .range { gap:18px; }
    .forecast-card .range-value { font-size:23px; }
    .forecast-card .range-label { font-size:10px; }
    .forecast-card details { font-size:14px; margin-top:18px; border-top:1px solid var(--line); padding-top:12px; }
    summary { color:var(--muted); cursor:pointer; }
    .forecast-text { margin:12px 0 0; line-height:1.65; }
    .forecast-text strong { display:block; margin-bottom:3px; font-weight:600; }
    .sun-stroke { stroke:var(--sun); } .rain-stroke { stroke:var(--rain); }
    .status-row { min-height:30px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:18px; }
    .status { font-size:12px; color:var(--muted); margin:0; }
    .weather-fallback { display:none; border:1px solid var(--line); border-radius:20px; padding:24px; margin-top:18px; background:var(--panel); }
    .weather-fallback p { margin-bottom:16px; }
    .weather-fallback .pill { margin-right:8px; }
    footer { display:flex; justify-content:space-between; gap:20px; border-top:1px solid var(--line); margin-top:30px; padding-top:20px; font-size:12px; line-height:1.8; color:var(--muted); }
    footer p { margin:0; }
    .source-link { text-underline-offset:3px; white-space:nowrap; }
    @media (max-width:900px) { .page-heading { align-items:flex-start; flex-direction:column; gap:22px; } .forecast-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .current { padding:26px; gap:26px; } .current-next { padding-left:26px; } .current-reading { gap:16px; } .current-icon { width:88px; height:88px; } .current-icon svg { width:72px; height:72px; } }
    @media (max-width:600px) { .topbar { padding:20px; } .brand { font-size:28px; } .breadcrumb { display:none; } .top-actions { gap:8px; } .page { margin-top:18px; padding:0 20px 28px; }   .current { grid-template-columns:1fr; padding:24px; gap:24px; border-radius:22px; } .current-next { padding:24px 0 0; border-left:0; border-top:1px solid var(--line); } .current-reading { gap:24px; } .temperature { font-size:64px; } .forecast-head { align-items:flex-start; flex-direction:column; gap:8px; margin-top:30px; } .forecast-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } footer { flex-direction:column; gap:12px; } }
    .quick-link { width:44px; min-height:44px; padding:10px; flex-shrink:0; }
    .quick-link svg { width:22px; height:22px; }
    .location-controls { margin:-4px 0 26px; }
    .weather-shortcuts { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
    .weather-shortcuts .pill { font-size:12px; padding:6px 14px; min-height:38px; }
    .city-search label { display:block; margin-bottom:8px; font-size:14px; color:var(--muted); }
    .city-search-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:stretch; gap:10px; }
    .city-search label { font-size:13px; font-weight:500; }
    .city-search-field { min-width:0; display:flex; align-items:center; gap:10px; min-height:56px; padding:5px 6px 5px 18px; border:1px solid var(--weather-accent-line); border-radius:999px; background:color-mix(in srgb,var(--weather-accent) 3%,var(--panel)); transition:border-color .15s,box-shadow .15s; }
    .city-search-field > svg { flex:0 0 18px; width:18px; height:18px; color:var(--weather-accent-text); }
    .city-search-field input { appearance:none; -webkit-appearance:none; flex:1; width:100%; min-width:0; min-height:42px; padding:8px 0; border:0; border-radius:0; background:transparent; color:var(--text); font:inherit; font-size:16px; line-height:1.5; box-shadow:none; outline:none; }
    .city-search-field input:focus,.city-search-field input:focus-visible { outline:none; box-shadow:none; }
    .city-search-field input::placeholder { color:var(--muted); opacity:1; }
    .city-search-field input::-webkit-search-decoration { -webkit-appearance:none; }
    .city-search-field:focus-within { border-color:var(--weather-accent-text); box-shadow:0 0 0 3px color-mix(in srgb,var(--weather-accent-text) 18%,transparent); }
    .city-search-field button[type="submit"] { flex-shrink:0; min-height:44px; padding:9px 16px; border:0; border-radius:999px; background:var(--weather-accent); color:#fff; font-size:14px; font-weight:500; box-shadow:none; }
    .city-search-field button[type="submit"]:hover { background:#6528b0; }
    .city-search-field button[type="submit"]:focus-visible { outline:2px solid var(--weather-accent-text); outline-offset:2px; }
    .locate-weather { min-height:56px; padding:12px 16px; border:1px solid var(--weather-accent-line); border-radius:999px; background:var(--weather-accent-soft); color:var(--weather-accent-text); font-size:14px; white-space:nowrap; }
    .locate-weather:hover,.city-results .pill:hover { border-color:var(--weather-accent-text); background:var(--weather-accent-soft); }
    .locate-weather:focus-visible,.city-results .pill:focus-visible { outline-color:var(--weather-accent-text); }
    .locate-weather svg { flex-shrink:0; width:18px; height:18px; }
    .location-controls .location-note:empty { display:none; }
    .location-note { font-size:14px; color:var(--muted); margin:12px 0 0; }
    .current-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; min-height:28px; }
    .current-heading .eyebrow { margin:0; }
    .station-control { position:relative; flex:0 1 200px; min-width:0; max-width:65%; color:var(--muted); }
    .station-control::after { content:""; position:absolute; right:11px; top:50%; width:5px; height:5px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-65%) rotate(45deg); pointer-events:none; }
    .station-control select { appearance:none; -webkit-appearance:none; display:block; width:100%; height:40px; padding:8px 28px 8px 10px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:14px; text-overflow:ellipsis; cursor:pointer; transition:background .2s,border-color .2s,color .2s; }
    .station-control select:hover { background:var(--soft); border-color:var(--line); color:var(--text); }
    .station-control select:focus-visible { outline:2px solid var(--text); outline-offset:2px; }
    .station-control option { background:var(--panel); color:var(--text); }
    .city-results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
    .city-results:empty { display:none; }
    .city-results .pill { min-width:0; justify-content:flex-start; text-align:left; border-radius:12px; padding:12px; line-height:1.5; overflow-wrap:anywhere; }
    .location-privacy { max-width:760px; margin-top:8px; }
    button:disabled { opacity:.6; cursor:wait; }
    @media(max-width:600px) { .topbar { padding:18px 14px; gap:8px; } .top-actions { gap:6px; } .top-actions > a:not(.quick-link) { padding:9px 12px; } .current-reading { gap:14px; } .current-icon { width:72px; height:72px; } .current-icon svg { width:60px; height:60px; } .temperature { font-size:54px; } .condition { overflow-wrap:anywhere; }  .source-link { white-space:normal; } }
    @media (prefers-reduced-motion:reduce) { * { transition:none !important; } }


@media(max-width:480px) { .topbar { flex-wrap:wrap; } .top-actions { margin-left:auto; } }

.weather-alerts[hidden], .weather-alert-status[hidden] { display:none; }
.weather-alerts { margin-bottom:32px; }
.weather-alerts-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:16px; }
.weather-alerts-heading .eyebrow { margin-bottom:6px; }
.weather-alerts-heading .updated { margin:0; }
.weather-alert-list { display:grid; gap:12px; }
.weather-alert { --alert-colour:#7b8796; --alert-tint:var(--panel); border:1px solid var(--line); border-left:6px solid var(--alert-colour); border-radius:16px; padding:20px 24px; background:var(--alert-tint); overflow-wrap:anywhere; }
.weather-alert--yellow { --alert-colour:#efc32e; --alert-tint:#fff9e3; }
.weather-alert--orange, .weather-alert--amber { --alert-colour:#ee8328; --alert-tint:#fff0e2; }
.weather-alert--red { --alert-colour:#df434c; --alert-tint:#fff0f0; }
.weather-alert-badge { display:inline-block; margin:0 0 10px; padding:3px 10px; border-radius:6px; background:var(--alert-colour); color:#131820; font-size:12px; font-weight:700; text-transform:capitalize; }
.weather-alert--red .weather-alert-badge, .weather-alert--neutral .weather-alert-badge { color:#fff; }
.weather-alert--neutral { --alert-colour:#596574; }
.weather-alert h3 { margin:0 0 8px; font-size:18px; font-weight:650; line-height:1.4; }
.weather-alert-dates { color:var(--muted); font-size:12px; margin:0 0 14px; }
.weather-alert-link { display:inline-block; min-height:32px; padding:4px 0; font-size:14px; font-weight:500; text-underline-offset:4px; }
.weather-alert-status { margin-top:8px; }
.weather-alert-details { margin-top:8px; font-size:14px; }
.weather-alert-details summary, .weather-alert-source summary { min-height:44px; display:flex; align-items:center; }
.weather-alert-details h4 { margin:14px 0 6px; }
.weather-alert-details p { margin:0 0 12px; white-space:pre-line; }
.weather-alert-source { margin-top:12px; font-size:12px; color:var(--muted); }
.weather-alert-source p { margin:8px 0; }
.dark-mode .weather-alert--yellow { --alert-tint:#353123; }
.dark-mode .weather-alert--orange, .dark-mode .weather-alert--amber { --alert-tint:#392f25; }
.dark-mode .weather-alert--red { --alert-tint:#39282b; }
@media(max-width:600px) { .weather-alerts-heading { align-items:flex-start; flex-direction:column; gap:8px; } .weather-alert { padding:18px; } }


/* Optional weather context follows the same light and dark palette. */
.metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 22px; }
.metrics > div { min-width:0; }
.metrics span { display:block; margin:0 0 4px; font-size:13px; }
.metrics b { font-size:16px; font-weight:600; }
#airQualityMetric[hidden] { display:none; }
#airQualityLink { text-decoration:none; text-underline-offset:3px; }
#airQualityLink:hover { text-decoration:underline; }
#airQualityMetric b { color:#916000; }
#airQualityMetric[data-risk="high"] b { color:#b9342b; }
#airQualityMetric[data-risk="very-high"] b { color:#8e315e; }
.dark-mode #airQualityMetric b { color:#efc267; }
.dark-mode #airQualityMetric[data-risk="high"] b { color:#ff9a90; }
.dark-mode #airQualityMetric[data-risk="very-high"] b { color:#f7a4ce; }
.status-row:has(.status:empty) { display:none; }
.history-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.history-card { background:var(--panel); border:1px solid var(--line); border-radius:20px; padding:24px; }
.history-card .range { flex-wrap:wrap; gap:16px 28px; }
.history-note,.history-source { font-size:13px; color:var(--muted); line-height:1.7; }
.history-note { margin:16px 0 0; }
.history-source { margin:14px 0 0; }
@media(max-width:600px) { .history-grid { grid-template-columns:1fr; } .history-card { padding:22px; } }

/* Forecast interval switch and compact hourly cards. */
.forecast-view-head { flex-wrap:wrap; align-items:center; }
.forecast-view-title { display:flex; align-items:center; flex-wrap:wrap; gap:14px 20px; }
.forecast-switch { display:inline-flex; padding:4px; gap:3px; border:1px solid var(--line); border-radius:999px; background:var(--soft); }
.forecast-switch label { position:relative; cursor:pointer; }
.forecast-switch input { position:absolute; opacity:0; width:1px; height:1px; }
.forecast-switch span { display:block; min-width:70px; padding:8px 14px; border-radius:999px; color:var(--muted); font-size:13px; font-weight:600; text-align:center; transition:background .15s,color .15s,box-shadow .15s; }
.forecast-switch input:checked + span { color:var(--text); background:var(--panel); box-shadow:0 2px 6px rgba(0,0,0,.09); }
.forecast-switch input:focus-visible + span { outline:3px solid var(--rain); outline-offset:3px; }
#forecastGrid[hidden], #updated[hidden], #hourlyPanel[hidden], #hourlyRetry[hidden] { display:none; }
.hourly-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.hourly-toolbar p { margin:0; line-height:1.6; }
.hourly-navigation { display:flex; gap:7px; align-items:center; flex-shrink:0; }
.hourly-arrow { width:44px; height:44px; border:1px solid var(--line); border-radius:50%; background:var(--panel); color:var(--text); font-size:18px; }
.hourly-arrow:disabled { opacity:.35; cursor:default; }
.hourly-grid { display:grid; grid-auto-flow:column; grid-auto-columns:max-content; gap:12px; overflow-x:auto; padding:2px 2px 14px; scroll-snap-type:x proximity; scrollbar-width:thin; scrollbar-color:var(--rain) var(--soft); }
.hourly-card { width:154px; scroll-snap-align:start; }
.hourly-solar-card { width:100px; padding-inline:12px; background:var(--glow); border-color:var(--sun); }
.hourly-solar-icon { color:var(--sun); }
.hourly-solar-label { font-size:16px; font-weight:600; margin:0; }
.hourly-card .period { margin-bottom:5px; }
.hourly-date { color:var(--muted); font-size:11px; margin:0 0 14px; }
.hourly-temperature { font-size:26px; font-weight:500; letter-spacing:-1px; margin:0 0 10px; }
.hourly-card .forecast-condition { margin-bottom:14px; }
.hourly-details { margin:0; padding-top:12px; border-top:1px solid var(--line); font-size:11px; }
.hourly-details div { display:flex; align-items:baseline; justify-content:space-between; gap:6px; margin-top:7px; }
.hourly-details dt { color:var(--muted); }
.hourly-details dd { margin:0; white-space:nowrap; }
.hourly-credit { color:var(--muted); font-size:11px; line-height:1.7; margin:10px 0 0; }
.hourly-credit a { color:inherit; }
@media (max-width:600px) {
  .forecast-view-head { align-items:stretch; gap:12px; }
  .forecast-view-title { justify-content:space-between; gap:12px; }
  .forecast-switch span { min-width:58px; padding:8px 10px; }
}

/* Current phase only, above the next weather forecast. */
.weather-moon { display:flex; align-items:center; gap:10px; margin:0 0 20px; padding-bottom:16px; border-bottom:1px solid var(--line); color:var(--text); }
.weather-moon[hidden] { display:none; }
.weather-moon svg { flex-shrink:0; }
.weather-moon-label { display:block; color:var(--muted); font-size:10px; letter-spacing:.1em; text-transform:uppercase; margin-bottom:2px; }
#currentMoonName { display:block; font-size:16px; font-weight:600; line-height:1.35; }
.weather-moon-disc { fill:#273345; }
.weather-moon-lit { fill:#f0e4bd; }
.weather-moon-rim { fill:none; stroke:var(--muted); stroke-width:.7; }

.current-feels { margin:7px 0 0; color:var(--muted); font-size:14px; }
.current-feels b { color:var(--text); font-weight:500; }
#pressure { white-space:nowrap; }
.forecast-feels { margin:12px 0 0; font-size:13px; color:var(--muted); font-variant-numeric:tabular-nums; line-height:1.6; }
.photo-heading { align-items:center; }
.photo-heading .eyebrow { margin-bottom:6px; }
.photo-day-control { display:flex; align-items:center; gap:10px; }
.photo-day-control label { font-size:12px; color:var(--muted); }
.photo-day-select { position:relative; display:inline-block; width:160px; max-width:100%; }
.photo-day-control select { appearance:none; -webkit-appearance:none; display:block; width:100%; min-height:44px; padding:10px 44px 10px 16px; border:1px solid var(--line); border-radius:14px; background:var(--panel); color:var(--text); font:inherit; font-size:14px; line-height:1.4; text-align:left; cursor:pointer; }
.photo-day-select > svg { position:absolute; top:50%; right:14px; width:18px; height:18px; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.photo-day-select:focus-within > svg { color:var(--rain); }
.photo-status:empty { display:none; }
.photo-status { margin:12px 0 18px; color:var(--text); font-size:14px; }
/* Solar light phases share the same colours in the timeline and its key. */
.photo-light--night { --light-colour:#263751; }
.photo-light--twilight { --light-colour:#929dc3; }
.photo-light--blue { --light-colour:#408bd0; }
.photo-light--golden { --light-colour:#e8ae3c; }
.photo-light--daylight { --light-colour:#ffe3a0; }
.photo-timeline-panel { padding:24px; border:1px solid var(--line); border-radius:22px; background:var(--panel); }
.photo-timeline-heading { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px 18px; }
.photo-timeline-heading h3 { font-size:15px; font-weight:600; margin:0; }
.photo-timeline-heading > span { font-size:11px; color:var(--muted); }
.photo-legend { display:flex; flex-wrap:wrap; gap:9px 18px; margin:16px 0 4px; font-size:11px; color:var(--muted); }
.photo-legend > span { display:inline-flex; align-items:center; gap:6px; }
.photo-swatch { display:inline-block; flex-shrink:0; width:9px; height:9px; border-radius:50%; background:var(--light-colour); box-shadow:0 0 0 1px var(--line); }
.photo-timeline-chart { position:relative; padding-top:24px; }
.photo-timeline-track { position:relative; height:46px; border-radius:12px; overflow:hidden; background:var(--soft); }
.photo-phase { position:absolute; top:0; bottom:0; padding:0; border:0; border-radius:0; background:var(--light-colour); min-width:0; }
.photo-phase:hover { filter:brightness(1.08); }
.photo-phase[aria-pressed="true"] { box-shadow:inset 0 0 0 2px var(--text); z-index:1; }
.photo-phase:focus-visible { outline:2px solid #fff; outline-offset:-4px; z-index:2; box-shadow:inset 0 0 0 2px var(--text); }
.photo-timeline-axis { position:relative; height:26px; margin-top:9px; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.photo-timeline-axis span { position:absolute; transform:translateX(-50%); white-space:nowrap; }
.photo-timeline-axis span:first-child { transform:none; }
.photo-timeline-axis span:last-child { transform:translateX(-100%); }
.photo-now { position:absolute; top:18px; height:58px; border-left:2px solid var(--text); pointer-events:none; z-index:3; }
.photo-now[hidden] { display:none; }
.photo-now span { position:absolute; top:-18px; left:-1px; transform:translateX(-50%); padding:0 5px; border-radius:5px; background:var(--panel); color:var(--text); font-size:10px; line-height:18px; font-weight:600; }
.photo-timeline-selection { display:flex; align-items:center; flex-wrap:wrap; gap:6px 14px; min-height:48px; padding:10px 0 16px; border-bottom:1px solid var(--line); font-size:13px; }
.photo-selection-kind { display:inline-flex; align-items:center; gap:7px; }
.photo-selection-kind::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--light-colour); box-shadow:0 0 0 1px var(--line); }
.photo-timeline-selection strong { font-size:13px; font-weight:500; font-variant-numeric:tabular-nums; }
.photo-selection-duration { color:var(--muted); font-size:11px; }
.photo-window-labels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 22px; padding-top:12px; }
.photo-window-label { display:grid; grid-template-columns:9px 1fr; gap:3px 8px; align-items:center; min-height:58px; border:0; border-radius:9px; padding:8px; background:transparent; color:var(--text); text-align:left; }
.photo-window-label:hover,.photo-window-label[aria-pressed="true"] { background:var(--soft); }
.photo-window-name { font-size:13px; color:var(--muted); }
.photo-window-time { grid-column:2; font-size:14px; font-variant-numeric:tabular-nums; }
.photo-window-label:disabled { cursor:default; opacity:.6; }
.photo-sun,.photo-weather { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; font-variant-numeric:tabular-nums; }
.photo-sun { margin:20px 0; padding:18px 0; border-block:1px solid var(--line); }
.photo-sun dt,.photo-weather dt { font-size:13px; color:var(--muted); margin-bottom:4px; }
.photo-sun dd,.photo-weather dd { margin:0; font-size:15px; }
.photo-weather-panel { margin-top:24px; padding-top:24px; border-top:1px solid var(--line); }
.photo-weather-panel h3 { font-size:16px; margin-bottom:16px; font-weight:500; }
.photo-weather { margin:0; }
.photo-weather dd { font-size:18px; font-weight:500; }
.photo-about { font-size:11px; color:var(--muted); margin-top:14px; line-height:1.7; }
.photo-about p { max-width:800px; margin:10px 0 0; }
@media(max-width:600px) {
  .photo-heading { flex-direction:row; align-items:center; flex-wrap:wrap; gap:16px; }
  .photo-timeline-panel { padding:18px 14px; border-radius:18px; }
  .photo-legend { gap:8px 12px; font-size:10px; }
  .photo-window-labels { gap:4px 6px; }
  .photo-window-label { padding:8px 4px; }
  .photo-window-time { font-size:11px; }
  .photo-timeline-selection { gap:6px 10px; }
  .photo-timeline-selection strong { font-size:12px; }
  .photo-sun,.photo-weather { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .photo-day-control label { display:none; }
  .metrics { gap:12px 18px; }
}

/* Keep search aligned with the weather card and navigation beside the desktop title. */
.page-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"title links" "search search"; align-items:center; gap:20px 24px; margin-bottom:16px; }
.weather-location-title { grid-area:title; min-width:0; }
.weather-location-title h1 { font-size:clamp(34px,3.5vw,48px); overflow-wrap:anywhere; }
.location-picker { grid-area:search; min-width:0; margin:0; }
.location-picker-body { display:block; }

.location-picker .location-controls { flex:1; min-width:0; margin:0; }
.weather-jump-links { grid-area:links; display:flex; justify-self:end; gap:8px; margin:0; }
.weather-jump-links a { display:flex; align-items:center; justify-content:center; min-height:44px; padding:10px 16px; border:1px solid var(--line); border-radius:999px; background:var(--panel); color:var(--muted); font-size:14px; text-decoration:none; }
.weather-jump-links a:hover { background:var(--soft); color:var(--text); }
.next-forecast-details > summary { display:none; }
.photo-window-group { min-width:0; }
.photo-window-group-title { display:flex; align-items:center; gap:8px; margin:8px 8px 4px; font-size:14px; font-weight:600; }
.photo-window-group-title::before { content:''; width:9px; height:9px; flex-shrink:0; border-radius:50%; background:var(--light-colour); }
.photo-window-group .photo-window-label { width:100%; }

@media (max-width:700px) {
  .weather-shortcuts { flex-wrap:nowrap; justify-content:safe center; overflow-x:auto; padding-block:8px; scrollbar-width:thin; }
  .weather-shortcuts .pill { flex-shrink:0; white-space:nowrap; }
  .topbar { padding:14px 16px; flex-wrap:nowrap; }
  .brand { font-size:28px; }
  .breadcrumb { display:none; }
  .page { margin-top:14px; padding:0 16px 32px; }
  .page-heading { grid-template-columns:minmax(0,1fr); grid-template-areas:"title" "search" "links"; gap:16px; margin-bottom:18px; }
  .page-heading .eyebrow { margin-bottom:6px; font-size:12px; }
  h1 { font-size:36px; letter-spacing:-1.5px; overflow-wrap:anywhere; }
  h2 { font-size:22px; }
  .location-meta { font-size:15px; }
  .location-picker { margin:0; border:0; background:transparent; }
            .location-picker-body { display:block; padding:0; }
  
  
  .city-search-row { grid-template-columns:minmax(0,1fr) 56px; gap:10px; }
  .city-search-field { padding-left:18px; gap:8px; }
  .city-search-field > svg { display:none; }
  .city-search-field button[type="submit"] { padding-inline:12px; }
  .locate-weather { width:56px; min-height:56px; padding:0; border-radius:50%; }
  .locate-weather > span { display:none; }
  .locate-weather svg { width:21px; height:21px; }
  
  .pill { min-height:44px; }
  
  .location-note { font-size:14px; line-height:1.6; }
  .city-results { grid-template-columns:minmax(0,1fr); }
  .city-results .pill { justify-content:flex-start; }
  .weather-jump-links { display:flex; justify-self:stretch; gap:6px; margin:0; }
  .weather-jump-links a { display:flex; align-items:center; justify-content:center; flex:1; min-height:44px; padding:8px 4px; border-radius:999px; color:var(--muted); font-size:14px; text-decoration:none; background:var(--soft); }
  .weather-jump-links a:hover { color:var(--text); background:var(--panel); }
  #forecast,#weather-map,#photography { scroll-margin-top:16px; }
  .current { grid-template-columns:minmax(0,1fr); border-radius:22px; padding:20px; gap:20px; }
  .current-heading { flex-wrap:wrap; gap:8px; }
  .current-heading .eyebrow { font-size:12px; }
  .station-control { flex:0 1 210px; max-width:70%; }
  .station-control select { height:44px; padding:8px 27px 8px 10px; border:1px solid var(--line); background:var(--soft); font-size:16px; }
  .current-reading { gap:18px; margin:18px 0 16px; }
  .current-reading > div:last-child { min-width:0; }
  .current-icon { width:68px; height:68px; }
  .current-icon svg { width:58px; height:58px; }
  .temperature { font-size:clamp(52px,15vw,70px); letter-spacing:-3px; font-weight:400; }
  .condition { font-size:19px; line-height:1.4; overflow-wrap:anywhere; }
  .current-feels { font-size:15px; }
  .details { font-size:13px; line-height:1.6; }
  .metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 16px; margin-top:20px; padding-top:18px; }
  .metrics > div { min-width:0; }
  .metrics span { display:block; margin:0 0 4px; font-size:13px; }
  .metrics b { display:block; font-size:16px; font-weight:600; overflow-wrap:anywhere; }
  .current-next { padding:18px 0 0; border-left:0; border-top:1px solid var(--line); }
  .current-next > .eyebrow { order:0; font-size:12px; }
  .current-next > .range { order:1; gap:32px; }
  .current-next .range-value { font-size:28px; }
  .current-next .range-label { font-size:12px; }
  .next-forecast-details { order:2; margin-top:8px; }
  .next-forecast-details > summary { display:flex; align-items:center; gap:8px; min-height:44px; font-size:14px; color:var(--rain); }
  .next-forecast-details > summary::after { content:'+'; font-size:18px; }
  .next-forecast-details[open] > summary::after { content:'−'; }
  .next-summary { margin:4px 0 14px; font-size:16px; line-height:1.65; }
  .weather-moon { order:3; margin:12px 0 0; padding:16px 0 0; border-top:1px solid var(--line); border-bottom:0; }
  .weather-moon-label { font-size:12px; letter-spacing:.04em; text-transform:none; }
  #currentMoonName { font-size:15px; }
  .forecast-head { flex-direction:column; align-items:stretch; margin:28px 0 16px; gap:12px; }
  .forecast-view-title { width:100%; flex-direction:column; align-items:stretch; gap:14px; }
  .forecast-switch { display:flex; border-radius:14px; }
  .forecast-switch label { flex:1; }
  .forecast-switch span { display:flex; justify-content:center; align-items:center; min-height:44px; padding:10px; border-radius:10px; font-size:15px; }
  .updated { font-size:13px; line-height:1.6; }
  .forecast-grid { grid-template-columns:minmax(0,1fr); gap:0; padding:0 16px; background:var(--panel); border:1px solid var(--line); border-radius:20px; }
  .forecast-grid > .forecast-card { display:grid; grid-template-columns:40px minmax(0,1fr) auto; gap:6px 12px; padding:18px 0 10px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
  .forecast-grid > .forecast-card:last-child { border-bottom:0; }
  .forecast-grid .period { grid-column:2; grid-row:1; margin:0; align-self:end; font-size:16px; overflow-wrap:anywhere; }
  .forecast-grid .forecast-icon { grid-column:1; grid-row:1/3; align-self:center; width:40px; height:40px; margin:0; }
  .forecast-grid .forecast-condition { grid-column:2; grid-row:2; margin:0; min-height:0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
  .forecast-grid .range { grid-column:3; grid-row:1/3; align-self:center; gap:12px; text-align:right; }
  .forecast-grid .range-label { font-size:11px; letter-spacing:0; }
  .forecast-grid .range-value { font-size:24px; line-height:1.3; }
  .forecast-grid .forecast-feels { grid-column:2/-1; grid-row:3; margin:2px 0 0; font-size:13px; }
  .forecast-grid details { grid-column:1/-1; margin:0; padding:0; border-top:0; font-size:15px; }
  .forecast-grid details summary { display:flex; align-items:center; justify-content:space-between; min-height:44px; list-style:none; font-size:14px; color:var(--rain); }
  .forecast-grid details summary::-webkit-details-marker { display:none; }
  .forecast-grid details summary::after { content:'+'; font-size:20px; }
  .forecast-grid details[open] summary::after { content:'−'; }
  .forecast-text { margin:8px 0 14px; font-size:15px; line-height:1.65; }
  .hourly-grid { gap:12px; scroll-padding-inline:2px; }
  .hourly-card { width:170px; padding:18px 16px; }
  .hourly-solar-card { width:104px; padding-inline:12px; }
  .hourly-card .period { font-size:16px; }
  .hourly-date { font-size:13px; }
  .hourly-temperature { font-size:30px; }
  .hourly-card .forecast-condition { font-size:14px; }
  .hourly-details { font-size:13px; }
  .hourly-details div { gap:8px; margin-top:10px; }
  .hourly-toolbar { align-items:flex-start; }
  .hourly-arrow { width:44px; height:44px; }
  .tide-preview { padding:20px; }
  .tide-preview .tide-type,.tide-preview .tide-height { font-size:13px; }
  .tide-preview .tide-time { font-size:18px; }
  .photo-heading { flex-direction:row; align-items:center; }
  .photo-day-control select { min-height:44px; font-size:16px; }
  .photo-status { font-size:15px; line-height:1.6; }
  .photo-timeline-heading h3 { font-size:17px; }
  .photo-timeline-heading > span,.photo-legend { font-size:13px; }
  .photo-timeline-track { height:52px; }
  .photo-timeline-selection { font-size:14px; }
  .photo-timeline-selection strong { font-size:14px; }
  .photo-selection-duration { font-size:13px; }
  .photo-window-labels { grid-template-columns:1fr; gap:4px; }
  .photo-window-group + .photo-window-group { margin-top:8px; padding-top:12px; border-top:1px solid var(--line); }
  .photo-window-group-title { font-size:16px; }
  .photo-window-label { grid-template-columns:10px minmax(0,1fr) auto; padding:12px 8px; min-height:48px; }
  .photo-window-name { font-size:14px; }
  .photo-window-time { grid-column:3; font-size:14px; }
  .photo-sun,.photo-weather { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; }
  .photo-sun dt,.photo-weather dt { font-size:13px; }
  .photo-sun dd,.photo-weather dd { font-size:17px; }
  .photo-weather-panel { margin-top:20px; padding-top:20px; }
  .photo-weather-panel h3 { font-size:16px; }
  .photo-about,.history-note,.history-source { font-size:13px; }
  .photo-about summary { min-height:44px; display:flex; align-items:center; }
  .history-grid { grid-template-columns:1fr; }
  .history-card { padding:20px; }
  .history-card .eyebrow,.history-card .range-label { font-size:12px; }
  .history-card .range { gap:16px 24px; }
  .weather-alert-dates,.weather-alert-link { font-size:14px; }
  footer { flex-direction:column; font-size:13px; line-height:1.7; gap:16px; }
  .source-link { white-space:normal; display:flex; align-items:center; min-height:44px; }
}

@media (min-width:701px) and (max-width:1000px) {
  .page-heading { column-gap:20px; }
  .location-picker .location-controls { width:100%; }
}

@media (max-width:360px) {
  .page { padding-inline:12px; }
  .city-search-field > svg { display:none; }
  .city-search-field { padding-left:18px; gap:6px; }
  .city-search-field button[type="submit"] { padding-inline:12px; }
  .current { padding:16px; }
  .current-heading { align-items:flex-start; flex-direction:column; }
  .station-control { flex-basis:auto; max-width:100%; width:100%; }
  .forecast-grid { padding-inline:12px; }
  .forecast-grid > .forecast-card { grid-template-columns:32px minmax(0,1fr) auto; column-gap:8px; }
  .forecast-grid .forecast-icon { width:32px; height:32px; }
  .forecast-grid .range { gap:8px; }
  .forecast-grid .range-value { font-size:22px; }
  .photo-window-label { grid-template-columns:10px minmax(0,1fr); }
  .photo-window-time { grid-column:2; }
}



/* A softer sky strip, a clear present-time marker, and a readable selected window. */
.photo-timeline-panel { padding:26px; box-shadow:0 8px 28px #00000005; }
.photo-timeline-heading { align-items:center; }
.photo-timeline-heading h3 { font-size:18px; letter-spacing:-.3px; }
.photo-timeline-heading > span { font-size:12px; }
.photo-timeline-chart { padding-top:38px; margin-top:8px; }
.photo-timeline-track { height:76px; border-radius:16px; box-shadow:inset 0 0 0 1px #00000008,0 4px 14px #00000006; }
.photo-phase { background:linear-gradient(180deg,color-mix(in srgb,var(--light-colour) 76%,#fff),var(--light-colour)); box-shadow:inset -1px 0 #ffffff28; }
.photo-phase:hover { filter:brightness(1.05); }
.photo-phase[aria-pressed="true"] { box-shadow:inset 0 0 0 2px #fff,0 0 0 1px #00000012; border-radius:5px; }
.photo-phase:focus-visible { outline:3px solid var(--text); outline-offset:-4px; box-shadow:inset 0 0 0 2px #fff; }
.photo-phase-caption { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; color:#203047; font-size:12px; font-weight:600; pointer-events:none; }
.photo-light--night .photo-phase-caption { color:#f4f6ff; }
.photo-phase-symbol,.photo-phase-symbol svg { display:block; width:21px; height:21px; }
.photo-timeline-axis { height:24px; margin-top:12px; font-size:12px; }
.photo-timeline-axis span::before { content:''; position:absolute; width:1px; height:4px; top:-8px; left:50%; background:var(--muted); opacity:.4; }
.photo-timeline-axis span:first-child::before { left:0; }
.photo-timeline-axis span:last-child::before { left:auto; right:0; }
.photo-now { top:32px; height:88px; border-left:2px solid var(--text); filter:drop-shadow(0 0 2px var(--panel)); }
.photo-now span { top:-27px; padding:2px 9px; border-radius:999px; background:var(--text); color:var(--panel); font-size:11px; line-height:20px; box-shadow:0 2px 6px #00000012; }
.photo-now span::after { content:''; position:absolute; bottom:-3px; left:50%; width:6px; height:6px; background:var(--text); transform:translateX(-50%) rotate(45deg); }
.photo-now--start span { transform:translateX(-10px); }
.photo-now--start span::after { left:10px; }
.photo-now--end span { transform:translateX(calc(-100% + 10px)); }
.photo-now--end span::after { left:calc(100% - 10px); }
.photo-legend { gap:8px; margin:10px 0 18px; font-size:12px; }
.photo-legend > span { gap:6px; min-height:32px; padding:5px 10px; border:1px solid var(--line); border-radius:999px; background:var(--panel); }
.photo-swatch { width:8px; height:8px; }
.photo-timeline-selection { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 12px; margin:0 0 8px; padding:16px; border:1px solid color-mix(in srgb,var(--light-colour) 32%,var(--line)); border-radius:14px; background:color-mix(in srgb,var(--light-colour) 9%,var(--panel)); }
.photo-selection-kind { grid-column:1; font-size:14px; font-weight:500; }
.photo-timeline-selection strong { grid-column:1; font-size:20px; font-weight:600; letter-spacing:-.3px; }
.photo-selection-duration { grid-column:2; grid-row:1/3; align-self:center; padding:5px 9px; border-radius:8px; background:var(--panel); font-size:12px; white-space:nowrap; }
.photo-window-group .photo-window-label[aria-pressed="true"] { background:color-mix(in srgb,var(--light-colour) 12%,var(--panel)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--light-colour) 30%,var(--line)); }
@media (max-width:700px) {
  .photo-timeline-panel { padding:20px 14px; border-radius:20px; }
  .photo-timeline-heading { align-items:flex-start; gap:5px; }
  .photo-timeline-heading h3 { font-size:18px; }
  .photo-timeline-heading > span { font-size:12px; }
  .photo-timeline-track { height:72px; border-radius:14px; }
  .photo-phase-caption { font-size:11px; }
  .photo-phase-symbol,.photo-phase-symbol svg { width:19px; height:19px; }
  .photo-now { height:84px; }
  .photo-timeline-axis { font-size:11px; }
  .photo-legend { gap:6px; font-size:12px; }
  .photo-legend > span { padding:5px 8px; }
  .photo-timeline-selection { padding:14px 12px; column-gap:8px; }
  .photo-timeline-selection strong { font-size:19px; }
  .photo-selection-kind { font-size:14px; }
  .photo-selection-duration { padding:5px 7px; }
}
@media (max-width:360px) {
  .photo-timeline-selection { grid-template-columns:minmax(0,1fr); }
  .photo-selection-duration { grid-column:1; grid-row:auto; justify-self:start; margin-top:3px; }
}

/* Sun times belong to the daily light card, just before its selected window. */
.photo-timeline-panel .photo-sun { margin:0 0 18px; padding:0; border:0; background:transparent; gap:10px; }
.photo-sun-stat { min-width:0; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.photo-timeline-panel .photo-sun dt { display:flex; align-items:center; gap:8px; margin:0 0 10px; color:var(--muted); font-size:13px; }
.photo-sun-icon { display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; border-radius:10px; background:var(--glow); color:var(--sun); }
.photo-sun-icon svg { display:block; width:20px; height:20px; }
.photo-timeline-panel .photo-sun dd { font-size:20px; font-weight:500; line-height:1.4; min-height:28px; }
.photo-timeline-panel .photo-sun-stat--daylight dd { font-size:17px; line-height:28px; }
@media (max-width:700px) {
  .photo-sun-stat { padding:12px; }
  .photo-timeline-panel .photo-sun dt { gap:7px; }
  .photo-sun-icon { flex-basis:28px; width:28px; height:28px; border-radius:9px; }
}

.photo-window-group--twilight { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:22px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.photo-window-group--twilight .photo-window-group-title { grid-column:1/-1; }
@media (max-width:700px) { .photo-window-group--twilight { grid-template-columns:minmax(0,1fr); } }
