/* WxGrid — fit-to-width paged forecast grid. Theme through the --wxg-* variables. */
.wxg-host {
  --wxg-font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wxg-text: #1E293B;
  --wxg-strong: #0A1931;
  --wxg-muted: #737784;
  --wxg-border: #EEF1F6;
  --wxg-border-strong: #D5DCE6;
  --wxg-head: #F8FAFC;
  --wxg-night: rgba(10, 25, 49, 0.035);
  --wxg-accent: #2C5EBD;
  --wxg-line: #64748B;
  --wxg-warm: #EA580C;
  --wxg-cold: #2563EB;
  --wxg-surface: #FFFFFF;
  display: block;
  width: 100%;
  min-width: 0;
}
.wxg-frame { outline: none; border: 1px solid var(--wxg-border-strong); border-radius: 4px; overflow: hidden; touch-action: pan-y; }
.wxg-frame:focus-visible { box-shadow: 0 0 0 2px var(--wxg-accent); }
.wxg-table {
  border-collapse: separate; border-spacing: 0; table-layout: fixed;
  font-family: var(--wxg-font); font-size: 11px; color: var(--wxg-text);
  font-variant-numeric: tabular-nums; max-width: 100%;
}
.wxg-table th, .wxg-table td {
  padding: 0 1px; height: 30px; text-align: center; white-space: nowrap; overflow: hidden;
  border-bottom: 1px solid var(--wxg-border);
}
.wxg-table tr:last-child > * { border-bottom: 0; }
.wxg-label {
  text-align: left !important; padding: 0 8px !important; background: var(--wxg-surface);
  border-right: 1px solid var(--wxg-border-strong);
  font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--wxg-muted);
  white-space: normal !important; line-height: 1.15;
}
.wxg-label small { display: block; font-size: 9px; font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .85; }
.wxg-table td.night { background: var(--wxg-night); }
.wxg-table td.wxg-day-start { border-left: 1px solid var(--wxg-border-strong); }
.wxg-date td {
  height: 26px; background: var(--wxg-head); text-align: left; padding-left: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wxg-strong);
}
.wxg-date td span { display: block; overflow: hidden; text-overflow: ellipsis; }
.wxg-date td small { display: block; font-size: 8.5px; line-height: 1.1; letter-spacing: 0; }
.wxg-date th { background: var(--wxg-head); }
.wxg-strong { font-weight: 700; color: var(--wxg-strong); }
.wxg-dim { color: var(--wxg-muted); }
.wxg-icon-row td { height: 44px; }
.wxg-icon-row.has-text td { height: 60px; vertical-align: top; padding-top: 6px; }
.wxg-status { display: block; font-family: Inter, system-ui, sans-serif; font-size: 9.5px; line-height: 1.15; color: var(--wxg-muted); white-space: normal; padding: 1px 2px 0; max-height: 2.3em; overflow: hidden; }
.wxg-snow-row td { height: 64px; vertical-align: bottom; padding-bottom: 5px; }
.wxg-snow { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.wxg-snow b { font-size: 12px; font-weight: 700; line-height: 1; }
.wxg-snow b.zero { color: var(--wxg-muted); font-weight: 500; opacity: .6; }
.wxg-snow i { display: block; width: 62%; max-width: 28px; border-radius: 2px 2px 0 0; }
.wxg-flag { display: block; font-size: 9px; font-weight: 700; color: var(--wxg-warm); line-height: 1; }
.wxg-line-row td { height: 66px; padding: 0 !important; text-align: left; }
.wxg-line-row svg { display: block; overflow: visible; }
.wxg-line { fill: none; stroke: var(--wxg-line); stroke-width: 1.6; stroke-linecap: round; }
.wxg-dot { fill: var(--wxg-warm); stroke: var(--wxg-surface); stroke-width: 1.4; }
.wxg-dot.cold { fill: var(--wxg-cold); }
.wxg-line-label { font: 700 10.5px var(--wxg-font); fill: var(--wxg-strong); }
.wxg-ref { stroke: var(--wxg-cold); stroke-opacity: .45; stroke-dasharray: 3 4; }
.wxg-ref-label { font: 700 9px var(--wxg-font); fill: var(--wxg-cold); fill-opacity: .8; }
.wxg-cloud { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.wxg-cloud i { display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--wxg-border); position: relative; overflow: hidden; }
.wxg-cloud i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--wxg-muted); }
.wxg-wind { display: inline-flex; align-items: center; justify-content: center; gap: 1px; }
.wxg-wind svg { width: 9px; height: 9px; fill: var(--wxg-muted); flex-shrink: 0; }

.wxg-pager { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 30px; }
.wxg-range { font-family: var(--wxg-font); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--wxg-strong); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.wxg-dots { display: flex; gap: 4px; }
.wxg-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--wxg-border-strong); display: block; }
.wxg-dots i.on { background: var(--wxg-accent); }
.wxg-nav {
  width: 30px; height: 30px; display: grid; place-items: center; flex-shrink: 0; cursor: pointer;
  border: 1px solid var(--wxg-border-strong); border-radius: 4px; background: var(--wxg-surface); color: var(--wxg-strong);
}
.wxg-nav:hover:not(:disabled) { border-color: var(--wxg-accent); color: var(--wxg-accent); }
.wxg-nav:disabled { opacity: .35; cursor: default; }
.wxg-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wxg-pager .wxg-nav[data-dir="-1"] { order: 0; }
.wxg-pager .wxg-range { order: 1; }
.wxg-pager .wxg-dots, .wxg-pager .wxg-count { order: 2; }
.wxg-count { font-family: var(--wxg-font); font-size: 10.5px; color: var(--wxg-muted); white-space: nowrap; }
.wxg-pager .wxg-nav[data-dir="1"] { order: 3; }
.wxg-note { font-family: var(--wxg-font); font-size: 10px; color: var(--wxg-muted); margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.wxg-note i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; border: 1px solid var(--wxg-border-strong); background: var(--wxg-night); }

.wxg-table .ms, .wxg-table .material-symbols-outlined { display: block; margin: 0 auto; line-height: 1; }
.wxg-period { display: inline-flex; align-items: center; justify-content: center; gap: 3px; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--wxg-muted); }
.wxg-period .ms, .wxg-period .material-symbols-outlined { display: inline-block; margin: 0; font-size: 14px !important; }
.wxg-time-row td { font-size: 10.5px; }

/* Edge paging: chevron tabs in reserved gutters beside the data, with a short slide on page change. */
.wxg-frame-edge { position: relative; }
.wxg-table td.wxg-gut { padding: 0; border-bottom-color: transparent; background: var(--wxg-surface); }
.wxg-date td.wxg-gut { background: var(--wxg-head); }
.wxg-pager-edge { justify-content: center; min-height: 22px; }
.wxg-pager-edge .wxg-range { flex: 0 1 auto; }
.wxg-edge {
  position: absolute; top: 0; bottom: 0; z-index: 2; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 0; background: transparent; color: var(--wxg-accent); transition: background .2s ease, color .2s ease;
}
.wxg-edge svg {
  width: 22px; height: 22px; padding: 3px; box-sizing: content-box; border-radius: 999px; fill: none; stroke: currentColor;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; background: var(--wxg-surface);
  box-shadow: 0 1px 2px rgba(10, 25, 49, .12), 0 0 0 1px var(--wxg-border-strong); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease;
}
.wxg-edge.next { background: linear-gradient(90deg, transparent, rgba(44, 94, 189, .05)); }
.wxg-edge.prev { background: linear-gradient(270deg, transparent, rgba(44, 94, 189, .05)); }
.wxg-edge:hover:not(:disabled) { background: rgba(44, 94, 189, .09); }
.wxg-edge.next:hover:not(:disabled) svg { transform: translateX(2px); box-shadow: 0 2px 6px rgba(44, 94, 189, .25), 0 0 0 1px var(--wxg-accent); }
.wxg-edge.prev:hover:not(:disabled) svg { transform: translateX(-2px); box-shadow: 0 2px 6px rgba(44, 94, 189, .25), 0 0 0 1px var(--wxg-accent); }
.wxg-edge:disabled { cursor: default; background: transparent; }
.wxg-edge:disabled svg { opacity: 0; }
.wxg-edge:focus-visible { outline: 2px solid var(--wxg-accent); outline-offset: -2px; }
@keyframes wxg-in-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes wxg-in-prev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.wxg-slide-next td:not(.wxg-gut) { animation: wxg-in-next .34s cubic-bezier(.2, .8, .2, 1) both; }
.wxg-slide-prev td:not(.wxg-gut) { animation: wxg-in-prev .34s cubic-bezier(.2, .8, .2, 1) both; }

.wxg-ratio-row td { font-size: 10.5px; letter-spacing: -.02em; }
.wxg-dash { color: var(--wxg-muted); margin: 0 1px; }
.wxg-arrow { line-height: 0; }
.wxg-wind svg.wxg-arrow-smooth { width: 13px; height: 13px; fill: var(--wxg-accent); }
.wxg-wind.stack { flex-direction: column; gap: 3px; }
@media (max-width: 640px) { .wxg-edge svg { width: 14px; height: 14px; padding: 2px; } }

/* Continuous mode: every column in one table that scrolls sideways. Row labels stay put, and each
   day's name rides along the left edge while that day is on screen. */
.wxg-frame-scroll { overflow-x: auto; overflow-y: hidden; touch-action: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.wxg-frame-scroll .wxg-table { max-width: none; }
.wxg-frame-scroll .wxg-label { position: sticky; left: 0; z-index: 2; }
.wxg-frame-scroll .wxg-date td { overflow: visible; }
.wxg-frame-scroll .wxg-date td span { display: inline-block; position: sticky; left: calc(var(--wxg-lw) + 6px); }
