/*
 * HELPERG Data — layout helpers for the public data pages.
 *
 * Composition only. Every colour, radius, shadow, spacing step and type size
 * below is a canonical token from styles.css; nothing new is defined. The
 * `ui-*` components do the visual work; these `dx-*` rules arrange them for
 * a filter toolbar, a live-state region and a responsive record table, and
 * respect reduced motion and the sticky-stack clearance styles.css sets.
 */

/* ======================================================================
 * P2J — the institutional economic surface.
 *
 * Serious rather than decorative: navy and neutral greys, borders instead of
 * fills, no gradient, glass, glow or ornamental shadow, and no pale-blue wash
 * over rows of numbers. Typography and alignment carry the hierarchy. Every
 * value stays neutral — colour here means operational state, never whether a
 * statistic is good news.
 * ====================================================================== */

/* Developer sub-navigation, inside <main> on the /data/ developer surfaces. */
.dx-nav { border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.dx-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  padding: var(--space-2) 0;
  list-style: none;
}
.dx-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--type-meta);
  font-weight: 600;
  text-decoration: none;
}
.dx-nav__list a:hover { background: var(--color-surface-secondary); color: var(--color-text); }
.dx-nav__list a[aria-current="page"] { background: var(--color-data-canvas); color: var(--color-navy); box-shadow: inset 0 -2px 0 var(--color-navy); }

/* Live region and states. Only one state is visible at a time. */
.dx-state[hidden] { display: none; }
.dx-state { display: grid; gap: var(--space-3); }
.dx-summary { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; color: var(--color-text-muted); font-size: var(--type-meta); }

/* Record tables: the wrap scrolls, the page never does. The wrap is a containing block, so the visually-hidden
   spans inside the cells (position: absolute) stay inside it when the table is wider than the wrap; otherwise
   they widen the document, which a real corpus with long official titles showed at 768px. */
.ui-table-wrap { position: relative; }
.dx-table td, .dx-table th { white-space: nowrap; }
.dx-table td.dx-wrap, .dx-table th.dx-wrap { white-space: normal; min-width: 16ch; }
/* A column that carries a title and an excerpt gets the room a sentence needs. */
.dx-table td.dx-wide, .dx-table th.dx-wide { min-width: 34ch; }
.dx-table .dx-num { min-width: 10ch; font-variant-numeric: tabular-nums; text-align: right; }
.dx-table .dx-num .dx-val__meta { white-space: nowrap; }
.dx-table .dx-cell-stack { display: grid; gap: var(--space-1); }
.dx-table .dx-cell-stack > .ui-meta { white-space: normal; min-width: 14ch; }
/* Below 768px the same rows read as cards: each cell is labelled by its column head (the head stays for assistive technology). */
@media (max-width: 767px) {
  .dx-table--cards { min-width: 0; }
  .dx-table--cards thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .dx-table--cards tbody, .dx-table--cards tr { display: block; }
  .dx-table--cards tr { margin: 0 0 var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
  .dx-table--cards td { display: grid; grid-template-columns: minmax(88px, 34%) minmax(0, 1fr); gap: var(--space-3); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); white-space: normal; text-align: left; }
  .dx-table--cards td:last-child { border-bottom: 0; }
  .dx-table--cards td::before { content: attr(data-label); color: var(--color-text-muted); font-size: .8125rem; }
  .dx-table--cards td.dx-wrap, .dx-table--cards td.dx-wide { min-width: 0; }
  .dx-table--cards .dx-num .dx-val { justify-items: start; }
}
/* How a computed value came about, disclosed beside the figure. */
.dx-derived > summary { color: var(--color-brand); font-size: .8125rem; font-weight: 600; cursor: pointer; }
.dx-derived > p { max-width: 48ch; white-space: normal; }
[data-dx-view="news"] .dx-title { font-size: 1.125rem; line-height: 1.45; }
[data-dx-view="news"] .dx-cell-stack { gap: .65rem; }
.dx-news-details[open] > div { margin-top: .75rem; }
@media (min-width: 768px) {
  [data-dx-view="news"] td:first-child { width: 11rem; }
}

/* Key/value readouts for weather and status. */
.dx-readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: var(--space-4); }
.dx-readout__item { display: grid; gap: var(--space-1); padding: var(--space-4); border: 1px solid var(--color-data-border); border-radius: var(--radius-md); background: var(--color-data-surface); }
.dx-readout__value { font-size: var(--type-h3); font-weight: 650; color: var(--color-data-text); font-variant-numeric: tabular-nums; }

/* Attribution is part of the licence, not decoration; keep it legible. */
.dx-attribution { color: var(--color-text-secondary); font-size: var(--type-meta); line-height: 1.5; }

/* Hub cards inherit ui-card; only the footer alignment is arranged here. */
.dx-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-6); }
.dx-card-grid .ui-card { display: grid; grid-template-rows: auto 1fr auto; gap: var(--space-4); }

/* An external, publisher-owned link is marked as such; the marker is text, not colour. */
.dx-external::after { content: ' \2197'; font-size: .85em; }
.dx-table .dx-title { font-weight: 600; }

/* Developer documentation: endpoint blocks and parameter tables. */
.dx-endpoint { display: grid; gap: var(--space-3); min-width: 0; padding: var(--space-6); border: 1px solid var(--color-data-border); border-radius: var(--radius-md); background: var(--color-data-surface); }
/* Inline code in documentation prose may wrap; a 50-character cache directive must not widen a phone viewport. */
.dx-prose :where(p, dd, li) code { white-space: normal; overflow-wrap: anywhere; }
/* Grid items default to min-width:auto, which lets a wide <pre> inside .ui-code widen the card and the page. */
.dx-endpoint > * { min-width: 0; }
/* A path is one unbreakable token; at 360px it must be allowed to break rather than widen the page. */
.dx-endpoint__method { font: 600 var(--type-code)/1.2 var(--font-mono); color: var(--color-brand-deep); overflow-wrap: anywhere; }

@media (max-width: 767px) {
  .dx-nav__list a { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .dx-nav__list a, .dx-readout__item { transition: none; }
}

/* ======================================================================
 * P2G — the economic calendar. Composition only, as above: every colour,
 * radius, spacing step and type size is a token from styles.css.
 * ====================================================================== */

/* Text for assistive technology only (the site's stylesheet has no such utility). */
.dx-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* The filter toolbar every filtered surface shares: common controls on the rows, the rarer ones behind a disclosure, Reset always visible. */
.dx-toolbar { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-data-border); border-radius: var(--radius-md); background: var(--color-data-surface); }
.dx-toolbar__row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3); }
.dx-toolbar__row--meta { align-items: center; padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.dx-toolbar__field { flex: 0 1 240px; min-width: 0; }
.dx-toolbar__field--wide { flex: 1 1 320px; }
/* The rarer filters, disclosed natively; the summary is a control with the shared count. */
.dx-more { grid-column: 1 / -1; }
.dx-more > summary { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); font: 600 var(--type-meta)/1.2 var(--font-sans); cursor: pointer; list-style: none; }
.dx-more > summary::-webkit-details-marker { display: none; }
.dx-more > summary:hover { border-color: var(--color-blue-border); background: var(--color-blue-light); color: var(--color-brand-dark); }
.dx-more__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--space-3); padding-top: var(--space-3); }
.dx-cal-search { flex: 1 1 240px; min-width: 0; }
.dx-presets { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; padding: 0; border: 0; min-width: 0; }
.dx-preset { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--color-data-border); border-radius: var(--radius-sm); background: var(--color-data-surface); color: var(--color-data-text); font: 600 var(--type-meta)/1.2 var(--font-sans); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard); }
.dx-preset:hover { border-color: var(--color-navy-soft); background: var(--color-data-row-hover); color: var(--color-navy); }
.dx-preset[aria-pressed="true"] { border-color: var(--color-navy); background: var(--color-navy); color: #FFFFFF; }
.dx-nav-btns { display: inline-flex; gap: var(--space-1); }
.dx-nav-btns .ui-button { min-height: 40px; padding-block: 6px; }
.dx-custom { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3); }
.dx-custom .ui-field { flex: 1 1 150px; }
.dx-custom[hidden] { display: none; }
.dx-clock { display: inline-flex; align-items: baseline; gap: var(--space-2); margin: 0; color: var(--color-text-secondary); font-size: var(--type-meta); white-space: nowrap; }
.dx-clock__time { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--color-text); }
.dx-tz { flex: 0 1 260px; min-width: 0; }
.dx-mode { display: inline-flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; padding: 0; border: 0; }
.dx-mode label { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; color: var(--color-text-secondary); font-size: var(--type-meta); }
.dx-mode input { width: 18px; height: 18px; accent-color: var(--color-brand); }
.dx-filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--color-brand); color: var(--color-on-brand); font-size: .75rem; }
.dx-filter-count:empty { display: none; }

/* Active-filter chips. */
.dx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.dx-chips[hidden] { display: none; }
.dx-chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; padding: 4px 10px 4px 12px; border: 1px solid var(--color-data-border); border-radius: var(--radius-sm); background: var(--color-data-canvas); color: var(--color-data-text); font: 600 .8125rem/1.2 var(--font-sans); cursor: pointer; }
.dx-chip:hover { border-color: var(--color-navy); }
.dx-chip__x { font-size: 1.1rem; line-height: 1; }

/* The advanced-filter panel: a <dialog>, inline on wide screens, modal on narrow ones. */
.dx-panel { position: static; width: 100%; max-width: none; margin: 0; padding: var(--space-4); border: 1px solid var(--color-data-border); border-radius: var(--radius-md); background: var(--color-data-surface); color: inherit; }
.dx-panel:not([open]) { display: none; }
.dx-panel__heading { margin: 0 0 var(--space-3); font-size: var(--type-body); font-weight: 650; color: var(--color-text); }
.dx-panel__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--space-3); }
.dx-panel__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }

/* Live region, states and the reserved results area (no layout shift when rows arrive). */
.dx-cal-region { min-height: 28rem; }
.dx-cal-partial[hidden] { display: none; }

/* The table. Six columns and a compact primary row: time, event, actual, previous, status, source.
   Everything else — place, currency, revision detail, schedule source, evidence — is on the
   event's meta line or in its expandable details row, so no row grows past two short lines. */
.dx-cal { font-size: var(--type-meta); }
.dx-cal th, .dx-cal td { padding: var(--space-2) var(--space-2); vertical-align: top; }
.dx-cal thead th { position: sticky; top: var(--sticky-stack-height); z-index: 2; border-bottom: 2px solid var(--color-data-border); background: var(--color-data-canvas); color: var(--color-navy); white-space: nowrap; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dx-cal tbody tr:last-child td { border-bottom: 1px solid var(--color-border); }
.dx-cal__day th { position: sticky; top: calc(var(--sticky-stack-height) + 2.25rem); z-index: 1; padding: var(--space-2); border-top: 1px solid var(--color-navy); border-bottom: 1px solid var(--color-data-border); background: var(--color-data-canvas); color: var(--color-navy); font-weight: 700; text-align: left; white-space: normal; }
.dx-cal__row td { padding-block: var(--space-1); transition: background-color var(--duration-fast) var(--ease-standard); }
.dx-cal__row:hover td, .dx-cal__row:focus-within td { background: var(--color-data-row-hover); }
.dx-cal__time { width: 9ch; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dx-cal__time time { display: inline; font-weight: 650; color: var(--color-text); }
.dx-cal__time .dx-val__meta { display: block; white-space: nowrap; }
.dx-cal .dx-cell-stack { display: grid; gap: var(--space-1); }
.dx-cal__event { min-width: 24ch; white-space: normal; }
.dx-cal__toggle { display: inline-flex; align-items: flex-start; gap: var(--space-2); width: 100%; min-height: 24px; margin: 0; padding: 2px 0; border: 0; background: none; color: var(--color-data-text); font: 650 var(--type-meta)/1.35 var(--font-sans); text-align: left; cursor: pointer; }
.dx-cal__toggle:hover .dx-cal__title { color: var(--color-brand-deep); text-decoration: underline; }
/* A long official title is clamped to two lines in the row; the full title is read to assistive technology and shown in the details row. */
.dx-cal__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dx-cal__meta { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dx-cal__chevron::before { content: '\203A'; display: inline-block; color: var(--color-text-muted); transition: transform var(--duration-fast) var(--ease-standard); }
.dx-cal__toggle[aria-expanded="true"] .dx-cal__chevron::before { transform: rotate(90deg); }
.dx-cal__details[hidden] { display: none; }
.dx-cal__details > td { padding: var(--space-3) var(--space-4) var(--space-4); background: var(--color-data-canvas); border-bottom: 2px solid var(--color-data-border); white-space: normal; }
.dx-cal__details-body { display: grid; gap: var(--space-3); max-width: 110ch; white-space: normal; }
.dx-kv { display: grid; margin: 0; }
.dx-kv__row { display: grid; grid-template-columns: minmax(120px, 13rem) minmax(0, 1fr); gap: var(--space-3); padding: var(--space-1) 0; border-bottom: 1px solid var(--color-border); }
.dx-kv__row:last-child { border-bottom: 0; }
.dx-kv dt { color: var(--color-text-muted); }
.dx-kv dd { margin: 0; min-width: 0; color: var(--color-text); overflow-wrap: anywhere; }
.dx-evidence { margin: 0; padding-left: 1.2em; }
.dx-inline-list { display: inline-flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
/*
 * A published value is whatever the publisher states, and some publishers state
 * a lot. The ECB gives its M3 annual growth rate at full float precision —
 * 2.8209187272400627 — and a run of nineteen digits carries no break
 * opportunity, so its min-content width is the whole 170px string. A grid track
 * cannot shrink below its content's min-content size no matter how many
 * `minmax(0, 1fr)` and `min-width: 0` rules sit above it, so at 320px the card
 * pushed the document 16px wide and the whole page scrolled sideways.
 *
 * `overflow-wrap: anywhere` is the one declaration that makes the break
 * opportunity exist for MIN-CONTENT SIZING as well as for painting;
 * `break-word` would let it paint outside its box but still reserve the full
 * width, which is the bug. Nothing is rounded, hidden or clipped: the figure
 * the publisher stated is shown in full, wrapping onto a second line when the
 * viewport leaves it no other choice.
 */
.dx-val { display: grid; gap: 2px; white-space: nowrap; min-width: 0; overflow-wrap: anywhere; }
.dx-val__num { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--color-data-text); min-width: 0; overflow-wrap: anywhere; }
.dx-val__meta { display: block; color: var(--color-text-muted); font-size: .8125rem; line-height: 1.4; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.dx-val--none { color: var(--color-text-muted); }
.dx-cal .dx-num .dx-val { justify-items: end; }
/* A value cell is as wide as its widest figure and never breaks a period code across lines. */
.dx-cal .dx-num { min-width: 10ch; }
.dx-cal .dx-num .dx-val__meta { white-space: nowrap; }
.dx-cal .dx-cell-stack { min-width: 9ch; white-space: normal; }

/* The official-source action: one short phrase per link kind, never wrapping in a row; the full kind label is for assistive technology. */
/* The official source link is the point of the row, and it is the one control
 * a reader on a phone must be able to hit: 44px, the repo-wide target, not the
 * 40px it was. `nowrap` stays for the dense desktop table; inside a card the
 * label may be a full release-family name, so it wraps there instead. */
.dx-source { display: inline-flex; align-items: center; gap: 0 var(--space-1); min-height: 44px; color: var(--color-brand); font-weight: 600; text-decoration: none; white-space: nowrap; min-width: 0; overflow-wrap: anywhere; }
.dx-card .dx-source, .dx-cards .dx-source { white-space: normal; }
.dx-source:hover { color: var(--color-brand-deep); text-decoration: underline; }
.dx-cal__source { width: 12ch; white-space: nowrap; }

/* Cards below 768px: the same data as a list under day headings. */
.dx-cards { display: grid; gap: var(--space-4); }
.dx-cards__day { display: grid; gap: var(--space-2); }
.dx-cards__heading { margin: 0; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border-strong); font-size: var(--type-body); font-weight: 650; color: var(--color-text); }
.dx-cards__list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.dx-card { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-data-border); border-radius: var(--radius-md); background: var(--color-data-surface); }
.dx-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); }
.dx-card__time { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--color-text); }
.dx-card__place { margin-left: auto; color: var(--color-text-secondary); font-size: .8125rem; }
.dx-card__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); }
.dx-card__fact { display: grid; gap: 2px; min-width: 0; }
.dx-card__fact .dx-val { white-space: normal; }
.dx-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.dx-card .dx-cal__toggle { min-height: 44px; }
.dx-card .dx-cal__details { padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-secondary); }
.dx-card .dx-kv__row { grid-template-columns: 1fr; gap: 2px; }

/* The switch between table and cards is a breakpoint, not a squeeze. */
@media (max-width: 767px) {
  .dx-cal-tablewrap { display: none; }
  .dx-toolbar { padding: var(--space-3); }
  .dx-preset, .dx-chip, .dx-nav-btns .ui-button, .dx-mode label { min-height: 44px; }
  .dx-cal-region { min-height: 20rem; }
  .dx-panel:modal { position: fixed; inset: var(--sticky-stack-height) 0 0 0; width: 100%; height: auto; max-width: none; max-height: none; margin: 0; overflow: auto; border-width: 1px 0 0; border-radius: 0; z-index: 1000; }
  .dx-panel::backdrop { background: color-mix(in srgb, var(--color-text) 40%, transparent); }
}
@media (min-width: 768px) {
  .dx-cards { display: none; }
}

/* A sticky header needs the wrap NOT to be a scroll container. Below 1024px the
   six columns still need horizontal room, so the wrap keeps its own scrolling
   and the header does not stick; above it the table fits and the header tracks
   the sticky stack — never overlapping the H1, which is above the table. */
@media (min-width: 1024px) {
  .dx-cal-tablewrap { overflow-x: visible; }
}
@media (max-width: 1023px) {
  .dx-cal thead th, .dx-cal__day th { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  .dx-preset, .dx-cal__row td, .dx-cal__chevron::before { transition: none; }
}

/* ======================================================================
 * P2K — the weather product.
 * Spectrum redesign: one scoped weather system, replacing the P2K/P2P
 * overlays. Decorative spectrum is a brand motif, never a weather prediction.
 * Provider-derived day/night, numbers, units and all missing values stay intact.
 * ====================================================================== */
[data-wx] {
  --wx-sky-top: #104b77; --wx-sky-bottom: #20638a;
  --wx-canvas: #f3f6fa; --wx-surface: #fff; --wx-surface-soft: #f5f8fc;
  --wx-line: #dce5ef; --wx-ink: #152b46; --wx-ink-soft: #4d627b; --wx-ink-muted: #526780;
  --wx-cyan: #168baa; --wx-cyan-text: #086b87; --wx-sun: #f2bd43; --wx-sun-deep: #a76c0b;
  --wx-cloud: #7489a4; --wx-rain: #388ed0; --wx-rain-soft: #75b8dc;
  --wx-snow: #86afc7; --wx-snow-soft: #e2f1f9; --wx-fog: #7b8a9e;
  --wx-thunder: #6555a4; --wx-thunder-warm: #df9c31;
  --wx-curve: #268baa; --wx-curve-fill: #75b8dc; --wx-track: #e2eaf3; --wx-focus: #005fb8;
  --wx-icon: var(--wx-ink); --wx-icon-sun: var(--wx-sun); --wx-icon-cloud: var(--wx-cloud);
  --wx-icon-precip: var(--wx-rain); --wx-icon-flake: var(--wx-snow); --wx-icon-bolt: var(--wx-thunder-warm);
  --wx-red: #ed7778; --wx-orange: #f5ab71; --wx-yellow: #f1d879; --wx-green: #80c8aa;
  --wx-blue: #69bce5; --wx-indigo: #869adc; --wx-violet: #b79bde;
  --wx-rainbow: linear-gradient(90deg,var(--wx-red),var(--wx-orange),var(--wx-yellow),var(--wx-green),var(--wx-blue),var(--wx-indigo),var(--wx-violet));
  --wx-atmosphere: linear-gradient(120deg,var(--wx-sky-top),var(--wx-sky-bottom));
}
[data-wx]:has([data-wx-theme="night"]), [data-wx-theme="night"] {
  --wx-sky-top: #111e3b; --wx-sky-bottom: #243458;
  --wx-canvas: #0d1729; --wx-surface: #16243b; --wx-surface-soft: #1c2d46; --wx-line: #354760;
  --wx-ink: #f0f5fc; --wx-ink-soft: #bbcce1; --wx-ink-muted: #b1c4da;
  --wx-cyan: #7ed5e8; --wx-cyan-text: #8bddec; --wx-sun: #ebcd7c; --wx-sun-deep: #ebcd7c;
  --wx-cloud: #a9bdd7; --wx-rain: #88c8ed; --wx-rain-soft: #548fb9;
  --wx-snow: #d3eaf5; --wx-snow-soft: #354b68; --wx-fog: #aabdd2; --wx-thunder: #c5b9ec;
  --wx-thunder-warm: #e9bf79; --wx-curve: #83d0e6; --wx-curve-fill: #609dbc;
  --wx-track: #34475f; --wx-focus: #9bdcff;
  --wx-icon-sun: #d0e7fa; --wx-icon-cloud: #b6c9e0; --wx-icon-precip: #8bd9ed;
  --wx-icon-flake: #dfedf7; --wx-icon-bolt: #edc385;
}
[data-wx-accent="clear"], [data-wx-accent="fair"] { --wx-accent: var(--wx-sun); }
[data-wx-accent="partly"], [data-wx-accent="cloudy"], [data-wx-accent="unknown"] { --wx-accent: var(--wx-cloud); }
[data-wx-accent="rain"], [data-wx-accent="sleet"] { --wx-accent: var(--wx-rain); }
[data-wx-accent="fog"] { --wx-accent: var(--wx-fog); }
[data-wx-accent="snow"] { --wx-accent: var(--wx-snow); }
[data-wx-accent="thunder"] { --wx-accent: var(--wx-thunder); }

body[data-ui="fluent"] [data-wx] { background: var(--wx-canvas); color: var(--wx-ink); }
body[data-ui="fluent"] .wx-masthead { padding-block: 32px 24px; }
body[data-ui="fluent"] .wx-masthead__inner { display: grid; gap: 10px; }
body[data-ui="fluent"] .wx-masthead__title { margin: 0; color: var(--wx-ink); font-size: clamp(1.65rem,3vw,2.4rem); font-weight: 650; line-height: 1.15; letter-spacing: -.04em; }
body[data-ui="fluent"] .wx-masthead__title::after { content: ""; display: inline-block; width: 48px; height: 4px; margin: 0 0 .19em 14px; border-radius: 8px; background: var(--wx-rainbow); }
body[data-ui="fluent"] .wx-masthead__dek { margin: 0; max-width: 72ch; color: var(--wx-ink-soft); font-size: .875rem; line-height: 1.6; }
body[data-ui="fluent"] [data-wx] .ui-breadcrumb, body[data-ui="fluent"] [data-wx] .ui-breadcrumb a { color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-stage { padding-block: 0 64px; }
body[data-ui="fluent"] .wx-report { display: grid; gap: 28px; min-width: 0; }
body[data-ui="fluent"] .wx-report > *, body[data-ui="fluent"] .wx-band > * { min-width: 0; }

/* A self-contained sky canvas. Text occupies the left; the decorative arc
   and provider icon occupy the right. No text is painted over rainbow bands. */
body[data-ui="fluent"] .wx-sky { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 12px; padding: 32px 36px 24px; border-radius: 24px; background-color: var(--wx-sky-top); background-image: var(--wx-atmosphere); box-shadow: 0 16px 40px #152b4614; color: #fff; }
body[data-ui="fluent"] .wx-sky > :not(.wx-spectrum) { position: relative; z-index: 1; min-width: 0; }
body[data-ui="fluent"] .wx-sky::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--wx-rainbow); }
body[data-ui="fluent"] .wx-spectrum { position: absolute; width: 410px; height: auto; right: 22px; bottom: -14px; pointer-events: none; opacity: .72; }
body[data-ui="fluent"] .wx-spectrum path { fill: none; stroke-width: 11; }
body[data-ui="fluent"] .wx-spectrum path:nth-child(1) { stroke: var(--wx-red); }
body[data-ui="fluent"] .wx-spectrum path:nth-child(2) { stroke: var(--wx-orange); }
body[data-ui="fluent"] .wx-spectrum path:nth-child(3) { stroke: var(--wx-yellow); }
body[data-ui="fluent"] .wx-spectrum path:nth-child(4) { stroke: var(--wx-green); }
body[data-ui="fluent"] .wx-spectrum path:nth-child(5) { stroke: var(--wx-blue); }
body[data-ui="fluent"] .wx-spectrum path:nth-child(6) { stroke: var(--wx-indigo); }
body[data-ui="fluent"] .wx-spectrum path:nth-child(7) { stroke: var(--wx-violet); }
body[data-ui="fluent"] .wx-spectrum ellipse { fill: var(--wx-sky-bottom); }
body[data-ui="fluent"] [data-wx-theme="night"] .wx-spectrum { opacity: .45; }
body[data-ui="fluent"] .wx-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
body[data-ui="fluent"] .wx-bar__place { flex: 1 1 20rem; min-width: 0; }
body[data-ui="fluent"] .wx-bar__name { margin: 0; font-size: clamp(1.75rem,3vw,2.5rem); line-height: 1.12; letter-spacing: -.035em; font-weight: 650; color: #fff; }
body[data-ui="fluent"] .wx-bar__when { min-height: 3.4em; max-width: 50ch; margin: 8px 0 0; font-size: .8rem; line-height: 1.6; color: #e0edf8; }
body[data-ui="fluent"] .wx-bar__controls { display: flex; align-items: center; gap: 8px; }
body[data-ui="fluent"] .wx-sky .wx-locate { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-inline: 16px; border: 1px solid #ffffff65; border-radius: 12px; background: #ffffff14; color: #fff; box-shadow: none; font-size: .8rem; }
body[data-ui="fluent"] .wx-locate__mark { flex: none; }
body[data-ui="fluent"] .wx-sky .wx-units__control { min-height: 44px; width: 66px; padding-inline: 12px; border: 1px solid #ffffff65; border-radius: 12px; background: #ffffff14; color: #fff; font-weight: 650; }
body[data-ui="fluent"] .wx-units__control option { background: var(--wx-surface); color: var(--wx-ink); }
body[data-ui="fluent"] .wx-now { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px; min-height: 164px; padding: 12px 350px 12px 0; }
body[data-ui="fluent"] .wx-now__mark { position: absolute; right: 112px; top: 6px; line-height: 0; width: 128px; height: 128px; --wx-icon-cloud: #d5e8f6; --wx-icon-sun: #ffe0a0; --wx-icon-precip: #abdefa; filter: drop-shadow(0 8px 16px #0d294940); }
body[data-ui="fluent"] [data-wx-theme="night"] .wx-now__mark { --wx-icon-sun: #d7e9ff; --wx-icon-cloud: #b7cbe6; }
body[data-ui="fluent"] .wx-now__temp { margin: 0; min-width: 1.5em; font-size: clamp(5rem,10vw,8rem); line-height: .95; letter-spacing: -.065em; font-weight: 300; color: #fff; font-variant-numeric: tabular-nums; }
body[data-ui="fluent"] .wx-now__unit { font-size: .29em; font-weight: 450; letter-spacing: -.04em; margin-left: .12em; vertical-align: super; color: #e0edf8; }
body[data-ui="fluent"] .wx-now__words { display: grid; gap: 8px; min-width: 0; }
body[data-ui="fluent"] .wx-now__condition { margin: 0; min-height: 1.5em; font-size: 1.25rem; font-weight: 600; color: #fff; }
body[data-ui="fluent"] .wx-now__feels, body[data-ui="fluent"] .wx-now__range { margin: 0; min-height: 1.5em; font-size: .85rem; line-height: 1.6; color: #e0edf8; }
body[data-ui="fluent"] .wx-now__summary { margin: 2px 0 0; min-height: 3em; font-size: .8rem; line-height: 1.5; color: #fff; }
body[data-ui="fluent"] .wx-now__summary[hidden] { display: block !important; visibility: hidden; }
body[data-ui="fluent"] .wx-suggestion { margin: 0; max-width: 64ch; color: #e0edf8; font-size: .8rem; line-height: 1.6; }
/* Laid out whether or not it applies, so a suggestion arriving at boot moves
   nothing below it — the same reservation .wx-now__summary and .wx-keep make.
   visibility also takes the note and its button out of the reading order and
   the tab order while there is no suggestion to explain. */
body[data-ui="fluent"] .wx-suggestion[hidden] { display: block !important; visibility: hidden; }
body[data-ui="fluent"] .wx-suggestion strong { color: #fff; font-weight: 600; }
body[data-ui="fluent"] .wx-resolution { margin: 0; max-width: 64ch; color: #e0edf8; font-size: .8rem; }
body[data-ui="fluent"] .wx-keep { min-height: 36px; margin: 0; }
body[data-ui="fluent"] .wx-sky .wx-suggestion__change { min-height: 32px; margin-left: 4px; padding: 4px 10px; border: 1px solid #ffffff60; border-radius: 8px; background: #ffffff0d; color: #fff; font-size: .75rem; font-weight: 500; }
body[data-ui="fluent"] .wx-sky .wx-save, body[data-ui="fluent"] .wx-sky .wx-correct { min-height: 36px; padding: 6px 12px; border: 1px solid #ffffff60; border-radius: 8px; background: #ffffff0d; color: #fff; font-size: .75rem; font-weight: 500; }
body[data-ui="fluent"] .wx-correct { margin-left: 6px; }
body[data-ui="fluent"] .wx-stale { margin: 0; border-left: 4px solid var(--wx-sun); }

/* Compact information cards: spectrum rails are decorative; words and values
   always identify the measurement. Missing values are never colour-coded. */
body[data-ui="fluent"] .wx-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
body[data-ui="fluent"] .wx-group { position: relative; min-width: 0; display: grid; align-content: start; gap: 18px; padding: 24px 20px 18px; border: 1px solid var(--wx-line); border-radius: 18px; background: var(--wx-surface); overflow: hidden; }
body[data-ui="fluent"] .wx-group::before { content: ""; position: absolute; inset: 0 20px auto; height: 3px; border-radius: 0 0 4px 4px; background: var(--wx-blue); }
body[data-ui="fluent"] .wx-group:nth-child(2)::before { background: var(--wx-green); }
body[data-ui="fluent"] .wx-group:nth-child(3)::before { background: var(--wx-orange); }
body[data-ui="fluent"] .wx-group:nth-child(4)::before { background: var(--wx-violet); }
body[data-ui="fluent"] .wx-group__title { margin: 0; font-size: .6875rem; font-weight: 700; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-group__facts { display: grid; gap: 14px; margin: 0; }
body[data-ui="fluent"] .wx-fact { display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 44px; }
body[data-ui="fluent"] .wx-fact:first-child { min-height: 88px; }
body[data-ui="fluent"] .wx-fact dt { color: var(--wx-ink-soft); font-size: .75rem; }
body[data-ui="fluent"] .wx-fact__value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 0; color: var(--wx-ink); font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body[data-ui="fluent"] .wx-fact:first-child .wx-fact__value { font-size: 1.5rem; letter-spacing: -.03em; }
body[data-ui="fluent"] .wx-fact__note { color: var(--wx-ink-soft); font-size: .75rem; line-height: 1.4; font-weight: 400; letter-spacing: 0; }
body[data-ui="fluent"] .wx-arrow { flex: none; align-self: center; color: var(--wx-cyan); }
body[data-ui="fluent"] .wx-missing { color: var(--wx-ink-muted); }
body[data-ui="fluent"] .wx-group--absent { grid-column: 1 / -1; display: grid; grid-template-columns: max-content minmax(0,1fr); align-items: start; gap: 8px; min-height: 2.6rem; padding: 0 4px; border: 0; border-radius: 0; background: transparent; }
body[data-ui="fluent"] .wx-group--absent::before { content: none; }
body[data-ui="fluent"] .wx-group--absent .wx-group__title { font-size: .75rem; letter-spacing: 0; text-transform: none; }
body[data-ui="fluent"] .wx-group__absent { margin: 0; color: var(--wx-ink-soft); font-size: .75rem; line-height: 1.6; }
body[data-ui="fluent"] .wx-missing-note { margin: -16px 4px 0; color: var(--wx-ink-soft); font-size: .75rem; line-height: 1.5; }

/* Forecast navigation and the chart use the same restrained surface system. */
body[data-ui="fluent"] .wx-views { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; width: fit-content; border: 1px solid var(--wx-line); border-radius: 14px; background: var(--wx-surface); }
body[data-ui="fluent"] .wx-views[hidden], body[data-ui="fluent"] .wx-view[hidden] { display: none; }
body[data-ui="fluent"] .wx-view { min-height: 44px; padding: 10px 22px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--wx-ink-soft); font: 600 .85rem/1.2 var(--font-sans); cursor: pointer; transition: border-color 140ms ease; }
body[data-ui="fluent"] .wx-view:hover { background: var(--wx-surface-soft); }
body[data-ui="fluent"] .wx-view[aria-pressed="true"] { background: var(--wx-ink); color: var(--wx-surface); }
body[data-ui="fluent"] .wx-band { display: grid; gap: 16px; }
body[data-ui="fluent"] .wx-band__title { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -.02em; color: var(--wx-ink); }
body[data-ui="fluent"] .wx-band__table summary { width: fit-content; min-height: 28px; cursor: pointer; font-size: .8rem; color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-hours { overflow-x: auto; contain: paint; min-height: 252px; border: 1px solid var(--wx-line); border-radius: 18px; background: var(--wx-surface); scrollbar-width: thin; scrollbar-color: var(--wx-line) transparent; }
body[data-ui="fluent"] .wx-hours__inner { position: relative; }
body[data-ui="fluent"] .wx-curve { position: absolute; left: 0; top: 2.9rem; pointer-events: none; }
body[data-ui="fluent"] .wx-curve__line { stroke: var(--wx-curve); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
body[data-ui="fluent"] .wx-curve__dot { fill: var(--wx-curve); }
body[data-ui="fluent"] .wx-curve__bar { fill: var(--wx-curve-fill); opacity: .4; }
body[data-ui="fluent"] .wx-hours__row { position: relative; display: flex; }
body[data-ui="fluent"] .wx-hour { flex: 0 0 62px; width: 62px; display: grid; justify-items: center; gap: 6px; padding: 18px 0; color: var(--wx-icon); }
body[data-ui="fluent"] .wx-hour + .wx-hour { border-left: 1px solid var(--wx-line); }
body[data-ui="fluent"] .wx-hour.is-now { background: var(--wx-surface-soft); box-shadow: inset 0 3px var(--wx-cyan); }
body[data-ui="fluent"] .wx-hour p { margin: 0; }
body[data-ui="fluent"] .wx-hour__time { font-size: .8rem; font-weight: 600; color: var(--wx-ink); font-variant-numeric: tabular-nums; }
body[data-ui="fluent"] .wx-hour__day { min-height: 1em; font-size: .6875rem; color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-hour .wx-icon { margin-top: 4.9rem; }
body[data-ui="fluent"] .wx-hour__temp { font-size: 1rem; font-weight: 650; color: var(--wx-ink); font-variant-numeric: tabular-nums; }
body[data-ui="fluent"] .wx-hour__precip { min-height: 1.1em; font-size: .75rem; color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-icon { color: var(--wx-icon); }
body[data-ui="fluent"] .wx-icon__sun, body[data-ui="fluent"] .wx-icon__moon { color: var(--wx-icon-sun); }
body[data-ui="fluent"] .wx-icon__cloud { color: var(--wx-icon-cloud); }
body[data-ui="fluent"] .wx-icon__drop { color: var(--wx-icon-precip); }
body[data-ui="fluent"] .wx-icon__flake { color: var(--wx-icon-flake); }
body[data-ui="fluent"] .wx-icon__bolt { color: var(--wx-icon-bolt); }
body[data-ui="fluent"] .wx-days-wrap { overflow-x: auto; contain: paint; border: 1px solid var(--wx-line); border-radius: 12px; background: var(--wx-surface); }
body[data-ui="fluent"] .wx-days { width: 100%; border-collapse: collapse; font-size: .8rem; }
body[data-ui="fluent"] .wx-days th, body[data-ui="fluent"] .wx-days td { padding: 10px 14px; text-align: left; white-space: nowrap; color: var(--wx-ink); }
body[data-ui="fluent"] .wx-days thead th { background: var(--wx-ink); color: var(--wx-surface); }
body[data-ui="fluent"] .wx-days tbody tr + tr th, body[data-ui="fluent"] .wx-days tbody tr + tr td { border-top: 1px solid var(--wx-line); }

body[data-ui="fluent"] .wx-days-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--wx-line); border-radius: 18px; background: var(--wx-surface); }
body[data-ui="fluent"] .wx-day { display: grid; grid-template-columns: 7rem minmax(9rem,1fr) 6rem minmax(9rem,14rem) auto; align-items: center; gap: 16px; min-height: 76px; padding: 12px 20px; box-sizing: border-box; }
body[data-ui="fluent"] .wx-day + .wx-day { border-top: 1px solid var(--wx-line); }
body[data-ui="fluent"] .wx-day:hover { background: var(--wx-surface-soft); }
body[data-ui="fluent"] .wx-day:first-child { border-radius: 18px 18px 0 0; }
body[data-ui="fluent"] .wx-day:last-child { border-radius: 0 0 18px 18px; }
body[data-ui="fluent"] .wx-day p { margin: 0; }
body[data-ui="fluent"] .wx-day__name { font-size: .875rem; font-weight: 650; color: var(--wx-ink); white-space: nowrap; }
body[data-ui="fluent"] .wx-day__condition { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 30px; font-size: .8rem; color: var(--wx-ink); }
body[data-ui="fluent"] .wx-day__precip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: .8rem; color: var(--wx-ink); }
body[data-ui="fluent"] .wx-day__chance { color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-day__scale { display: grid; grid-template-columns: 2.6rem 1fr 2.6rem; align-items: center; gap: 10px; font-size: .8rem; font-variant-numeric: tabular-nums; }
body[data-ui="fluent"] .wx-day__low { text-align: right; color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-day__high { color: var(--wx-ink); font-weight: 650; }
body[data-ui="fluent"] .wx-day__track { position: relative; height: 6px; border-radius: 6px; background: var(--wx-track); }
body[data-ui="fluent"] .wx-day__fill { position: absolute; inset-block: 0; border-radius: 6px; background: linear-gradient(90deg,var(--wx-cyan),var(--wx-green),var(--wx-sun)); }
body[data-ui="fluent"] .wx-day__more { grid-column: 5; justify-self: end; }
body[data-ui="fluent"] .wx-day__more-summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 8px; color: var(--wx-ink-soft); font-size: .8rem; font-weight: 600; cursor: pointer; list-style: none; }
body[data-ui="fluent"] .wx-day__more-summary::-webkit-details-marker { display: none; }
body[data-ui="fluent"] .wx-day__more-summary::after { content: ""; width: 5px; height: 5px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
body[data-ui="fluent"] .wx-day__more[open] .wx-day__more-summary::after { transform: translateY(1px) rotate(-135deg); }
body[data-ui="fluent"] .wx-day__more[open] { display: contents; }
body[data-ui="fluent"] .wx-day__more[open] > .wx-day__more-summary { grid-column: 5; grid-row: 1; justify-self: end; }
body[data-ui="fluent"] .wx-day__details { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,11rem),1fr)); gap: 12px; padding: 16px 0 4px; margin: 0; border-top: 1px dashed var(--wx-line); font-size: .8rem; }
body[data-ui="fluent"] .wx-day__details > div { display: grid; gap: 4px; }
body[data-ui="fluent"] .wx-day__details dt { color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-day__details dd { margin: 0; color: var(--wx-ink); font-weight: 600; }
body[data-ui="fluent"] .wx-day__more--skeleton { min-height: 44px; visibility: hidden; }
body[data-ui="fluent"] [data-wx-daily-note], body[data-ui="fluent"] [data-wx-range-note] { color: var(--wx-ink-soft); font-size: .8rem; line-height: 1.6; margin: 0; }

/* The place chooser is now above the reading, not below the entire forecast. */
body[data-ui="fluent"] .wx-picker { border: 1px solid var(--wx-line); border-radius: 14px; background: var(--wx-surface); }
body[data-ui="fluent"] .wx-picker__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 52px; padding: 10px 20px; font-size: .85rem; color: var(--wx-ink); cursor: pointer; list-style: none; }
body[data-ui="fluent"] .wx-picker__summary::-webkit-details-marker { display: none; }
body[data-ui="fluent"] .wx-picker__label { font-weight: 650; }
body[data-ui="fluent"] .wx-picker__label::before { content: "⌕"; display: inline-block; font-size: 1.3rem; margin-right: 10px; line-height: 1; }
body[data-ui="fluent"] .wx-picker__hint { color: var(--wx-ink-soft); font-size: .8rem; }
body[data-ui="fluent"] .wx-picker__summary::after { content: "+"; margin-left: auto; font-size: 1.25rem; color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-picker[open] > .wx-picker__summary::after { content: "−"; }
body[data-ui="fluent"] .wx-picker__body { display: grid; gap: 24px; padding: 20px; border-top: 1px solid var(--wx-line); }
body[data-ui="fluent"] .wx-chooser__consent, body[data-ui="fluent"] .wx-chooser__note { margin: 0; max-width: 72ch; }
body[data-ui="fluent"] .wx-search { position: relative; min-width: 0; }
body[data-ui="fluent"] .wx-search__input { width: 100%; }
body[data-ui="fluent"] .wx-search__results { position: absolute; z-index: 3; inset-inline: 0; max-height: 18rem; overflow-y: auto; margin: 4px 0 0; padding: 0; list-style: none; border: 1px solid var(--wx-line); border-radius: 10px; background: var(--wx-surface); box-shadow: 0 12px 24px #152b4612; }
body[data-ui="fluent"] .wx-search__option { min-height: 44px; padding: 12px 16px; font-size: .85rem; color: var(--wx-ink); cursor: pointer; }
body[data-ui="fluent"] .wx-search__option + .wx-search__option { border-top: 1px solid var(--wx-line); }
body[data-ui="fluent"] .wx-search__option:hover, body[data-ui="fluent"] .wx-search__option.is-active { background: var(--wx-surface-soft); }
body[data-ui="fluent"] .wx-search__status { margin: 4px 0 0; }
body[data-ui="fluent"] .wx-places { display: grid; gap: 12px; }
body[data-ui="fluent"] .wx-places__title { margin: 0; font-size: .75rem; font-weight: 650; color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-places__list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
body[data-ui="fluent"] .wx-place-button { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--wx-line); border-radius: 10px; background: var(--wx-surface); color: var(--wx-ink); font: 600 .8rem/1.3 var(--font-sans); cursor: pointer; transition: border-color 140ms ease; }
body[data-ui="fluent"] .wx-place-button:hover { background: var(--wx-surface-soft); border-color: var(--wx-cyan); }
body[data-ui="fluent"] .wx-forget { margin-left: 8px; }
body[data-ui="fluent"] .wx-advanced { padding-top: 16px; border-top: 1px solid var(--wx-line); }
body[data-ui="fluent"] .wx-advanced__summary { min-height: 44px; font-size: .8rem; font-weight: 600; color: var(--wx-ink); cursor: pointer; }
body[data-ui="fluent"] .wx-advanced__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-top: 16px; }
body[data-ui="fluent"] .wx-advanced__form .ui-field { flex: 1 1 10rem; min-width: 0; }
body[data-ui="fluent"] .wx-advanced__form .ui-help { flex: 1 1 100%; }
body[data-ui="fluent"] .wx-picker strong { color: var(--wx-ink); }
body[data-ui="fluent"] .wx-picker .ui-control { background-color: var(--wx-surface-soft); color: var(--wx-ink); border-color: var(--wx-line); }
body[data-ui="fluent"] .wx-picker .ui-help, body[data-ui="fluent"] .wx-picker .ui-meta, body[data-ui="fluent"] .wx-picker .ui-label { color: var(--wx-ink-soft); }
body[data-ui="fluent"] .wx-provenance { display: grid; gap: 8px; padding-top: 20px; border-top: 1px solid var(--wx-line); }
body[data-ui="fluent"] .wx-basis, body[data-ui="fluent"] .wx-provenance p { margin: 0; max-width: 90ch; color: var(--wx-ink-soft); font-size: .75rem; line-height: 1.6; }
body[data-ui="fluent"] [data-wx] .wx-provenance a { color: var(--wx-ink); text-decoration: underline; text-underline-offset: 3px; }
body[data-ui="fluent"] [data-wx] :is(button,select,input,summary,[tabindex="0"],a):focus-visible { outline: 3px solid var(--wx-focus); outline-offset: 3px; }
body[data-ui="fluent"] .wx-sky :is(button,select):focus-visible { outline-color: #fff; }
body[data-ui="fluent"] .wx-about { border-top: 1px solid var(--wx-line); background: var(--wx-surface); }
body[data-ui="fluent"] .wx-methodology > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; cursor: pointer; list-style: none; }
body[data-ui="fluent"] .wx-methodology > summary::-webkit-details-marker { display: none; }
body[data-ui="fluent"] .wx-methodology > summary::after { content: "+"; color: var(--wx-ink-soft); font-size: 24px; }
body[data-ui="fluent"] .wx-methodology[open] > summary::after { content: "−"; }
body[data-ui="fluent"] .wx-about .ui-definition-list { padding: 16px 0 0; margin: 0; }
body[data-ui="fluent"] .wx-about .ui-definition-list > div { border-color: var(--wx-line); }
body[data-ui="fluent"] .wx-about dd { font-weight: 400; overflow-wrap: anywhere; }
body[data-ui="fluent"] .wx-about .ui-section-heading { font-size: 1.4rem; color: var(--wx-ink); }
body[data-ui="fluent"] [data-wx] .wx-about :is(dt,dd,dd a) { color: var(--wx-ink-soft); }

/* Reflow, not clipping: chart/table keep their own scroll; the page never does. */
@media (max-width: 1100px) {
  body[data-ui="fluent"] .wx-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-ui="fluent"] .wx-now { grid-template-columns: 1fr; gap: 12px; padding-right: 310px; }
  body[data-ui="fluent"] .wx-now__words { grid-template-columns: 1fr 1fr; }
  body[data-ui="fluent"] .wx-now__condition, body[data-ui="fluent"] .wx-now__summary { grid-column: 1 / -1; }
  body[data-ui="fluent"] .wx-now__mark { right: 100px; top: 48px; }
  body[data-ui="fluent"] .wx-spectrum { width: 360px; right: 12px; }
  body[data-ui="fluent"] .wx-day { grid-template-columns: 6rem minmax(7rem,1fr) 4rem minmax(8rem,11rem) auto; gap: 10px; }
}
@media (max-width: 767px) {
  body[data-ui="fluent"] .wx-about .ui-definition-list > div { grid-template-columns: 1fr; gap: 8px; }
  body[data-ui="fluent"] .wx-masthead { padding-block: 22px 18px; }
  body[data-ui="fluent"] .wx-stage { padding-bottom: 40px; }
  body[data-ui="fluent"] .wx-report { gap: 22px; }
  body[data-ui="fluent"] .wx-sky { padding: 24px; border-radius: 20px; }
  body[data-ui="fluent"] .wx-bar__place { flex-basis: 100%; }
  body[data-ui="fluent"] .wx-bar__controls { width: 100%; }
  body[data-ui="fluent"] .wx-sky .wx-locate { flex: 1; justify-content: center; }
  body[data-ui="fluent"] .wx-now { padding: 16px 0 0; gap: 16px; min-height: 250px; }
  body[data-ui="fluent"] .wx-now__temp { font-size: clamp(4.5rem,19vw,6rem); }
  body[data-ui="fluent"] .wx-now__mark { right: 4px; top: 0; width: 100px; height: 100px; }
  body[data-ui="fluent"] .wx-now__mark > svg { width: 100px; height: 100px; }
  body[data-ui="fluent"] .wx-now__words { max-width: 24rem; grid-template-columns: 1fr; gap: 4px; }
  body[data-ui="fluent"] .wx-now__summary { min-height: 3em; max-width: 30ch; }
  body[data-ui="fluent"] .wx-spectrum { width: 218px; right: -36px; top: 146px; bottom: auto; opacity: .42; }
  body[data-ui="fluent"] .wx-facts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body[data-ui="fluent"] .wx-group { padding: 20px 14px 14px; border-radius: 14px; gap: 16px; }
  body[data-ui="fluent"] .wx-group--absent { padding: 0 2px; border-radius: 0; }
  body[data-ui="fluent"] .wx-fact__value, body[data-ui="fluent"] .wx-fact:first-child .wx-fact__value { font-size: 1.125rem; }
  body[data-ui="fluent"] .wx-fact { min-height: 48px; }
  body[data-ui="fluent"] .wx-fact:first-child { min-height: 112px; }
  body[data-ui="fluent"] .wx-group__facts { gap: 10px; }
  body[data-ui="fluent"] .wx-views { width: 100%; }
  body[data-ui="fluent"] .wx-view { flex: 1; padding-inline: 10px; }
  body[data-ui="fluent"] .wx-day { grid-template-columns: 5.5rem 1fr; grid-template-areas: "name condition" "more precip" "scale scale"; gap: 8px 12px; padding: 14px 16px; }
  body[data-ui="fluent"] .wx-day__name { grid-area: name; }
  body[data-ui="fluent"] .wx-day__condition { grid-area: condition; gap: 8px; }
  body[data-ui="fluent"] .wx-day__precip { grid-area: precip; align-self: center; }
  body[data-ui="fluent"] .wx-day__scale { grid-area: scale; }
  body[data-ui="fluent"] .wx-day__more { grid-area: more; justify-self: start; }
  body[data-ui="fluent"] .wx-day__more-summary { padding-inline: 0 8px; }
  body[data-ui="fluent"] .wx-day__more[open] { display: contents; }
  body[data-ui="fluent"] .wx-day__more[open] > .wx-day__more-summary { grid-area: more; justify-self: start; }
  body[data-ui="fluent"] .wx-day__details { grid-column: 1 / -1; grid-row: 4; }
  body[data-ui="fluent"] .wx-picker__summary { padding: 12px 16px; }
  body[data-ui="fluent"] .wx-picker__hint { display: none; }
}
@media (max-width: 380px) {
  body[data-ui="fluent"] .wx-sky { padding: 20px; }
  body[data-ui="fluent"] .wx-bar__when { min-height: 4.8em; }
  body[data-ui="fluent"] .wx-now__mark { right: 0; width: 80px; height: 80px; }
  body[data-ui="fluent"] .wx-now__mark > svg { width: 80px; height: 80px; }
  body[data-ui="fluent"] .wx-views { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-ui="fluent"] .wx-picker__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-ui="fluent"] .wx-place-button, body[data-ui="fluent"] .wx-view { transition: none; }
}


/* -- P2J: the status surface says how data arrives, and which feed is late --- */

/*
 * `.dx-delivery`, not `.dx-mode`: the calendar's time-mode fieldset has owned
 * `.dx-mode` since P2G, and a second rule under the same name put a border and
 * padding around a control on another page entirely. One stylesheet serves
 * every data surface, so a class name is a global name.
 */
.dx-delivery {
  justify-self: start;
  padding: 2px var(--space-2);
  border: 1px solid var(--color-data-border);
  border-radius: var(--radius-sm);
  font-size: var(--type-meta);
  font-weight: 600;
  color: var(--color-data-secondary);
  background: var(--color-data-canvas);
}
.dx-feeds { display: grid; gap: var(--space-2); margin: var(--space-3) 0 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--color-data-border); list-style: none; }
.dx-feeds__item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.dx-feeds__name { font-size: var(--type-meta); font-weight: 650; color: var(--color-data-text); }

/*
 * WCAG 2.2 AA target size (minimum), 2.5.8: a target is at least 24 by 24 CSS
 * pixels unless it is an inline link inside a sentence. The disclosure controls
 * inside the data islands rendered at 21-22px, which is under it with no
 * exemption to claim — they are standalone controls, not inline links.
 */
/*
 * Padding rather than a min-height with flex: `display: flex` on a <summary>
 * removes its default disclosure marker in Chrome, and the fix for a target
 * size must not take the triangle away from a control that needs it. Padding
 * grows the box, and so the hit area, without touching the marker. This
 * stylesheet loads only on the data surfaces, so the bare selector is scoped
 * by where it is served.
 */
summary { padding-block: 3px; }

/*
 * SC 2.5.8 exempts a link inside a sentence, whose size is constrained by the
 * line-height of the text around it. It does not exempt a link that IS the
 * whole of its container — a term, a definition, or a stacked cell action —
 * and those rendered at 17 to 23.5px. Padding grows the hit area without
 * changing the line box, so nothing reflows.
 */
:where(dt, dd) > a:only-child { padding-block: 4px; }
.dx-cell-stack a { padding-block: 1px; }
