/* Today's brief — the number strip, the insight cards, the reader's list.
 *
 * From the owner's v2 design (Claude Design, 25 September 2026): its phone
 * Today, 03a, and its desktop Today, 03c, in the parts the owner named. The
 * palette is design.css's own — the design's --pg/--sf/--ink/--ink2/--ink3/
 * --br are --bg/--surface/--ink/--t2/--faint/--accent here, and its --ln,
 * --sf2 and --brs are the three --tb* tokens design.css declares for it.
 *
 * Every rule carries `#app`: the shell sets `#app button { font: inherit;
 * color: inherit }` and `#app .om-scr h1/h2 {… !important}`, and a component
 * rule without the id loses to both. Home's own order on a phone is decided
 * in chart-viewer.css and nowhere else; what this file orders is the inside
 * of the brief. */

#app {
  --tbSans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
  --tbMono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, monospace;
}
#app .tb-layout { display: grid; gap: 16px; min-width: 0; }
#app .tb-lead, #app .tb-side, #app .tb-cards, #app .tb-watch, #app .tb-next, #app .tb-market { min-width: 0; }
#app .tb-lead { display: flex; flex-direction: column; gap: 16px; }
#app .tb-side { display: flex; flex-direction: column; gap: 20px; }
#app .tb-cards { display: flex; flex-direction: column; gap: 16px; }
/* The market's two questions — how widely it moved, who bought and who sold —
 * as one block between the reader's companies and the day's cards. */
#app .tb-market { display: flex; flex-direction: column; gap: 16px; }

/* A phone, and anything short of room for a side column: the side column
 * steps out of the way so its two parts can sit either side of the cards —
 * the reader's list directly under the strip, then the market's block, the
 * cards, and what is next after them. */
@media (max-width: 1099px) {
  #app .tb-side { display: contents; }
  #app .tb-lead { order: 1; }
  #app .tb-watch { order: 2; }
  #app .tb-market { order: 3; }
  #app .tb-cards { order: 4; }
  #app .tb-next { order: 5; }
}
/* The design's 03c: a reading column and, beside it, the reader's list and
 * what is next, held in view while the cards scroll.
 *
 * Edge to edge, like every other block on the page. It was capped at 1,180px
 * and centred, so on a 1,440px screen Home's first screenful sat 102px inside
 * the header, the market strip and everything below it — the owner, 25 Sep
 * 2026: "on desktop there's gaps to left and right". The reading measure is
 * kept by the text's own max-widths, not by narrowing the whole block. */
@media (min-width: 1100px) {
  #app .tb-layout {
    grid-template-columns: minmax(0, 1fr) 380px; column-gap: 32px; row-gap: 20px;
    align-items: start; width: 100%;
  }
  #app .tb-lead { grid-column: 1; grid-row: 1; }
  #app .tb-market { grid-column: 1; grid-row: 2; }
  #app .tb-cards { grid-column: 1; grid-row: 3; }
  #app .tb-side { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 16px; }
}

/* ── the header ────────────────────────────────────────────────────────── */
/* The intro was a wrapping ROW (journal.css), with the lead and the headline
 * given `flex-basis: 100%` to force their own lines. In this column that
 * basis is a HEIGHT, and with wrap on, the lead wrapped into a second column
 * beside the first — off the side of a phone, widening the whole page to
 * 1,130px. A column that does not wrap, and no basis. */
#app .tb-lead .journal-intro {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px;
  max-width: none; padding: 0;
}
#app .tb-lead .journal-intro > * { flex-basis: auto; }
#app .tb-dateline {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 12px;
  flex-wrap: wrap; min-height: 32px;
}
#app .tb-dateline .journal-eyebrow { margin: 0; font: 500 12px/1.5 var(--tbMono); color: var(--faint); }
#app .tb-lead .journal-intro h1 {
  order: 0; margin: 0; font: 700 26px/1.3 var(--tbSans) !important; letter-spacing: -.01em;
  color: var(--ink);
}
#app .tb-lead .journal-intro .home-headline {
  margin: 0; max-width: 34ch; font: 600 21px/1.55 var(--tbSans); letter-spacing: -.005em;
  color: var(--ink); text-wrap: balance;
}
#app .tb-lead .journal-intro .journal-lead { margin: 0; font-size: 17px; line-height: 1.65; }
@media (min-width: 1100px) {
  /* On a desktop the sentence is the headline and the title is its label. */
  #app .tb-lead .journal-intro h1 { color: var(--t2); }
  #app .tb-lead .journal-intro .home-headline { font-size: 32px; line-height: 1.45; max-width: 30ch; }
}
#app .tb-fresh {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 500 12px/1.3 var(--tbSans); color: var(--t2);
  border: 1px solid currentColor; border-radius: 12px; padding: 4px 10px;
}
#app .tb-fresh[data-tone="live"] { color: var(--info); }
#app .tb-fresh[data-tone="est"] { color: var(--warn); border-style: dashed; }
#app .tb-empty { padding: 18px 14px; color: var(--faint); font-size: 14px; }

/* ── the number strip ──────────────────────────────────────────────────── */
#app .nb-strip { position: relative; background: var(--surface); border-radius: 20px; overflow: hidden; }
#app .nb-scroll {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-behavior: smooth;
  padding-block: 12px; padding-inline: 6px 50px; scrollbar-width: none;
}
#app .nb-scroll::-webkit-scrollbar { display: none; }
#app .nb-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 20px; }
#app .nb-item {
  flex: none; display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 4px 14px; margin: 0; border: 0; border-inline-start: 1px solid var(--tbLine);
  background: none; color: var(--ink); text-align: start; font: inherit;
}
#app .nb-item:first-child { border-inline-start-color: transparent; }
#app button.nb-item { cursor: pointer; border-radius: 0; }
#app button.nb-item:hover .nb-l { color: var(--accent); }
#app button.nb-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 10px; }
#app .nb-l { font: 500 12px/1.4 var(--tbSans); color: var(--faint); white-space: nowrap; }
#app .nb-v { font: 600 17px/1.3 var(--tbMono); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
#app .nb-s { font: 500 11px/1.3 var(--tbMono); color: var(--faint); white-space: nowrap; }
#app .nb-item[data-tone="up"] .nb-v { color: var(--up); }
#app .nb-item[data-tone="down"] .nb-v { color: var(--down); }
#app .nb-item[data-tone="quiet"] .nb-v { color: var(--faint); }
#app .nb-more {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: 44px;
  display: flex; align-items: center; justify-content: center; padding: 0; margin: 0;
  background: var(--surface); border: 0; border-inline-start: 1px solid var(--tbLine);
  color: var(--t2); cursor: pointer;
}
#app .nb-more:hover { color: var(--accent); }
#app .nb-more:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 12px; }
#app .nb-strip.is-fits .nb-more { display: none; }
/* The old Home's index curves, small, from a desktop up (today.js miniCurve).
 * On a phone the strip stays the design's row of numbers. */
#app .nb-curve, #app .nb-cn { display: none; }
@media (min-width: 1100px) {
  #app .nb-item:has(.nb-curve) { min-width: 176px; }
  #app .nb-curve { display: block; width: 100%; height: 40px; margin-top: 8px; }
  #app .nb-svg { display: block; width: 100%; height: 40px; overflow: visible; }
  #app .nb-cn { display: block; font: 500 11px/1.3 var(--tbMono); color: var(--faint); white-space: nowrap; margin-top: 2px; }
}
#app .nb-strip.is-fits .nb-scroll { padding-inline-end: 6px; }

/* ── the insight card ──────────────────────────────────────────────────── */
#app .ic {
  background: var(--surface); color: var(--ink); border-radius: 20px;
  padding: 20px 20px 4px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
  scroll-margin-top: 16px;
}
#app .ic-kicker { display: flex; align-items: center; gap: 8px; font: 600 14px/1.4 var(--tbSans); color: var(--t2); }
#app .ic-kicker i { font-style: normal; color: var(--tbLine); }
#app .ic-time { font: 500 12px/1.4 var(--tbMono); color: var(--faint); }
#app .ic .ic-head { margin: -6px 0 0; font: 700 17px/1.45 var(--tbSans) !important; letter-spacing: 0; text-wrap: balance; color: var(--ink); }
@media (min-width: 1100px) { #app .ic .ic-head { font-size: 21px !important; font-weight: 600 !important; } }
#app .ic-pic { min-width: 0; }
#app .ic-pic.is-tappable { cursor: pointer; }
/* Layout-only wrappers (insightCard): invisible to the column on a phone. */
#app .ic-main, #app .ic-body { display: contents; }
@media (min-width: 1100px) {
  #app .ic-main.is-side {
    display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    column-gap: 32px; align-items: start;
  }
  #app .ic-main.is-side > .ic-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
}
#app .ic-note {
  margin: 0; font: 400 14px/1.65 var(--tbSans); color: var(--t2);
  border-inline-start: 2px solid var(--accent); padding-inline-start: 12px; text-wrap: pretty;
}
#app .ic-block { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--tbLine); padding-top: 14px; }
#app .ic-label { font: 700 12px/1.4 var(--tbSans); color: var(--t2); }
#app .ic-fact p, #app .ic-p { margin: 0; font: 500 17px/1.6 var(--tbSans); color: var(--ink); text-wrap: pretty; }
#app .ic-sub { display: flex; flex-direction: column; gap: 10px; }
#app .ic-sub .ic-label { margin-top: 4px; }
#app .ic-small { margin: 0; font: 400 12px/1.6 var(--tbSans); color: var(--t2); }
#app .ic-toggle {
  align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  padding: 0; margin: 0; background: none; border: 0; cursor: pointer;
  font: 600 14px/1.3 var(--tbSans); color: var(--accent);
}
#app .ic-toggle:hover { text-decoration: underline; text-underline-offset: 4px; }
#app .ic-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
#app .ic-links { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
#app .ic-link {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; margin: 0;
  border: 1px solid var(--tbLine); border-radius: 12px; background: none; cursor: pointer;
  font: 500 12px/1.3 var(--tbSans); color: var(--ink);
}
#app .ic-link:hover { border-color: var(--accent); color: var(--accent); }
/* A glossary word, as the design draws one: underlined in dots, with a
 * circled question mark — a word that answers when pressed. */
#app .ic-links .gl-chip {
  /* The site's chip draws a dotted border too; one dotted line, under the word. */
  border: 0;
  min-height: 44px; display: inline-flex; align-items: center; gap: 5px; padding: 0 6px;
  font: 500 14px/1.3 var(--tbSans); color: var(--ink);
  text-decoration: underline dotted var(--accent) 1.5px; text-underline-offset: 6px;
}
#app .ic-links .gl-chip i {
  width: 18px; height: 18px; border-radius: 9px; border: 1.5px solid var(--accent); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font: 700 11px/1 var(--tbSans);
  vertical-align: middle; text-decoration: none;
}
#app .ic-source, #app .tb-ev {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  font: 500 12px/1.4 var(--tbMono); color: var(--faint);
}
#app .ic-source { border-top: 1px solid var(--tbLine); }
#app .ic-source > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .ic-source svg, #app .tb-ev svg { flex: none; }
#app .tb-ev { min-height: 40px; }
#app .tb-chip {
  align-self: flex-start; display: inline-flex; align-items: center; white-space: nowrap;
  font: 500 12px/1.3 var(--tbSans); color: var(--t2);
  border: 1px solid currentColor; border-radius: 12px; padding: 3px 10px;
}
#app .tb-chip.is-dashed { border-style: dashed; border-color: var(--faint); }
#app .tb-chip.is-est { color: var(--warn); border-style: dashed; }

/* ── the event study ───────────────────────────────────────────────────── */
/* A chart at the width of a desktop card would be as tall as a screen; it
 * keeps a phone's proportions and sits at the start of the card. */
#app .es { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 560px; }
#app .es.is-mini { max-width: none; }
#app .es-plot { position: relative; }
#app .es-y { position: absolute; left: 2px; font: 500 11px/1 var(--tbMono); color: var(--faint);
  background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 1px 2px; border-radius: 3px; }
#app .es-y.is-top { top: 3%; }
#app .es-y.is-bottom { bottom: 3%; }
#app .es-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 12px/1.4 var(--tbSans); color: var(--faint); }
#app .es-key { display: inline-flex; align-items: center; gap: 6px; }
#app .es-key i { display: inline-block; width: 18px; height: 0; border-top: 1px solid var(--faint); }
#app .es-key[data-kind="median"] i { border-top: 1.6px dashed var(--t2); }
#app .es-key[data-kind="now"] i { border-top: 3px solid var(--ink); }
#app .es-key[data-kind="ordinary"] i { border-top: 1.4px solid var(--faint); }
/* The two weeks, named over their halves of the drawing: before and after. */
#app .es-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#app .es-panels > span { display: flex; flex-direction: column; gap: 1px; }
#app .es-panels b { font: 600 12px/1.3 var(--tbSans); color: var(--t2); }
#app .es-panels small { font: 400 11px/1.3 var(--tbSans); color: var(--faint); }
#app .es-wait { position: absolute; left: 59%; top: 53%; font: 500 11px/1.2 var(--tbSans); color: var(--faint); }
#app .es-key[data-kind="band"] i { height: 10px; border: 1px solid color-mix(in srgb, var(--faint) 35%, transparent);
  background: color-mix(in srgb, var(--faint) 16%, transparent); border-radius: 2px; }
/* A chart's time runs left to right in both languages, and its labels are
 * anchored to that: without `direction: ltr` the page's own direction turned
 * every `text-anchor: start` in the drawing into "end", and the scale's
 * labels ran off the left edge. */
#app .es-svg, #app .rr-svg, #app .fh-svg { direction: ltr; }
#app .es-svg { display: block; width: 100%; height: auto; }
#app .es-axis { display: flex; justify-content: space-between; font: 500 11px/1.3 var(--tbMono); color: var(--faint); }
#app .es-axis .es-ev { font-family: var(--tbSans); }
#app .es-caption { margin: 0; font: 400 14px/1.6 var(--tbSans); color: var(--t2); text-wrap: pretty; }


/* ── how unusual ───────────────────────────────────────────────────────── */
#app .rr { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 560px; }
#app .rr-ends { display: flex; justify-content: space-between; font: 500 11px/1.3 var(--tbSans); color: var(--faint); }
#app .rr-svg { display: block; width: 100%; height: auto; }
#app .rr-label { font: 600 17px/1.5 var(--tbSans); color: var(--ink); text-wrap: pretty; }
#app .rr-note { font: 400 12px/1.5 var(--tbSans); color: var(--faint); }

/* ── who bought and who sold ───────────────────────────────────────────── */
#app .fb { display: flex; flex-direction: column; gap: 2px; }
#app .fb-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 64px; gap: 10px; align-items: center; }
#app .fb-row.is-main { min-height: 36px; }
#app .fb-row.is-sub { min-height: 26px; }
#app .fb-row.is-head { align-items: end; padding-bottom: 6px; }
#app .fb-unit { font: 500 11px/1.3 var(--tbSans); color: var(--faint); }
#app .fb-ends { display: flex; justify-content: space-between; font: 500 11px/1.3 var(--tbSans); color: var(--faint); white-space: nowrap; }
#app .fb-l { font: 600 17px/1.3 var(--tbSans); color: var(--ink); }
#app .fb-row.is-sub .fb-l { font: 400 12px/1.3 var(--tbSans); color: var(--t2); padding-inline-start: 10px; }
#app .fb-track { position: relative; display: block; height: 16px; }
#app .fb-row.is-sub .fb-track { height: 8px; }
#app .fb-axis { position: absolute; top: -4px; bottom: -4px; left: 50%; width: 1px; background: var(--faint); }
#app .fb-bar { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--up); }
#app .fb-bar[data-tone="down"] { background: var(--down); }
#app .fb-v { font: 600 17px/1.3 var(--tbMono); color: var(--ink); text-align: left; font-variant-numeric: tabular-nums; }
#app .fb-row.is-sub .fb-v { font-size: 12px; font-weight: 400; color: var(--t2); }
#app .fb-row.is-total { border-top: 1px solid var(--tbLine); margin-top: 6px; padding-top: 10px; }
#app .fb-row.is-total .fb-l { font-size: 12px; }
#app .fb-why { font: 400 12px/1.5 var(--tbSans); color: var(--t2); }
#app .fb-row.is-total .fb-v { font-size: 12px; }

#app .fh { display: flex; flex-direction: column; gap: 4px; }
#app .fh-lane { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: center; }
#app .fh-l { font: 500 12px/1.3 var(--tbSans); color: var(--t2); }
#app .fh-svg { display: block; width: 100%; height: 34px; }
#app .fh-axis { display: flex; justify-content: space-between; gap: 8px; padding-inline-start: 94px;
  font: 500 11px/1.3 var(--tbMono); color: var(--faint); }
#app .fh-axis span:nth-child(2) { font-family: var(--tbSans); text-align: center; }
#app .fh-note { margin: 2px 0 0; font: 400 12px/1.5 var(--tbSans); color: var(--faint); }

/* Both sides: what each group sold to the left of the line and bought to the
 * right, on one scale, the two amounts at the ends and what they come to on
 * the row's own line. Owner, 25 Sep 2026: "show how much Egyptian
 * individuals bought versus sold, the same for institutions". */
#app .tx { display: flex; flex-direction: column; gap: 12px; }
#app .tx-ends { display: flex; justify-content: space-between; padding: 0 72px;
  font: 500 11px/1.3 var(--tbSans); color: var(--faint); }
#app .tx-row { display: flex; flex-direction: column; gap: 6px; }
#app .tx-row + .tx-row.is-lead, #app .tx-row.is-lead + .tx-row { border-top: 1px solid var(--tbLine); padding-top: 12px; }
#app .tx-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
#app .tx-l { font: 600 14px/1.3 var(--tbSans); color: var(--ink); }
#app .tx-row.is-part .tx-l { font-weight: 500; color: var(--t2); }
#app .tx-row.is-lead .tx-l { font-size: 17px; }
#app .tx-net { display: inline-flex; align-items: baseline; gap: 6px; font: 500 12px/1.3 var(--tbSans); color: var(--t2); white-space: nowrap; }
#app .tx-net b { font: 600 14px/1.3 var(--tbMono); font-variant-numeric: tabular-nums; color: var(--ink); }
#app .tx-net[data-tone="up"] .tx-net-w, #app .tx-net[data-tone="up"] b { color: var(--up); }
#app .tx-net[data-tone="down"] .tx-net-w, #app .tx-net[data-tone="down"] b { color: var(--down); }
/* Fixed ends, so the line sits at the same place on every row; wide enough for
 * "9.13 مليار", which is wider than "9.13 bn". */
#app .tx-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 8px; align-items: center; }
#app .tx-v { font: 500 11px/1.2 var(--tbMono); font-variant-numeric: tabular-nums; color: var(--t2); white-space: nowrap; }
#app .tx-v.is-sold { text-align: right; }
#app .tx-v.is-bought { text-align: left; }
#app .tx-track { position: relative; display: block; height: 14px; }
#app .tx-row.is-part .tx-track { height: 10px; }
#app .tx-bar { position: absolute; top: 0; bottom: 0; }
#app .tx-bar.is-sold { background: var(--down); border-radius: 3px 0 0 3px; }
#app .tx-bar.is-bought { background: var(--up); border-radius: 0 3px 3px 0; }
#app .tx-row.is-part .tx-bar { opacity: .7; }
#app .tx-axis { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1px; background: var(--ink); }

/* The same two sides session by session: a dot for bought, a ring for sold,
 * the line between them the difference. */
#app .th { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#app .th-l { font: 500 12px/1.3 var(--tbSans); color: var(--t2); }
#app .th-plot { position: relative; }
#app .th-top { position: absolute; top: 0; left: 0; font: 500 11px/1 var(--tbMono); color: var(--faint); }
#app .th-svg { display: block; width: 100%; height: 92px; }
#app .th-axis { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font: 500 11px/1.3 var(--tbMono); color: var(--faint); }
#app .th-key { display: inline-flex; align-items: center; gap: 5px; font-family: var(--tbSans); }
#app .th-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-start: 6px; }
#app .th-dot.is-bought { background: var(--up); }
#app .th-dot.is-sold { background: var(--surface); border: 1.5px solid var(--down); }
#app .th-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 700px) { #app .th-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── the week and "we checked" ─────────────────────────────────────────── */
#app .wk { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; height: 150px; }
#app .wk-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
#app .wk-plot { flex: 1; width: 100%; position: relative; display: block; }
#app .wk-zero { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--faint); }
#app .wk-bar { position: absolute; left: 22%; right: 22%; border-radius: 3px; background: var(--up); }
#app .wk-bar[data-tone="down"] { background: var(--down); }
#app .wk-v { font: 600 12px/1.3 var(--tbMono); color: var(--ink); }
#app .wk-d { font: 500 12px/1.3 var(--tbSans); color: var(--faint); }
#app .ck { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#app .ck-pane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#app .ck-title { font: 600 12px/1.4 var(--tbSans); color: var(--ink); }
#app .ck-med { font: 500 12px/1.4 var(--tbSans); color: var(--t2); }
#app .ck-med b { font-family: var(--tbMono); color: var(--ink); }

/* ── what is next ──────────────────────────────────────────────────────── */
#app .tb-next { background: var(--surface); border-radius: 20px; padding: 18px 20px 6px; }
#app .tb-next h2, #app .wr-head h2 { margin: 0 0 4px; font: 700 21px/1.4 var(--tbSans) !important; letter-spacing: 0; color: var(--ink); }
#app .cr-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--tbLine); }
#app .cr-row:first-child { border-top-color: transparent; }
#app .cr-date { display: flex; flex-direction: column; align-items: center; }
#app .cr-date > span { font: 500 12px/1.3 var(--tbSans); color: var(--faint); }
#app .cr-date > span:last-child { font-size: 11px; }
#app .cr-date strong { font: 600 21px/1.2 var(--tbMono); color: var(--ink); }
#app .cr-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
#app .cr-text { font: 600 17px/1.5 var(--tbSans); color: var(--ink); text-align: start; }
#app button.cr-text { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
#app button.cr-text:hover { color: var(--accent); }

/* ── the reader's companies ────────────────────────────────────────────── */
#app .wr { background: var(--surface); border-radius: 20px; padding: 18px 20px 6px; }
#app .wr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
#app .wr-lead { font: 500 12px/1.4 var(--tbSans); color: var(--faint); }
#app .wr-list { display: flex; flex-direction: column; }
#app .wr-row {
  display: flex; flex-direction: column; gap: 10px; width: 100%; margin: 0; padding: 16px 0;
  background: none; border: 0; border-top: 1px solid var(--tbLine); border-radius: 0;
  text-align: start; color: var(--ink); cursor: pointer; font: inherit;
}
#app .wr-row:first-child { border-top-color: transparent; }
#app .wr-row:hover .wr-name { color: var(--accent); }
#app .wr-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
#app .wr-top { display: grid; grid-template-columns: minmax(0, 1fr) 72px 84px; gap: 14px; align-items: center; }
#app .wr-id { display: flex; flex-direction: column; min-width: 0; }
/* Real names are long — «أوراسكوم كونستراكشون» — and the design's were
 * «شركة أ». Two lines before an ellipsis, so a reader can tell two companies
 * with the same first word apart. */
#app .wr-name { font: 600 17px/1.35 var(--tbSans); color: var(--ink); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#app .wr-sub { font: 500 12px/1.4 var(--tbMono); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .wr-sp { display: flex; justify-content: center; }
#app .wr-spark { display: block; overflow: visible; }
#app .wr-nospark { display: block; width: 72px; height: 1px; border-top: 1px dashed var(--tbLine); }
#app .wr-px { display: flex; flex-direction: column; align-items: flex-start; }
#app .wr-close { font: 600 17px/1.3 var(--tbMono); color: var(--ink); font-variant-numeric: tabular-nums; }
#app .wr-pct { font: 500 12px/1.3 var(--tbMono); font-variant-numeric: tabular-nums; }
#app .wr-change { display: flex; flex-direction: column; padding-inline-start: 18px; }
#app .wr-what { font: 700 12px/1.4 var(--tbSans); color: var(--faint); }
#app .wr-text { font: 500 14px/1.6 var(--tbSans); color: var(--ink); text-wrap: pretty; }
#app .wr-change .tb-ev { min-height: 32px; }
#app .wr-more {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 0 0 6px; padding: 0;
  background: none; border: 0; cursor: pointer; font: 600 14px/1.3 var(--tbSans); color: var(--accent);
}
/* Between a phone's list and the old grid of tall cards: on a tablet or a
 * narrow desktop, with no side column, the same rows two to a line. */
@media (min-width: 700px) and (max-width: 1099px) {
  #app .wr-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  #app .wr-row:nth-child(2) { border-top-color: transparent; }
}
/* The offer list for a reader who follows nothing, in the side column. */
@media (min-width: 1100px) {
  #app .tb-watch .home-watch-empty .home-watch-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ── the glossary sheet (the design's 10b and 10c) ─────────────────────────
 *
 * A sheet from the bottom of a phone, a card in the middle of a desktop.
 * A word opened from a card shows that word alone — its plain sentence,
 * where today's brief uses it, the words it leans on — with the list one
 * search away. The shell (`aix-dialog`) is the site's; what is here is the
 * sheet's own shape. */
#app dialog.gl-sheet { width: min(560px, calc(100% - 32px)); max-height: 88dvh; margin: auto; overflow: visible; }
/* The sheet takes focus when it opens, so a keyboard reader lands inside it;
 * its own edge is not a control, and the ring there read as a stray border. */
#app dialog.gl-sheet:focus, #app dialog.gl-sheet:focus-visible { outline: none; }
#app .gl-sheet .gl-card {
  width: 100%; max-width: none; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink); border-radius: 20px; padding: 10px 20px 0; gap: 14px;
  display: flex; flex-direction: column;
}
@media (max-width: 600px) {
  #app dialog.gl-sheet { width: 100%; max-width: 100%; margin: auto 0 0; }
  #app .gl-sheet .gl-card { border-radius: 20px 20px 0 0; max-height: 90dvh; }
}
#app .gl-grip { align-self: center; flex: none; width: 40px; height: 5px; border-radius: 3px; background: var(--tbLine); }
#app .gl-bar { display: flex; gap: 8px; align-items: center; position: sticky; top: -10px; z-index: 1;
  background: var(--surface); padding-block: 6px; }
#app .gl-sheet .gl-search {
  flex: 1; min-width: 0; height: 48px; min-height: 48px; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--tbLine); border-radius: 12px;
  font: 400 17px/1.3 var(--tbSans); color: var(--ink);
}
#app .gl-sheet .gl-close {
  flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: none; color: var(--ink); cursor: pointer;
}
#app .gl-sheet .gl-close:hover { background: var(--tbSf2); }
#app .gl-name { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
#app .gl-kicker { font: 700 12px/1.4 var(--tbSans); color: var(--faint); }
#app .gl-sheet h2.gl-term { margin: 0; font: 700 26px/1.3 var(--tbSans) !important; letter-spacing: 0; color: var(--ink); }
#app .gl-sheet .gl-name .gl-other { align-self: flex-end; font: 500 12px/1.3 'IBM Plex Sans', sans-serif; color: var(--faint); }
#app .gl-def { margin: 0; font: 500 17px/1.75 var(--tbSans); color: var(--ink); text-wrap: pretty; }
#app .gl-usage { display: flex; flex-direction: column; background: var(--bg); border-radius: 12px; padding: 12px 14px 0; }
#app .gl-usage-label { font: 700 12px/1.4 var(--tbSans); color: var(--faint); }
#app .gl-usage p { margin: 2px 0 0; font: 500 17px/1.6 var(--tbSans); color: var(--ink); }
#app .gl-usage-ev { min-height: 44px; display: flex; align-items: center; font: 500 12px/1.4 var(--tbMono); color: var(--faint); }
#app .gl-need { display: flex; flex-direction: column; gap: 4px; }
#app .gl-need-label { font: 700 12px/1.4 var(--tbSans); color: var(--t2); }
#app .gl-need-list { display: flex; flex-wrap: wrap; gap: 4px 12px; }
#app .gl-need-word {
  min-height: 44px; display: inline-flex; align-items: center; gap: 5px; padding: 0; margin: 0;
  background: none; border: 0; cursor: pointer; font: 500 17px/1.3 var(--tbSans); color: var(--ink);
  text-decoration: underline dotted var(--accent) 1.5px; text-underline-offset: 6px;
}
#app .gl-need-word i {
  width: 18px; height: 18px; border-radius: 9px; border: 1.5px solid var(--accent); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font: 700 11px/1 var(--tbSans); font-style: normal;
}
#app .gl-all { align-self: flex-start; min-height: 44px; padding: 0; margin: 0; background: none; border: 0;
  cursor: pointer; font: 600 14px/1.3 var(--tbSans); color: var(--accent); }
#app .gl-back {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px;
  margin: 0; padding: 0; background: none; border: 0; border-top: 1px solid var(--tbLine);
  font: 600 17px/1.3 var(--tbSans); color: var(--accent); cursor: pointer; text-align: start;
}
#app .gl-sheet h2.gl-list-title { margin: 4px 0 0; font: 700 21px/1.3 var(--tbSans) !important; letter-spacing: 0; }
#app .gl-sheet .gl-lead { margin: 0; font: 400 14px/1.65 var(--tbSans); color: var(--t2); }
#app .gl-sheet .gl-body { overflow: visible; margin: 0; padding: 0; }
#app .gl-sheet .gl-foot { margin: 0; padding: 10px 0 14px; border-top: 1px solid var(--tbLine); font: 400 12px/1.6 var(--tbSans); color: var(--faint); }

/* ── the watchlist screen (the design's 06a) ──────────────────────────────
 *
 * The same row as the brief's list, with the reader's star kept on it: this
 * is where the list is edited. One list in a card on a phone; two to a line
 * from a tablet up. */
#app .wl-rows { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface);
  border-radius: 20px; padding: 6px 20px; }
#app .wl-row { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-top: 1px solid var(--tbLine); min-width: 0; }
#app .wl-row:first-child { border-top-color: transparent; }
#app .wl-top { display: grid; grid-template-columns: minmax(0, 1fr) 72px 84px 32px; gap: 12px; align-items: center; }
#app .wl-id { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; margin: 0; padding: 0;
  background: none; border: 0; cursor: pointer; text-align: start; color: var(--ink); font: inherit; }
#app .wl-id:hover .wl-name { color: var(--accent); }
#app .wl-name { font: 600 17px/1.35 var(--tbSans); color: var(--ink); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#app .wl-sub { font: 500 12px/1.4 var(--tbMono); color: var(--faint); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .wl-sp { display: flex; justify-content: center; }
#app .wl-px { display: flex; flex-direction: column; align-items: flex-start; }
#app .wl-close { font: 600 17px/1.3 var(--tbMono); color: var(--ink); font-variant-numeric: tabular-nums; }
#app .wl-pct { font: 500 12px/1.3 var(--tbMono); font-variant-numeric: tabular-nums; }
#app .wl-star { width: 32px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  margin: 0; padding: 0; background: none; border: 0; cursor: pointer; font: 400 17px/1 var(--tbSans); }
#app .wl-star:hover { color: var(--accent) !important; }
#app .wl-change { display: flex; flex-direction: column; padding-inline-start: 18px; }
#app .wl-what { font: 700 12px/1.4 var(--tbSans); color: var(--faint); }
#app .wl-text { font: 500 14px/1.6 var(--tbSans); color: var(--ink); text-wrap: pretty; }
#app .wl-ev { min-height: 32px; }
@media (min-width: 900px) {
  #app .wl-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
  #app .wl-row:nth-child(2) { border-top-color: transparent; }
}

/* ── connect your assistant (v2 design, 10a) ────────────────────────────
 *
 * One column on a phone, as drawn. From a tablet up the setup (status,
 * choice, link and steps) sits beside what the assistant can see, so the
 * promise is in view while the reader follows the steps. */
#app .cn { display: flex; flex-direction: column; gap: 16px; max-width: 1080px; }
#app .cn-head { display: flex; flex-direction: column; gap: 8px; padding: 6px 8px 0; }
#app .cn-head h1 { margin: 0; font: 700 26px/1.3 var(--tbSans); color: var(--ink); text-wrap: balance; }
#app .cn-head p { margin: 0; font: 400 17px/1.7 var(--tbSans); color: var(--t2); max-width: 62ch; text-wrap: pretty; }
#app .cn-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
#app .cn-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#app .cn-card { background: var(--surface); border-radius: 20px; padding: 18px 20px; display: flex;
  flex-direction: column; gap: 12px; min-width: 0; }
#app .cn-status { gap: 8px; }
#app .cn-on { display: flex; align-items: center; gap: 10px; font: 600 17px/1.4 var(--tbSans); color: var(--ink); }
#app .cn-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--up); flex: none; }
#app .cn-on.is-off .cn-dot { background: transparent; border: 1.5px solid var(--faint); }
#app .cn-muted { font: 500 14px/1.6 var(--tbSans); color: var(--t2); }
#app .cn-host { font-family: var(--tbMono); font-size: 12px; color: var(--faint); }
#app .cn-btn { align-self: flex-start; min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--tbLine); background: none; color: var(--ink); font: 600 14px var(--tbSans); cursor: pointer; }
#app .cn-danger { border-color: var(--down); color: var(--down); }
#app .cn-btn:disabled { opacity: .6; cursor: default; }
#app .cn-h2 { margin: 8px 0 0; font: 700 17px/1.4 var(--tbSans); color: var(--ink); }
#app .cn-bots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#app .cn-bot { min-height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; border-radius: 20px; border: 1px solid var(--tbLine); background: var(--surface); color: var(--ink);
  cursor: pointer; padding: 8px; font: inherit; }
#app .cn-bot.is-on { border: 2px solid var(--accent); }
#app .cn-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--tbSf2); display: flex;
  align-items: center; justify-content: center; font: 600 14px var(--tbMono); }
#app .cn-name { font: 600 14px/1.3 var(--tbSans); text-align: center; }
#app .cn-label { font: 700 14px/1.4 var(--tbSans); color: var(--t2); }
#app .cn-sep { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--tbLine); }
#app .cn-link { display: flex; gap: 8px; align-items: center; }
#app .cn-url { flex: 1; min-width: 0; height: 52px; display: flex; align-items: center; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--tbLine); border-radius: 12px; font: 600 17px var(--tbMono);
  color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
#app .cn-copy { height: 52px; min-width: 84px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 14px; border-radius: 12px; border: 0; background: var(--accent); color: var(--surface);
  font: 600 14px var(--tbSans); cursor: pointer; }
#app .cn-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
#app .cn-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: flex-start;
  font: 400 17px/1.6 var(--tbSans); color: var(--ink); }
#app .cn-n { width: 28px; height: 28px; border-radius: 14px; border: 1.5px solid var(--t2); display: flex;
  align-items: center; justify-content: center; font: 600 14px var(--tbMono); color: var(--ink); }
#app .cn-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
#app .cn-list li { min-height: 44px; display: flex; align-items: center; gap: 10px; font: 500 17px/1.4 var(--tbSans); color: var(--ink); }
#app .cn-list svg { flex: none; }
#app .cn-limits p { margin: 0; font: 400 14px/1.6 var(--tbSans); color: var(--ink); }
#app .cn-used { font-family: var(--tbMono) !important; }
#app .cn-rules { margin: 0; font: 400 14px/1.6 var(--tbSans); color: var(--faint); max-width: 62ch; }
#app .cn button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (min-width: 900px) {
  #app .cn-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}

/* ── the month record (today.js monthsCard) ─────────────────────────────
 * Charts run left to right in both languages: a fall sits left of zero. */
#app .ys { display: flex; flex-direction: column; gap: 8px; max-width: 560px; width: 100%; }
#app .ys-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: center; }
#app .ys-name { font: 600 12px/1.3 var(--tbSans); color: var(--t2); }
#app .ys-plot { position: relative; height: 28px; border-bottom: 1px solid var(--tbLine); }
#app .ys-zero { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--faint); }
#app .ys-med { position: absolute; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
#app .ys-dot { position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--faint);
  box-shadow: 0 0 0 1.5px var(--surface); }
#app .ys-dot[data-tone="up"] { background: var(--up); }
#app .ys-dot[data-tone="down"] { background: var(--down); }
#app .ys-axisrow { align-items: start; }
#app .ys-axis { position: relative; height: 16px; font: 500 11px/1.3 var(--tbMono); color: var(--faint); }
#app .ys-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
#app .ys-axis span.is-lo { transform: none; }
#app .ys-axis span.is-hi { transform: translateX(-100%); }
#app .ys-cap { margin: 2px 0 0; font: 400 12px/1.5 var(--tbSans); color: var(--faint); }

#app .mg { display: flex; flex-direction: column; gap: 2px; max-width: 560px; }
#app .mg-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 5px 8px; border-radius: 10px; border: 1px solid transparent; }
#app .mg-headrow { padding-block: 0 4px; }
#app .mg-col { font: 600 11px/1.3 var(--tbSans); color: var(--faint); }
#app .mg-row.is-lit { background: var(--tbAccSoft); }
#app .mg-row.is-now { border-color: var(--tbLine); border-style: dashed; }
#app .mg-m { font: 600 12px/1.3 var(--tbSans); color: var(--ink); }
#app .mg-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; min-width: 0; }
#app .mg-track { position: relative; height: 8px; background: var(--tbSf2); border-radius: 4px; overflow: hidden; }
#app .mg-bar { position: absolute; top: 0; bottom: 0; }
#app .mg-bar[data-tone="up"] { background: var(--up); }
#app .mg-bar[data-tone="down"] { background: var(--down); }
#app .mg-v { font: 600 12px/1.3 var(--tbMono); color: var(--ink); font-variant-numeric: tabular-nums; min-width: 44px; text-align: end; }
#app .mg-n { font: 500 11px/1.3 var(--tbMono); color: var(--faint); font-variant-numeric: tabular-nums; min-width: 34px; }
#app .mg-cap { margin: 6px 0 0; font: 400 12px/1.5 var(--tbSans); color: var(--faint); }
@media (max-width: 420px) {
  #app .mg-row { grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding-inline: 4px; }
  #app .mg-n { display: none; }
}

#app .rb { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
#app .rb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 160px) 48px; gap: 10px; align-items: center; }
#app .rb-l { font: 500 14px/1.4 var(--tbSans); color: var(--ink); }
#app .rb-row[data-kind="usual"] .rb-l { color: var(--t2); }
#app .rb-track { position: relative; height: 10px; background: var(--tbSf2); border-radius: 5px; }
#app .rb-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
#app .rb-row[data-kind="usual"] .rb-bar { background: var(--faint); }
#app .rb-one { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); }
#app .rb-v { font: 600 12px/1.3 var(--tbMono); color: var(--ink); text-align: end; font-variant-numeric: tabular-nums; }
#app .rb-cap { margin: 0; font: 400 12px/1.5 var(--tbSans); color: var(--faint); }
#app .mo-basis { font-size: 12px; color: var(--faint); }
#app .mo-pic { display: flex; flex-direction: column; gap: 14px; width: 100%; }
#app .mo-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 560px; }
#app .mo-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--tbSf2); }
#app .mo-stat-l { font: 600 12px/1.3 var(--tbSans); color: var(--t2); }
#app .mo-stat-v { font: 500 17px/1.2 var(--tbMono); color: var(--t2); }
#app .mo-stat-v b { font: 600 32px/1.1 var(--tbMono); color: var(--ink); }
#app .mo-stat-s { font: 500 12px/1.4 var(--tbSans); color: var(--t2); }
#app .ic-detail .mo-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--tbLine); }
#app .ic-detail .mo-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
#app .mo-h { margin: 0; font: 700 14px/1.4 var(--tbSans); color: var(--ink); }
#app .mo-line { margin: 0; font: 400 14px/1.6 var(--tbSans); color: var(--t2); max-width: 62ch; }
#app .mo-ribbons { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
#app .mo-rib { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: start; }
#app .mo-rib-l { font: 600 12px/1.3 var(--tbSans); color: var(--t2); padding-top: 3px; }
#app .yr { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#app .yr-cells { display: grid; gap: 3px; max-width: 470px; }
#app .yr-c { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--tbSf2); }
#app .yr-c[data-tone="up"] { background: var(--up); }
#app .yr-c[data-tone="down"] { background: var(--down); }
#app .yr-ends { display: flex; justify-content: space-between; max-width: 470px; font: 500 11px/1.3 var(--tbMono); color: var(--faint); }
#app .cb { display: flex; flex-direction: column; gap: 5px; max-width: 560px; }
#app .cb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
#app .cb-l { font: 500 14px/1.45 var(--tbSans); color: var(--ink); }
#app .cb-n { font: 500 12px/1.3 var(--tbMono); color: var(--t2); white-space: nowrap; }
#app .cb-n b { font: 600 17px/1.2 var(--tbMono); color: var(--ink); }
#app .cb-track { position: relative; height: 10px; border-radius: 5px; background: var(--tbSf2); }
#app .cb-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
#app .cb[data-tone="up"] .cb-fill { background: var(--up); }
#app .cb[data-tone="down"] .cb-fill { background: var(--down); }
#app .cb-ref { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
#app .cb-refl { position: relative; height: 14px; font: 500 11px/1.2 var(--tbMono); color: var(--t2); }
#app .cb-refl span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
#app .mo-evs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
#app .mo-ev { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px;
  border-radius: 14px; background: var(--tbSf2); }
#app .mo-ev-d { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
#app .mo-ev-d small { font: 500 11px var(--tbSans); color: var(--t2); }
#app .mo-ev-d b { font: 600 26px/1.1 var(--tbMono); color: var(--ink); }
#app .mo-ev-d span { font: 500 12px var(--tbSans); color: var(--t2); }
#app .mo-ev-t { display: flex; flex-direction: column; gap: 2px; font: 400 14px/1.55 var(--tbSans); color: var(--t2); }
#app .mo-ev-t b { font: 600 14px/1.4 var(--tbSans); color: var(--ink); }
#app .mo-words { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--tbLine); }
#app .mo-words > summary { cursor: pointer; font: 600 14px/1.4 var(--tbSans); color: var(--accent); min-height: 32px; display: flex; align-items: center; }
#app .mo-words .ic-fact p { font-size: 14px; }
@media (min-width: 700px) { #app .mo-evs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── the quick guide (guide.js) ─────────────────────────────────────────
 * The one block here that is not under #app: the guide hangs off <body>,
 * because the app replaces everything inside #app on each render. It sits
 * above everything, the bottom bar included. The shade takes the clicks so
 * the page underneath is not pressed by accident; on a step that points at
 * something, the ring's own shadow does the dimming and the shade is clear. */
body > .qg { position: fixed; inset: 0; z-index: 10000;
  --tbSans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
  --tbMono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, monospace; }
body > .qg .qg-shade { position: absolute; inset: 0; background: transparent; }
body > .qg.is-free .qg-shade { background: rgba(8, 18, 28, .55); }
body > .qg .qg-ring { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(8, 18, 28, .55);
  outline: 2px solid var(--accent); outline-offset: 0; pointer-events: none;
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
body > .qg .qg-card { position: fixed; background: var(--surface); color: var(--ink); border-radius: 20px;
  padding: 16px 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .28); display: flex; flex-direction: column; gap: 10px;
  max-width: 420px; font-family: var(--tbSans); }
body > .qg.is-free .qg-card { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); }
body > .qg .qg-head { display: flex; justify-content: space-between; align-items: center; }
body > .qg .qg-count { font: 500 12px/1.3 var(--tbMono); color: var(--faint); }
body > .qg .qg-skip { background: none; border: 0; color: var(--t2); font: 600 14px var(--tbSans); min-height: 32px; padding: 0 4px; cursor: pointer; }
body > .qg .qg-card h2 { margin: 0; font: 700 21px/1.35 var(--tbSans); color: var(--ink); text-wrap: balance; }
body > .qg .qg-card p { margin: 0; font: 400 17px/1.6 var(--tbSans); color: var(--t2); text-wrap: pretty; }
body > .qg .qg-dots { display: flex; gap: 6px; }
body > .qg .qg-dots i { display: block; width: 6px; height: 6px; border-radius: 3px; background: var(--tbLine); }
body > .qg .qg-dots i.is-on { width: 18px; background: var(--accent); }
body > .qg .qg-row { display: flex; gap: 10px; justify-content: flex-end; }
body > .qg .qg-back, body > .qg .qg-next { min-height: 44px; padding: 0 18px; border-radius: 12px; font: 600 14px var(--tbSans); cursor: pointer; }
body > .qg .qg-back { background: none; border: 1px solid var(--tbLine); color: var(--ink); }
body > .qg .qg-next { background: var(--accent); border: 0; color: var(--surface); }
body > .qg button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#app .tb-guide { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 12px;
  border: 1px dashed var(--tbLine); background: none; color: var(--t2); font: 500 12px var(--tbSans); cursor: pointer; }
#app .tb-guide:hover { color: var(--accent); border-color: var(--accent); }
#app .journal-ask .tb-guide { margin-inline-start: 8px; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { body > .qg .qg-ring { transition: none; } }

/* ── a reading (v2 design «قراءة») ─────────────────────────────────────── */
#app .ic-reading { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px;
  background: var(--tbAccSoft); border: 1px dashed var(--accent); max-width: 62ch; }
#app .ic-rd-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#app .ic-rd-tag { font: 700 12px/1.4 var(--tbSans); color: var(--surface); background: var(--accent); border-radius: 8px; padding: 1px 8px; }
#app .ic-rd-what { font: 500 12px/1.5 var(--tbSans); color: var(--t2); }
#app .ic-rd-t { margin: 2px 0 0; font: 600 17px/1.5 var(--tbSans); color: var(--ink); text-wrap: pretty; }
#app .ic-rd-p { margin: 0; font: 400 14px/1.6 var(--tbSans); color: var(--t2); }
#app .ic-rd-p b { color: var(--ink); font-weight: 600; }

/* ── the company page's checks (checks.js; v2 design 07) ────────────────── */
#app .ck2 { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border-radius: 20px; padding: 18px 20px; }
#app .ck2-head { display: flex; flex-direction: column; gap: 8px; }
#app .ck2-head h2 { margin: 0; font: 700 21px/1.35 var(--tbSans); color: var(--ink); }
#app .ck2-head p { margin: 0; font: 400 14px/1.6 var(--tbSans); color: var(--t2); max-width: 62ch; }
#app .ck2-tally { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#app .ck2-when { font: 500 12px/1.4 var(--tbMono); color: var(--faint); }
#app .ck2-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
#app .ck2-row { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--tbLine); min-width: 0; }
#app .ck2-row:first-child { border-top-color: transparent; }
#app .ck2-top { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
#app .ck2-n { width: 26px; height: 26px; border-radius: 13px; border: 1.5px solid var(--tbLine); display: flex; align-items: center;
  justify-content: center; font: 600 12px var(--tbMono); color: var(--t2); }
#app .ck2-q { font: 600 17px/1.4 var(--tbSans); color: var(--ink); }
#app .ck2-chip { font: 600 12px/1.4 var(--tbSans); border-radius: 10px; padding: 2px 10px; white-space: nowrap;
  background: var(--tbSf2); color: var(--t2); }
#app .ck2-chip[data-status="notable"] { background: var(--tbAccSoft); color: var(--accent); }
#app .ck2-chip[data-status="no data"] { background: none; border: 1px dashed var(--tbLine); color: var(--faint); }
#app .ck2-a { margin: 0; font: 400 14px/1.6 var(--tbSans); color: var(--ink); padding-inline-start: 36px; text-wrap: pretty; }
#app .ck2-src { padding-inline-start: 36px; }
#app a.ck2-src { color: var(--t2); text-decoration: underline dotted; }
#app .ck2-sess, #app .ck2-pair, #app .ck2-share { padding-inline-start: 36px; display: flex; flex-direction: column; gap: 4px; max-width: 460px; }
#app .ck2-cells { display: grid; gap: 3px; }
#app .ck2-cells i { display: block; height: 12px; border-radius: 3px; background: var(--tbSf2); }
#app .ck2-cells i.is-on { background: var(--accent); }
#app .ck2-cap { font: 500 12px/1.4 var(--tbSans); color: var(--t2); }
#app .ck2-pr { display: grid; grid-template-columns: minmax(0, 150px) minmax(60px, 1fr) 52px; gap: 10px; align-items: center; }
#app .ck2-pl { font: 500 12px/1.4 var(--tbSans); color: var(--t2); }
#app .ck2-pt { position: relative; height: 10px; border-radius: 5px; background: var(--tbSf2); overflow: hidden; display: block; }
#app .ck2-pt i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
#app .ck2-pr[data-tone="down"] .ck2-pt i { background: var(--down); }
#app .ck2-pr[data-tone="quiet"] .ck2-pt i { background: var(--faint); }
#app .ck2-pv { font: 600 12px/1.3 var(--tbMono); color: var(--ink); text-align: end; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  #app .ck2-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
  #app .ck2-row:nth-child(2) { border-top-color: transparent; }
}

/* ── the flows card's period (today.js flowsCard) ──────────────────────── */
#app .fr-pic { display: flex; flex-direction: column; gap: 12px; width: 100%; }
#app .fr-controls { display: flex; flex-wrap: wrap; gap: 8px; }
#app .fr-seg { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 14px; background: var(--tbSf2);
  max-width: 100%; overflow-x: auto; scrollbar-width: none; }
#app .fr-seg::-webkit-scrollbar { display: none; }
#app .fr-opt { flex: none; min-height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: none;
  color: var(--t2); font: 600 12px var(--tbSans); cursor: pointer; white-space: nowrap; }
#app .fr-opt.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
#app .fr-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Gemini's record (gemini-record.js) — Home's lab card and the workbench ─ */
#app .gm { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--tbLine); }
#app .gm-head { display: flex; flex-direction: column; gap: 6px; }
#app .gm-kicker { font: 700 11px/1.4 var(--tbMono); letter-spacing: .08em; color: var(--accent); }
#app .gm-head h3 { margin: 0; font: 700 21px/1.35 var(--tbSans); color: var(--ink); }
#app .gm-head p { margin: 0; font: 400 14px/1.6 var(--tbSans); color: var(--t2); max-width: 62ch; }
#app .gm-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
#app .gm-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#app .gm-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
#app .gm-when { font: 600 14px/1.4 var(--tbSans); color: var(--ink); }
#app .gm-n { font: 500 14px/1.2 var(--tbMono); color: var(--t2); }
#app .gm-n b { font: 600 26px/1.1 var(--tbMono); color: var(--ink); }
#app .gm-n.is-none { font: 500 12px var(--tbSans); color: var(--faint); }
#app .gm-track { position: relative; height: 10px; border-radius: 5px; background: var(--tbSf2); }
#app .gm-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
#app .gm-ref { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
#app .gm-nights { display: flex; flex-wrap: wrap; gap: 4px; }
#app .gm-night { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: var(--tbSf2); }
#app .gm-night.is-up { background: var(--up); }
#app .gm-night.is-down { background: var(--down); }
#app .gm-night.is-wait { background: none; border: 1.5px dashed var(--faint); }
#app .gm-sub { margin: 0; font: 400 12px/1.5 var(--tbSans); color: var(--t2); }
#app .gm-key { display: flex; flex-wrap: wrap; gap: 14px; font: 500 12px/1.4 var(--tbSans); color: var(--t2); }
#app .gm-key span { display: inline-flex; align-items: center; gap: 6px; }
#app .gm-key .gm-night { width: 12px; height: 12px; }
#app .gm-ref-key { display: inline-block; width: 2px; height: 14px; background: var(--ink); border-radius: 1px; }
#app .gm-note { margin: 0; font: 500 14px/1.6 var(--tbSans); color: var(--ink); max-width: 62ch; }
#app .gm-readings { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--tbLine); }
#app .gm-readings h4 { margin: 0; font: 700 14px/1.4 var(--tbSans); color: var(--ink); }
#app .gm-rd-plot { position: relative; margin: 0 8px; }
#app .gm-rd-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--tbLine); }
#app .gm-rd-dot { position: absolute; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--t2); opacity: .75; }
#app .gm-rd-dot.is-standard { background: var(--accent); opacity: 1; box-shadow: 0 0 0 3px var(--tbAccSoft), 0 0 0 4.5px var(--accent); }
#app .gm-rd-scale { display: flex; justify-content: space-between; margin: 0 8px; font: 500 11px/1.3 var(--tbMono); color: var(--faint); }
@media (min-width: 900px) { #app .gm.is-full .gm-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; } }

/* ── the model lab, on Home (ai-cards.js) ─────────────────────────────────
 * Rewritten 25 Sep 2026 after the owner found "very big white space": a
 * three-column grid built for three tiles held one. Now two pictures share
 * the width — Gemini's record on a soft panel, every model's nights beside
 * it — and on a phone they stack. Nothing here is tinted by result except the
 * squares themselves: green ahead, red behind, dashed waiting, grey not yet
 * running. */
#app .aix-lab {
  background: var(--surface); color: var(--ink); border-radius: 20px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
#app .lb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
#app .lb-dateline { margin: 0; font: 500 12px/1.5 var(--tbMono); color: var(--faint); }
#app .aix-lab .aix-lab-title { margin: -4px 0 0; font: 700 21px/1.4 var(--tbSans) !important; color: var(--ink); text-wrap: balance; }
#app .lb-answer { margin: 0; max-width: 72ch; font: 600 17px/1.6 var(--tbSans); color: var(--ink); text-wrap: pretty; }
#app .lb-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
#app .lb-kicker { margin: 0; font: 700 11px/1.4 var(--tbMono); letter-spacing: .08em; color: var(--accent); }
#app .lb-title { margin: 0; font: 700 17px/1.4 var(--tbSans); color: var(--ink); }
#app .lb-small { margin: 0; font: 400 12px/1.55 var(--tbSans); color: var(--t2); text-wrap: pretty; }

/* Gemini's five: the main test, on its own soft panel. */
#app .lb-gem {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  background: var(--tbAccSoft); border-radius: 16px; padding: 16px;
}
#app .lb-gem-rows { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
#app .lb-gem-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 12px; }
#app .lb-gem-when { font: 600 14px/1.4 var(--tbSans); color: var(--ink); }
#app .lb-gem-count { font: 500 14px/1.2 var(--tbSans); color: var(--t2); white-space: nowrap; }
#app .lb-gem-count b { font: 600 26px/1.1 var(--tbMono); color: var(--ink); }
#app .lb-gem-bar {
  grid-column: 1 / -1; position: relative; height: 10px; border-radius: 5px; background: var(--surface);
}
#app .lb-gem-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
#app .lb-gem-ref { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
#app .lb-gem-sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 12px; font: 400 12px/1.5 var(--tbSans); color: var(--t2); }
#app .lb-gem-vs { white-space: nowrap; }
#app .lb-gem-row.is-waiting { grid-template-columns: minmax(0, 1fr); }
#app .lb-gem-first { font: 600 14px/1.4 var(--tbSans); color: var(--ink); }
#app .lb-gem-key { display: flex; align-items: center; gap: 8px; }
#app .lb-gem-ref-key { flex: none; display: inline-block; width: 2px; height: 14px; background: var(--ink); border-radius: 1px; }

/* Every model, night by night. */
#app .lb-board { --lbName: 96px; --lbCount: 40px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#app .lb-board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#app .lb-pills { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--tbSf2); }
#app .lb-pill {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 600 12px/1.3 var(--tbSans); color: var(--t2); white-space: nowrap;
}
#app .lb-pill:hover { color: var(--ink); }
#app .lb-pill.is-on { background: var(--accent); color: var(--onAccent); }
#app .lb-pill:focus-visible, #app .lb-cta:focus-visible, #app .lb-how:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#app .lb-grid { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#app .lb-group { margin: 8px 0 2px; font: 700 11px/1.4 var(--tbSans); letter-spacing: .04em; color: var(--t2); }
#app .lb-row, #app .lb-axis {
  display: grid; grid-template-columns: var(--lbName) minmax(0, 1fr) var(--lbCount);
  align-items: center; column-gap: 8px; min-width: 0;
}
#app .lb-row { min-height: 24px; padding: 2px 6px; border-radius: 8px; }
#app .lb-row.is-gemini { background: var(--tbAccSoft); padding-block: 6px; }
#app .lb-row.is-gemini .lb-name { font-weight: 700; }
#app .lb-row.is-ref { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--tbLine); border-radius: 0; }
#app .lb-name { min-width: 0; font: 500 12px/1.25 var(--tbSans); color: var(--ink); overflow-wrap: anywhere; }
#app .lb-name small { display: block; font: 600 11px/1.3 var(--tbSans); color: var(--accent); }
#app .lb-row.is-ref .lb-name small { color: var(--faint); }
#app .lb-cells { display: grid; gap: 2px; min-width: 0; }
#app .lb-cell { display: block; height: 14px; border-radius: 3px; background: var(--tbSf2); box-sizing: border-box; }
#app .lb-cell.is-up { background: var(--up); }
#app .lb-cell.is-down { background: var(--down); }
#app .lb-cell.is-wait { background: none; border: 1.5px dashed var(--faint); }
#app .lb-cell.is-none { background: var(--tbSf2); opacity: .7; }
#app .lb-count { font: 500 12px/1.2 var(--tbMono); color: var(--ink); text-align: end; font-variant-numeric: tabular-nums; }
#app .lb-count.is-few { color: var(--faint); }
#app .lb-axis { padding: 0 6px; font: 500 11px/1.3 var(--tbMono); color: var(--faint); }
#app .lb-axis-dates { display: flex; justify-content: space-between; min-width: 0; }
#app .lb-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 12px/1.4 var(--tbSans); color: var(--t2); }
#app .lb-key span { display: inline-flex; align-items: center; gap: 6px; }
#app .lb-key .lb-cell { width: 12px; height: 12px; flex: none; }

/* The foot: the §8 line, the way into the workbench, the method on request. */
#app .lb-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--tbLine);
}
#app .aix-lab .aix-lab-lead { flex: 1 1 320px; margin: 0; font: 400 14px/1.55 var(--tbSans); color: var(--t2); text-wrap: pretty; }
#app .lb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#app .lb-cta {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 12px; cursor: pointer;
  background: var(--accent); color: var(--onAccent); font: 600 14px/1.3 var(--tbSans);
}
#app .lb-cta.is-quiet { background: none; border-color: var(--tbLine); color: var(--ink); }
#app .lb-cta.is-quiet:hover { border-color: var(--accent); color: var(--accent); }
#app .lb-how {
  min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  font: 600 14px/1.3 var(--tbSans); color: var(--accent);
}
#app .lb-how:hover { text-decoration: underline; text-underline-offset: 4px; }
#app .lb-how-text { margin: 0; max-width: 72ch; font: 400 14px/1.65 var(--tbSans); color: var(--t2); text-wrap: pretty; }

@media (max-width: 540px) {
  #app .aix-lab { padding: 18px 16px; }
  #app .lb-gem { padding: 14px; }
  #app .lb-actions { width: 100%; }
  #app .lb-actions .lb-cta { flex: 1; }
}
@media (min-width: 1100px) {
  #app .aix-lab .aix-lab-title { font-size: 26px !important; }
  #app .lb-body { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 40px; align-items: start; }
  #app .lb-body.is-one { grid-template-columns: minmax(0, 1fr); }
  #app .lb-board { --lbName: 220px; --lbCount: 48px; }
  #app .lb-name { font-size: 14px; }
  #app .lb-cells { gap: 3px; }
  #app .lb-cell { height: 18px; border-radius: 4px; }
}

/* ── the market beside who bought it (today.js flowsCard) ───────────────── */
#app .fr-mkt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 10px 12px;
  border-radius: 12px; background: var(--tbSf2); font: 500 12px/1.4 var(--tbSans); color: var(--t2); }
#app .fr-mkt-l { flex: 1 0 100%; font-weight: 600; color: var(--ink); }
#app .fr-mkt-v b { font: 600 14px/1.2 var(--tbMono); font-variant-numeric: tabular-nums; color: var(--ink); }
#app .fr-mkt-v[data-tone="up"] b { color: var(--up); }
#app .fr-mkt-v[data-tone="down"] b { color: var(--down); }

/* EGX 30 under the Egyptians' sessions (today.js tradeHistory) */
#app .th-ix { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
#app .th-ix-l { font: 500 11px/1.3 var(--tbSans); color: var(--faint); }
#app .th-ix-svg { display: block; width: 100%; height: 30px; }

/* ── every market at once (today.js marketTable, valueHistory) ──────────── */
#app .mt { display: flex; flex-direction: column; gap: 0; }
#app .mt-row { display: grid; grid-template-columns: minmax(92px, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 8px;
  align-items: center; padding: 9px 0; border-top: 1px solid var(--tbLine); }
#app .mt-row.is-head { border-top: 0; padding-top: 0; align-items: end; }
#app .mt-row.is-total { border-top: 1px solid var(--ink); }
#app .mt-unit, #app .mt-h { font: 500 11px/1.3 var(--tbSans); color: var(--faint); }
#app .mt-h { text-align: end; }
#app .mt-m { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#app .mt-m b { font: 600 14px/1.3 var(--tbSans); color: var(--ink); }
#app .mt-m small { font: 400 11px/1.3 var(--tbSans); color: var(--faint); }
#app .mt-v { font: 600 14px/1.2 var(--tbMono); font-variant-numeric: tabular-nums; text-align: end; color: var(--t2); }
#app .mt-v[data-tone="up"] { color: var(--up); }
#app .mt-v[data-tone="down"] { color: var(--down); }
#app .mt-key { margin: 8px 0 0; font: 400 11px/1.4 var(--tbSans); color: var(--faint); }
#app .vh { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#app .vh-svg { display: block; width: 100%; height: 84px; }
#app .vh-key { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font-family: var(--tbSans); }
#app .vh-key > span { display: inline-flex; align-items: center; gap: 5px; }
#app .vh-key i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }

/* ── the sessions before, and which shares rose and fell (breadthMore) ──── */
#app .bm { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--tbLine); }
#app .bm-past { display: flex; flex-direction: column; gap: 8px; }
#app .bm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#app .bm-back { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--tbLine);
  background: var(--surface); color: var(--ink); font: 600 12px var(--tbSans); cursor: pointer; }
#app .bm-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#app .sc { display: flex; flex-direction: column; gap: 4px; }
#app .sc-l { font: 500 11px/1.3 var(--tbSans); color: var(--faint); }
#app .sc-l.is-ix { margin-top: 6px; }
#app .sc-plot { position: relative; display: flex; flex-direction: column; gap: 2px; }
#app .sc-svg { display: block; width: 100%; height: 96px; }
#app .sc-ix { display: block; width: 100%; height: 34px; }
#app .sc-hit { position: absolute; inset: 0; display: flex; }
#app .sc-col { flex: 1 1 0; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 4px; }
#app .sc-col:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
#app .sc-col:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#app .sc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-start: 6px; }
#app .sc-dot.is-up { background: var(--up); }
#app .sc-dot.is-down { background: var(--down); }
#app .sc-read { margin: 2px 0 0; font: 600 12px/1.45 var(--tbSans); color: var(--ink); }
#app .mv { display: flex; flex-direction: column; gap: 10px; }
#app .mv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#app .mv-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 560px) { #app .mv-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
#app .mv-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#app .mv-h { display: flex; align-items: baseline; gap: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--up);
  font: 600 14px/1.3 var(--tbSans); color: var(--ink); }
#app .mv-col[data-tone="down"] .mv-h { border-bottom-color: var(--down); }
#app .mv-h b { font: 600 17px/1.2 var(--tbMono); font-variant-numeric: tabular-nums; }
#app .mv-col[data-tone="up"] .mv-h b { color: var(--up); }
#app .mv-col[data-tone="down"] .mv-h b { color: var(--down); }
#app .mv-h small { font: 400 12px/1.3 var(--tbSans); color: var(--faint); }
#app .mv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
#app .mv-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; width: 100%;
  min-height: 36px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--tbLine); background: none;
  text-align: start; color: inherit; cursor: pointer; }
#app .mv-row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
#app .mv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#app .mv-t { font: 600 12px/1.3 var(--tbMono); color: var(--ink); text-align: start; }
#app .mv-n { font: 400 12px/1.35 var(--tbSans); color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .mv-p { font: 600 14px/1.2 var(--tbMono); font-variant-numeric: tabular-nums; }
#app .mv-p[data-tone="up"] { color: var(--up); }
#app .mv-p[data-tone="down"] { color: var(--down); }
#app .mv-more { align-self: flex-start; min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--tbLine);
  background: var(--surface); color: var(--ink); font: 600 12px var(--tbSans); cursor: pointer; }
#app .mv-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── the Investors screen: every market, and session by session ────────── */
#app .ivc { display: flex; flex-direction: column; gap: 10px; }
#app .ivc-l { font-family: 'IBM Plex Mono', 'IBM Plex Sans Arabic', monospace; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); }
#app .ivc-mix { display: flex; flex-direction: column; gap: 8px; }
#app .ivc-mix-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--sunk); }
#app .ivc-mix-bar > span { display: block; height: 100%; }
#app .ivc-rows { display: flex; flex-direction: column; }
#app .ivc-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--rule2); }
#app .ivc-row.is-total { border-top: 1px solid var(--ink); }
@media (min-width: 700px) { #app .ivc-row { grid-template-columns: minmax(120px, 170px) minmax(0, 1fr); align-items: center; } }
#app .ivc-m { display: flex; flex-direction: column; gap: 2px; }
#app .ivc-m b { font-size: 14px; font-weight: 600; color: var(--ink); }
#app .ivc-m small { font-size: 12px; color: var(--faint); }
#app .ivc-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
#app .ivc-cell { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--t2); min-width: 0; }
#app .ivc-party { font-size: 12px; font-weight: 600; color: var(--ink); }
#app .ivc-cell b { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; color: var(--ink); }
#app .ivc-cell b[data-tone="up"] { color: var(--up); }
#app .ivc-cell b[data-tone="down"] { color: var(--down); }
#app .ivp { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
#app .ivp-scroll { overflow-x: auto; }
#app .ivp-t { width: 100%; border-collapse: collapse; font-size: 12px; }
#app .ivp-t th, #app .ivp-t td { padding: 8px 8px; border-bottom: 1px solid var(--rule2); white-space: nowrap; }
#app .ivp-t thead th { font-family: 'IBM Plex Mono', 'IBM Plex Sans Arabic', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--faint); text-align: end; }
#app .ivp-t thead th:first-child, #app .ivp-t tbody th { text-align: start; }
#app .ivp-t tbody th { font-weight: 600; color: var(--ink); }
#app .ivp-t td { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; text-align: end; color: var(--t2); }
#app .ivp-t td[data-tone="up"] { color: var(--up); }
#app .ivp-t td[data-tone="down"] { color: var(--down); }
/* A number keeps its own left-to-right direction, so `end` would put it on
   the right while its right-to-left header sits on the left. */
html[dir="rtl"] #app .mt-v, html[dir="rtl"] #app .ivp-t td { text-align: left; }
#app .ivc-side.is-bought b { color: var(--up); }
#app .ivc-side.is-sold b { color: var(--down); }

/* A market nobody traded in the session — said in words, not drawn as three
   empty bars (logic.js investors.quiet). */
#app .inv-quiet { margin: 10px 0 6px; padding: 12px 14px; border-radius: var(--radius-control); background: var(--sunk); color: var(--t2); font-size: 14px; line-height: 1.55; }
/* …and the last session that market did trade in, dated first. */
#app .inv-last { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 8px; }
#app .inv-last-h { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); max-width: 72ch; }

/* ── The Exchange screen: sector indices, dealers' metals, year by year ──
   (exchange-extras.js). One island each, the same frame as the Investors
   screen's; a picture, one line, the rest folded. */
#app .xx-island { border-radius: var(--radius-island); background: var(--surface); border: 1px solid var(--edgeIn);
  box-shadow: var(--sh); padding: 20px 22px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#app .xx-island .island-heading h2 { margin: 0; }
#app .xs, #app .xg, #app .xy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#app .xx-lead { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink); max-width: 72ch; text-wrap: pretty; }
#app .xx-line { margin: 0; font-size: 12px; line-height: 1.55; color: var(--t2); max-width: 72ch; text-wrap: pretty; }
#app .xx-seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
#app .xx-words-body { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; font-size: 14px; line-height: 1.6; color: var(--t2); }
#app .xx-words-body p { margin: 0; max-width: 78ch; }
#app .xx-src { font: 11px/1.5 var(--tbMono); color: var(--faint); }

/* Sectors: one diverging bar each, on one scale. */
#app .xs-list { display: flex; flex-direction: column; gap: 7px; }
#app .xs-row { display: grid; grid-template-columns: minmax(96px, 210px) minmax(0, 1fr) 76px; align-items: center; gap: 10px; }
#app .xs-name { font-size: 14px; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
#app .xs-track { position: relative; height: 14px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
#app .xs-zero { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--faint); opacity: .7; }
#app .xs-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; background: var(--faint); }
#app .xs-bar[data-tone="up"] { background: var(--up); }
#app .xs-bar[data-tone="down"] { background: var(--down); }
#app .xs-v { font: 500 12px/1.2 var(--tbMono); font-variant-numeric: tabular-nums; text-align: end; color: var(--t2); }
#app .xs-v[data-tone="up"] { color: var(--up); }
#app .xs-v[data-tone="down"] { color: var(--down); }
html[dir="rtl"] #app .xs-v { text-align: left; }

/* Gold and silver: a bar per dealer from what it pays to what it asks, the
   world price dashed across all of them; then the band since the board began. */
#app .xg-ladder { display: flex; flex-direction: column; gap: 8px; }
#app .xg-row { display: grid; grid-template-columns: minmax(96px, 170px) minmax(0, 1fr) 64px; align-items: center; gap: 10px; }
#app .xg-worldrow { margin-bottom: -2px; }
#app .xg-name { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
#app .xg-track { position: relative; height: 16px; }
#app .xg-worldrow .xg-track { height: 18px; }
#app .xg-world { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1px dashed var(--faint); }
#app .xg-worldtag { position: absolute; top: 0; white-space: nowrap; font: 11px/1.4 var(--tbMono); color: var(--faint); }
#app .xg-worldtag.is-mid { transform: translateX(-50%); }
#app .xg-worldtag.is-start { transform: translateX(-4px); }
#app .xg-worldtag.is-end { transform: translateX(calc(-100% + 4px)); }
#app .xg-worldtag b { color: var(--t2); font-weight: 600; }
#app .xg-span { position: absolute; top: 6px; height: 4px; border-radius: 2px; background: var(--accent); opacity: .35; }
#app .xg-end { position: absolute; top: 3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; }
#app .xg-end.is-bid { background: var(--surface); border: 2px solid var(--accent); box-sizing: border-box; }
#app .xg-end.is-ask { background: var(--accent); }
#app .xg-v { font: 600 12px/1.2 var(--tbMono); font-variant-numeric: tabular-nums; text-align: end; color: var(--ink); }
html[dir="rtl"] #app .xg-v { text-align: left; }
#app .xg-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--t2); }
#app .xg-key span { display: inline-flex; align-items: center; gap: 6px; }
#app .xg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; }
#app .xg-dot.is-bid { border: 2px solid var(--accent); background: var(--surface); }
#app .xg-dot.is-ask { background: var(--accent); }
#app .xg-hist { display: flex; flex-direction: column; gap: 6px; }
#app .xg-plot { position: relative; padding: 16px 0; }
#app .xg-svg { display: block; width: 100%; height: 132px; }
#app .xg-hi, #app .xg-lo { position: absolute; inset-inline-start: 0; font: 11px/1 var(--tbMono); color: var(--faint); }
#app .xg-hi { top: 0; }
#app .xg-lo { bottom: 0; }
#app .xg-axis { display: flex; justify-content: space-between; font: 11px/1.3 var(--tbMono); color: var(--faint); }
#app .xg-scroll { overflow-x: auto; max-width: 100%; }
#app .xg-t { border-collapse: collapse; font-size: 12px; min-width: 100%; }
#app .xg-t th, #app .xg-t td { padding: 7px 10px; border-bottom: 1px solid var(--tbLine); text-align: start; white-space: nowrap; }
#app .xg-t td { font-family: var(--tbMono); font-variant-numeric: tabular-nums; text-align: end; }
#app .xg-t thead th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
#app .xy-t th[scope="row"] { white-space: normal; min-width: 180px; }
html[dir="rtl"] #app .xg-t td { text-align: left; }

/* Year by year: six small bar charts, oldest year first, drawn left to right
   in both languages like every chart on the site. */
/* Six tiles: three across, two, then one — a count the rows fill, so no tile
   sits alone on a row of its own. */
#app .xy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { #app .xy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { #app .xy-grid { grid-template-columns: minmax(0, 1fr); } }
#app .xy-tile { border-radius: var(--radius-control); background: var(--sunk); padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#app .xy-l { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.35; }
#app .xy-l small { display: block; font-weight: 400; font-size: 11px; color: var(--faint); margin-top: 2px; }
#app .xy-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; align-items: end; }
#app .xy-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
#app .xy-v { font: 500 11px/1.2 var(--tbMono); font-variant-numeric: tabular-nums; color: var(--t2); white-space: nowrap; }
#app .xy-track { position: relative; width: 100%; height: 64px; display: flex; align-items: flex-end; }
#app .xy-bar { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--accent); opacity: .75; }
#app .xy-col.is-partial .xy-bar { opacity: .4; }
#app .xy-y { font: 11px/1.2 var(--tbMono); color: var(--faint); }
@media (max-width: 560px) {
  #app .xx-island { padding: 16px 14px 12px; }
  #app .xs-row, #app .xg-row { grid-template-columns: minmax(0, 1fr) 70px; }
  #app .xs-name, #app .xg-name { grid-column: 1 / -1; }
  #app .xs-track, #app .xg-track { grid-column: 1; }
}

/* This week at the exchange (today.js weekAheadCard): seven days, a dot for
   each date on the record, coloured by what it is. Drawn left to right in
   both languages, like every timeline on the site. */
#app .wa { display: flex; flex-direction: column; gap: 8px; }
#app .wa-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; direction: ltr; }
#app .wa-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 10px;
  border-radius: 10px; background: var(--sunk); min-width: 0; }
#app .wa-day.is-today { outline: 2px solid var(--accent); outline-offset: -2px; }
#app .wa-day.is-empty .wa-d { color: var(--faint); }
#app .wa-dow { font: 11px/1.2 var(--tbMono); color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
#app .wa-d { font: 600 14px/1.2 var(--tbMono); color: var(--ink); }
#app .wa-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 10px; max-width: 100%; }
#app .wa-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
/* Colour and shape both, so the three kinds part without colour vision. */
#app .wa-dot[data-g="meet"] { background: var(--iris); }
#app .wa-dot[data-g="div"] { background: var(--up); }
#app .wa-dot[data-g="rights"] { background: var(--accent); border-radius: 2px; }
#app .wa-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--t2); }
#app .wa-key span { display: inline-flex; align-items: center; gap: 6px; }
#app .wa-list { display: flex; flex-direction: column; gap: 10px; }
#app .wa-group { display: flex; flex-direction: column; gap: 6px; }
#app .wa-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.45; }
#app .wa-tick { font: 600 12px/1.2 var(--tbMono); color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-align: start; }
#app span.wa-tick { color: var(--t2); cursor: default; }
#app .wa-what { color: var(--ink); overflow-wrap: anywhere; }

/* The insiders' card is insider-board.css's, with the screen behind it. */
