/* ============================================================
   /weather — page-scoped styles (wxp-*). Builds on home-new.css
   tokens: Sunlit Edition, Spectral + IBM Plex Mono.
   ============================================================ */

/* ---- Top: title + picker ---- */
.wxp-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--gap);
    padding-top: 30px;
    padding-bottom: 6px;
    flex-wrap: wrap;
}

/* section.block's `padding: X 0 0` shorthand kills .wrap's side gutters
   (home-new.css:120 vs :99) — restore them for this page's bare headings. */
.wxp-body section.block { padding-inline: var(--pad); }
.wxp-body .chart-note { color: var(--muted); }
.wxp-h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
    margin: .1em 0 .25em;
}
.wxp-h1 em {
    font-style: normal;
    color: var(--sea-text);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 3px;
    text-underline-offset: 7px;
}
.wxp-lede {
    max-width: 56ch;
    color: var(--ink-2);
    font-size: 1.02rem;
    line-height: 1.6;
}
.wxp-picker { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.wxp-select { min-width: 240px; max-width: 300px; }
.wxp-updated { font-size: .72rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* ---- Warnings ---- */
.wxp-warn {
    display: block;
    border-radius: var(--r);
    padding: 12px 16px;
    margin: 10px 0;
    border: 1px solid;
    background: var(--card);
}
.wxp-warn summary { cursor: pointer; }
.wxp-warn.level-yellow { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.wxp-warn.level-orange { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.wxp-warn.level-red    { border-color: var(--alert-b); box-shadow: inset 4px 0 0 var(--alert-b); }
.wxp-warn-type { font-weight: 600; }
.wxp-warn-when { color: var(--muted); font-size: .82rem; margin-left: 8px; }
.wxp-warn-text { margin: 8px 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.5; }

/* ---- Right now ---- */
.wxp-now {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--gap);
    padding: clamp(18px, 3vw, 28px);
}
.wxp-now-main { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px); flex-wrap: wrap; }
.wxp-now-icon { width: 74px; height: 74px; flex: 0 0 auto; color: var(--gold-text); }
.wxp-now-icon svg { width: 100%; height: 100%; }
.wxp-big { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 600; line-height: 1; }
.wxp-unit { font-size: 1.4rem; color: var(--muted); font-family: var(--mono); }
.wxp-now-label { margin: .2em 0 0; color: var(--ink-2); }
.wxp-now-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    gap: 10px;
    margin: 0;
    flex: 1 1 260px;
}
.wxp-chip {
    background: var(--card-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 8px 10px;
}
.wxp-chip dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wxp-chip dd { margin: 2px 0 0; font-size: 1.05rem; font-weight: 600; }

/* Beaufort dial */
.wxp-beaufort {
    border-left: 1px solid var(--line-2);
    padding-left: clamp(14px, 2.5vw, 24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.wxp-bft-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wxp-bft-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.wxp-bft-reading { font-size: .85rem; color: var(--ink-2); }
.wxp-bft-band { display: flex; gap: 3px; }
.wxp-bft-cell {
    flex: 1;
    height: 26px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--c) 24%, var(--card));
    position: relative;
    transition: background .2s;
}
.wxp-bft-cell i {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-style: normal; font-size: .66rem; color: var(--ink);
}
.wxp-bft-cell.in-range { background: color-mix(in srgb, var(--c) 55%, var(--card)); }
.wxp-bft-cell.is-now { background: var(--c); box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--ink); }
.wxp-bft-cell.is-now i { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.55); font-weight: 700; }
.wxp-bft-label { margin: 0; font-size: .95rem; line-height: 1.45; }
.wxp-bft-range { margin: 0; font-size: .72rem; color: var(--muted); letter-spacing: .04em; }

/* ---- Meteogram ---- */
.wxp-meteo-panel { padding: clamp(14px, 2.5vw, 22px); position: relative; }
.wxp-meteo-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--r-sm);
    background: var(--card-soft);
}
.wxp-meteo-scroll:focus-visible { outline: 2.5px solid var(--terra); }
.wxp-meteogram { display: block; }
.wxp-meteogram .wxp-mg-day { font: 600 11px var(--mono); fill: var(--ink-2); letter-spacing: .04em; }
.wxp-meteogram .wxp-mg-hour { font: 500 10px var(--mono); fill: var(--muted); text-anchor: middle; }
.wxp-meteogram .wxp-mg-val { font: 600 10px var(--mono); text-anchor: middle; }
.wxp-meteogram .wxp-mg-lane { font: 600 9.5px var(--mono); fill: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.wxp-meteo-skel { padding: 60px 20px; text-align: center; color: var(--muted); font-size: .9rem; }
.wxp-tip {
    position: absolute;
    z-index: 5;
    background: var(--dark-2);
    color: var(--on-dark);
    border-radius: var(--r-sm);
    padding: 8px 11px;
    font-size: .72rem;
    line-height: 1.6;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    max-width: 220px;
}
.wxp-tip strong { color: #fff; }

/* ---- Tides & sky ---- */
.wxp-tides-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--gap); }
.wxp-tide-panel { padding: clamp(14px, 2.5vw, 22px); }
.wxp-tide-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.wxp-tide-station { font-size: .72rem; color: var(--muted); }
.wxp-tide-svg { width: 100%; height: 150px; display: block; }
.wxp-tide-svg .tide-fill { fill: rgba(43, 183, 168, .14); }
.wxp-tide-svg .tide-line { fill: none; stroke: var(--sea); stroke-width: 2.4; stroke-linecap: round; }
.wxp-tide-svg .tide-dot { fill: var(--card); stroke: var(--sea-text); stroke-width: 2; }
.wxp-tide-svg .tide-lab { font: 600 11px 'IBM Plex Mono', monospace; fill: var(--ink-2); }
.wxp-tide-svg .tide-now-ring { fill: none; stroke: var(--terra); stroke-width: 2.4; }
.wxp-tide-svg .tide-est { font: 500 10px 'IBM Plex Mono', monospace; fill: var(--muted); }
.wxp-tide-times { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; }
.wxp-tide-times .up::before { content: '▲ '; color: var(--sea-text); }
.wxp-tide-times .down::before { content: '▼ '; color: var(--rain-text); }
.wxp-tide-times .is-past { opacity: .5; }
.wxp-sky-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: clamp(14px, 2.5vw, 22px); align-content: center; }
.wxp-sky-cell { background: var(--card-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; }
.wxp-sky-cell span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wxp-sky-cell strong { font-size: 1.05rem; }

/* ---- Sea state ---- */
.wxp-insight {
    background: linear-gradient(120deg, rgba(43,183,168,.1), rgba(231,176,8,.08));
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    padding: 12px 16px;
    font-size: .98rem;
    margin: 0 0 14px;
}
.wxp-sea-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.wxp-sea-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.wxp-sea-k { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.wxp-sea-big { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.wxp-sea-v { margin: 0; font-weight: 600; }
.wxp-sea-sub { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.45; }
.wxp-sea-bars { display: flex; align-items: flex-end; gap: 10px; height: 64px; padding: 4px 0; }
.wxp-sea-bars .bar { flex: 1; border-radius: 5px 5px 2px 2px; min-height: 4px; }
.wxp-sea-bars .bar.total { background: var(--sea); }
.wxp-sea-bars .bar.swell { background: var(--rain); }
.wxp-sea-legend { display: flex; gap: 12px; font-size: .68rem; color: var(--muted); font-family: var(--mono); }
.wxp-sea-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.wxp-rose { width: 96px; height: 96px; align-self: center; }
.wxp-spark { width: 100%; height: 44px; }
.wxp-spark .spark-line { fill: none; stroke: var(--sea); stroke-width: 1.8; }
.wxp-spark .spark-fill { fill: rgba(43, 183, 168, .12); }

/* ---- Level pills + meters ---- */
.wxp-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wxp-pill {
    font: 700 10px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 9px;
    border-radius: var(--r-pill);
    color: var(--ink);
    background: var(--card-soft);
    white-space: nowrap;
}
.wxp-pill i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 0; font-style: normal; }
.wxp-meter { position: relative; height: 6px; border-radius: 3px; margin: 2px 0 4px; }
.wxp-meter i {
    position: absolute; top: 50%;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--ink);
    border: 2.5px solid var(--card);
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.wxp-meter-aqi { background: linear-gradient(90deg, #23b46f 0 20%, #7fb83e 20% 40%, #e7b008 40% 60%, #e8772b 60% 80%, #d23b2c 80% 100%); }
.wxp-meter-dust { background: linear-gradient(90deg, #23b46f 0 10%, #7fb83e 10% 50%, #e8772b 50% 75%, #d23b2c 75% 100%); }
.wxp-meter-pm25 { background: linear-gradient(90deg, #23b46f 0 30%, #7fb83e 30% 45%, #e7b008 45% 60%, #e8772b 60% 80%, #d23b2c 80% 100%); }
.wxp-meter-pollen { background: linear-gradient(90deg, #23b46f 0 25%, #7fb83e 25% 50%, #e7b008 50% 70%, #e8772b 70% 85%, #d23b2c 85% 100%); }

/* ---- Badges (amenities) ---- */
.wxp-badges { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 4px; }
.wxp-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font: 600 11px/1 var(--mono);
    letter-spacing: .03em;
    background: var(--card-soft);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    padding: 6px 11px;
    color: var(--ink-2);
}
.wxp-badge.is-good { border-color: rgba(26, 157, 146, .5); color: var(--sea-text); }
.wxp-badge.is-warn { border-color: var(--alert-b); color: var(--alert-b); font-weight: 700; }

/* ---- Buoy strip ---- */
.wxp-buoy-strip {
    margin: 0 0 14px;
    font-size: .82rem;
    color: var(--ink-2);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 10px 14px;
}
.wxp-buoy-strip .live-dot-inline { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sea); margin-right: 6px; animation: wxp-pulse 2.4s infinite; }
@keyframes wxp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---- Fires strip ---- */
.wxp-fire {
    border-radius: var(--r);
    border: 1px solid var(--warn);
    box-shadow: inset 4px 0 0 var(--warn);
    background: var(--card);
    padding: 12px 16px;
    margin: 10px 0;
    font-size: .92rem;
}
.wxp-fire strong { color: var(--terra-text); }
.wxp-fire .mono { color: var(--muted); font-size: .78rem; }

/* ---- Best beach ---- */
.wxp-best-grid { min-height: 120px; }
.wxp-best-note { margin: 0 0 12px; font-size: .85rem; color: var(--ink-2); }
.wxp-uv-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: 0; }
.wxp-best-card { overflow: hidden; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .15s cubic-bezier(.22,1,.36,1), box-shadow .15s; }
.wxp-best-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.wxp-best-art { height: 120px; background: linear-gradient(150deg, #cfe4ee, #eadfc8); position: relative; }
.wxp-best-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wxp-best-rank {
    position: absolute; top: 10px; left: 10px;
    background: var(--ink); color: #fff;
    font-family: var(--mono); font-size: .72rem; font-weight: 700;
    border-radius: var(--r-pill); padding: 4px 10px;
}
.wxp-best-score { position: absolute; top: 10px; right: 10px; background: var(--card); border-radius: var(--r-pill); padding: 4px 10px; font-family: var(--mono); font-size: .74rem; font-weight: 700; }
.wxp-best-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.wxp-best-name { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; margin: 0; }
.wxp-best-name a { color: inherit; text-decoration: none; }
.wxp-best-name a:hover { color: var(--terra-text); }
.wxp-best-why { margin: 0; font-size: .82rem; color: var(--ink-2); line-height: 1.5; }
.wxp-best-stats { display: flex; gap: 10px; font-size: .72rem; color: var(--muted); font-family: var(--mono); flex-wrap: wrap; }

/* ---- Map ---- */
.wxp-map-panel { padding: 0; overflow: hidden; position: relative; }
.wxp-map { height: 440px; width: 100%; background: var(--card-soft); }
.wxp-map-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 400; }
.wxp-map-legend {
    position: absolute; left: 12px; bottom: 12px; z-index: 500;
    background: rgba(255, 253, 249, .92);
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    padding: 7px 10px;
    font-size: .66rem;
    letter-spacing: .03em;
    display: flex; align-items: center; gap: 6px;
}
.wxp-map-legend .sw { width: 14px; height: 8px; border-radius: 3px; display: inline-block; }

/* ---- Outlook (extends .forecast/.fc-day) ---- */
.wxp-outlook { grid-template-columns: repeat(10, minmax(92px, 1fr)); }
.wxp-fc-skel { min-height: 110px; opacity: .5; }
.wxp-uvw { font-size: .62rem; color: var(--muted); font-family: var(--mono); }

/* ---- Responsive ---- */
@media (max-width: 1040px) {
    .wxp-sea-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .wxp-now { grid-template-columns: 1fr; }
    .wxp-beaufort { border-left: 0; border-top: 1px solid var(--line-2); padding-left: 0; padding-top: 14px; }
    .wxp-tides-grid { grid-template-columns: 1fr; }
    .wxp-picker { align-items: stretch; width: 100%; }
    .wxp-select { max-width: none; }
    .wxp-outlook { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; }
    .wxp-outlook .fc-day { scroll-snap-align: start; }
}
@media (max-width: 640px) {
    .wxp-now-chips { grid-template-columns: repeat(3, 1fr); }
    .wxp-map { height: 340px; }
    .wxp-best-tabs { flex-wrap: wrap; }
    .wxp-body .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .wxp-uvw { display: none; }
}
@media (max-width: 440px) {
    .wxp-now-chips { grid-template-columns: repeat(2, 1fr); }
}
@media (pointer: coarse) {
    .wxp-bft-cell { height: 30px; }
    .wxp-meteo-tabs .chart-tab, .wxp-best-tabs .chart-tab, .wxp-map-tabs .chart-tab { min-height: 44px; }
    .wxp-select { min-height: 44px; }
}
.wxp-uv-window { display: block; font-size: .62rem; color: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
    .wxp-best-card { transition: none; }
}
