/* ===========================================================================
   /symbol/<sym>/ — the research workspace, on the 2026 component system
   ===========================================================================

   What this file is for, and what it deliberately does not do.

   The page is built from `static/css/am-system.css` and the canvas
   primitives: `.am-panel` (+ `--feature` / `--quiet`), `.am-section-head`,
   `.am-seg`, `.am-table`, `.am-chart`, `.am-chip`, `.am-bar`, `.am-evidence`,
   `.am-state`, `.am-btn`, `.c-disclosure`, `.c-actions`. None of those is
   written here. There is not one `.am-*` or `.c-*` selector in this file, for
   two reasons: `markets/tests/test_canvas_design` fails the build if a page
   sheet writes a rule for a class canvas-2026.css owns, and a component that
   is re-styled per route stops being a component. What is here is this page's
   own objects — the instrument hero, the mode strip, the chart frame, the
   reading blocks — and the compositions that seat the shared components in
   them.

   ## Why the class names changed

   The old namespace could not be given the approved surface. `.symbol-header`
   / `.sym-head`, `.chart-section`, `.chart-container-large`,
   `.section-title-detail`, `.analysis-section-detail` and `.sym-mode` had
   rules written for them in five stylesheets that all load *after* this one:

     page-unification.css  a panel on `.symbol-header`, under !important
     app-shell.css         a card on `.symbol-header` and
                           `.analysis-section-detail`
     theme-foundation.css  a light-theme accent border and a blue badge,
                           under !important
     reference-2026.css    a grid and a type scale on `.sym-head*`
     workspaces.css        `background: … !important` on `.sym-head`, and a
                           cyan underline tab on `.sym-mode.is-active` —
                           and this is the last stylesheet in the document

   Out-specifying all of that would have meant a five-class selector and an
   `!important` for every declaration on the page, which is not a design
   system, it is a fight. The blocks are renamed instead — `sym-hero`,
   `sym-modes__tab`, `sym-figure`, `sym-block` — so the legacy rules match
   nothing and the component layer is the only thing painting this page.

   Four names are kept exactly as they were because tests and the asset-class
   contract slice the markup by them: `symbol-detail-container` and
   `symbol-title` (each alone in its class attribute), `symbol-type-badge`,
   `sym-modes__strip` (with `role="tablist"` adjacent), `sym-fact__note`,
   `sym-status--*`, `sym-regime--*`, `sym-bias__list`, `chart-loading-fallback`
   and `#tv-chart-detail`.

   ## Two mechanics that decide most of the selectors below

   1. `bundle-shell.css` (canvas-2026 + am-system + the family sheets) loads
      *after* this file, and `bundle-bridge.css` (canvas-bridge + workspaces)
      loads last. So a one-class rule here loses to a one-class rule there.
      Where this sheet has to win it uses two classes, or three under
      `.page-symbol_detail`, and says so.

   2. canvas-bridge.css paints by *substring of the class name*
      (`[class*="-label"]`, `[class*="__value"]`, `[class*="-badge"]`,
      `[class*="--up"]`). Where the value it would impose differs from what a
      block needs, the class is renamed out of its way rather than fought:
      `__state-label` → `__key`, `__value` → `__fig`, `sym-bias__badge` →
      `sym-bias__dir`. One owner per treatment. (The one that mattered: the
      bridge has a rule exempting `.sym-mode.is-active [class*="__label"]`
      from the muted grey, because muted grey on the selected tab's fill
      measured 1.08:1. The tab label is `.sym-modes__name` now, which the
      substring never matches, so the exemption is not needed.)

   Sizes: 12px label floor everywhere, 44px targets at 767px and below,
   tabular figures opted in per surface, logical properties throughout — there
   is no RTL block for layout in this file, only for the glyphs whose meaning
   is directional.
   =========================================================================== */

.symbol-detail-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* One vertical rhythm for the whole page body: every panel is a child of a
   mode panel, and the gap between them is stated once instead of as a
   margin-bottom on each block. */
.sym-panel-body {
    display: grid;
    gap: clamp(1rem, 1.6vw, 1.5rem);
    align-content: start;
}

.sym-panel-body[hidden] { display: none; }


/* ===========================================================================
   1–2. The instrument hero: identity, state, and the price
   ===========================================================================

   The page used to publish two prices for one asset, 800px apart, from two
   sources, formatted differently. One price, one place; that part is settled
   in the template. What this block decides is that the price is the largest
   thing on the page and that everything else in the hero is visibly
   subordinate to it — the identity line at 1.5rem, the state and the bands in
   the second column at meta size, the actions and the scored record below a
   hairline.

   The grid is the reading order at every width. At ≥900px the second column
   takes the state and the bands so the figure is not crowded; below that the
   areas collapse to one column in the same sequence, which is the brief's
   §4 order: identity → market status and freshness → price → readings →
   context → actions. */
.sym-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
    grid-template-areas:
        "ident  status"
        "quote  facts"
        "read   facts"
        "foot   foot";
    column-gap: clamp(1.5rem, 3vw, 3rem);
    row-gap: 0.75rem;
    align-items: start;
}

/* --- identity ----------------------------------------------------------- */

/* `.symbol-title` keeps its name (the asset-class test slices the page by
   `class="symbol-title"` and reads the labels inside it), so the composition
   rules sit on the class itself. */
.symbol-title {
    grid-area: ident;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.65rem;
    margin: 0;
    min-width: 0;
}

.sym-hero__ticker {
    font-size: clamp(1.25rem, 1.6vw, 1.5rem);
    font-weight: var(--c-w-bold);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--c-text);
}

[dir="rtl"] .sym-hero__ticker { letter-spacing: 0; }

.sym-hero__name {
    font-size: var(--c-t-lead);
    font-weight: var(--c-w-medium);
    line-height: 1.3;
    color: var(--c-text-secondary);
}

.sym-hero__venue {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}

[dir="rtl"] .sym-hero__venue { letter-spacing: 0; text-transform: none; }

/* --- market status and feed health -------------------------------------- */

.sym-hero__status {
    grid-area: status;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    min-width: 0;
}

.sym-hero__state {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
    font-size: var(--c-t-meta);
}

.sym-hero__key {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}

[dir="rtl"] .sym-hero__key { letter-spacing: 0; text-transform: none; }

.sym-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: var(--c-w-semi);
    white-space: nowrap;
}

.sym-status__dot {
    inline-size: 7px;
    block-size: 7px;
    border-radius: var(--c-r-pill);
    background: currentcolor;
    flex: 0 0 auto;
}

/* Colour is never the only carrier: the word beside the dot is the reading,
   and the dot only repeats it. */
.sym-status--open { color: var(--c-up-ink); }
.sym-status--pre,
.sym-status--post { color: var(--c-attention); }
.sym-status--closed,
.sym-status--weekend,
.sym-status--holiday { color: var(--c-text-secondary); }
.sym-status--unknown { color: var(--c-text-muted); }

.sym-fact__note {
    display: block;
    font-size: var(--c-t-label);
    line-height: 1.5;
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}

/* SC 2.5.8: a link on its own line is a control, not a target inside a
   sentence, so the 24px floor applies to it. */
a.sym-fact__note,
.sym-fact__note a {
    display: inline-flex;
    align-items: center;
    min-block-size: 24px;
    padding-block: 0.15rem;
}

/* --- the price ---------------------------------------------------------- */

.sym-hero__quote {
    grid-area: quote;
    min-width: 0;
}

.sym-hero__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0;
}

.sym-hero__figure {
    font-size: clamp(2.5rem, 4.6vw, 3.6rem);
    font-weight: var(--c-w-bold);
    letter-spacing: -0.035em;
    line-height: 1.02;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}

[dir="rtl"] .sym-hero__figure { letter-spacing: 0; }

.sym-hero__price--absent {
    font-size: var(--c-t-h2);
    font-weight: var(--c-w-semi);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--c-text-secondary);
}

/* The unit names the quantity; it is not the quantity. */
.sym-hero__ccy {
    font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
    font-weight: var(--c-w-semi);
    letter-spacing: 0.04em;
    color: var(--c-text-muted);
}

[dir="rtl"] .sym-hero__ccy { letter-spacing: 0; }

.sym-hero__change {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 0;
}

.sym-hero__basis {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-medium);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-text-muted);
}

[dir="rtl"] .sym-hero__basis { letter-spacing: 0; text-transform: none; }

.sym-hero__unit {
    margin: 0.4rem 0 0;
    max-width: 52ch;
    font-size: var(--c-t-meta);
    line-height: 1.5;
    color: var(--c-text-secondary);
}

/* --- readings ----------------------------------------------------------- */

.sym-hero__readings {
    grid-area: read;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 1rem;
    margin: 0.35rem 0 0;
    font-size: var(--c-t-meta);
    color: var(--c-text-secondary);
}

.sym-hero__readings-key {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}

[dir="rtl"] .sym-hero__readings-key { letter-spacing: 0; text-transform: none; }

.sym-hero__reading { white-space: nowrap; }
.sym-hero__reading strong { font-weight: var(--c-w-semi); color: var(--c-text); }

/* Dotted, not solid: this link goes to an explanation of the readings beside
   it rather than to another page, and a solid underline in a row of readings
   reads as one of them. */
.sym-hero__readings-note {
    display: inline-flex;
    align-items: center;
    min-block-size: 24px;
    font-size: var(--c-t-label);
    color: var(--c-text-muted);
    text-decoration: none;
    border-block-end: 1px dotted var(--c-line-strong);
}

.sym-hero__readings-note:hover {
    color: var(--c-evidence);
    border-block-end-color: var(--c-evidence);
}

/* --- range and volatility regime: context, on inset ground -------------- */

/* Two classes: the padding and radius come from `.am-panel--quiet`, which is
   one class in a sheet that loads later, so a one-class rule here would be
   overruled. */
.sym-hero .sym-hero__facts {
    grid-area: facts;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem 1.25rem;
    margin: 0;
    padding: 0.9rem 1.1rem;
    border-radius: var(--c-r-control);
}

.sym-hero__fact { min-width: 0; }

.sym-hero__fact-key {
    margin: 0;
    font-size: var(--c-t-label);
    font-weight: var(--c-w-medium);
    line-height: 1.5;
    color: var(--c-text-muted);
}

.sym-hero__fact-fig {
    margin: 0.2rem 0 0;
    font-size: var(--c-t-meta);
    font-weight: var(--c-w-semi);
    line-height: 1.45;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
    /* A range is one figure with a dash in it; it wraps rather than clips. */
    overflow-wrap: anywhere;
}

.sym-hero__fact-note {
    margin: 0.15rem 0 0;
    font-size: var(--c-t-label);
    line-height: 1.5;
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}

.sym-regime { font-weight: var(--c-w-bold); }
.sym-regime--low { color: var(--c-text-secondary); }
.sym-regime--normal { color: var(--c-text); }
.sym-regime--elevated { color: var(--c-attention); }
.sym-regime--extreme { color: var(--c-down-ink); }

/* --- the footer strip --------------------------------------------------- */

.sym-hero__foot {
    grid-area: foot;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-block-start: 0.35rem;
    padding-block-start: 0.9rem;
    border-block-start: 1px solid var(--c-line);
}

.sym-hero__actions { margin: 0; }

.sym-share[open] { flex-basis: 100%; }

.sym-hero__record {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.65rem;
    margin: 0;
    font-size: var(--c-t-meta);
    color: var(--c-text-secondary);
}

.sym-hero__record-key {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}

[dir="rtl"] .sym-hero__record-key { letter-spacing: 0; text-transform: none; }

.sym-hero__record-pct {
    font-size: var(--c-t-figure-sm);
    font-weight: var(--c-w-figure);
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}

.sym-hero__record-n { color: var(--c-text-muted); }

.sym-hero__record-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-block-size: 24px;
    color: var(--c-evidence);
    font-weight: var(--c-w-semi);
    text-decoration: none;
}

.sym-hero__record-link:hover { text-decoration: underline; }


/* ===========================================================================
   The mode strip (Overview / News / AI Evidence / Prediction History /
   Model Accuracy)
   ===========================================================================

   `.sym-modes__strip` is the shared `.am-seg`: an inset track with a dark
   pill on the segment whose `aria-selected` is true, which means the correct
   ARIA for a tablist is also the styling hook and the two cannot disagree.
   Only the parts am-seg has no opinion about are here.

   Three classes on the wrapper: `workspaces.css` is the last stylesheet in
   the document and gives `.page-symbol_detail .sym-modes` a full-width
   bottom rule and a canvas ground — the underline-tab treatment this strip
   replaces. */
.page-symbol_detail .symbol-detail-container .sym-modes {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

/* Two classes to beat `.am-seg__item`'s own padding, which arrives later. */
.sym-modes__strip .sym-modes__tab {
    gap: 0.45rem;
    min-block-size: 40px;
    padding-inline: 0.9rem;
    font-size: var(--c-t-meta);
}

.sym-modes__icon {
    inline-size: 16px;
    block-size: 16px;
    flex: 0 0 auto;
}

.sym-modes__icon svg { inline-size: 100%; block-size: 100%; }

/* The count inherits the segment's ink, so it is legible on the dark pill
   without a second rule for the selected state. */
.sym-modes__count {
    min-inline-size: 1.4em;
    padding-inline: 0.35rem;
    border-radius: var(--c-r-pill);
    background: color-mix(in srgb, currentcolor 14%, transparent);
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    font-variant-numeric: tabular-nums;
    text-align: center;
}


/* ===========================================================================
   3–4. The chart
   ===========================================================================

   The instrument first, and at a size that makes it the subject. On
   production /symbol/BTC/ at 390px this element began at y=4,830 with the
   page 9,597px long: six screens below eight blocks of narrative before the
   reader reached the instrument the narrative is about. It opens the dossier
   now, in a feature panel, with its range control in its own head.

   The canvas box has a height before anything draws in it. That is not
   cosmetic: a chart sized from its own iframe is a layout shift, and the
   reference redesign measured 0.64 CLS from exactly this element. The size
   and the well are `.am-chart--feature` (am-system.css) now -- the hero-chart
   modifier this page's local `clamp(22rem, 48vh, 38rem)` was promoted into,
   so /accuracy/ and the reports get the same reserved box from the same
   declaration. `.sym-figure__canvas` stays on the element as a hook
   (tools/measure/ux_measure.py selects it to find the chart) and for the
   Tadawul branch below, which is the one thing about this box that is this
   page's. */
.sym-figure { min-width: 0; }

#tv-chart-detail {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
}

#tv-chart-detail iframe {
    inline-size: 100%;
    block-size: 100%;
    border: 0;
    display: block;
}

/* The loading state fills the reserved box.

   `.am-state--panel` is `.am-state.am-state--panel` in am-system.css now, so
   the modifier wins against canvas-bridge's one-class base and the centring,
   the column direction and the 42ch measure come from the component. What is
   still this page's is the fill: `#tv-chart-detail` is absolutely positioned
   inside the reserved box, and the state inside *it* has to take the whole of
   that box rather than the component's 180px floor. An id plus a class says
   that without touching the component. */
#tv-chart-detail > .chart-loading-fallback {
    display: grid;
    place-items: center;
    align-content: center;
    inline-size: 100%;
    block-size: 100%;
    max-inline-size: none;
    min-block-size: 0;
    margin: 0;
    padding: 1.5rem;
    border: 0;
    text-align: center;
}


/* Tadawul: TradingView does not distribute this exchange in embedded charts,
   so the box holds an honest state and sizes to it rather than reserving a
   plot that will never arrive. Three classes, because the height it is
   undoing is `.am-chart--feature .am-chart__canvas` at (0,2,0) from a sheet
   that loads after this one. */
.sym-figure .am-chart__canvas.sym-figure__canvas--external {
    block-size: auto;
    min-block-size: 12rem;
}

/* Three classes plus an id, for the same reason as the loading box above. */
.sym-figure .sym-figure__canvas--external #tv-chart-detail {
    position: static;
    display: grid;
    place-items: center;
    inline-size: 100%;
    block-size: auto;
    max-inline-size: none;
    padding: 1.75rem 1.25rem;
    border: 0;
    text-align: center;
}

.sym-figure .sym-figure__canvas--external #tv-chart-detail.sym-figure__external {
    max-inline-size: none;
}

.sym-figure__ranges { flex: 0 0 auto; }

.sym-figure__caption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.75rem;
    margin: 0;
    font-size: var(--c-t-label);
    line-height: 1.5;
    color: var(--c-text-muted);
}

.sym-figure__caption a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-block-size: 24px;
    color: var(--c-evidence);
    font-weight: var(--c-w-semi);
    text-decoration: none;
}

.sym-figure__caption a:hover { text-decoration: underline; }


/* ===========================================================================
   5–9. The reading blocks
   ===========================================================================

   Market context, model readings, technical signals, verification state and
   related news are one panel each, introduced by an `.am-section-head`. They
   are not a grid of equal cards: the price and the chart are the only two
   things on this page allowed to dominate, and everything below them is a
   sequence of subordinate blocks whose secondary detail is behind a
   disclosure. */
.sym-block { min-width: 0; }

.sym-block > * + * { margin-block-start: 0.85rem; }

.sym-block__sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: var(--c-t-h3);
    font-weight: var(--c-w-semi);
    line-height: 1.35;
    color: var(--c-text);
}

.sym-block__lead {
    margin: 0;
    max-width: 74ch;
    font-size: var(--c-t-meta);
    line-height: 1.6;
    color: var(--c-text-secondary);
}

/* The provenance line every reading family carries: where the figure comes
   from, what window it covers and when it was taken. The page publishes three
   different kinds of reading about one asset, and they are allowed to
   disagree — what they are not allowed to do is arrive in the same voice with
   no source on any of them. */
.sym-block__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.9rem;
    margin: 0;
    max-width: 82ch;
    font-size: var(--c-t-label);
    line-height: 1.6;
    color: var(--c-text-muted);
}

.sym-block__time {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sym-block__note {
    margin: 0;
    max-width: 78ch;
    font-size: var(--c-t-label);
    line-height: 1.6;
    color: var(--c-text-muted);
}

.sym-block__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-block-size: 24px;
    color: var(--c-evidence);
    font-size: var(--c-t-meta);
    font-weight: var(--c-w-semi);
    text-decoration: none;
    white-space: nowrap;
}

.sym-block__link:hover { text-decoration: underline; }

.sym-block__more { margin-block-start: 0.85rem; }

/* --- the definition grid every fact block uses -------------------------- */

.sym-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.85rem 1.5rem;
    margin: 0;
}

.sym-fact { min-width: 0; }

.sym-fact--wide { grid-column: 1 / -1; }

.sym-fact__key {
    margin: 0;
    font-size: var(--c-t-label);
    font-weight: var(--c-w-medium);
    line-height: 1.5;
    color: var(--c-text-muted);
}

.sym-fact__fig {
    margin: 0.2rem 0 0;
    font-size: var(--c-t-meta);
    font-weight: var(--c-w-semi);
    line-height: 1.5;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}

.sym-fact__prose {
    margin: 0.2rem 0 0;
    max-width: 74ch;
    font-size: var(--c-t-meta);
    line-height: 1.6;
    color: var(--c-text-secondary);
}

.dir-bullish { color: var(--c-up-ink); }
.dir-bearish { color: var(--c-down-ink); }
.dir-neutral { color: var(--c-text-muted); }

/* --- 5. market context: the dominant narrative and its events ----------- */

.sym-narrative__head { font-size: var(--c-t-lead); font-weight: var(--c-w-semi); }
.sym-narrative__head a { color: inherit; text-decoration: none; }
.sym-narrative__head a:hover { text-decoration: underline; }

.sym-narrative__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.9rem;
}

/* A dominant narrative that has not moved in a fortnight is a fact about the
   asset and not a fact about today, and the line has to say which before the
   reader has finished the headline. The glyph is the one `.health--stale`
   already uses, so a reader who learned it on the price learns nothing new. */
.sym-narrative__age.is-aged { color: var(--c-attention); }
.sym-narrative__age.is-aged::before { content: "◔ "; }

.sym-narrative__note,
.sym-narrative__impact {
    margin: 0;
    max-width: 74ch;
    font-size: var(--c-t-meta);
    line-height: 1.6;
    color: var(--c-text-secondary);
}

.sym-events {
    display: grid;
    gap: 0.6rem;
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
}

.sym-events__item {
    padding-inline-start: 0.85rem;
    border-inline-start: 2px solid var(--c-line);
}

.sym-events__item a {
    color: var(--c-text);
    font-size: var(--c-t-meta);
    font-weight: var(--c-w-medium);
    line-height: 1.5;
    text-decoration: none;
}

.sym-events__item a:hover { text-decoration: underline; }

.sym-events__meta {
    display: block;
    margin-block-start: 0.15rem;
    font-size: var(--c-t-label);
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}

/* --- 6. model readings: observed bias and agreement --------------------- */

.sym-bias__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.sym-bias__scenario {
    margin: 0.7rem 0 0;
    max-width: 74ch;
    font-size: var(--c-t-body);
    line-height: 1.6;
    color: var(--c-text);
}

.sym-bias > * + * { margin-block-start: 0.85rem; }

.sym-bias__list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* These links sit in a block of prose at the same colour as the text around
   them, so the underline is the only cue there is
   (markets/tests/test_accessibility.py pins exactly this rule). */
.sym-bias__list a {
    color: var(--c-text);
    font-size: var(--c-t-meta);
    line-height: 1.5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sym-bias__source {
    display: block;
    margin-block-start: 0.15rem;
    font-size: var(--c-t-label);
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}

.sym-agreement-block > * + * { margin-block-start: 0.7rem; }

.sym-agreement {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sym-agreement__row {
    display: grid;
    grid-template-columns: minmax(5.5rem, 8rem) minmax(0, 1fr) minmax(4.5rem, auto);
    align-items: center;
    gap: 0.75rem;
}

.sym-agreement__dir {
    font-size: var(--c-t-meta);
    font-weight: var(--c-w-semi);
}

/* Two classes: `.am-bar` caps itself at 160px for a leaderboard cell, and
   here the bar is the comparison and takes the row. */
.sym-agreement .sym-agreement__bar {
    inline-size: 100%;
    margin-block-start: 0;
}

/* The count qualifies the bar; it does not compete with it. */
.sym-agreement__n {
    font-size: var(--c-t-label);
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
    text-align: end;
    white-space: nowrap;
}

.sym-providers {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--c-t-meta);
}

.sym-providers li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding-block: 0.2rem;
}

.sym-providers__name { color: var(--c-text-secondary); }

/* --- 7. technical signals ----------------------------------------------- */

/* Two classes for the padding: `.am-panel--quiet` arrives later and is one
   class. The table inside reaches the well's edges. */
.sym-block .sym-readings {
    padding: 0.35rem 1rem;
    border-radius: var(--c-r-control);
}

.sym-readings__v { font-weight: var(--c-w-semi); }
.sym-readings__v.is-support { color: var(--c-up-ink); }
.sym-readings__v.is-resistance { color: var(--c-down-ink); }
.sym-readings__v.is-strong { color: var(--c-up-ink); }
.sym-readings__v.is-weak { color: var(--c-text-muted); }

.sym-ccy {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-medium);
    color: var(--c-text-muted);
}

.sym-momentum > * + * { margin-block-start: 0.6rem; }

/* The bar that used to be a Fear & Greed gauge. A red-to-amber-to-green
   track with a matching gradient fill is the visual grammar of a market-mood
   index, and readers took this for one; the number is one asset's latest
   stored price change mapped onto 0–100. Same value, same scale, same
   position — an inset track, one neutral fill, and the score stated above its
   own end. `.sentiment-value` has to stay inside `.sentiment-bar` because the
   page's own script reads it from there, so it is placed rather than
   reordered. */
.sym-momentum .sentiment-bar {
    position: relative;
    display: block;
    inline-size: 100%;
    block-size: 10px;
    margin-block-start: 1.6rem;
    border: 1px solid var(--c-line);
    border-radius: var(--c-r-pill);
    background-color: var(--c-inset);
    background-image: none;
    overflow: visible;
}

.sym-momentum .sentiment-fill {
    display: block;
    block-size: 100%;
    border-radius: var(--c-r-pill);
    background-color: var(--c-neutral);
    background-image: none;
}

.sym-momentum .sentiment-value {
    position: absolute;
    inset-block-end: calc(100% + 0.4rem);
    inset-inline-end: 0;
    font-size: var(--c-t-figure-sm);
    font-weight: var(--c-w-figure);
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
    background: none;
    border: 0;
    padding: 0;
}

.sym-momentum__label {
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    font-size: var(--c-t-meta);
    font-weight: var(--c-w-semi);
    color: var(--c-text-secondary);
}

.sym-momentum__absent {
    margin: 0;
    font-size: var(--c-t-meta);
    color: var(--c-text-muted);
}

.sym-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sym-chips__detail { color: var(--c-text-muted); font-weight: var(--c-w-normal); }

/* --- 8. verification state ---------------------------------------------- */

.sym-verify__bar { inline-size: 100%; }
.sym-block .sym-verify__bar { inline-size: 100%; block-size: 8px; }

.sym-stages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sym-stages__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sym-stages__name {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-medium);
    color: var(--c-text-secondary);
}

.sym-stages__count {
    font-size: var(--c-t-figure-sm);
    font-weight: var(--c-w-figure);
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}

/* A stage with nothing in it is not a result. "Verified 262" is the headline
   fact of this panel and "Excluded 0" is not a reading at all; they were
   rendering at one weight. */
.sym-stages__item--verified .sym-stages__name { color: var(--c-text); font-weight: var(--c-w-semi); }
.sym-stages__item--verified .sym-stages__count { color: var(--c-evidence); }
.sym-stages__item.is-empty .sym-stages__name,
.sym-stages__item.is-empty .sym-stages__count {
    color: var(--c-text-faint);
    font-weight: var(--c-w-medium);
}

/* --- 9. related news, on the overview ---------------------------------- */

.sym-newslist {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sym-newslist__item {
    padding-block: 0.7rem;
    border-block-start: 1px solid color-mix(in srgb, var(--c-line) 70%, transparent);
    min-width: 0;
}

.sym-newslist__item:first-child { border-block-start: 0; padding-block-start: 0; }

.sym-newslist__title {
    display: block;
    color: var(--c-text);
    font-size: var(--c-t-body);
    font-weight: var(--c-w-medium);
    line-height: 1.45;
    text-decoration: none;
}

.sym-newslist__title:hover { text-decoration: underline; }

.sym-newslist__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.75rem;
    margin: 0.25rem 0 0;
    font-size: var(--c-t-label);
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}


/* ===========================================================================
   AI evidence
   =========================================================================== */

.sym-evidence__list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sym-evidence__item > * + * { margin-block-start: 0.75rem; }

.sym-evidence__head { border-radius: var(--c-r-control); }

.sym-evidence__summary { gap: 0.6rem 1.25rem; }

/* SC 2.5.8, measured at 390: this summary was 21px and appears eight times on
   one screen of the evidence panel. `min-block-size` rather than a display
   change, because `display: flex` on a summary removes the disclosure marker
   in Chromium and the marker is the only thing that says the row opens. */
.sym-provenance > summary {
    min-block-size: 24px;
    padding-block: 0.2rem;
}

.sym-provenance__list { font-size: var(--c-t-label); }


/* ===========================================================================
   Prediction history
   =========================================================================== */

.sym-filters { margin-block: 0.25rem; }

.sym-filters__fields {
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sym-filters__field {
    display: grid;
    gap: 0.3rem;
    flex: 1 1 9rem;
    min-width: 0;
}

.sym-filters__field :is(select, input) {
    min-block-size: 40px;
    inline-size: 100%;
    max-inline-size: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-r-control);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: var(--c-t-meta);
}

.sym-filters__field :is(select, input):focus-visible {
    outline: 2px solid var(--c-evidence);
    outline-offset: 2px;
}

.sym-state { font-weight: var(--c-w-medium); }
.sym-state--verified { color: var(--c-evidence); }
.sym-state--excluded { color: var(--c-text-faint); }
.sym-state--pending { color: var(--c-text-muted); }

.sym-table__delta {
    margin-inline-start: 0.35rem;
    font-variant-numeric: tabular-nums;
}

.sym-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-block-start: 1rem;
}

.sym-pagination__status {
    font-size: var(--c-t-meta);
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}


/* ===========================================================================
   The price-alert dialog
   =========================================================================== */

.sym-dialog {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--c-overlay) 70%, transparent);
}

.sym-dialog__panel {
    inline-size: 100%;
    max-inline-size: 26rem;
}

.sym-dialog__panel > * + * { margin-block-start: 1rem; }

.sym-dialog__field { display: grid; gap: 0.35rem; }

.sym-dialog__field label {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-medium);
    color: var(--c-text-muted);
}

.sym-dialog__field :is(select, input) {
    min-block-size: 44px;
    inline-size: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-r-control);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
}

.sym-dialog__actions { justify-content: flex-end; }

.sym-dialog__status { margin: 0; font-size: var(--c-t-meta); }
.sym-dialog__status[data-state="error"] { color: var(--c-down-ink); }
.sym-dialog__status[data-state="ok"] { color: var(--c-up-ink); }


/* ===========================================================================
   Asset intelligence dossier
   ===========================================================================

   Scoped by id, which is what lets these rules out-specify the bridge's
   substring selectors without a fifth class or an !important. */
#asset-dossier .dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 0.85rem;
}

/* `dossier-narrative` is alone in its class attribute on purpose:
   markets/tests/test_gate_closure.py matches `class="dossier-narrative">` as
   a literal to read the Arabic narrative out of the page, so a second class
   inside the quotes makes that assertion vacuous rather than failing. The
   lede treatment is stated here instead of borrowing `.sym-block__lead`. */
#asset-dossier .dossier-narrative {
    margin: 0;
    max-inline-size: 78ch;
    font-size: var(--c-t-meta);
    line-height: 1.6;
}

#asset-dossier .dossier-card { padding: 1rem 1.1rem; }
#asset-dossier .dossier-card > * + * { margin-block-start: 0.7rem; }

#asset-dossier .provider-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

#asset-dossier .provider-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding-block: 0.5rem;
    border-block-end: 1px solid color-mix(in srgb, var(--c-line) 70%, transparent);
}

#asset-dossier .provider-list > li:last-child .provider-row { border-block-end: 0; }

#asset-dossier .provider-row__id { min-width: 0; }

#asset-dossier .provider-name {
    display: block;
    color: var(--c-text);
    font-size: var(--c-t-meta);
    font-weight: var(--c-w-medium);
}

#asset-dossier .provider-meta {
    color: var(--c-text-muted);
    font-size: var(--c-t-label);
    font-variant-numeric: tabular-nums;
}

#asset-dossier .provider-rate {
    display: grid;
    justify-items: end;
    gap: 4px;
    min-inline-size: 5.5rem;
    font-weight: var(--c-w-bold);
    font-size: var(--c-t-meta);
    font-variant-numeric: tabular-nums;
    text-align: end;
}

#asset-dossier .provider-rate__pct { display: block; }

/* Band names come from markets.services.platform_metrics.accuracy_band, so
   the same win rate is coloured the same here, on /accuracy/ and in the
   research brief. */
#asset-dossier .provider-rate.rate-high { color: var(--c-up-ink); }
#asset-dossier .provider-rate.rate-mid { color: var(--c-attention); }
#asset-dossier .provider-rate.rate-low { color: var(--c-down-ink); }

/* `end`, not `right`: this label wraps to two lines and a physical alignment
   sends the ragged edge to opposite sides of the row in the two locales. */
#asset-dossier .provider-rate.rate-insufficient {
    color: var(--c-text-muted);
    font-weight: var(--c-w-semi);
    font-size: var(--c-t-label);
    text-align: end;
    max-inline-size: 11rem;
}

#asset-dossier .trend-value { font-size: var(--c-t-figure); line-height: 1.05; }
#asset-dossier .trend-sub { color: var(--c-text-muted); font-size: var(--c-t-label); }
#asset-dossier .trend-delta.flat { color: var(--c-text-muted); }

#asset-dossier .cluster + .cluster {
    margin-block-start: 0.7rem;
    padding-block-start: 0.7rem;
    border-block-start: 1px solid color-mix(in srgb, var(--c-line) 70%, transparent);
}

#asset-dossier .cluster-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    margin: 0;
}

#asset-dossier .cluster-count {
    color: var(--c-text-muted);
    font-size: var(--c-t-label);
    font-variant-numeric: tabular-nums;
}

#asset-dossier .cluster-headline {
    margin: 0.3rem 0 0;
    padding-inline-start: 0.75rem;
    border-inline-start: 2px solid var(--c-line);
    color: var(--c-text-secondary);
    font-size: var(--c-t-label);
    line-height: 1.5;
}

/* One fact, so a line rather than a layout. */
.asset-tz {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: var(--c-t-label);
}

.asset-tz__label {
    font-weight: var(--c-w-semi);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}

[dir="rtl"] .asset-tz__label { letter-spacing: 0; text-transform: none; }

.asset-tz__value { color: var(--c-text-secondary); font-weight: var(--c-w-semi); }

/* The unit on the confidence figure in the calls list: quieter than the
   number it qualifies, for the same reason the currency is quieter than the
   price — it names the quantity, it is not the quantity. */
.calls__conf-unit {
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    color: var(--c-text-faint);
}

/* The provenance marker. `.lb-tag lb-tag--muted` is what the markup used to
   carry, and that class is defined in exactly one place: the inline <style>
   of templates/accuracy_leaderboard.html. It is page-local, so on this page
   it styled nothing and "not AI" read as part of the provider's name rather
   than a caveat about it. Declared here under a name this page owns, with the
   same values the leaderboard uses, and repeated in
   includes/_symbol_accuracy_body.html because that partial also renders on a
   route with no page stylesheet. */
.sym-tag {
    display: inline-block;
    margin-inline-start: 6px;
    padding: 1px 7px;
    border-radius: var(--c-r-chip);
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    vertical-align: middle;
    border: 1px solid transparent;
    white-space: nowrap;
}

.sym-tag--muted {
    background: var(--c-inset);
    color: var(--c-text-muted);
    border-color: var(--c-line);
}

/* The empty state inside a mode panel keeps the shared state block; this is
   only its measure. */
.sym-empty { max-inline-size: 42rem; margin-inline: auto; }


/* ===========================================================================
   Light theme: out-specifying the two sheets that load after this one
   ===========================================================================

   Neither is this workstream's to edit, and neither is wrong — they are
   blanket rescues written when most of the site had hardcoded dark colours.
   They are out-specified rather than fought with !important.

   1. `body[class^="page-"] .main-content p` (page-unification.css, (0,2,1))
      paints every paragraph a warm shell grey. Measured in the light theme,
      that put the quotation unit, the readings line and the scored record in
      #363832 while the spans beside them kept their cool slate token: "USD
      per coin" in one grey and the "USD" next to the price in another. Three
      classes under `.page-symbol_detail` clears it.

   2. `:root[data-theme="light"] p / li / td` (canvas-bridge.css, the last
      sheet in the document, (0,2,1)) does the same for paragraphs, list items
      and table cells. Where a block wants a token other than
      `--c-text-secondary` on one of those elements, the rule is stated at
      three or four classes. */
.page-symbol_detail .symbol-detail-container .sym-hero__unit,
.page-symbol_detail .symbol-detail-container .sym-hero__readings,
.page-symbol_detail .symbol-detail-container .sym-hero__record,
.page-symbol_detail .symbol-detail-container .sym-block__lead,
.page-symbol_detail .symbol-detail-container .sym-narrative__note,
.page-symbol_detail .symbol-detail-container .sym-narrative__impact,
.page-symbol_detail .symbol-detail-container .sym-fact__prose {
    color: var(--c-text-secondary);
}

.page-symbol_detail .symbol-detail-container .sym-block__meta,
.page-symbol_detail .symbol-detail-container .sym-block__note,
.page-symbol_detail .symbol-detail-container .sym-momentum__absent,
.page-symbol_detail .symbol-detail-container .sym-newslist__meta,
.page-symbol_detail .symbol-detail-container .sym-hero__fact-note {
    color: var(--c-text-muted);
}

.page-symbol_detail .symbol-detail-container .sym-bias__scenario,
.page-symbol_detail .symbol-detail-container .sym-hero__fact-fig {
    color: var(--c-text);
}

/* Table cells. `.am-table td` is (0,1,1) and the bridge's `td` rescue is
   (0,2,1) from a later sheet, so every figure in every table on the page came
   out secondary — including the support level and the reference price, which
   are the figures the table exists for. */
.page-symbol_detail .symbol-detail-container .sym-block td,
.page-symbol_detail .symbol-detail-container .sym-block th {
    color: var(--c-text);
}

.page-symbol_detail .symbol-detail-container .sym-block thead th {
    color: var(--c-text-muted);
}

/* List items whose own colour this page sets. */
.page-symbol_detail .symbol-detail-container .sym-providers li,
.page-symbol_detail .symbol-detail-container .sym-newslist__item,
.page-symbol_detail .symbol-detail-container .sym-events__item {
    color: var(--c-text-secondary);
}

/* The asset-class badge. theme-foundation.css paints it with
   `background: var(--am-accent-soft) !important` and a blue border in the
   light theme — the one saturated blue chip on a page whose accent is
   reserved for verification. `symbol-type-badge` cannot be renamed
   (markets/tests/test_asset_registry.py asserts the literal
   `<span class="symbol-type-badge index">`), so this is the one place on the
   page that answers an !important with an !important, at four classes so it
   wins without touching anything outside /symbol/. */
.page-symbol_detail .symbol-detail-container .symbol-title .symbol-type-badge {
    display: inline-flex;
    align-items: center;
    min-block-size: 22px;
    padding: 2px 9px;
    border-radius: var(--c-r-pill);
    background: var(--c-inset) !important;
    border: 1px solid var(--c-line) !important;
    color: var(--c-text-secondary) !important;
    font-size: var(--c-t-label);
    font-weight: var(--c-w-semi);
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
}


/* ===========================================================================
   Arabic
   ===========================================================================

   Measured with canvas ink metrics (actualBoundingBoxAscent + Descent), which
   is the only instrument that sees glyph extents — a Range's client rects
   return line boxes and report Arabic and Latin as identical, which is how
   this stayed invisible.

   At the same font-size Arabic ink runs 13–15% taller than Latin, and a
   stacked vocalisation goes much further: in "أحدث التنبؤات المُتحقَّق منها"
   the shadda-plus-damma lifts the ascent from ~14px to 23.4px, an ink height
   of 28.2px in a 25.9px line box. Nothing here hides overflow, so it does not
   clip — what the tight leading costs is the space between a vocalised word
   and the line above it. It matters more on this site than most because /ar/
   has no webfont at all: Inter is subset to Latin by `unicode-range` and the
   declared Arabic faces are never loaded, so every Arabic glyph comes from
   the reader's operating system and its metrics cannot be known in advance. */
[dir="rtl"] .symbol-detail-container :is(h1, h2, h3) { line-height: 1.35; }
[dir="rtl"] .symbol-title { line-height: 1.3; }

/* The two glyphs whose meaning is directional. `→` (U+2192) has
   Bidi_Mirrored=N, so the bidi algorithm leaves it pointing right inside an
   Arabic paragraph, where "onward" is left. Everything else on this page is
   laid out with logical properties and needs no rule. */
[dir="rtl"] .symbol-detail-container :is(.sym-block__link, .sym-hero__record-link, .sym-figure__caption a) > span[aria-hidden="true"] {
    display: inline-block;
    transform: scaleX(-1);
}


/* ===========================================================================
   Narrower viewports
   ===========================================================================

   One column, same sequence. A phone does not get a shrunken desktop: the
   hero's two columns collapse into the reading order the grid areas already
   name, the chart keeps a real plot height rather than a strip, and every
   control clears 44px. */
@media (max-width: 1023px) {
    .sym-hero {
        grid-template-columns: minmax(0, 1fr);
        /* 2026-09-18: price before state, stats before actions.
           The stack used to read ident -> status -> quote, so the freshness
           sentence ("Stored snapshot (BTC) 18 Sep 03:00 +03 - 2 hours ago")
           pushed the figure a reader opened the page for below the fold of a
           390px screen. The heading stays first because it names the asset;
           after it the order is the question a reader asks in order -- what
           is it trading at, how fresh is that, what is the range, what do the
           readings say, what can I do. Same six areas, no new surface. */
        grid-template-areas: "ident" "quote" "status" "facts" "read" "foot";
        row-gap: 0.8rem;
    }

    .sym-hero .sym-hero__facts { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
}

@media (max-width: 767px) {
    .symbol-detail-container { padding: 1rem; }

    /* 44px targets. Measured at 390: the mode tabs were 40px, the disclosure
       summaries 21px and the filter controls 42px. */
    .sym-modes__strip .sym-modes__tab { min-block-size: 44px; }

    .sym-block__more > summary,
    .sym-provenance > summary { min-block-size: 44px; }

    /* The non-advice disclaimer is a shared component
       (templates/components/non_advice_disclaimer.html) and ships a
       class-less <summary>, so there is no hook to name and the canvas class
       on its wrapper is not this sheet's to write a rule for. Measured at
       390: 24px. Selected by the absence of a class, which is exactly what
       distinguishes it from this page's own disclosures. */
    .page-symbol_detail .symbol-detail-container summary:not([class]) {
        min-block-size: 44px;
        display: flex;
        align-items: center;
    }

    .sym-block__link,
    .sym-hero__record-link,
    .sym-hero__readings-note,
    .sym-figure__caption a,
    a.sym-fact__note,
    .sym-fact__note a { min-block-size: 44px; }

    /* Two classes: page-unification.css gives every button in .main-content
       a 42px floor from a later sheet, and one class here ties and loses. */
    .sym-filters__field :is(select, input),
    .sym-filters .sym-filters__go { min-block-size: 44px; }

    /* `flex-start`, not `stretch`: a full-width centred "+ Watchlist" reads
       as the page's primary action, and it is not one. The 44px floor comes
       from the button's own min-block-size. */
    .sym-hero__foot { flex-direction: column; align-items: flex-start; }

    .sym-hero__record { justify-content: flex-start; }

    /* The history table stacks into labelled rows. Two classes plus an
       element to clear `.am-table td`, which arrives later. */
    .sym-history .sym-table thead { display: none; }

    .sym-history .sym-table tbody tr {
        display: grid;
        gap: 0.2rem;
        padding-block: 0.7rem;
        border-block-end: 1px solid var(--c-line);
    }

    .sym-history .sym-table tbody :is(th, td) {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.1rem 0;
        border: 0;
        text-align: start;
    }

    .sym-history .sym-table tbody :is(th, td)::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--c-text-muted);
        font-size: var(--c-t-label);
        font-weight: var(--c-w-medium);
    }

    .sym-agreement__row { grid-template-columns: minmax(4.5rem, 6rem) minmax(0, 1fr) auto; }

    .sym-stages { gap: 0.6rem 1.25rem; }
}

@media (max-width: 430px) {
    .sym-hero__figure { font-size: clamp(2.1rem, 11vw, 2.6rem); }
    .sym-hero .sym-hero__facts { grid-template-columns: minmax(0, 1fr); }
    .sym-hero__status { gap: 0.4rem 0.9rem; }
    .sym-stages { gap: 0.5rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .sym-modes__strip .sym-modes__tab { transition: none; }
}

/* ===========================================================================
   AI insight drawer, light-theme corrections and RTL fixes
   ===========================================================================

   Moved verbatim out of the <style> block at the foot of
   templates/symbol_detail.html, where 663 lines of CSS were being re-sent
   inside the HTML of every symbol page -- uncached, un-minified, and mostly
   describing a modal that opens on a click most readers never make. The
   rules are unchanged; only their address is.
   =========================================================================== */

/* AI Insight Modal Styles (Converted from Drawer) */
.ai-insight-drawer {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--c-dur-panel) var(--c-ease),
                visibility var(--c-dur-panel) var(--c-ease);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ai-insight-drawer.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity var(--c-dur-panel) var(--c-ease);
}

.ai-insight-drawer.active .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--c-r-overlay);
    box-shadow: var(--c-shadow-overlay);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Mobile: slide up from bottom */
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: transform var(--c-dur-panel) var(--c-ease),
                opacity var(--c-dur-panel) var(--c-ease);
}

.ai-insight-drawer.active .drawer-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Desktop: subtle scale-in animation */
@media (min-width: 768px) {
    .drawer-content {
        /* Desktop: centered, subtle scale-in */
        transform: scale(0.95);
        max-width: 600px;
    }

    .ai-insight-drawer.active .drawer-content {
        transform: scale(1);
    }
}

/* Mobile: full-width on small screens */
@media (max-width: 767px) {
    .ai-insight-drawer {
        padding: 0;
        align-items: flex-end;
    }
    
    .drawer-content {
        max-width: 100%;
        width: 100%;
        border-radius: var(--c-r-overlay) var(--c-r-overlay) 0 0;
        max-height: 90vh;
    }
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--c-line);
    background: var(--c-surface-raised);
    flex-shrink: 0;
}

.drawer-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.drawer-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.drawer-title-section {
    flex: 1;
    min-width: 0;
}

.drawer-title {
    font-size: 1.35rem;
    font-weight: var(--c-w-bold);
    color: var(--text);
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.drawer-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: var(--c-w-medium);
}

.drawer-close-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--c-r-panel);
    border: none;
    background: var(--c-inset);
    color: var(--c-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--c-dur-move) var(--c-ease);
    flex-shrink: 0;
}

.drawer-close-btn:hover {
    background: var(--c-inset);
}

.drawer-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.drawer-sentiment-badge-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.drawer-sentiment-badge {
    padding: 8px 16px;
    border-radius: var(--c-r-overlay);
    font-size: 0.875rem;
    font-weight: var(--c-w-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-sentiment-badge.bullish,
.drawer-sentiment-badge.positive {
    background: color-mix(in srgb, var(--c-up) 14%, transparent);
    color: var(--c-up);
    border: 1px solid currentColor;
}

.drawer-sentiment-badge.bearish,
.drawer-sentiment-badge.negative {
    background: color-mix(in srgb, var(--c-down) 14%, transparent);
    color: var(--c-down);
    border: 1px solid currentColor;
}

.drawer-sentiment-badge.neutral {
    background: var(--c-inset);
    color: var(--c-text-muted);
    border: 1px solid var(--c-line);
}

.drawer-section {
    margin-bottom: 24px;
}

.drawer-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: var(--c-evidence);
    flex-shrink: 0;
}

.section-title-text {
    font-size: 1rem;
    font-weight: var(--c-w-bold);
    color: var(--text);
    margin: 0;
}

.drawer-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
    padding: 16px;
    background: var(--c-inset);
    border-radius: var(--c-r-panel);
    border: 1px solid var(--c-line);
}

.drawer-meta {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--c-line);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-meta-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: var(--c-w-semi);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 0.9375rem;
    font-weight: var(--c-w-semi);
    color: var(--text);
}

.confidence-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.confidence-bar {
    flex: 1;
    height: 8px;
    background: var(--c-inset);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    width: 0%;
    background-color: var(--c-down); background-image: linear-gradient(90deg, var(--c-down), var(--c-attention), var(--c-up));
    border-radius: 4px;
    transition: width var(--c-dur-panel) var(--c-ease);
}

.confidence-text {
    font-size: 0.875rem;
    font-weight: var(--c-w-bold);
    color: var(--text);
    min-width: 50px;
    text-align: end;
}

.drawer-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.drawer-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--c-r-panel);
    border: 1px solid var(--c-line);
    background: var(--c-surface);
    color: var(--c-text);
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--c-dur-move) var(--c-ease),
                border-color var(--c-dur-move) var(--c-ease);
}

.drawer-action:hover {
    background: var(--c-inset);
    border-color: var(--c-line-strong);
}

.btn-open {
    border-color: var(--c-evidence);
}

.drawer-body::-webkit-scrollbar {
    width: 6px;
}

.drawer-body::-webkit-scrollbar-track {
    background: var(--c-inset);
}

.drawer-body::-webkit-scrollbar-thumb {
    background: var(--c-line-strong);
    border-radius: 3px;
}

.drawer-body::-webkit-scrollbar-thumb:hover {
    background: var(--c-text-faint);
}


/* ===========================================================================
   The symbol-aware news card
   ===========================================================================

   The card itself is news.css's and is shared with /news/; what is here is
   the one row this page adds to it — the model's recorded reading for this
   asset — and the footer rule under it. */
.symbol-aware-card { cursor: default; }

.symbol-impact-line {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 1rem 0;
    padding: 0.75rem 0.9rem;
    border-radius: var(--c-r-control);
    border-inline-start: 3px solid var(--c-line);
    font-size: var(--c-t-meta);
    line-height: 1.55;
}

.symbol-impact-line .impact-icon {
    inline-size: 18px;
    block-size: 18px;
    flex-shrink: 0;
    margin-block-start: 2px;
}

.impact-text { flex: 1 1 auto; min-width: 0; }
.impact-text strong { font-weight: var(--c-w-semi); }

.impact-bullish {
    background: color-mix(in srgb, var(--c-up) 9%, transparent);
    border-inline-start-color: var(--c-up);
}

.impact-bullish .impact-icon,
.impact-bullish .impact-text strong { color: var(--c-up-ink); }

.impact-bearish {
    background: color-mix(in srgb, var(--c-down) 9%, transparent);
    border-inline-start-color: var(--c-down);
}

.impact-bearish .impact-icon,
.impact-bearish .impact-text strong { color: var(--c-down-ink); }

.impact-neutral { background: var(--c-inset); }

.impact-neutral .impact-icon,
.impact-neutral .impact-text strong { color: var(--c-text-muted); }

.symbol-aware-card .news-card-footer {
    margin-block-start: 1rem;
    padding-block-start: 1rem;
    border-block-start: 1px solid var(--c-line);
}

.news-source-small {
    font-size: var(--c-t-label);
    color: var(--c-text-muted);
}

@media (max-width: 767px) {
    .symbol-impact-line { flex-direction: column; gap: 0.5rem; }
    .symbol-impact-line .impact-icon { margin-block-start: 0; }
}


/* ===========================================================================
   The drawer in Arabic
   =========================================================================== */
[dir="rtl"] .drawer-header,
[dir="rtl"] .drawer-header-content { flex-direction: row-reverse; }
[dir="rtl"] .drawer-title-section { text-align: start; }
[dir="rtl"] .drawer-meta-item .meta-label { flex-direction: row-reverse; }

@media (max-width: 767px) {
    [dir="rtl"] .drawer-content {
        border-radius: var(--c-r-overlay) var(--c-r-overlay) 0 0;
    }
}

/* The Finviz "warming up" spinner's keyframe. It used to be declared inside
   the branch that rendered it, so the animation existed only when that branch
   happened to render — and the other warming branch referenced the same name
   with nothing to bind to. Declared once, where both find it. */
@keyframes skeleton-spin { to { transform: rotate(360deg); } }

/* The one line that keeps the Arabic page honest about its English prose.
   Same register as the article page's note: muted, meta scale, above the
   block it describes rather than buried under it. */
.sym-block__lang-note {
    margin: 0 0 var(--c-space-3);
    color: var(--c-text-muted);
    font-size: var(--c-t-meta);
    line-height: 1.5;
}

/* Insider trades: five columns that do not fit a phone card. The table keeps
   a width its dates and type chips fit on one line and scrolls inside the card
   (the shared edge shadow is the cue) rather than overflowing it or wrapping a
   date onto three lines. */
.sym-insider__table { min-inline-size: 34rem; }
.sym-insider__table :is(td, th):nth-child(3),
.sym-insider__table :is(td, th):nth-child(4),
.sym-insider__table .am-table__num { white-space: nowrap; }
.sym-insider__table .am-chip { white-space: nowrap; }
