/* ==========================================================================
   Cotavela — component layer
   --------------------------------------------------------------------------
   Built entirely on tokens.css. NO raw hex below this line, no magic numbers
   outside the space scale.

   Swiss skeleton, Vogue register:
     * Structure is hairlines and alignment. Almost nothing is a filled box.
     * Hierarchy is type — Didone display for figures and mastheads, neutral
       grotesque for prose, mono for anything in a column.
     * Icons are 1.25px monochrome SVG strokes (app.js), never emoji.

   Mobile-first: every rule is written for 375px; breakpoints only ADD.
   She reads this one-handed walking into the office, so: 44px tap targets,
   thumb-zone navigation, 16px inputs (less makes iOS Safari zoom on focus).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--jo-canvas);
  color: var(--jo-ink-1);
  font-family: var(--jo-font-sans);
  font-size: var(--jo-type-1);
  line-height: var(--jo-leading-body);
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(60px + var(--jo-safe-bottom));
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }

.wrap { max-width: var(--jo-grid-max); margin: 0 auto; padding: 0 var(--jo-grid-margin); }
.screen { display: none; }
.screen.is-active { display: block; animation: rise var(--jo-motion-quick) var(--jo-ease); }
@keyframes rise { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* Icons — inline SVG, stroke only, inherit colour. */
.ico { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.14em; flex: 0 0 auto; }
.ico svg { width: 100%; height: 100%; display: block; }

.brand-wordmark { display: block; width: 4.444em; height: 1em; max-width: 100%; fill: currentColor; }

/* --------------------------------------------------------------------------
   Masthead — the Vogue move. Didone, huge, tight, with one heavy rule under
   it. Exactly one per screen; that scarcity is what makes it read editorial.
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 10;
  background: var(--jo-canvas);
  padding-top: var(--jo-safe-top);
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
}
.masthead__row {
  display: flex; align-items: flex-end; gap: var(--jo-space-3);
  padding: var(--jo-space-3) 0 var(--jo-space-2);
}
.masthead__title {
  font-family: var(--jo-font-display);
  font-size: var(--jo-type-4);
  font-weight: var(--jo-weight-normal);
  line-height: var(--jo-leading-flat);
  letter-spacing: var(--jo-track-hero);
}
.masthead__sub {
  margin-left: auto;
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-3);
  padding-bottom: 3px;
  white-space: nowrap;
}
.masthead__rule { height: var(--jo-rule-heavy); background: var(--jo-rule); }

.iconbtn {
  min-width: 44px; min-height: 44px;
  display: inline-grid; place-items: center;
  cursor: pointer; color: var(--jo-ink-2);
}
.iconbtn:active { color: var(--jo-accent); }

.session-exit {
  min-width: 44px; min-height: 44px; cursor: pointer;
  font-size: var(--jo-type-0); color: var(--jo-ink-2);
}
@media (max-width: 600px) {
  .masthead__row { flex-wrap: wrap; row-gap: var(--jo-space-1); }
  .masthead__title { margin-right: auto; }
  .masthead__sub { order: 1; flex-basis: 100%; margin-left: 0; }
}

.login-page { padding-bottom: 0; }
.login {
  min-height: 100svh; display: grid; align-content: center;
  gap: var(--jo-space-7); padding-top: var(--jo-space-7); padding-bottom: var(--jo-space-6);
}
.login__brand { border-top: var(--jo-rule-heavy) solid var(--jo-accent); padding-top: var(--jo-space-5); }
.login__eyebrow {
  font-size: var(--jo-type-00); text-transform: uppercase;
  letter-spacing: var(--jo-track-caps); color: var(--jo-ink-2);
}
.login__brand h1 {
  font: var(--jo-weight-normal) clamp(3.25rem, 9vw, 5rem)/1 var(--jo-font-display);
  letter-spacing: var(--jo-track-hero); margin: var(--jo-space-5) 0;
}
.login__logo { display: flex; align-items: center; gap: var(--jo-space-3); }
.login__mark { width: 56px; height: 56px; flex: 0 0 56px; fill: currentColor; }
.login__logo .brand-wordmark { width: min(240px, calc(100% - 72px)); height: auto; }
.login__brand > p:last-child { font-size: var(--jo-type-2); color: var(--jo-ink-2); }
.login__panel h2 {
  font: var(--jo-weight-normal) var(--jo-type-4)/var(--jo-leading-tight) var(--jo-font-display);
  margin: var(--jo-space-3) 0;
}
.login__intro { color: var(--jo-ink-2); margin-bottom: var(--jo-space-5); }
.login__form { display: grid; gap: var(--jo-space-2); }
.login__form label { margin-top: var(--jo-space-3); font-weight: var(--jo-weight-medium); }
.login__form input:not([type="hidden"]) {
  min-width: 0; width: 100%; min-height: 48px; padding: var(--jo-space-3);
  border: var(--jo-hairline-width) solid var(--jo-hairline-firm); border-radius: 0;
  font: inherit; font-size: var(--jo-type-2); color: var(--jo-ink-1); background: var(--jo-canvas);
}
.login__form input:focus-visible, .login__form button:focus-visible, .session-exit:focus-visible {
  outline: 2px solid var(--jo-accent); outline-offset: 3px;
}
.login__form small, .login__note { color: var(--jo-ink-2); font-size: var(--jo-type-0); }
.login__form button {
  min-height: 48px; margin-top: var(--jo-space-5); padding: var(--jo-space-3) var(--jo-space-4);
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  color: var(--jo-accent-ink); background: var(--jo-accent);
}
.login__note { margin-top: var(--jo-space-4); }
.login__error { border-left: 2px solid var(--jo-accent); padding-left: var(--jo-space-3); color: var(--jo-accent); }
.login__footer {
  border-top: var(--jo-hairline-width) solid var(--jo-hairline);
  padding-top: var(--jo-space-4); color: var(--jo-ink-2); font-size: var(--jo-type-0);
}
@media (min-width: 720px) {
  .login { grid-template-columns: 1fr 1fr; gap: var(--jo-space-8); }
  .login__brand { align-self: start; }
  .login__footer { grid-column: 1 / -1; }
}

/* Dateline — the editorial byline strip under the masthead. */
.dateline {
  display: flex; align-items: center; gap: var(--jo-space-3);
  padding: var(--jo-space-3) 0;
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-3);
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
}
.dateline__dot { width: 3px; height: 3px; background: var(--jo-accent); }

/* --------------------------------------------------------------------------
   Section heads — small caps, tracked, with a rule. No filled headers.
   -------------------------------------------------------------------------- */
.sect {
  display: flex; align-items: baseline; gap: var(--jo-space-3);
  margin: var(--jo-space-7) 0 var(--jo-space-4);
}
.sect:first-child { margin-top: var(--jo-space-5); }
.sect__title {
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  font-weight: var(--jo-weight-semi);
}
.sect__rule { flex: 1; height: var(--jo-hairline-width); background: var(--jo-hairline-firm); }
.sect__n {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-00);
  color: var(--jo-ink-3);
}

/* --------------------------------------------------------------------------
   Quote board — hairline grid, no cards. Didone figures.
   -------------------------------------------------------------------------- */
.board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* The 1px gap + background IS the grid: cells sit on a hairline field
     rather than each carrying its own border (which would double up). */
  gap: var(--jo-hairline-width);
  background: var(--jo-hairline);
  border: var(--jo-hairline-width) solid var(--jo-hairline);
}
@media (min-width: 560px) { .board { grid-template-columns: repeat(3, 1fr); } }

.quote {
  background: var(--jo-canvas);
  padding: var(--jo-space-4) var(--jo-space-3);
  display: grid; gap: var(--jo-space-1);
  transition: background var(--jo-motion-flash) var(--jo-ease);
}
.quote.is-changed { background: var(--jo-accent-soft); }
.quote__label {
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.quote__value {
  font-family: var(--jo-font-display);
  font-size: var(--jo-type-3);
  line-height: var(--jo-leading-flat);
  letter-spacing: var(--jo-track-tight);
}
.quote__delta {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-0);
  display: flex; align-items: center; gap: 3px;
}
.up { color: var(--jo-up); } .down { color: var(--jo-down); } .flat { color: var(--jo-flat); }

/* --------------------------------------------------------------------------
   Rows — the universal list primitive. Hairline separated, never boxed.
   -------------------------------------------------------------------------- */
.rows { border-top: var(--jo-hairline-width) solid var(--jo-hairline); }
.row {
  display: block;
  padding: var(--jo-space-4) 0;
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
  position: relative;
}
/* Urgent gets a rule in the margin, not a filled background. */
.row--urgent { padding-left: var(--jo-space-4); }
.row--urgent::before {
  content: ""; position: absolute; left: 0; top: var(--jo-space-4); bottom: var(--jo-space-4);
  width: var(--jo-rule-width); background: var(--jo-urgent);
}
.row--filing { padding-left: var(--jo-space-4); }
.row--filing::before {
  content: ""; position: absolute; left: 0; top: var(--jo-space-4); bottom: var(--jo-space-4);
  width: var(--jo-rule-width); background: var(--jo-accent);
}

.row__kicker {
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  color: var(--jo-accent);
  margin-bottom: var(--jo-space-1);
}
.row__title {
  font-size: var(--jo-type-2);
  line-height: var(--jo-leading-tight);
  letter-spacing: var(--jo-track-tight);
  font-weight: var(--jo-weight-normal);
}

/* A row that opens the article. Swiss grammar means the affordance is a mark
   and a hairline, never a coloured "button" — but on a phone there is no hover,
   so it must be visible at rest rather than on interaction. */
.ico--ext {
  width: 0.72em; height: 0.72em;
  margin-left: var(--jo-space-2);
  vertical-align: baseline;
  color: var(--jo-ink-3);
}
.row--link { cursor: pointer; }
.row--link .row__title { text-decoration-color: transparent; }
.row--link:active {
  background: var(--jo-surface-sunk);
}
.row--link:active .ico--ext { color: var(--jo-accent); }
/* Keyboard users get a real focus ring — the desktop path still matters. */
.row--link:focus-visible {
  outline: var(--jo-rule-width) solid var(--jo-accent);
  outline-offset: -2px;
}
@media (hover: hover) {
  .row--link:hover .row__title { text-decoration: underline; text-underline-offset: 0.18em; }
  .row--link:hover .ico--ext { color: var(--jo-accent); }
}
.row__meta {
  margin-top: var(--jo-space-2);
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-wide);
  color: var(--jo-ink-3);
  display: flex; flex-wrap: wrap; gap: var(--jo-space-3); align-items: center;
}
/* The timestamp is the one part of the meta line that is a FIGURE, so it sits
   in mono and pushes to the end — the outlet reads left, the time reads right,
   and the dates align down the column instead of drifting with outlet length. */
.row__when {
  margin-left: auto;
  font-family: var(--jo-font-mono);
  letter-spacing: var(--jo-track-flat);
  white-space: nowrap;
}

/* Chips — bordered, never filled (axiom 3). */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-wide);
  padding: 2px var(--jo-space-2);
  border: var(--jo-hairline-width) solid var(--jo-hairline-firm);
  color: var(--jo-ink-2);
  white-space: nowrap;
}
.chip--urgent {
  border-color: var(--jo-urgent);
  color: var(--jo-urgent);
  font-weight: var(--jo-weight-loud);
}

/* Filter strip — scrolls horizontally, never wraps into a wall. */
.filters {
  display: flex; gap: var(--jo-space-4);
  overflow-x: auto;
  padding: var(--jo-space-4) 0;
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto;
  padding: var(--jo-space-1) 0;
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-3);
  cursor: pointer;
  border-bottom: var(--jo-rule-width) solid transparent;
  white-space: nowrap;
  min-height: 34px;
}
.filter.is-on { color: var(--jo-ink-1); border-bottom-color: var(--jo-accent); }

/* Mover row: label / value / %. Fixed-width numeric columns so the decimal
   points line up down the list — a column of prices that does not align is not
   a quote board. Inline styles were doing this before; they belong here. */
.mover {
  display: flex;
  align-items: baseline;
  gap: var(--jo-space-3);
}
.mover__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover__val {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-1);
  text-align: right;
  min-width: 5.5em;
}
.mover__pct {
  min-width: 4.8em;
  justify-content: flex-end;
  font-weight: var(--jo-weight-medium);
}

/* --------------------------------------------------------------------------
   Indicator table — mono column, right-aligned. Tabular figures.
   -------------------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl td {
  padding: var(--jo-space-3) 0;
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
  vertical-align: baseline;
}
.tbl__label { font-size: var(--jo-type-1); }
.tbl__sub {
  display: block;
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-wide);
  color: var(--jo-ink-3);
}
.tbl__val {
  text-align: right;
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-2);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   INDICADORES — region-grouped, two-column hairline grid.
   NEW classes only; nothing above this block is modified. (.tbl is left in
   place; the Painel no longer uses it.)

   Replaces the flat A→Z .tbl, which interleaved Brazilian and US prints by
   accident of the alphabet. Grouping comes from the API (`indicator_groups`),
   so an empty region never reaches the markup.

   Same INTENT as .board — cells sit on a hairline field, no cell is a card —
   but built from half-borders rather than .board's gap-over-background, and
   deliberately so. .board's technique paints the hairline colour across the
   whole container and lets the cells mask it; any slot with no cell in it
   therefore renders as a filled grey BLOCK. The board never shows one because
   it is a fixed six, but the indicator groups are odd-sized (21 Brazilian, 5
   US) and the tail slot is empty at some breakpoint. That block is a fill
   doing structural work, which is exactly axiom 1's prohibition — and it reads
   as a broken cell rather than as the end of a list.

   So: the container draws TOP and LEFT, each cell draws RIGHT and BOTTOM.
   Every internal rule is drawn exactly once, the outer edge is closed by the
   last cells, nothing doubles up at the seams — and an absent cell draws
   nothing at all, so the grid ends in an L-shaped notch at any column count,
   with no filler element and no JS that has to know how many columns the
   current breakpoint is showing.
   -------------------------------------------------------------------------- */
.indgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: var(--jo-hairline-width) solid var(--jo-hairline);
  border-left: var(--jo-hairline-width) solid var(--jo-hairline);
}
/* At 560px the .board already goes to three columns, and so does this: an
   indicator cell's content is narrower than a quote's (no display serif), so
   if a quote board fits three across, indicators certainly do. */
@media (min-width: 560px) { .indgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.indcell {
  border-right: var(--jo-hairline-width) solid var(--jo-hairline);
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
  padding: var(--jo-space-3);
  display: grid;
  gap: var(--jo-space-1);
  align-content: start;
  min-width: 0;
}

/* The label is allowed exactly TWO lines and then truncates.
   Wrapping was chosen over one-line truncation because at 138px of measured
   content width the all-caps tracked label fits ~15 characters per line, and
   half the set is longer than that — one line would ellipsis "Confiança do
   consumidor" to "CONFIANÇA DO…" and "Dívida líquida/PIB" to "DÍVIDA LÍQU…",
   the latter being indistinguishable from its neighbour "Dívida bruta/PIB".
   Two lines clear every label in the live set.

   The track is PINNED to two lines whether the label needs them or not, so a
   one-line label ("CDI") does not ride up and break the baseline it shares
   with the rest of its grid row. That is what keeps the figures on one line
   across the row instead of stepping with label length. */
.indcell__label {
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  line-height: var(--jo-leading-tight);
  color: var(--jo-ink-3);
  min-height: calc(2 * var(--jo-type-00) * var(--jo-leading-tight));
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
  /* The tracked-out final letter otherwise pushes a 2-line label into a 3rd. */
  overflow-wrap: anywhere;
}

/* The unit rides with the label, but drops the caps tracking.
   --jo-track-caps is 0.18em, which at 10px adds ~1.8px per character — on
   "índice" that is ~11px spent on air. A unit is a symbol string ("% a.a.",
   "R$ mi"), not a word being set as a label, so tracking it out is wrong
   typographically as well as expensive. It keeps the label's size and colour
   so it reads as part of that block. */
.indcell__unit {
  letter-spacing: var(--jo-track-flat);
  white-space: nowrap;
}
.indcell__unit::before { content: " · "; }

/* Figure line: the delta in a fixed slot, the figure hard against the cell's
   right edge. NOTHING sits after the figure — that is what puts its right edge
   at the same x in every cell and lines the digits up down the column, which
   is the whole reason this is a grid of figures rather than a list of facts.

   The delta column is FIXED, not 1fr: a flexible track collapses to whatever
   the figure leaves, and the figure is the widest thing in the cell, so
   "▼ −0,42" was squeezed to "▼…" in all 26 cells. 3.4em holds a signed
   two-decimal delta at 10px mono; anything longer ellipsizes rather than
   pushing the rail — losing a digit of the CHANGE is survivable, losing one
   of the LEVEL is not. */
.indcell__figs {
  display: grid;
  grid-template-columns: 3.4em minmax(0, 1fr);
  align-items: baseline;
  gap: var(--jo-space-1);
  min-width: 0;
}
.indcell__value {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-2);
  letter-spacing: var(--jo-track-tight);
  line-height: var(--jo-leading-tight);
  white-space: nowrap;
  text-align: right;
  color: var(--jo-ink-1);
}

/* Direction is a MARK, not a colour. Green-up/red-down is a market convention
   that INVERTS on macro data — falling unemployment is good but would render
   red, rising gross debt would render green — so colour here would assert a
   judgement the app cannot make. It stays --jo-ink-3 in both directions and
   reads as metadata; colour is left to the quote board and the movers, where
   the convention actually holds. */
.indcell__delta {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-00);
  letter-spacing: var(--jo-track-flat);
  color: var(--jo-ink-3);
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Provenance KEPT rather than dropped: every figure in this app is sourced on
   purpose, and "0,16" with no period is a number, not a fact. It gets its own
   full-width line — mono with flat tracking is what makes ~20 characters fit
   in 138px; the sans all-caps treatment .row__meta uses is ~40% wider and
   would not. */
.indcell__prov {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-00);
  letter-spacing: var(--jo-track-flat);
  line-height: var(--jo-leading-tight);
  color: var(--jo-ink-3);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* Region heading inside INDICADORES. The same .sect component as everywhere
   else on the Painel, pulled in tight: it is a SUB-head under "Indicadores",
   and the full --jo-space-7 top margin would read as a peer of it. The title
   drops to ink-2 and normal weight for the same reason — one step down the
   hierarchy by weight and colour rather than by size, so the type scale stays
   at one size per semantic level. */
.sect--sub { margin: var(--jo-space-5) 0 var(--jo-space-2); }
.sect--sub .sect__title { font-weight: var(--jo-weight-normal); color: var(--jo-ink-2); }

/* --------------------------------------------------------------------------
   Report — the rendered digest, set as an editorial page.
   -------------------------------------------------------------------------- */
.report { font-size: var(--jo-type-1); line-height: var(--jo-leading-body); }
.report h3 {
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  font-weight: var(--jo-weight-semi);
  margin: var(--jo-space-6) 0 var(--jo-space-3);
  padding-bottom: var(--jo-space-2);
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline-firm);
}
.report h3:first-child { margin-top: 0; }
.report li {
  padding-left: var(--jo-space-4);
  text-indent: calc(-1 * var(--jo-space-4));
  margin-bottom: var(--jo-space-3);
}
.report strong { font-weight: var(--jo-weight-semi); }
/* The lead paragraph gets the Didone treatment — one per report. */
.report .lead {
  font-family: var(--jo-font-display);
  font-size: var(--jo-type-3);
  line-height: var(--jo-leading-tight);
  letter-spacing: var(--jo-track-tight);
  margin-bottom: var(--jo-space-5);
}

/* --------------------------------------------------------------------------
   REPORT — ILLUSTRATED  (added with charts.js; see docs/PDF_EXPORT.md)
   --------------------------------------------------------------------------
   `.report--illustrated` is the render path taken when the report carries a
   structured snapshot (`data`). Everything here is ADDITIVE: a report with
   `data: null` never gets this class and renders exactly as it did before.

   The figure block itself (.jofig, .jochart, .joquote__spark) belongs to
   charts.css and is NOT restated here — one construction, one owner. What is
   below is only what the app's column needs that a chart cannot know: the
   board at the top, the sector legend, and the agenda table.
   -------------------------------------------------------------------------- */

/* The board leads the screen, so it needs air under it and none above — it is
   the first thing in the column. The grid itself is .board/.quote, reused
   verbatim from the Painel above: one board, rendered in two places. */
.report--illustrated > .board { margin-bottom: var(--jo-space-6); }
.report--illustrated > .board:first-child + h3 { margin-top: 0; }

/* The delta line now carries a sparkline as well as the percentage, so it
   becomes a row. Baseline, not centre: the mark must sit on the figure's
   baseline or it reads as floating a pixel high against the mono digits. */
.report--illustrated .quote__delta { align-items: baseline; }

/* "sem destaques" — an absence, set as one. Same treatment as the printed
   sheet's .sect--empty rather than a second idea about what quiet looks like. */
.report__none {
  color: var(--jo-ink-3);
  font-size: var(--jo-type-0);
  font-style: italic;
  margin-bottom: var(--jo-space-3);
}

/* --------------------------------------------------------------------------
   Sector legend — the names behind each average
   --------------------------------------------------------------------------
   The strip says "Bancos +0,63%"; only this says that Itaú is the one
   negative name inside it, which for Jo is the entire reason to draw sectors
   at all. Rows are hairline-separated, never boxed — .rows' grammar at a
   smaller size.
   -------------------------------------------------------------------------- */
.joleg { margin-top: var(--jo-space-3); }
.joleg__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--jo-space-1) var(--jo-space-3);
  padding: var(--jo-space-2) 0;
  border-top: var(--jo-hairline-width) solid var(--jo-hairline);
  align-items: baseline;
}
.joleg__label {
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-2);
}
.joleg__pct {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-0);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
/* The member names span both columns on their own line: at 375px seven bank
   names do not fit beside a label, and wrapping them into the label column
   would break the alignment the sector column exists for. Each name carries
   its OWN direction colour — that is the whole payload of this row. */
.joleg__names {
  grid-column: 1 / -1;
  font-size: var(--jo-type-0);
  color: var(--jo-ink-3);
  line-height: var(--jo-leading-tight);
}
/* Hairline separators between names rather than a bullet or a comma: the
   names are already coloured, and a punctuation mark inherits that colour and
   reads as part of the name beside it. */
.joleg__names > span + span {
  margin-left: var(--jo-space-2);
  padding-left: var(--jo-space-2);
  border-left: var(--jo-hairline-width) solid var(--jo-hairline);
}

/* --------------------------------------------------------------------------
   Agenda table — efetivo vs. esperado
   --------------------------------------------------------------------------
   The one figure with no chart: a surprise is the GAP between two numbers,
   and two numbers side by side say that better than any mark. A real <table>,
   because it is real tabular data (unlike the print sheet's layout tables) —
   and because <thead> is what repeats when it splits across a printed page.
   -------------------------------------------------------------------------- */
.agenda {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--jo-space-3);
  font-size: var(--jo-type-0);
}
.agenda thead th {
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  font-weight: var(--jo-weight-normal);
  color: var(--jo-ink-3);
  text-align: left;
  padding-bottom: var(--jo-space-2);
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline-firm);
}
.agenda td {
  padding: var(--jo-space-2) 0;
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
  vertical-align: baseline;
}
.agenda__when {
  white-space: nowrap;
  padding-right: var(--jo-space-3);
  color: var(--jo-ink-3);
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-wide);
}
.agenda__event { width: 100%; padding-right: var(--jo-space-3); }
/* The country is context, not the event — a bordered chip would be a fifth
   column of noise, so it is one step down in the metadata ink on its own line
   (tokens.css rule 3: context is never a coloured badge). */
.agenda__country {
  display: block;
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-3);
}
.agenda__num, .agenda thead th.agenda__num {
  font-family: var(--jo-font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  padding-left: var(--jo-space-3);
}
.agenda__num--dim { color: var(--jo-ink-3); }
/* Not released yet: the whole row steps back, because a consensus with no
   actual beside it is a plan, not a fact. */
.agenda__row.is-pending .agenda__event { color: var(--jo-ink-2); }
/* A surprise gets a rule in the margin — the same move .row--urgent makes,
   and for the same reason: it is the one agenda fact that changes a position,
   and a filled row would be the only filled thing on the page. */
.agenda__row.is-surprise .agenda__when {
  box-shadow: inset var(--jo-rule-width) 0 0 0 var(--jo-accent);
  padding-left: var(--jo-space-2);
}

/* --------------------------------------------------------------------------
   Chat
   -------------------------------------------------------------------------- */
.chat { display: flex; flex-direction: column; gap: var(--jo-space-4); padding: var(--jo-space-5) 0 var(--jo-space-6); }
.bubble {
  max-width: 88%;
  padding: var(--jo-space-3) var(--jo-space-4);
  border-radius: var(--jo-radius-bubble);
  line-height: var(--jo-leading-body);
  white-space: pre-wrap; word-wrap: break-word;
}
.bubble--me {
  align-self: flex-end;
  background: var(--jo-ink-1);
  color: var(--jo-canvas);
}
.bubble--bot {
  align-self: flex-start;
  background: var(--jo-surface);
  border: var(--jo-hairline-width) solid var(--jo-hairline);
  border-left: var(--jo-rule-width) solid var(--jo-accent);
}
.bubble strong { font-weight: var(--jo-weight-semi); }

.composer {
  position: fixed; left: 0; right: 0;
  bottom: calc(60px + var(--jo-safe-bottom));
  background: var(--jo-canvas);
  border-top: var(--jo-hairline-width) solid var(--jo-hairline-firm);
  padding: var(--jo-space-3) var(--jo-grid-margin);
}
.composer__row { max-width: var(--jo-grid-max); margin: 0 auto; display: flex; gap: var(--jo-space-2); }
.composer input {
  flex: 1; min-height: 44px;
  padding: 0 var(--jo-space-3);
  border: var(--jo-hairline-width) solid var(--jo-hairline-firm);
  border-radius: var(--jo-radius-0);
  background: var(--jo-surface);
  color: var(--jo-ink-1);
  font-family: var(--jo-font-sans);
  font-size: var(--jo-type-2);   /* 16px floor — stops iOS zooming on focus */
}
.composer input:focus { outline: var(--jo-rule-width) solid var(--jo-accent); outline-offset: -2px; }
.composer button {
  min-width: 44px; min-height: 44px; padding: 0 var(--jo-space-4);
  background: var(--jo-accent); color: var(--jo-accent-ink);
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-caps);
  font-weight: var(--jo-weight-semi);
  cursor: pointer;
}
.composer button:disabled { opacity: .4; }

.suggest { display: flex; flex-wrap: wrap; gap: var(--jo-space-2); margin-top: var(--jo-space-4); }
.suggest button {
  padding: var(--jo-space-2) var(--jo-space-3);
  border: var(--jo-hairline-width) solid var(--jo-hairline-firm);
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-wide);
  color: var(--jo-ink-2); cursor: pointer;
}
.suggest button:active { border-color: var(--jo-accent); color: var(--jo-accent); }

/* --------------------------------------------------------------------------
   Source attribution (Consulta) — ADDED, see docs/CITATIONS.md.
   Nothing above this comment was modified.

   The answer stays the thing you read: markers are typographic marks in the
   metadata ink, and the source list is collapsed until asked for. Structure is
   hairlines and a hanging number column — no filled panel, no citation pills.
   -------------------------------------------------------------------------- */

/* Inline marker. Superscript-ish, 10px, metadata ink — it must not break the
   reading line, so it borrows the figure ink rather than the accent. */
.cite {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-00);
  letter-spacing: var(--jo-track-flat);
  line-height: 1;
  vertical-align: 0.42em;          /* superscript by baseline shift, not <sup>:
                                      <sup> also shrinks the glyph a second time */
  color: var(--jo-ink-3);
  background: none; border: 0; padding: 0 0 0 1px;
  cursor: pointer;
  position: relative;              /* anchors the enlarged hit area below */
}
/* 44px touch target WITHOUT a 44px box: a transparent overlay grows the hit
   area past the glyph while the text line keeps its own leading. */
.cite::after {
  content: ""; position: absolute;
  top: -14px; bottom: -14px; left: -5px; right: -5px;
}
.cite:active { color: var(--jo-accent); }
.cite:focus-visible {
  outline: var(--jo-hairline-width) solid var(--jo-accent);
  outline-offset: 2px;
}

/* UNVERIFIED — the model cited a source we could not tie to the claim.
   Kept strictly typographic: a "?" in the glyph plus a dotted underline. No
   red pill, no fill. The dotted rule is the copy-editor's query mark, which is
   exactly the semantics here: "check this before you use it". */
.cite--unverified {
  border-bottom: var(--jo-hairline-width) dotted currentColor;
  color: var(--jo-ink-2);
}

/* The dropdown. Native <details> so keyboard + screen-reader behaviour and the
   open/closed state come for free. */
.srcs {
  margin-top: var(--jo-space-4);
  border-top: var(--jo-hairline-width) solid var(--jo-hairline);
  /* .bubble sets pre-wrap for the answer text; the source list is real markup
     and must not inherit it or every newline becomes a blank line. */
  white-space: normal;
}
.srcs__sum {
  display: flex; align-items: center; gap: var(--jo-space-2);
  min-height: 44px;                /* thumb target */
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-3);
  cursor: pointer;
  list-style: none;                /* kill the default triangle, both engines */
}
.srcs__sum::-webkit-details-marker { display: none; }
.srcs__sum:active { color: var(--jo-accent); }
.srcs__sum:focus-visible {
  outline: var(--jo-hairline-width) solid var(--jo-accent);
  outline-offset: -1px;
}
/* Our own marker: a chevron that rotates. 1.25px stroke, same as every icon. */
.srcs__chev {
  width: 0.85em; height: 0.85em; flex: 0 0 auto;
  margin-left: auto;
  color: var(--jo-ink-3);
  transition: transform var(--jo-motion-quick) var(--jo-ease);
}
.srcs[open] .srcs__chev { transform: rotate(90deg); }
.srcs__count {
  font-family: var(--jo-font-mono);
  letter-spacing: var(--jo-track-flat);
}

.srcs__list { margin: 0 0 var(--jo-space-3); padding: 0; list-style: none; }

/* One source. The number hangs in its own column so the titles align down the
   list — the alignment IS the structure, which is why there is no box. */
.src {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0 var(--jo-space-2);
  padding: var(--jo-space-3) 0;
  border-top: var(--jo-hairline-width) solid var(--jo-hairline);
}
.src__n {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-0);
  color: var(--jo-ink-3);
  font-variant-numeric: tabular-nums;
}
.src__title {
  font-size: var(--jo-type-1);
  line-height: var(--jo-leading-tight);
  letter-spacing: var(--jo-track-tight);
  color: var(--jo-ink-1);
}
a.src__title { display: block; }
a.src__title:active { color: var(--jo-accent); }
@media (hover: hover) {
  a.src__title:hover { text-decoration: underline; text-underline-offset: 0.18em; }
  a.src__title:hover .ico--ext { color: var(--jo-accent); }
}
.src__meta {
  grid-column: 2;
  margin-top: var(--jo-space-2);
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-wide);
  color: var(--jo-ink-3);
  display: flex; flex-wrap: wrap; gap: var(--jo-space-3); align-items: center;
}
/* The reading of a datapoint is a FIGURE — mono, and it sits at the end of the
   meta line so values align down the column like the dashboard's board. */
.src__val {
  margin-left: auto;
  font-family: var(--jo-font-mono);
  letter-spacing: var(--jo-track-flat);
  color: var(--jo-ink-2);
  white-space: nowrap;
}
/* Highlight when a marker is tapped. A hairline in the accent on the hanging
   edge — the same "rule, not fill" move the bot bubble already makes. */
.src.is-cited {
  box-shadow: inset var(--jo-rule-width) 0 0 var(--jo-accent);
  padding-left: var(--jo-space-2);
}

/* Footnote for the unverified tier. Sits under the list, in metadata type, and
   only renders when there IS an unverified citation. */
.srcs__note {
  padding: var(--jo-space-3) 0;
  border-top: var(--jo-hairline-width) solid var(--jo-hairline);
  font-size: var(--jo-type-00);
  line-height: var(--jo-leading-body);
  text-transform: uppercase; letter-spacing: var(--jo-track-wide);
  color: var(--jo-ink-3);
}
.srcs__note b {
  font-family: var(--jo-font-mono);
  letter-spacing: var(--jo-track-flat);
  font-weight: var(--jo-weight-normal);
  color: var(--jo-ink-2);
  border-bottom: var(--jo-hairline-width) dotted currentColor;
}

/* --------------------------------------------------------------------------
   Tab bar — thumb zone. Labels are type, icons are strokes.
   -------------------------------------------------------------------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--jo-canvas);
  border-top: var(--jo-hairline-width) solid var(--jo-hairline-firm);
  padding-bottom: var(--jo-safe-bottom);
}
.tab {
  min-height: 60px;
  display: grid; place-items: center; gap: var(--jo-space-1);
  padding: var(--jo-space-2) 0;
  color: var(--jo-ink-3);
  cursor: pointer;
  position: relative;
  border-top: var(--jo-rule-width) solid transparent;
  margin-top: -1px;
}
/* Compact labels keep all six destinations visible on small screens. */
.tabbar--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tabbar--6 .tab { padding-left: 2px; padding-right: 2px; grid-template-rows: 16px 1fr; }
.tabbar--6 .tab__label {
  letter-spacing: var(--jo-track-flat);
  font-size: clamp(0.5625rem, 2.4vw, var(--jo-type-00));
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
}
/* The urgent dot is positioned off the column centre; a narrower column needs
   it pulled in or it lands outside the tab. */
.tabbar--6 .tab__dot { transform: translateX(15px); }

.tab__label { font-size: var(--jo-type-00); letter-spacing: var(--jo-track-caps); text-transform: uppercase; }
.tab.is-on { color: var(--jo-ink-1); border-top-color: var(--jo-accent); }
.tab__dot {
  position: absolute; top: 10px; right: 50%;
  transform: translateX(18px);
  width: 5px; height: 5px; background: var(--jo-urgent);
}

/* --------------------------------------------------------------------------
   ATIVOS — the personal watchlist screen. NEW component classes only; nothing
   above this block is modified. Same grammar as the rest of the page: hairline
   rules, no cards, no fills, colour only for market direction.
   -------------------------------------------------------------------------- */

/* Add-asset form. Sits at the top of the screen rather than in a fixed bar:
   adding is occasional, and the fixed composer is the chat's affordance. */
.wladd {
  display: flex; gap: var(--jo-space-2);
  padding: var(--jo-space-4) 0;
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
}
.wladd input {
  flex: 1; min-width: 0; min-height: 44px;
  padding: 0 var(--jo-space-3);
  border: var(--jo-hairline-width) solid var(--jo-hairline-firm);
  border-radius: var(--jo-radius-0);
  background: var(--jo-surface);
  color: var(--jo-ink-1);
  font-family: var(--jo-font-sans);
  font-size: var(--jo-type-2);   /* 16px floor — below this iOS zooms on focus */
}
.wladd input::placeholder { color: var(--jo-ink-3); }
.wladd input:focus { outline: var(--jo-rule-width) solid var(--jo-accent); outline-offset: -2px; }
.wladd button {
  min-width: 44px; min-height: 44px; padding: 0 var(--jo-space-3);
  background: var(--jo-accent); color: var(--jo-accent-ink);
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-caps);
  font-weight: var(--jo-weight-semi);
  cursor: pointer; white-space: nowrap;
}
.wladd button:disabled { opacity: .4; }

/* Feedback line for the add flow. A rule in the margin carries the state —
   a filled red banner would be the only coloured box on the page. */
.wlnote {
  margin-top: var(--jo-space-3);
  padding: var(--jo-space-2) 0 var(--jo-space-2) var(--jo-space-3);
  border-left: var(--jo-rule-width) solid var(--jo-hairline-firm);
  font-size: var(--jo-type-1);
  line-height: var(--jo-leading-tight);
  color: var(--jo-ink-2);
}
.wlnote--err { border-left-color: var(--jo-down); color: var(--jo-down); }
.wlnote--ok  { border-left-color: var(--jo-up);   color: var(--jo-up); }

/* Charts sit between identity and quote on desktop, below them on phones. */
.wlhead { display: none; }
.wlrow {
  display: grid; grid-template-columns: minmax(0, 1fr) 104px;
  grid-template-areas: "asset quote" "history remove";
  align-items: center; gap: var(--jo-space-1) var(--jo-space-4);
  padding: var(--jo-space-2) 0;
}
.wlrow__asset { grid-area: asset; min-width: 0; }
.wlrow__name {
  display: block;
  font-size: var(--jo-type-2);
  line-height: var(--jo-leading-tight);
  letter-spacing: var(--jo-track-tight);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wlrow__quote {
  grid-area: quote; display: flex; flex-direction: column;
  align-items: flex-end; gap: var(--jo-space-1);
}
.wlrow__val {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-1);
  text-align: right;
}
.wlrow__pct { justify-content: flex-end; font-weight: var(--jo-weight-medium); }

.wlrow__meta {
  margin-top: var(--jo-space-1);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--jo-space-2);
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-wide);
  color: var(--jo-ink-3);
}
.chip--sym { font-family: var(--jo-font-mono); letter-spacing: var(--jo-track-flat); }
.wlrow .chip--sym { padding: 0; border: 0; }
/* Only rendered for a NON-home listing (see watchlist.js `venue`) — a column of
   B3 names all saying "SÃO PAULO · BRL" is fifteen rows of nothing. */
.wlrow__venue { color: var(--jo-ink-3); }
.wlrow__rm {
  grid-area: remove; justify-self: end;
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  color: var(--jo-ink-3);
  cursor: pointer;
}
.wlrow__rm svg { width: 1rem; height: 1rem; display: block; }
.wlrow__rm:active { color: var(--jo-down); }
.wlrow__rm:focus-visible { outline: var(--jo-rule-width) solid var(--jo-accent); outline-offset: -4px; }
@media (hover: hover) { .wlrow__rm:hover { color: var(--jo-down); } }

.wlrow__history {
  grid-area: history; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--jo-space-4); max-width: 216px;
}
.wlrow__trend {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--jo-space-1);
  font-size: var(--jo-type-00); color: var(--jo-ink-3);
}
.wlrow__nohistory { min-height: 24px; display: flex; align-items: center; }
@media (min-width: 700px) {
  .wlhead, .wlrow {
    display: grid; grid-template-columns: minmax(0, 1fr) 216px 104px 44px;
    grid-template-areas: "asset history quote remove"; column-gap: var(--jo-space-5);
  }
  .wlhead {
    padding: var(--jo-space-3) 0;
    border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
    font-size: var(--jo-type-00); color: var(--jo-ink-3);
    text-transform: uppercase; letter-spacing: var(--jo-track-wide);
  }
  .wlhead__quote { grid-area: quote; text-align: right; }
  .wlrow { padding: var(--jo-space-3) 0; }
  .wlrow__period { display: none; }
}

/* Calendar event: name, then the actual/consensus/previous triple in a mono
   row. The triple IS the story — "0,16% vs 0,25% esperado" is what moves a
   curve — so the figures get the column, not a sentence. */
.ev__name {
  font-size: var(--jo-type-1);
  line-height: var(--jo-leading-tight);
}
/* Three fixed columns, so real/esperado/anterior align down the whole list and
   the comparison is scannable. A flex row wrapped to the content width and the
   figures zig-zagged, which is exactly what a quote column must not do. */
.ev__figs {
  margin-top: var(--jo-space-2);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--jo-space-2);
}
.ev__fig { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ev__figval {
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-1);
  color: var(--jo-ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ev__fig--actual .ev__figval { color: var(--jo-ink-1); }
.ev__figlabel {
  font-family: var(--jo-font-sans);
  font-size: var(--jo-type-00);
  text-transform: uppercase;
  letter-spacing: var(--jo-track-wide);
  color: var(--jo-ink-3);
}

/* Empty state. The one place on this screen with a display-serif line — she
   only ever sees it after deliberately emptying the list. */
.wlempty { padding: var(--jo-space-7) 0; text-align: center; }
.wlempty__lead {
  font-family: var(--jo-font-display);
  font-size: var(--jo-type-3);
  line-height: var(--jo-leading-tight);
  letter-spacing: var(--jo-track-tight);
  margin-bottom: var(--jo-space-3);
}
.wlempty__body {
  font-size: var(--jo-type-1);
  color: var(--jo-ink-2);
  max-width: 28em; margin: 0 auto var(--jo-space-5);
}
.wlempty__btn {
  min-height: 44px; padding: 0 var(--jo-space-4);
  border: var(--jo-hairline-width) solid var(--jo-hairline-firm);
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-2); cursor: pointer;
}
.wlempty__btn:active { border-color: var(--jo-accent); color: var(--jo-accent); }

/* --------------------------------------------------------------------------
   States
   -------------------------------------------------------------------------- */
.empty, .loading {
  text-align: center; color: var(--jo-ink-3);
  padding: var(--jo-space-8) var(--jo-space-4);
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-caps);
}
.skeleton {
  background: var(--jo-surface-sunk);
  animation: pulse 1.2s ease-in-out infinite;
  height: 1em; margin-bottom: var(--jo-space-2);
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.colophon {
  margin: var(--jo-space-7) 0 var(--jo-space-5);
  padding-top: var(--jo-space-4);
  border-top: var(--jo-hairline-width) solid var(--jo-hairline);
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-3);
  text-align: center;
}

/* ── The narration player ────────────────────────────────────────────────────
   A report you can listen to. Deliberately NOT <audio controls>: the UA widget
   is a rounded, shaded, platform-coloured object and this page is hairlines and
   type — one native control would be the loudest thing on the screen. So the
   element stays hidden and this is a thin skin over it, built only from tokens.

   Everything here obeys the house rules: radius 0, colour only for the accent
   and for market direction, icons as inline SVG strokes, no emoji. */
.player {
  margin: var(--jo-space-4) 0 var(--jo-space-5);
  padding: var(--jo-space-3) 0;
  border-top: var(--jo-hairline-width) solid var(--jo-hairline);
  border-bottom: var(--jo-hairline-width) solid var(--jo-hairline);
}
.player__row {
  display: flex; align-items: center; gap: var(--jo-space-3);
}
.player__row + .player__row { margin-top: var(--jo-space-3); }

/* 44px hit target — this is the one control on the screen that gets tapped
   while walking. The visible mark is smaller than the target on purpose. */
.player__play {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--jo-ink-1);
  border: var(--jo-rule-width) solid var(--jo-ink-1);
  cursor: pointer;
}
.player__play:disabled { color: var(--jo-ink-3); border-color: var(--jo-hairline-firm); cursor: default; }
.player__play .ico { width: 18px; height: 18px; }

/* The rail is the progress bar. A 3px band with a 44px transparent hit area
   above and below it, because a 3px tap target is not a tap target. */
.player__rail {
  position: relative; flex: 1 1 auto;
  height: 3px; background: var(--jo-surface-sunk);
  cursor: pointer; touch-action: none;
}
.player__rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: -20px; bottom: -20px;
}
.player__fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: var(--jo-accent);
}
.player__buffer {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: var(--jo-hairline-firm);
}
.player__time {
  flex: 0 0 auto;
  font-family: var(--jo-font-mono);
  font-size: var(--jo-type-00);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--jo-track-flat);
  color: var(--jo-ink-2);
}
.player__meta {
  flex: 1 1 auto;
  font-size: var(--jo-type-00);
  text-transform: uppercase; letter-spacing: var(--jo-track-caps);
  color: var(--jo-ink-3);
}
.player__meta.is-error {
  color: var(--jo-urgent);
  text-transform: none; letter-spacing: 0;
  line-height: var(--jo-leading-tight);
}
/* Language + speed on the left, the two exports on the right. At 390px the
   whole set does not fit one line, so the RIGHT group is allowed to wrap under
   itself while the language toggle keeps its position — the control she uses
   most should not move when a button appears next to it. */
.player__row--controls { justify-content: space-between; align-items: flex-start; }
.player__actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--jo-space-4); flex-wrap: wrap;
}
.player__lang { display: flex; align-items: center; gap: var(--jo-space-3); flex: 0 0 auto; }
.player__lang .filter { min-height: 34px; }
.player__sep { color: var(--jo-hairline-firm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
