/* Uman weather page. Layers on styles.css and reuses its :root tokens, and
   uses CSS logical properties throughout (margin-inline, text-align: start) so
   the Hebrew RTL variant needs no separate rules — same approach as border.css.

   The figures are set in JetBrains Mono with tabular figures, matching the
   border page: both pages are columns of numbers that should line up. */
.wx { background: var(--bg); color: var(--ink); }
.wx-wrap { max-width: 940px; margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Chrome -------------------------------------------------------------- */
.wx-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0; flex-wrap: wrap;
}
.wx-top .brand-148 { color: var(--primary); font-weight: 700; }
.wx-top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wx-wa {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink);
  font-weight: 600; font-size: var(--fs-sm); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 9px 15px;
}
.wx-wa:hover { border-color: var(--primary); color: var(--primary-dark); }
.wx-langs { display: flex; gap: 6px; }
.wx-lang {
  font-size: var(--fs-sm); color: var(--mute); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px;
}
.wx-lang:hover { color: var(--ink); border-color: var(--ink); }

.wx-foot {
  border-top: 1px solid var(--line); margin-top: 34px;
  padding: 24px 0 calc(60px + env(safe-area-inset-bottom, 0px));
  color: var(--mute); font-size: var(--fs-xs);
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}
.wx-foot a { color: var(--mute); }
.wx-foot a:hover { color: var(--ink); }
.wx-attr a { text-decoration: underline; }

/* --- Hero ---------------------------------------------------------------- */
.wx-hero { padding: 24px 0 8px; }
.wx-kicker {
  display: inline-block; background: var(--accent-soft); color: var(--primary-dark);
  font-weight: 600; font-size: var(--fs-xs); padding: 5px 12px; border-radius: 999px;
}
.wx-hero h1 {
  font-size: var(--fs-3xl); letter-spacing: -0.02em;
  line-height: 1.1; margin: 10px 0 12px;
}
.wx-lead { font-size: var(--fs-lg); color: #3c3026; line-height: 1.65; max-width: 720px; margin: 0; }

.wx-section { padding: 30px 0; border-top: 1px solid var(--line); margin-top: 30px; }
.wx-section h2 { font-size: var(--fs-xl); letter-spacing: -0.01em; margin: 0 0 6px; }
.wx-sub { color: var(--mute); font-size: var(--fs-base); margin: 0 0 18px; max-width: 720px; line-height: 1.55; }

/* --- Now ----------------------------------------------------------------- */
.wx-now {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px 24px; margin: 14px 0 10px;
}
.wx-now-icon svg { width: 54px; height: 54px; color: var(--primary); display: block; }
.wx-now-main { display: flex; flex-direction: column; }
.wx-temp {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-figure); font-weight: 600; line-height: 1; color: var(--ink);
}
.wx-cond { color: var(--mute); font-size: var(--fs-base); margin-top: 6px; }
.wx-now-meta {
  display: grid; grid-template-columns: repeat(2, auto); gap: 10px 26px;
  margin: 0; margin-inline-start: auto;
}
@media (min-width: 720px) { .wx-now-meta { grid-template-columns: repeat(3, auto); } }
.wx-now-meta dt {
  font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--mute);
}
.wx-now-meta dd {
  margin: 2px 0 0; font-size: var(--fs-base); font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.wx-updated { font-size: var(--fs-xs); color: var(--mute); margin: 0; }
.wx-updated time { font-weight: 600; color: var(--ink); }
.wx-unavailable {
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 16px 18px; color: var(--mute);
  font-size: var(--fs-base); margin: 14px 0 0; max-width: 620px;
}

/* --- Temperature units ---------------------------------------------------- */
/* Both figures are in the DOM; this chooses. Celsius is the served default, so
   it needs no attribute — a reader with JavaScript off, or a crawler, gets the
   unit the rest of the site is written in. */
.t-f { display: none; }
[data-units="f"] .t-c { display: none; }
[data-units="f"] .t-f { display: inline; }


/* --- Travel warning ------------------------------------------------------ */
.wx-warn {
  background: var(--accent-soft); border: 1px solid #F3D9A4;
  border-radius: var(--radius); padding: 14px 18px; margin: 26px 0 0;
  max-width: 660px;
}
.wx-warn b { color: #6B4A12; font-size: var(--fs-base); }
.wx-warn p { margin: 6px 0 10px; color: #6B4A12; font-size: var(--fs-sm); line-height: 1.55; }
.wx-cta-sm {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600;
  font-size: var(--fs-sm); color: var(--primary-dark);
}
.wx-cta-sm:hover { text-decoration: underline; }

/* --- Forecast table ------------------------------------------------------ */
.wx-table-scroll { overflow-x: auto; margin-top: 14px; -webkit-overflow-scrolling: touch; }
.wx-table {
  width: 100%; border-collapse: collapse; min-width: 560px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.wx-table thead th {
  text-align: start; font-size: var(--fs-2xs); text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--mute); font-weight: 600;
  padding: 11px 15px; border-bottom: 1px solid var(--line);
}
.wx-table tbody tr + tr { border-top: 1px solid var(--line); }
/* A day the drive has to plan around. The row tint is redundant with the
   condition spelled out in its own cell, never the only carrier. */
.wx-table tbody tr.is-warn { background: color-mix(in oklab, var(--accent-soft) 45%, transparent); }
.wx-table th, .wx-table td { padding: 12px 15px; text-align: start; font-weight: 400; vertical-align: middle; }
.wx-day { white-space: nowrap; }
.wx-dow { font-weight: 600; color: var(--ink); }
.wx-date {
  display: block; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--fs-xs); color: var(--mute); margin-top: 2px;
}
.wx-cell-cond { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.wx-ico svg { width: 20px; height: 20px; color: var(--mute); display: block; }
.wx-hi, .wx-lo {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums; font-size: var(--fs-base);
}
.wx-hi { font-weight: 600; color: var(--ink); }
.wx-lo { color: var(--mute); margin-inline-start: 8px; }
.wx-mm { color: var(--mute); font-size: var(--fs-xs); margin-inline-start: 4px; }
.wx-table td { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }

/* --- September ----------------------------------------------------------- */
.wx-stats { display: grid; gap: 12px; margin: 0; grid-template-columns: 1fr; }
@media (min-width: 560px) { .wx-stats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .wx-stats { grid-template-columns: repeat(3, 1fr); } }
.wx-stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.wx-stat dt {
  font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--mute); margin-bottom: 6px;
}
.wx-stat dd { margin: 0; }
.wx-stat b {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums; font-size: var(--fs-lg); font-weight: 600;
  color: var(--ink);
}
/* The three days people are actually packing for. */
.wx-stat.is-festival { border-color: var(--primary); background: var(--accent-soft); }
.wx-stat.is-festival dt { color: var(--primary-dark); }
.wx-stat.is-festival b { color: var(--primary-dark); }

/* --- Prose --------------------------------------------------------------- */
.wx-list { color: #3c3026; line-height: 1.7; font-size: var(--fs-md); max-width: 760px; margin: 14px 0 0; padding-inline-start: 22px; }
.wx-list li { margin-bottom: 8px; }
.wx-faq { margin: 12px 0 0; }
.wx-faq dt { font-weight: 600; margin: 16px 0 5px; }
.wx-faq dd { margin: 0; color: #3c3026; line-height: 1.65; font-size: var(--fs-base); max-width: 760px; }

.wx-cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 4px 0 0; }
.wx-cta {
  display: inline-flex; align-items: center; background: var(--primary);
  color: #fff; font-weight: 600; font-size: var(--fs-md); padding: 14px 26px;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.wx-cta:hover { background: var(--primary-dark); }

/* --- Mobile -------------------------------------------------------------- */
@media (max-width: 700px) {
  .wx-wrap { padding: 0 14px; }
  .wx-now { gap: 14px; padding: 16px; }
  .wx-now-meta { margin-inline-start: 0; width: 100%; }
  .wx-table-scroll { overflow-x: visible; }
  .wx-table { min-width: 0; }
  .wx-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wx-table, .wx-table tbody, .wx-table tr, .wx-table td, .wx-table th { display: block; }
  .wx-table tbody tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  .wx-table th, .wx-table td { padding: 4px 0; }
  .wx-day { display: flex; align-items: baseline; gap: 8px; padding-bottom: 6px; }
  .wx-date { margin-top: 0; }
  .wx-table td::before {
    content: attr(data-label) ": "; color: var(--mute); font-size: var(--fs-xs);
    margin-inline-end: 6px;
  }
}
