/* Uman currency page. Layers on styles.css and reuses its :root tokens, with
   CSS logical properties throughout so the Hebrew RTL variant needs no separate
   rules — same approach as border.css and weather.css. Figures are set in
   JetBrains Mono with tabular figures, as on every other numbers page here. */
.fx { background: var(--bg); color: var(--ink); }
.fx-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 -------------------------------------------------------------- */
.fx-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0; flex-wrap: wrap;
}
.fx-top .brand-148 { color: var(--primary); font-weight: 700; }
.fx-top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-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;
}
.fx-wa:hover { border-color: var(--primary); color: var(--primary-dark); }
.fx-langs { display: flex; gap: 6px; }
.fx-lang {
  font-size: var(--fs-sm); color: var(--mute); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px;
}
.fx-lang:hover { color: var(--ink); border-color: var(--ink); }

.fx-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;
}
.fx-foot a { color: var(--mute); }
.fx-foot a:hover { color: var(--ink); }
.fx-attr a { text-decoration: underline; }

/* --- Hero and sections --------------------------------------------------- */
.fx-hero { padding: 24px 0 8px; }
.fx-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;
}
.fx-hero h1 {
  font-size: var(--fs-3xl); letter-spacing: -0.02em;
  line-height: 1.1; margin: 10px 0 12px;
}
.fx-lead { font-size: var(--fs-lg); color: #3c3026; line-height: 1.65; max-width: 720px; margin: 0; }
.fx-section { padding: 30px 0; border-top: 1px solid var(--line); margin-top: 30px; }
.fx-section h2 { font-size: var(--fs-xl); letter-spacing: -0.01em; margin: 0 0 6px; }
.fx-sub { color: var(--mute); font-size: var(--fs-base); margin: 0 0 18px; max-width: 720px; line-height: 1.55; }
.fx-prose { color: #3c3026; line-height: 1.75; font-size: var(--fs-md); max-width: 760px; margin: 0 0 14px; }

/* --- Rates table --------------------------------------------------------- */
.fx-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fx-table {
  width: 100%; border-collapse: collapse; min-width: 520px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.fx-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);
}
.fx-table tbody tr + tr { border-top: 1px solid var(--line); }
.fx-table th, .fx-table td { padding: 13px 15px; text-align: start; font-weight: 400; vertical-align: middle; }
.fx-ccy { white-space: nowrap; }
.fx-flag { font-size: var(--fs-lg); margin-inline-end: 7px; }
.fx-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600; font-size: var(--fs-sm); color: var(--ink);
}
.fx-name { display: block; font-size: var(--fs-xs); color: var(--mute); margin-top: 2px; }
.fx-rate, .fx-rate-sm {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.fx-rate { font-size: var(--fs-lg); font-weight: 600; color: var(--ink); }
.fx-rate-sm { font-size: var(--fs-base); color: var(--mute); }
.fx-uah { color: var(--mute); font-size: var(--fs-xs); }
.fx-none { color: var(--mute); }
/* Not missing data — a fact about the market, which the prose below explains. */
.fx-nocash { color: var(--mute); font-size: var(--fs-xs); font-style: italic; }
.fx-updated { font-size: var(--fs-xs); color: var(--mute); margin: 14px 0 0; }
.fx-updated time { font-weight: 600; color: var(--ink); }
.fx-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;
}

/* --- Converter ----------------------------------------------------------- */
.fx-conv {
  display: grid; gap: 14px; align-items: end;
  grid-template-columns: 1fr; max-width: 560px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
@media (min-width: 520px) { .fx-conv { grid-template-columns: 1fr 1.2fr; } }
.fx-field { display: grid; gap: 6px; }
.fx-field > label { font-size: var(--fs-xs); font-weight: 500; color: var(--ink); }
.fx-conv input, .fx-conv select {
  /* 16px literal, not a token: below it iOS Safari zooms the page on focus.
     A browser threshold, not a typographic choice. */
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; width: 100%;
}
.fx-conv input:focus-visible, .fx-conv select:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 1px;
}
/* The direction toggle. Sits with the fields rather than above the result,
   because it changes what the fields mean, not what the answer looks like. */
.fx-swap {
  grid-column: 1 / -1; justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; color: var(--mute);
  font: inherit; font-size: var(--fs-xs);
}
.fx-swap:hover { border-color: var(--primary); color: var(--primary-dark); }
.fx-swap:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.fx-swap-glyph { font-size: var(--fs-md); line-height: 1; }
/* The glyph points the other way once the direction is flipped, so the control
   shows its own state rather than relying on the reader re-reading the result. */
.fx-swap[aria-pressed="true"] .fx-swap-glyph { transform: rotate(180deg); }
.fx-swap[aria-pressed="true"] { border-color: var(--primary); color: var(--primary-dark); }

.fx-conv-out {
  grid-column: 1 / -1; margin: 2px 0 0; font-size: var(--fs-lg); color: var(--ink);
  min-height: 1.4em;
}
.fx-conv-out b {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums; font-size: var(--fs-lg); color: var(--primary-dark);
}
.fx-conv-label { color: var(--mute); font-size: var(--fs-sm); }

/* --- Prose --------------------------------------------------------------- */
.fx-faq { margin: 12px 0 0; }
.fx-faq dt { font-weight: 600; margin: 16px 0 5px; }
.fx-faq dd { margin: 0; color: #3c3026; line-height: 1.65; font-size: var(--fs-base); max-width: 760px; }
.fx-cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 4px 0 0; }
.fx-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);
}
.fx-cta:hover { background: var(--primary-dark); }

/* --- Mobile -------------------------------------------------------------- */
@media (max-width: 620px) {
  .fx-wrap { padding: 0 14px; }
  .fx-table-scroll { overflow-x: visible; }
  .fx-table { min-width: 0; }
  .fx-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fx-table, .fx-table tbody, .fx-table tr, .fx-table td, .fx-table th { display: block; }
  .fx-table tbody tr { padding: 14px; border-top: 1px solid var(--line); }
  .fx-table th, .fx-table td { padding: 3px 0; }
  .fx-ccy { padding-bottom: 8px; border-bottom: 1px dashed var(--line); margin-bottom: 8px; }
  /* Keyed on the attribute rather than the element: the cell that spans both
     cash columns is a statement, not a value, and "bank buys: no published
     cash rate" reads as a contradiction. Dropping data-label from that cell
     generates no pseudo-element at all, which is more dependable than
     overriding `content` on one that already exists. */
  .fx-table td[data-label]::before {
    content: attr(data-label) ": "; color: var(--mute); font-size: var(--fs-xs);
    margin-inline-end: 6px;
  }
}
