/* ==========================================================================
   Instrument — TradeSetups design system
   --------------------------------------------------------------------------
   A hairline dark system: one accent, monospace for every number, and borders
   instead of shadows. Ported from the design export; the palette below is the
   exact set of oklch values it used, named rather than repeated inline.

   Numbers are ALWAYS monospace (.mono). In a product whose whole claim is
   measurement, a price that shifts column position between rows reads as
   decoration; tabular figures let a column of prices be scanned vertically.
   ========================================================================== */

:root {
    /* Surfaces, darkest to lightest. */
    --ts-bg:          oklch(0.17 0.012 258);
    --ts-surface:     oklch(0.195 0.012 258);
    --ts-surface-2:   oklch(0.205 0.013 258);
    --ts-surface-3:   oklch(0.215 0.013 258);
    --ts-track:       oklch(0.235 0.013 258);

    /* Hairlines. --ts-line is the workhorse; the rest are hover/emphasis. */
    --ts-line:        oklch(0.26 0.013 258);
    --ts-line-2:      oklch(0.29 0.014 258);
    --ts-line-3:      oklch(0.36 0.015 258);
    --ts-line-4:      oklch(0.40 0.015 258);

    /* Text, brightest to dimmest.
       --ts-fg-3 and --ts-fg-4 were raised to clear WCAG 2.2 AA contrast.
       The accessibility suite measured them on the live landing page:
         fg-3 (#767c85 on the card surface) was 4.34:1, and
         fg-4 (#5e646b on the page ground) was 3.19:1,
       against a 4.5:1 requirement for body-size text. Both are used at 9.5 to
       10.5px -- small text, where the ratio matters most and where the eye is
       least able to compensate. The new values clear it with roughly 5:1.

       --ts-fg-5 has NOT been raised. Nothing has flagged it, because no scanned
       page currently renders text in it, and changing an unmeasured value on
       the assumption it is wrong is how a palette drifts. It is almost
       certainly below the bar and is recorded as such in
       docs/accessibility.md. */
    --ts-fg:          oklch(0.97 0.005 258);
    --ts-fg-2:        oklch(0.745 0.013 258);
    --ts-fg-3:        oklch(0.635 0.015 258);
    --ts-fg-4:        oklch(0.60 0.014 258);
    --ts-fg-5:        oklch(0.45 0.014 258);

    /* One accent. Everything that is clickable-and-primary is this colour and
       nothing else is, so the eye never has to ask what is interactive. */
    --ts-accent:      #59D2E6;
    --ts-on-accent:   oklch(0.19 0.02 250);

    /* Semantics. Long/short and win/loss share these deliberately: a target is
       the same green as a gain because they mean the same thing to the reader. */
    --ts-up:          oklch(0.755 0.155 158);
    /* Raised from 0.665: the accessibility suite measured it below 4.5:1 as
       text on the dark ground. Semantic colours have to clear contrast like
       any other text -- a loss figure nobody can read is worse than one in the
       wrong shade of red. */
    --ts-down:        oklch(0.72 0.17 24);
    --ts-warn:        oklch(0.82 0.135 82);

    /* STAGE COLOURS, for the vertical marks that date a stage change on the
       evidence chart. Three of the four ARE the semantic colours above, because
       they mean the same things: an advance is the same green as a gain, a
       decline the same red as a loss, a top the same amber as a warning. Only
       basing needs its own, and it is deliberately indigo rather than the cyan
       accent -- the accent is what the moving averages are drawn in on that
       same chart, and two different meanings in one hue is how a reader stops
       trusting the colour. */
    --ts-stage-basing: oklch(0.68 0.16 275);

    --ts-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ts-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    --ts-radius:      10px;
    --ts-radius-sm:   6px;
    --ts-maxw:        1400px;
    --ts-gutter:      40px;
    --ts-topbar-h:    56px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html, body {
    background: var(--ts-bg);
    color: var(--ts-fg);
    font-family: var(--ts-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body { margin: 0; }

a { color: var(--ts-accent); text-decoration: none; }

/* A LINK IN RUNNING TEXT NEEDS MORE THAN A COLOUR. axe flagged
   link-in-text-block, serious, five times across /methodology and the quote
   page: WCAG 1.4.1 says colour cannot be the only thing that marks a link, and
   the rule above strips the underline from every anchor on the site.

   Scoped to <p> and <dd> -- containers that only ever hold sentences. <li> is
   deliberately NOT here: the account settings nav is a <ul> of <li><NavLink>,
   which reads as navigation and sets no text-decoration of its own, so an
   element-level rule would underline the whole sidebar. Chips, card footers and
   jump lists are unaffected either way, because each sets text-decoration
   through a class and a class-qualified selector outranks an element one.

   .ts-asof is here by name: it is a sentence of provenance rendered in a <div>
   rather than a <p>, and the quote page's "how each metric is defined" link
   sits inside it. Same running text, same requirement. */
p a, dd a, .ts-asof a {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
a:hover { color: var(--ts-fg); }

::selection { background: color-mix(in oklab, var(--ts-accent) 30%, transparent); }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.024em; margin: 0; }

.ts-mono, .mono { font-family: var(--ts-mono); font-variant-numeric: tabular-nums; }

/* Section eyebrows: tiny, wide-tracked, monospace. Used everywhere a block
   needs a label that must not compete with the data inside it. */
.ts-eyebrow {
    font-family: var(--ts-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--ts-fg-3);
    text-transform: uppercase;
}

.ts-shell { max-width: var(--ts-maxw); margin: 0 auto; padding: 0 var(--ts-gutter); }
.ts-page  { max-width: var(--ts-maxw); margin: 0 auto; padding: 32px var(--ts-gutter) 64px; }

.ts-muted   { color: var(--ts-fg-2); }
.ts-dim     { color: var(--ts-fg-3); }
.ts-dimmer  { color: var(--ts-fg-4); }
.ts-up      { color: var(--ts-up); }
.ts-down    { color: var(--ts-down); }
.ts-warn    { color: var(--ts-warn); }
.ts-accent-fg { color: var(--ts-accent); }

@keyframes ts-up-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ts-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ts-beat  { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.ts-anim-up   { animation: ts-up-in .5s ease both; }
.ts-anim-fade { animation: ts-fade .2s ease both; }
.ts-beat      { animation: ts-beat 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .ts-anim-up, .ts-anim-fade, .ts-beat { animation: none; }
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.ts-topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    height: var(--ts-topbar-h);
    border-bottom: 1px solid var(--ts-line);
    background: color-mix(in oklab, var(--ts-bg) 88%, transparent);
    backdrop-filter: blur(14px);
}

.ts-topbar__inner {
    max-width: var(--ts-maxw);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--ts-gutter);
    display: flex;
    align-items: center;
    gap: 32px;
}

.ts-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--ts-fg); }
.ts-brand:hover { color: var(--ts-fg); }
.ts-brand__mark { width: 11px; height: 11px; background: var(--ts-accent); transform: rotate(45deg); }
.ts-brand__word { font-family: var(--ts-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.16em; }

/* THE SYMBOL SEARCH, between the brand and the links.

   Fixed-ish width rather than flexible: it sits beside a link strip that
   already scrolls, and letting both compete for the same space makes the bar
   reflow as the viewport changes. Collapses to an icon-sized field before it
   disappears, because reaching a symbol from anywhere is more useful on a
   phone than the fifth nav link is. */
.ts-search { flex: 0 0 auto; width: 260px; min-width: 0; }
.ts-search .mud-input-control { margin: 0; }
.ts-search .mud-input.mud-input-outlined { font-size: 13px; }
.ts-search .mud-input-outlined-border { border-color: var(--ts-line); }

.ts-search__row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ts-search__sym { font-weight: 600; flex: 0 0 auto; }
.ts-search__name {
    color: var(--ts-fg-2); font-size: 12.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ts-search__sector { margin-left: auto; color: var(--ts-fg-3); font-size: 11px; flex: 0 0 auto; }

@media (max-width: 1100px) {
    .ts-search { width: 180px; }
}
@media (max-width: 720px) {
    .ts-search { width: 140px; }
}

/* The bar itself does NOT scroll. Only the link strip inside it does.
   An ancestor whose overflow is anything but visible clips an absolutely
   positioned descendant, and the admin dropdown opens BELOW the bar -- so with
   overflow-x on .ts-nav the panel was clipped out of existence and the trigger
   looked like a dead button. */
.ts-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.ts-nav__scroll { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ts-nav__scroll::-webkit-scrollbar { display: none; }

.ts-nav__link {
    position: relative;
    padding: 6px 12px;
    font-size: 13.5px;
    white-space: nowrap;
    color: var(--ts-fg-2);
    border-radius: var(--ts-radius-sm);
    transition: color .16s, background .16s;
}
.ts-nav__link:hover { background: var(--ts-surface-3); color: var(--ts-fg); }
.ts-nav__link.active { color: var(--ts-fg); }
/* The 2px rule sits on the topbar's own bottom border, so the active tab reads
   as a continuation of the page rather than a floating pill. */
.ts-nav__link.active::after {
    content: "";
    position: absolute;
    left: 12px; right: 12px;
    bottom: -15px;
    height: 2px;
    background: var(--ts-accent);
}

.ts-topbar__end { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }

.ts-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid oklch(0.31 0.015 258);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--ts-mono); font-size: 11px; font-weight: 600;
    color: var(--ts-fg-2);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.ts-btn {
    height: 32px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 14px;
    border: 1px solid var(--ts-line-2);
    border-radius: var(--ts-radius-sm);
    background: transparent;
    color: var(--ts-fg-2);
    font-family: var(--ts-sans); font-size: 13px;
    cursor: pointer;
    transition: border-color .16s, color .16s, filter .16s;
}
.ts-btn:hover { border-color: var(--ts-line-4); color: var(--ts-fg); }

.ts-btn--primary {
    background: var(--ts-accent);
    border-color: var(--ts-accent);
    color: var(--ts-on-accent);
    font-weight: 600;
}
.ts-btn--primary:hover { filter: brightness(1.1); color: var(--ts-on-accent); border-color: var(--ts-accent); }

.ts-btn--lg { height: 40px; padding: 0 20px; font-size: 14px; }

.ts-icon-btn {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--ts-line);
    border-radius: 7px;
    background: transparent;
    color: var(--ts-fg-2);
    cursor: pointer;
    transition: border-color .16s, color .16s;
}
.ts-icon-btn:hover { border-color: var(--ts-line-4); color: var(--ts-fg); }

/* --------------------------------------------------------------------------
   Cards, tiles, chips
   -------------------------------------------------------------------------- */

.ts-card {
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    background: var(--ts-surface);
    overflow: hidden;
}
.ts-card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--ts-line);
}
.ts-card__body { padding: 16px 18px; }

/* One bordered strip subdivided by hairlines, not four floating cards. The
   shared outline is what makes them read as one instrument panel. */
.ts-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    overflow: hidden;
}
.ts-tile { padding: 18px 20px; border-right: 1px solid var(--ts-line); background: var(--ts-surface); }
.ts-tile:last-child { border-right: 0; }
.ts-tile__label { font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ts-fg-3); margin-bottom: 8px; }
.ts-tile__row { display: flex; align-items: baseline; gap: 9px; }
.ts-tile__value { font-family: var(--ts-mono); font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.ts-tile__sub { font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-4); }
.ts-tile__bar { display: flex; height: 3px; margin-top: 12px; border-radius: 2px; overflow: hidden; background: var(--ts-track); }

.ts-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 28px; padding: 0 11px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    background: transparent;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.05em;
    color: var(--ts-fg-2);
    cursor: pointer;
    transition: border-color .16s, color .16s, background .16s;
}
.ts-chip:hover { border-color: var(--ts-line-4); color: var(--ts-fg); }
.ts-chip.active {
    border-color: var(--ts-accent);
    color: var(--ts-accent);
    background: color-mix(in oklab, var(--ts-accent) 12%, transparent);
}

.ts-tag {
    display: inline-flex; align-items: center;
    height: 20px; padding: 0 8px;
    border: 1px solid var(--ts-line-2);
    border-radius: 3px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.1em;
    color: var(--ts-fg-3);
}

/* Segmented control: the group carries the background, the selected item the
   raised surface. */
.ts-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--ts-track); border-radius: 7px; }
.ts-seg__item {
    display: inline-flex; align-items: center; gap: 7px;
    height: 28px; padding: 0 12px;
    border: 0; border-radius: 5px;
    background: transparent;
    color: var(--ts-fg-2);
    font-family: var(--ts-sans); font-size: 13px;
    cursor: pointer;
    transition: background .16s, color .16s;
}
.ts-seg__item:hover { color: var(--ts-fg); }
.ts-seg__item.active { background: var(--ts-surface); color: var(--ts-fg); }
.ts-seg__count { font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-4); }
.ts-seg__item.active .ts-seg__count { color: var(--ts-fg-2); }

.ts-divider-v { width: 1px; height: 24px; background: var(--ts-line); }

.ts-filterbar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px 16px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    background: var(--ts-surface);
}

/* --------------------------------------------------------------------------
   Setup rows
   --------------------------------------------------------------------------
   Fat rows, not a 15-column grid. Each row is one decision, so the things a
   decision needs — asymmetry, likelihood, where the stop sits — get room, and
   everything else is subordinated to a second line.
   -------------------------------------------------------------------------- */

.ts-rows { border: 1px solid var(--ts-line); border-radius: var(--ts-radius); overflow: hidden; }
.ts-rows__scroll { overflow-x: auto; }

.ts-row-grid {
    display: grid;
    grid-template-columns: 160px 172px minmax(200px, 1fr) 96px 108px 82px 116px 24px;
    gap: 16px;
    min-width: 1090px;
    padding: 11px 20px;
}

.ts-rows__head {
    border-bottom: 1px solid var(--ts-line);
    background: var(--ts-surface-2);
    font-family: var(--ts-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--ts-fg-3);
}

.ts-row {
    align-items: center;
    padding-top: 15px; padding-bottom: 15px;
    border-bottom: 1px solid var(--ts-track);
    color: inherit;
    cursor: pointer;
    transition: background .16s, box-shadow .16s;
}
.ts-row:hover { background: var(--ts-surface-2); box-shadow: inset 2px 0 0 var(--ts-accent); color: inherit; }
.ts-row:last-child { border-bottom: 0; }

.ts-row__sym { font-family: var(--ts-mono); font-size: 16px; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 3px; }
.ts-row__meta {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ts-fg-4);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ts-row__rr { font-family: var(--ts-mono); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }

.ts-bias {
    display: inline-flex; align-items: center; gap: 3px;
    height: 18px; padding: 0 6px;
    border-radius: 3px;
    font-family: var(--ts-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
}
.ts-bias--long  { background: color-mix(in oklab, var(--ts-up) 18%, transparent);   color: var(--ts-up); }
.ts-bias--short { background: color-mix(in oklab, var(--ts-down) 18%, transparent); color: var(--ts-down); }

.ts-status {
    display: inline-flex; align-items: center;
    height: 19px; padding: 0 7px;
    border: 1px solid var(--ts-line-2);
    border-radius: 3px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.08em;
    color: var(--ts-fg-2);
}
.ts-status--open      { border-color: color-mix(in oklab, var(--ts-accent) 55%, transparent); color: var(--ts-accent); }
.ts-status--triggered { border-color: color-mix(in oklab, var(--ts-up) 55%, transparent);     color: var(--ts-up); }
.ts-status--stopped   { border-color: color-mix(in oklab, var(--ts-down) 55%, transparent);   color: var(--ts-down); }

/* The risk/reward bar. Red is what you risk, green is what you stand to make,
   and the white tick is the entry — so the asymmetry the product exists to find
   is legible without reading a single number. */
.ts-rr { display: flex; height: 9px; border-radius: 2px; overflow: hidden; background: var(--ts-track); }
.ts-rr__risk   { background: color-mix(in oklab, var(--ts-down) 78%, transparent); }
.ts-rr__entry  { width: 2px; background: var(--ts-fg); }
.ts-rr__reward { flex: 1; background: color-mix(in oklab, var(--ts-up) 52%, transparent); position: relative; }
.ts-rr__tick   { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ts-bg); }
.ts-rr__legend { display: flex; justify-content: space-between; font-family: var(--ts-mono); font-size: 11px; margin-bottom: 5px; }

.ts-meter { height: 4px; border-radius: 2px; background: var(--ts-track); overflow: hidden; }
.ts-meter__fill { height: 100%; }

.ts-rows__foot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    background: var(--ts-surface);
}

/* --------------------------------------------------------------------------
   Tabs (quote page)
   -------------------------------------------------------------------------- */

.ts-tabs { display: flex; gap: 4px; }
.ts-tab {
    position: relative;
    padding: 11px 14px;
    border: 0; background: transparent;
    color: var(--ts-fg-2);
    font-family: var(--ts-sans); font-size: 13.5px;
    cursor: pointer;
    transition: color .16s;
}
.ts-tab:hover { color: var(--ts-fg); }
.ts-tab.active { color: var(--ts-fg); }
.ts-tab.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--ts-accent);
}

/* A visible focus ring. The tablist uses a roving tabindex, so the ONLY
   indication of where a keyboard reader is sitting is this outline. */
.ts-tab:focus-visible {
    outline: 2px solid var(--ts-accent);
    outline-offset: -2px;
    border-radius: 4px;
}

/* How many things are behind the tab, so a reader can decide whether to
   spend the click. */
.ts-tab__badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--ts-line-2, rgba(255,255,255,.10));
    color: var(--ts-fg-2);
    font-family: var(--ts-mono);
    font-size: 11px;
    line-height: 1.5;
}
.ts-tab.active .ts-tab__badge { background: var(--ts-accent); color: #06121f; }

/* Five sections do not fit a phone. Scroll them rather than wrapping into a
   second row that pushes the content down, and give each a 44px target. */
@media (max-width: 700px) {
    .ts-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .ts-tabs::-webkit-scrollbar { display: none; }
    .ts-tab {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* ONE LABEL-ABOVE-VALUE IDIOM, not five near-identical copies of it.
   .ts-stat, .ts-statstrip, .ts-nw__status and .ts-fact had each declared the
   same three sizes separately. Four copies of a rule agree until one of them
   is edited, and today produced four separate bugs of exactly that shape --
   the Altman thresholds, the ROIC series, a dictionary lookup and the
   margin-of-safety format. The CONTAINERS stay distinct (a strip has dividers,
   a fact grid has gaps); only the typography is shared.

   Stacked because it is the only arrangement that cannot collide: a
   side-by-side label and value need a gap wide enough for the longest label
   at the narrowest width, and that is not a number anyone can pick. */
.ts-stat__label,
.ts-statstrip__label,
.ts-nw__status-label,
.ts-refdata dt {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3); margin-bottom: 4px;
}
.ts-stat__value,
.ts-statstrip__value,
.ts-nw__status-value,
.ts-refdata dd {
    font-size: 15px; color: var(--ts-fg);
    /* Tabular figures so a column of numbers reads as a column. */
    font-variant-numeric: tabular-nums;
}
.ts-stat__value,
.ts-refdata dd.mono { font-family: var(--ts-mono); }

/* NOT .ts-facts. That name is already the Profile page's account facts -- a
   140-pixel label column with row borders, a different pattern with a
   different job -- and reusing it here would have silently restyled that page
   from three thousand lines away. Caught before it shipped; named so it is
   not repeated. */

/* Padding rather than a border. The old per-cell border-bottom never lined up
   across grid items, so it drew ragged underlines that looked like links. */
.ts-stat { padding: 8px 0; min-width: 0; }
.ts-stat__value { overflow-wrap: break-word; }
.ts-stat__value--info { color: var(--ts-accent); }

/* The note under a value: why it is absent, or where it came from. Dimmer
   than statstrip's note, because provenance is supporting rather than
   content. */
.ts-stat__note {
    margin-top: 3px;
    font-size: 11px; line-height: 1.45; color: var(--ts-fg-4);
}

/* Sticky rail: the setup levels stay on screen while the analysis scrolls,
   because the levels are what the reader keeps coming back to. */
.ts-rail { position: sticky; top: calc(var(--ts-topbar-h) + 24px); display: flex; flex-direction: column; gap: 20px; }

.ts-split { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 24px; align-items: start; }

@media (max-width: 1100px) {
    .ts-split { grid-template-columns: minmax(0, 1fr); }
    .ts-rail { position: static; }
    .ts-tiles { grid-template-columns: repeat(2, 1fr); }
    .ts-tile:nth-child(2) { border-right: 0; }
}

@media (max-width: 760px) {
    :root { --ts-gutter: 20px; }
    .ts-tiles { grid-template-columns: 1fr; }
    .ts-tile { border-right: 0; border-bottom: 1px solid var(--ts-line); }
    .ts-tile:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Material Symbols
   -------------------------------------------------------------------------- */

.ts-ico {
    font-family: 'Material Symbols Outlined';
    font-weight: normal; font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    /* Unprefixed as well as -webkit-: Firefox honours only the standard
       property, and without ligature shaping the glyph names render as text. */
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-size: 18px;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Top-bar dropdown (admin)
   -------------------------------------------------------------------------- */

.ts-nav__menu { position: relative; }

.ts-nav__trigger {
    display: inline-flex; align-items: center; gap: 4px;
    border: 0; background: transparent;
    font-family: var(--ts-sans);
}

.ts-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 210px;
    padding: 5px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-surface-2);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
    z-index: 1300;
}

.ts-menu__item {
    display: block;
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 13.5px;
    color: var(--ts-fg-2);
    white-space: nowrap;
}
.ts-menu__item:hover { background: var(--ts-surface-3); color: var(--ts-fg); }
.ts-menu__item.active { color: var(--ts-fg); }
.ts-menu__sep { height: 1px; margin: 5px 4px; background: var(--ts-line); }
.ts-menu__form { margin: 0; }
.ts-menu__button {
    width: 100%; text-align: left;
    border: 0; background: transparent; cursor: pointer;
    font-family: var(--ts-sans);
}

/* The avatar's menu: the reader's own pages. Opens on hover and keyboard
   focus, and on a tap through the .is-open class the button toggles. Anchored
   to the right edge, because the avatar sits at the right of the bar. */
.ts-usermenu { position: relative; display: flex; }
.ts-usermenu__trigger { cursor: pointer; background: transparent; padding: 0; }
.ts-usermenu__trigger:hover,
.ts-usermenu__trigger[aria-expanded="true"] { color: var(--ts-fg); border-color: var(--ts-fg-3); }
.ts-usermenu__panel {
    display: none;
    left: auto; right: 0;
    top: calc(100% + 10px);
    min-width: 180px;
}
/* A bridge over the gap, so moving the pointer from the avatar to the menu
   does not leave the hover and close it on the way. */
.ts-usermenu__panel::before {
    content: ""; position: absolute;
    left: 0; right: 0; top: -12px; height: 12px;
}
.ts-usermenu:hover .ts-usermenu__panel,
.ts-usermenu:focus-within .ts-usermenu__panel,
.ts-usermenu__panel.is-open { display: block; }

/* --------------------------------------------------------------------------
   Landing
   -------------------------------------------------------------------------- */

.ts-landing-hero {
    padding-top: 76px;
    padding-bottom: 64px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: start;
}

.ts-scanline { display: flex; align-items: center; gap: 9px; margin-bottom: 26px; }
.ts-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ts-up); }

.ts-hero__title { margin: 0 0 22px; font-size: 66px; line-height: 0.98; letter-spacing: -0.032em; text-wrap: pretty; }
.ts-hero__lede  { margin: 0 0 30px; font-size: 16.5px; line-height: 1.6; color: var(--ts-fg-2); max-width: 530px; text-wrap: pretty; }
.ts-hero__cta   { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

/* Setup anatomy panel.
   The plot is padded, and every level inside is positioned by a percentage. So
   an inner absolutely-positioned AREA carries the coordinate space and the
   markup only has to supply one number per level -- rather than each level
   having to compensate for the padding itself. */
.ts-anatomy__plot { position: relative; height: 322px; }
.ts-anatomy__area { position: absolute; left: 18px; right: 18px; top: 36px; bottom: 34px; }

.ts-anatomy__reward {
    position: absolute; left: 0; right: 0; top: 0; height: 90.9%;
    background: linear-gradient(180deg,
        color-mix(in oklab, var(--ts-up) 4%, transparent),
        color-mix(in oklab, var(--ts-up) 17%, transparent));
}
.ts-anatomy__risk {
    position: absolute; left: 0; right: 0; top: 90.9%; height: 9.1%;
    background: color-mix(in oklab, var(--ts-down) 22%, transparent);
}

.ts-anatomy__level {
    position: absolute; left: 0; right: 0;
    height: 0;
    display: flex; align-items: center; justify-content: space-between;
    border-top-width: 1px;
}
/* The label chips sit ON the rule, so they need the panel background behind
   them to punch a gap in the line rather than overprinting it. */
.ts-anatomy__name  { font-size: 11px; letter-spacing: 0.1em; background: var(--ts-surface); padding: 0 6px; transform: translateY(-1px); }
.ts-anatomy__price { font-size: 12px; font-weight: 500; background: var(--ts-surface); padding: 0 6px; transform: translateY(-1px); }

.ts-anatomy__band {
    position: absolute; left: 50%; transform: translateX(-50%);
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.1em;
    white-space: nowrap;
}

.ts-anatomy__foot { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ts-line); }
.ts-anatomy__foot > div { padding: 13px 18px; border-right: 1px solid var(--ts-line); }
.ts-anatomy__foot > div:last-child { border-right: 0; }
.ts-anatomy__stat { font-size: 17px; font-weight: 500; }

/* Scan strip */
.ts-strip { border-top: 1px solid var(--ts-line); border-bottom: 1px solid var(--ts-line); background: var(--ts-surface); }
.ts-strip__grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.ts-strip__cell { padding: 22px 0 22px 24px; border-left: 1px solid var(--ts-line); }
.ts-strip__cell:first-child { border-left: 0; padding-left: 0; }
.ts-strip__value { font-size: 23px; font-weight: 500; }

/* Numbered sections */
.ts-section { padding-top: 84px; }
.ts-section__head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 38px; flex-wrap: wrap; }
.ts-section__num { font-size: 11px; letter-spacing: 0.16em; color: var(--ts-accent); flex: 0 0 auto; text-transform: uppercase; }
.ts-section__title { font-size: 30px; letter-spacing: -0.02em; }

/* Ruled list: hairlines instead of cards, so four items read as one table of
   contents rather than four competing boxes. */
.ts-ruled { border-top: 1px solid var(--ts-line); }
.ts-ruled__row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 120px;
    gap: 24px;
    align-items: baseline;
    padding: 22px 0;
    border-bottom: 1px solid var(--ts-line);
}
.ts-ruled__key  { font-size: 11px; letter-spacing: 0.12em; color: var(--ts-fg-4); }
.ts-ruled__name { font-size: 17px; font-weight: 600; margin-bottom: 5px; }
.ts-ruled__desc { font-size: 14.5px; max-width: 640px; }
.ts-ruled__when { font-size: 11px; letter-spacing: 0.12em; text-align: right; text-transform: uppercase; }

.ts-gates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ts-gate__value { font-size: 24px; font-weight: 500; margin: 6px 0 10px; }
.ts-gate__why { margin: 0; font-size: 13.5px; line-height: 1.55; }

.ts-track { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; }

.ts-footer { margin-top: 84px; border-top: 1px solid var(--ts-line); }
.ts-footer__inner { display: flex; align-items: center; justify-content: space-between; padding-top: 26px; padding-bottom: 26px; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1100px) {
    .ts-landing-hero { grid-template-columns: 1fr; gap: 44px; padding-top: 48px; }
    .ts-hero__title { font-size: 48px; }
    .ts-strip__grid { grid-template-columns: repeat(2, 1fr); }
    .ts-strip__cell { padding-left: 20px; border-left: 1px solid var(--ts-line); }
    .ts-strip__cell:nth-child(odd) { border-left: 0; padding-left: 0; }
    .ts-gates { grid-template-columns: 1fr; }
    .ts-section { padding-top: 56px; }
}

@media (max-width: 760px) {
    .ts-hero__title { font-size: 38px; }
    .ts-ruled__row { grid-template-columns: 32px minmax(0, 1fr); }
    .ts-ruled__when { grid-column: 2; text-align: left; }
    .ts-strip__grid { grid-template-columns: 1fr; }
    .ts-strip__cell { border-left: 0; padding-left: 0; }

    /* THE TOP BAR HAD NO MOBILE TREATMENT AT ALL.
       The end-to-end suite measured the landing page overflowing a 390px
       viewport by 47px and named the culprits: the brand, the account controls
       (223px on their own) and two 32px gaps exceed the viewport between them,
       so the nav shrinks to nothing and it STILL does not fit. A page that
       scrolls sideways on a phone is unusable in a way no desktop screenshot
       shows.
       The wordmark goes and the mark stays -- the brand is still there, and at
       this width the word is the part carrying no information. */
    .ts-topbar__inner { gap: 12px; padding: 0 16px; }
    .ts-brand__word { display: none; }
    .ts-topbar__end { gap: 8px; min-width: 0; }
    .ts-topbar__end .ts-btn { padding-left: 10px; padding-right: 10px; font-size: 12.5px; }
}

.ts-row__type { font-size: 13px; color: var(--ts-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-rows__empty { padding: 56px 20px; text-align: center; }
.ts-rows__empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }

.ts-page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.ts-page__title { font-size: 32px; margin-bottom: 6px; }
.ts-page__head-end { display: flex; align-items: center; gap: 16px; }

/* --------------------------------------------------------------------------
   Quote header
   -------------------------------------------------------------------------- */

.ts-quote-head { border-bottom: 1px solid var(--ts-line); }
.ts-quote-head__top { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.ts-quote-head__ident { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.ts-quote-head__sym { font-family: var(--ts-mono); font-size: 34px; font-weight: 600; letter-spacing: 0.01em; }
.ts-quote-head__price { text-align: right; }
.ts-quote-head__last { font-size: 28px; font-weight: 500; letter-spacing: -0.01em; }

.ts-quote-head__pricerow {
    display: flex; align-items: baseline; justify-content: flex-end; gap: 10px;
}
.ts-quote-head__chg { font-size: 15px; font-weight: 500; }
.ts-quote-head__chg.up { color: var(--ts-up); }
.ts-quote-head__chg.down { color: var(--ts-down); }

/* PROVENANCE, NOT MICROCOPY.
   Whether a quote is usable is decided by its session date and its freshness,
   so this is set at a readable 12.5px rather than the 9.5px eyebrow the page
   uses for decorative labels. */
.ts-provenance {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-top: 5px;
    font-family: var(--ts-mono);
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ts-fg-3);
}
.ts-provenance--right { justify-content: flex-end; }
.ts-provenance__dot { opacity: .5; }

/* Sits under a panel heading to date THAT panel's data, so freshness travels
   with the numbers it describes instead of living once at the top of the page. */
/* Sentences in the body face; figures stay aligned with tabular numerals.
   Monospace is for numbers, symbols and badges, not for reading. */
.ts-asof {
    font-family: var(--ts-sans);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--ts-fg-3);
    margin: -4px 0 12px;
}

/* MudPaper panels inside the redesigned pages inherit the card treatment, so
   the untouched panel internals sit on the right surface without each one
   having to be rewritten. */
.ts-page .mud-paper,
.ts-rail .mud-paper {
    background: var(--ts-surface);
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Account pages (sign in, sign-in link, register)

   These arrived from the ASP.NET Identity scaffold on Bootstrap defaults: a
   full-width form, floating labels, a stock blue button, and the browser's own
   pale-yellow autofill painted over all of it. On a dark product it read as a
   different application bolted to the side of this one -- which, visually, is
   exactly what it was.

   One centred card, the app's own tokens, one field style shared by every
   account page.
   -------------------------------------------------------------------------- */

.ts-auth { max-width: 460px; margin: 0 auto; padding: 44px 20px 80px; }

.ts-auth__card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    background: var(--ts-surface);
    padding: 30px 28px 24px;
}

/* Accent hairline across the top edge: the one place the brand colour appears
   on these pages, and enough to stop the card reading as a plain grey box. */
.ts-auth__card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--ts-accent),
        color-mix(in oklab, var(--ts-accent) 22%, transparent));
}

.ts-auth__title {
    font-size: 26px; font-weight: 700; letter-spacing: -0.01em;
    text-align: center; margin: 2px 0 6px;
}
.ts-auth__sub { text-align: center; font-size: 14px; color: var(--ts-fg-2); margin: 0 0 20px; }

.ts-auth__note {
    display: flex; gap: 9px; align-items: flex-start;
    font-size: 13px; color: var(--ts-fg-2); margin: 0 0 20px;
}
.ts-auth__note .ts-ico { color: var(--ts-accent); font-size: 17px; flex: 0 0 auto; }

/* Two ways in, offered as a choice instead of a link buried under the form.
   LINKS rather than a scripted tab strip on purpose: the account pages are
   statically rendered because they round-trip POST-back forms, so a real
   navigation is the only thing that also works with scripting off. */
.ts-auth__tabs {
    display: flex; gap: 4px; padding: 4px; margin: 0 0 22px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-bg);
}
.ts-auth__tab {
    flex: 1; text-align: center; padding: 8px 10px; border-radius: 4px;
    font-size: 13.5px; font-weight: 600; color: var(--ts-fg-2);
}
.ts-auth__tab:hover { color: var(--ts-fg); }
.ts-auth__tab--on { background: var(--ts-surface-3); color: var(--ts-fg); }

.ts-field { margin: 0 0 16px; }
.ts-field__head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 0 0 6px;
}
.ts-field__label { font-size: 13px; font-weight: 600; color: var(--ts-fg); }
.ts-field__aside { font-size: 12.5px; }
.ts-field__wrap { position: relative; display: flex; align-items: center; }

.ts-input {
    width: 100%; padding: 11px 12px;
    border: 1px solid var(--ts-line-2);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-bg); color: var(--ts-fg);
    font-family: var(--ts-sans); font-size: 14.5px;
}
.ts-input::placeholder { color: var(--ts-fg-5); }
.ts-input:focus-visible {
    outline: 2px solid var(--ts-accent); outline-offset: 1px;
    border-color: var(--ts-accent);
}

/* AUTOFILL. Both Chrome and Firefox paint their own pale yellow over a filled
   field, which was the single most obviously broken thing on the sign-in page.
   No property overrides it directly, so the colour goes in through a 1000px
   inset shadow and the glyph colour is forced separately. */
.ts-input:autofill,
.ts-input:-webkit-autofill,
.ts-input:-webkit-autofill:hover,
.ts-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ts-fg);
    -webkit-box-shadow: 0 0 0 1000px var(--ts-bg) inset;
    box-shadow: 0 0 0 1000px var(--ts-bg) inset;
    caret-color: var(--ts-fg);
}

.ts-auth__reveal {
    position: absolute; right: 4px;
    border: 0; background: none; cursor: pointer;
    padding: 6px 8px; font: inherit; font-size: 12.5px; font-weight: 600;
    color: var(--ts-fg-2);
}
.ts-auth__reveal:hover { color: var(--ts-fg); }

.ts-auth__check {
    display: flex; align-items: center; gap: 8px;
    font-size: 13.5px; color: var(--ts-fg-2); margin: 2px 0 18px;
}
.ts-auth__check input { accent-color: var(--ts-accent); width: 15px; height: 15px; }

.ts-auth__submit {
    width: 100%; padding: 12px 16px; margin-top: 2px;
    border: 0; border-radius: var(--ts-radius-sm);
    background: var(--ts-accent); color: var(--ts-on-accent);
    font-family: var(--ts-sans); font-size: 15px; font-weight: 600;
    cursor: pointer;
}
.ts-auth__submit:hover { background: color-mix(in oklab, var(--ts-accent) 88%, white); }

.ts-auth__alt { text-align: center; margin: 14px 0 0; font-size: 13.5px; }
.ts-auth__alt button {
    border: 0; background: none; padding: 0;
    font: inherit; color: var(--ts-accent); cursor: pointer;
}
.ts-auth__alt button:hover { color: var(--ts-fg); }

.ts-auth__foot {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    margin: 20px 0 0; padding-top: 16px;
    border-top: 1px solid var(--ts-line);
    font-size: 12.5px; color: var(--ts-fg-3);
}
.ts-auth__foot .ts-ico { font-size: 15px; }

.ts-auth__below { text-align: center; margin: 22px 0 0; font-size: 14px; color: var(--ts-fg-2); }
.ts-auth__small { text-align: center; margin: 10px 0 0; font-size: 12.5px; color: var(--ts-fg-3); }

/* StatusMessage and the validation summary still emit Bootstrap's alert and
   text-danger classes. Restyled here rather than rewritten, because they are
   shared by every account page and their BEHAVIOUR is correct. */
.ts-auth .alert {
    border-radius: var(--ts-radius-sm);
    padding: 10px 12px; margin: 0 0 18px;
    font-size: 13.5px; border: 1px solid var(--ts-line);
    background: var(--ts-surface-2); color: var(--ts-fg);
}
.ts-auth .alert-danger {
    border-color: color-mix(in oklab, var(--ts-down) 45%, var(--ts-line));
    background: color-mix(in oklab, var(--ts-down) 12%, transparent);
}
.ts-auth .alert-success {
    border-color: color-mix(in oklab, var(--ts-up) 40%, var(--ts-line));
    background: color-mix(in oklab, var(--ts-up) 10%, transparent);
}
.ts-auth .text-danger { color: var(--ts-down); font-size: 12.5px; display: block; margin-top: 5px; }
.ts-auth .validation-summary-errors ul { margin: 0; padding-left: 18px; }
.ts-field__hint { font-size: 12.5px; color: var(--ts-fg-3); margin: 6px 0 0; }

/* --------------------------------------------------------------------------
   Account settings (Account/Manage/*)

   Fourteen pages that were still Bootstrap nav-pills plus a column of
   floating-label forms. Same tokens as the sign-in card, laid out as a
   settings area rather than a single card: a section list on the left and one
   panel per section.
   -------------------------------------------------------------------------- */

.ts-set { max-width: 1000px; margin: 0 auto; padding: 32px var(--ts-gutter) 80px; }
.ts-set__title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
.ts-set__sub { color: var(--ts-fg-2); font-size: 14px; margin: 0 0 24px; }

.ts-set__grid {
    display: grid;
    grid-template-columns: 216px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.ts-set__nav { display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; padding: 0; }
.ts-set__nav a {
    display: block; padding: 9px 12px;
    border-radius: var(--ts-radius-sm);
    font-size: 13.5px; color: var(--ts-fg-2);
}
.ts-set__nav a:hover { background: var(--ts-surface-2); color: var(--ts-fg); }
/* NavLink adds .active itself, so the current section needs no server-side
   comparison here. */
.ts-set__nav a.active { background: var(--ts-surface-3); color: var(--ts-fg); font-weight: 600; }

/* Below the breakpoint the section list becomes a scrolling strip above the
   panel. Same reason .ts-nav__scroll exists: a settings sidebar is 216px not
   showing settings on a phone. */
@media (max-width: 860px) {
    .ts-set { padding-left: 20px; padding-right: 20px; }
    .ts-set__grid { grid-template-columns: minmax(0, 1fr); }
    .ts-set__nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
    .ts-set__nav::-webkit-scrollbar { display: none; }
    .ts-set__nav a { white-space: nowrap; }
}

.ts-panel {
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    background: var(--ts-surface);
    padding: 24px;
}
.ts-panel + .ts-panel { margin-top: 18px; }
.ts-panel__title { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.ts-panel__sub { font-size: 13.5px; color: var(--ts-fg-2); margin: 0 0 20px; }
.ts-panel h3 { font-size: 15px; font-weight: 700; margin: 22px 0 8px; }
.ts-panel h3:first-child { margin-top: 0; }
.ts-panel p { font-size: 13.5px; color: var(--ts-fg-2); }
.ts-panel form { max-width: 430px; }
.ts-panel .row, .ts-panel .col-xl-6, .ts-panel .col-md-6 { display: contents; }

/* LABEL ABOVE INPUT REGARDLESS OF DOM ORDER.
   The scaffold used Bootstrap floating labels, which put the <input> BEFORE
   its <label>. Reordering the markup on fourteen pages by hand is how a
   for/id pair gets broken, so the order is set in CSS and the markup keeps
   whatever pairing it already had. */
.ts-field { display: flex; flex-direction: column; }
.ts-field > label,
.ts-field > .ts-field__head { order: 1; }
.ts-field > .ts-input,
.ts-field > input,
.ts-field > select,
.ts-field > textarea { order: 2; }
.ts-field > .text-danger,
.ts-field > .validation-message,
.ts-field > .ts-field__hint { order: 3; }
.ts-field > label { font-size: 13px; font-weight: 600; color: var(--ts-fg); margin: 0 0 6px; }

.ts-auth__submit, .ts-submit {
    width: 100%; padding: 12px 16px; margin-top: 2px;
    border: 0; border-radius: var(--ts-radius-sm);
    background: var(--ts-accent); color: var(--ts-on-accent);
    font-family: var(--ts-sans); font-size: 15px; font-weight: 600;
    cursor: pointer;
}
.ts-auth__submit:hover, .ts-submit:hover { background: color-mix(in oklab, var(--ts-accent) 88%, white); }

/* Destructive actions get the down colour, not the accent. Deleting an
   account should not look like the primary thing to do on the page. */
.ts-submit--danger { background: var(--ts-down); color: oklch(0.16 0.02 24); }
.ts-submit--danger:hover { background: color-mix(in oklab, var(--ts-down) 88%, white); }

.ts-submit--auto { width: auto; padding: 10px 18px; }

.ts-linkbtn {
    border: 0; background: none; padding: 0;
    font: inherit; color: var(--ts-accent); cursor: pointer;
}
.ts-linkbtn:hover { color: var(--ts-fg); }

.ts-set table, .ts-panel table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ts-set th, .ts-panel th {
    text-align: left; padding: 8px 10px;
    border-bottom: 1px solid var(--ts-line);
    color: var(--ts-fg-3); font-weight: 600;
    font-family: var(--ts-mono); font-size: 11.5px;
    letter-spacing: 0.06em; text-transform: uppercase;
}
.ts-set td, .ts-panel td { padding: 10px; border-bottom: 1px solid var(--ts-line); }

.ts-set .alert, .ts-panel .alert {
    border-radius: var(--ts-radius-sm);
    padding: 11px 13px; margin: 0 0 18px;
    font-size: 13.5px; border: 1px solid var(--ts-line);
    background: var(--ts-surface-2); color: var(--ts-fg);
}
.ts-set .alert-danger, .ts-panel .alert-danger {
    border-color: color-mix(in oklab, var(--ts-down) 45%, var(--ts-line));
    background: color-mix(in oklab, var(--ts-down) 12%, transparent);
}
.ts-set .alert-success, .ts-panel .alert-success {
    border-color: color-mix(in oklab, var(--ts-up) 40%, var(--ts-line));
    background: color-mix(in oklab, var(--ts-up) 10%, transparent);
}
.ts-set .alert-warning, .ts-panel .alert-warning {
    border-color: color-mix(in oklab, var(--ts-warn) 45%, var(--ts-line));
    background: color-mix(in oklab, var(--ts-warn) 12%, transparent);
}
.ts-set .text-danger, .ts-panel .text-danger { color: var(--ts-down); font-size: 12.5px; display: block; margin-top: 5px; }
.ts-set .text-info, .ts-panel .text-info { color: var(--ts-fg-2); }
.ts-set .validation-summary-errors ul, .ts-panel .validation-summary-errors ul { margin: 0; padding-left: 18px; }
/* BOOTSTRAP PAINTS <code> PINK (#d63384) and it is loaded before this file, so
   any inline code on a dark card inherited a colour that fails AA against it --
   axe caught exactly that on /methodology's R-multiple formulas. The rule below
   already covered two surfaces; .ts-card is the third and the one prose lives
   on. */
.ts-set code, .ts-panel code, .ts-card code { font-family: var(--ts-mono); font-size: 12.5px; color: var(--ts-fg); }

/* A <code> INSIDE MUDBLAZOR'S OWN SURFACES HAD NO COLOUR OF ITS OWN.
   The rule above covers this product's containers; a <code> written inside a
   MudText or a MudPaper matched none of them and fell back to the framework
   default, which does not meet 4.5:1 on these surfaces. The accessibility scan
   caught it on /calendar within minutes of that page being added to the suite
   -- the page had never been scanned before.
   color: inherit rather than a colour of its own, deliberately: it then reads
   exactly as well as the sentence around it, and that sentence is one the scan
   already accepts. A hardcoded value would be a second thing to keep in step
   with the theme. */
.mud-typography code, .mud-paper code { font-family: var(--ts-mono); font-size: 12.5px; color: inherit; }
.ts-set kbd, .ts-panel kbd {
    font-family: var(--ts-mono); font-size: 12.5px;
    background: var(--ts-bg); border: 1px solid var(--ts-line-2);
    border-radius: 4px; padding: 2px 6px; color: var(--ts-fg);
}

/* TWO-STEP VERIFICATION. Three numbered steps with the QR code and its typed
   fallback side by side; they stack on a phone, where the key is what gets
   copied because the code cannot be scanned by the device showing it. */
.ts-2fa__steps { margin: 0; padding: 0; list-style: none; counter-reset: ts-2fa; }
.ts-2fa__steps > li {
    counter-increment: ts-2fa; position: relative;
    padding: 16px 0 16px 40px; border-top: 1px solid var(--ts-line);
}
.ts-2fa__steps > li::before {
    content: counter(ts-2fa); position: absolute; left: 0; top: 16px;
    width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ts-surface-2); border: 1px solid var(--ts-line-2);
    font-family: var(--ts-mono); font-size: 12.5px; color: var(--ts-fg);
}
.ts-2fa__steps h4 { font-size: 14.5px; font-weight: 700; margin: 2px 0 6px; color: var(--ts-fg); }
.ts-2fa__steps p { margin: 0 0 10px; }
.ts-2fa__pair { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
/* White behind the code whatever the theme: scanners need dark modules on a
   light ground, and the quiet zone the generator draws is part of the code. */
.ts-2fa__qr {
    width: 198px; height: 198px; flex: 0 0 auto;
    background: #fff; border-radius: var(--ts-radius-sm);
    image-rendering: pixelated;
}
.ts-2fa__key { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 220px; }
.ts-2fa__key-label { font-size: 13px; font-weight: 600; color: var(--ts-fg); }
.ts-2fa__key kbd { font-size: 14px; padding: 8px 10px; word-break: break-all; user-select: all; }
.ts-2fa__key-hint { font-size: 12.5px; color: var(--ts-fg-3); }
.ts-input--code { font-family: var(--ts-mono); letter-spacing: 0.12em; max-width: 220px; }
.ts-2fa__codes {
    list-style: none; margin: 0 0 18px; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.ts-2fa__codes li {
    padding: 8px 10px; border: 1px solid var(--ts-line); border-radius: var(--ts-radius-sm);
    background: var(--ts-bg); text-align: center; user-select: all;
}
.ts-2fa__codes code { font-size: 14px; }
.ts-2fa__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.ts-2fa__inline { display: inline; max-width: none; }
.ts-2fa__on { color: var(--ts-up); font-weight: 600; }
.ts-2fa__next { margin: 0; }
.ts-submit--quiet { background: var(--ts-surface-2); color: var(--ts-fg); border: 1px solid var(--ts-line-2); }
.ts-submit--quiet:hover { background: var(--ts-bg); }

/* Read-only account facts (the Profile panel). A definition list because that
   is what a label/value pair is, and it keeps the pairing for a screen reader
   without inventing a table. */
.ts-facts { margin: 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0; }
.ts-facts dt {
    padding: 11px 0; border-top: 1px solid var(--ts-line);
    font-family: var(--ts-mono); font-size: 11.5px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-facts dd {
    padding: 11px 0; margin: 0; border-top: 1px solid var(--ts-line);
    font-size: 14px; color: var(--ts-fg);
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.ts-facts__aside { font-size: 12.5px; flex: 0 0 auto; }
@media (max-width: 620px) {
    .ts-facts { grid-template-columns: minmax(0, 1fr); }
    .ts-facts dt { padding-bottom: 0; border-top: 1px solid var(--ts-line); }
    .ts-facts dd { padding-top: 4px; border-top: 0; }
}

/* An <a> wearing a button's clothes -- the personal-data page links to the
   delete confirmation rather than posting to it, which is correct: it is a
   navigation, not the destructive act itself. */
a.ts-submit { display: inline-block; text-align: center; text-decoration: none; }
a.ts-submit:hover { color: var(--ts-on-accent); }
a.ts-submit--danger:hover { color: oklch(0.16 0.02 24); }
.ts-panel strong { color: var(--ts-fg); }

/* --------------------------------------------------------------------------
   Pricing
   --------------------------------------------------------------------------
   Four cards on one hairline grid, a comparison table that scrolls inside
   itself rather than pushing the page sideways, and an FAQ built from <details>
   so it works with JavaScript off and reads correctly to a screen reader.

   Every figure on the page comes from PlanCatalog. Nothing here styles a number
   that was typed into the markup.
   -------------------------------------------------------------------------- */

.ts-visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.ts-price-hero { padding-top: 48px; padding-bottom: 32px; max-width: 860px; }
.ts-price-hero .ts-hero__title { margin: 14px 0 0; }
.ts-price-hero .ts-hero__lede { margin: 14px 0 0; }

.ts-price-promises {
    display: flex; flex-wrap: wrap; gap: 8px 20px;
    margin: 20px 0 0; padding: 0;
    list-style: none;
    font-size: 12.5px; color: var(--ts-fg-2);
}
.ts-price-promises li { display: inline-flex; align-items: center; gap: 6px; }
.ts-price-promises .ts-ico { font-size: 15px; color: var(--ts-accent); }

.ts-price-toggle { margin-top: 26px; }

.ts-price-gate { margin-bottom: 24px; border-color: var(--ts-warn); }
.ts-price-gate__list { margin: 10px 0 0; padding-left: 20px; color: var(--ts-fg-2); font-size: 12.5px; }
.ts-price-gate__list li { margin-bottom: 5px; }

.ts-price-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.ts-price-card { position: relative; height: 100%; }
.ts-price-card--featured { border-color: var(--ts-accent); }
.ts-price-card__ribbon {
    position: absolute; top: 0; right: 0;
    padding: 3px 10px;
    border-bottom-left-radius: var(--ts-radius-sm);
    background: var(--ts-accent); color: var(--ts-on-accent);
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}

.ts-price-card__name { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.ts-price-card__tagline { margin: 6px 0 0; font-size: 13px; color: var(--ts-fg); }
.ts-price-card__audience { margin: 6px 0 0; font-size: 11.5px; line-height: 1.5; }

.ts-price-card__amount { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; }
.ts-price-card__figure { font-size: 30px; letter-spacing: -0.02em; color: var(--ts-fg); }
.ts-price-card__per { font-size: 12px; }
.ts-price-card__terms { margin-top: 4px; font-size: 11px; min-height: 15px; }

.ts-price-card__cta { width: 100%; justify-content: center; margin-top: 16px; }
.ts-price-card__cta[disabled] { opacity: .45; cursor: not-allowed; }

.ts-price-card__list { margin: 18px 0 0; padding: 0; list-style: none; }
.ts-price-card__list li {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 7px 0;
    border-top: 1px solid var(--ts-line);
    font-size: 12.5px; line-height: 1.5; color: var(--ts-fg-2);
}
.ts-price-card__list li:first-child { border-top: 0; padding-top: 0; }
.ts-price-card__list .ts-ico { font-size: 15px; color: var(--ts-accent); flex: 0 0 auto; margin-top: 1px; }

.ts-price-card__note { margin: 14px 0 0; font-size: 11px; line-height: 1.55; }

.ts-price-contract { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.ts-price-contract__figure { font-size: 20px; color: var(--ts-fg); white-space: nowrap; }

.ts-price-footnote { margin: 18px 0 0; font-size: 11px; line-height: 1.6; max-width: 90ch; }

.ts-price-section { padding-top: 56px; }
.ts-price-section__title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.ts-price-section__lede { margin: 8px 0 20px; font-size: 13px; max-width: 80ch; }

/* The table scrolls in its own box. The page body must never scroll
   horizontally -- the accessibility suite checks exactly that at a phone
   width, and a wide table is the classic way to fail it. */
.ts-price-tablewrap {
    overflow-x: auto;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    background: var(--ts-surface);
}
.ts-price-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 12.5px; }
.ts-price-table th, .ts-price-table td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--ts-line);
    line-height: 1.5;
}
.ts-price-table thead th {
    border-top: 0;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ts-fg-3);
    background: var(--ts-surface-2);
    position: sticky; top: 0;
}
.ts-price-table tbody th[scope="row"] { font-weight: 500; color: var(--ts-fg); width: 30%; }
.ts-price-table tbody td { color: var(--ts-fg-2); }
.ts-price-table__section th {
    background: var(--ts-surface-3);
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ts-fg-3);
}

.ts-price-credits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ts-price-credits__ops, .ts-price-credits__packs { margin: 0; padding: 0; list-style: none; }
.ts-price-credits__ops li {
    display: flex; gap: 12px; align-items: baseline;
    padding: 9px 0; border-top: 1px solid var(--ts-line);
    font-size: 12.5px; color: var(--ts-fg-2);
}
.ts-price-credits__ops li:first-child { border-top: 0; padding-top: 0; }
.ts-price-credits__cost {
    flex: 0 0 34px; text-align: right;
    font-size: 15px; color: var(--ts-accent);
}
.ts-price-credits__packs li {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-top: 1px solid var(--ts-line);
    font-size: 13px; color: var(--ts-fg-2);
}
.ts-price-credits__packs li:first-child { border-top: 0; padding-top: 0; }

.ts-price-faq { display: grid; gap: 10px; }
.ts-price-faq__item { padding: 0; }
.ts-price-faq__item > summary {
    padding: 14px 18px;
    cursor: pointer;
    font-size: 13.5px; font-weight: 500; color: var(--ts-fg);
    list-style: none;
}
.ts-price-faq__item > summary::-webkit-details-marker { display: none; }
.ts-price-faq__item > summary::after {
    content: "+"; float: right;
    font-family: var(--ts-mono); color: var(--ts-fg-3);
}
.ts-price-faq__item[open] > summary::after { content: "−"; }
.ts-price-faq__item > p { margin: 0; padding: 0 18px 16px; font-size: 12.5px; line-height: 1.65; max-width: 92ch; }

/* --------------------------------------------------------------------------
   Contextual upgrade prompts
   -------------------------------------------------------------------------- */

.ts-paywall {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
    padding: 14px 16px;
    border: 1px solid var(--ts-line-2);
    border-radius: var(--ts-radius);
    background: var(--ts-surface-2);
}
.ts-paywall__body { flex: 1 1 260px; min-width: 0; }
.ts-paywall__message { margin: 0; font-size: 13px; color: var(--ts-fg); }
.ts-paywall__detail { margin: 5px 0 0; font-size: 11.5px; color: var(--ts-fg-3); line-height: 1.55; }
.ts-paywall__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Plan and billing page
   -------------------------------------------------------------------------- */

.ts-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ts-plan-meter { margin: 0; padding: 0; list-style: none; }
.ts-plan-meter li {
    display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
    padding: 8px 0; border-top: 1px solid var(--ts-line);
    font-size: 12.5px; color: var(--ts-fg-2);
}
.ts-plan-meter li:first-child { border-top: 0; padding-top: 0; }
.ts-plan-meter__value { font-family: var(--ts-mono); color: var(--ts-fg); white-space: nowrap; }

@media (max-width: 1080px) {
    .ts-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ts-plan-grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .ts-price-grid,
    .ts-price-contract,
    .ts-price-credits,
    .ts-plan-grid { grid-template-columns: minmax(0, 1fr); }
    .ts-price-hero { padding-top: 32px; }
}

/* --------------------------------------------------------------------------
   Quote rail: symbol status and setup cards
   --------------------------------------------------------------------------
   A 336px rail is a decision surface, not a table viewport. These replace a
   nine-column MudTable that was squeezed into a column narrower than a phone.
   -------------------------------------------------------------------------- */

.ts-status-card__head {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 14.5px;
    margin-bottom: 8px;
}
.ts-status-card__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ts-fg-3);
    flex: 0 0 auto;
}
.ts-status-card__body {
    margin: 0 0 10px;
    font-size: 13.5px; line-height: 1.55;
    color: var(--ts-fg-2);
}
.ts-status-card__note {
    margin: 10px 0 0;
    font-size: 12.5px; line-height: 1.5;
    color: var(--ts-fg-3);
}
.ts-status-card__actions {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}

.ts-setup-card {
    border: 1px solid var(--ts-line);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}
.ts-setup-card__head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.ts-setup-card__name { font-weight: 600; font-size: 14.5px; }
.ts-setup-card__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-top: 4px;
    font-family: var(--ts-mono); font-size: 11.5px; color: var(--ts-fg-3);
}
.ts-setup-card__score {
    font-family: var(--ts-mono); font-size: 18px; font-weight: 600;
    line-height: 1;
}
.ts-setup-card__levels {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin: 12px 0;
    padding: 10px 0;
    border-top: 1px solid var(--ts-line);
    border-bottom: 1px solid var(--ts-line);
}
.ts-setup-card__levels > div { display: flex; flex-direction: column; gap: 2px; }
.ts-setup-card__levels span {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-setup-card__levels strong { font-size: 14px; }

.ts-setup-card__ladder { display: flex; flex-direction: column; gap: 4px; }
.ts-ladder-row {
    display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
    align-items: baseline;
    font-size: 12.5px;
}
.ts-ladder-row__name { color: var(--ts-fg-3); }
.ts-ladder-row__r { color: var(--ts-fg-2); min-width: 42px; text-align: right; }

.ts-setup-card__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--ts-line);
    font-family: var(--ts-mono); font-size: 11.5px; color: var(--ts-fg-3);
}
.ts-rail__more { font-size: 12.5px; }
.ts-rail__more a { color: var(--ts-accent); text-decoration: none; }
.ts-rail__more a:hover { text-decoration: underline; }

.ts-btn--sm { padding: 5px 10px; font-size: 12px; }
.ts-tag--up { color: var(--ts-up); border-color: color-mix(in oklch, var(--ts-up) 45%, transparent); }
.ts-tag--down { color: var(--ts-down); border-color: color-mix(in oklch, var(--ts-down) 45%, transparent); }

/* MOBILE READING ORDER.
   Below the split breakpoint the rail followed the chart AND the whole
   technical grid, so on a phone the single most decision-relevant thing --
   is there a setup or not -- sat under everything. It comes second now,
   directly after identity and price. */
@media (max-width: 1100px) {
    .ts-split { display: flex; flex-direction: column; }
    .ts-split > .ts-rail { order: -1; }
}

/* --------------------------------------------------------------------------
   Range locator and trend distance
   --------------------------------------------------------------------------
   Two pictures that each replace an arithmetic step the reader was doing in
   their head from numbers already on the page.
   -------------------------------------------------------------------------- */

.ts-locator, .ts-trend { margin-top: 4px; }

.ts-locator__head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    margin-bottom: 10px;
}
.ts-locator__title { font-size: 13.5px; font-weight: 600; }
.ts-locator__pct { font-size: 12px; color: var(--ts-fg-3); }

.ts-locator__track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: var(--ts-line-2, rgba(255,255,255,.08));
    overflow: visible;
}
.ts-locator__fill {
    position: absolute; inset: 0 auto 0 0;
    border-radius: 999px;
    background: linear-gradient(90deg,
        color-mix(in oklch, var(--ts-accent) 35%, transparent),
        var(--ts-accent));
}
.ts-locator__marker {
    position: absolute; top: 50%;
    width: 3px; height: 18px;
    transform: translate(-50%, -50%);
    border-radius: 2px;
    background: var(--ts-fg);
    box-shadow: 0 0 0 2px var(--ts-bg);
}

.ts-locator__scale {
    display: flex; justify-content: space-between; gap: 8px;
    margin-top: 10px;
    font-size: 12px; color: var(--ts-fg-3);
}
.ts-locator__scale em {
    display: block;
    font-style: normal; font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; opacity: .75;
}
.ts-locator__scale > :nth-child(2) { text-align: center; }
.ts-locator__scale > :last-child { text-align: right; }
.ts-locator__now { color: var(--ts-fg); }

.ts-locator__note {
    margin: 12px 0 0;
    font-size: 12px; line-height: 1.5; color: var(--ts-fg-3);
}

.ts-trend__rows { display: flex; flex-direction: column; gap: 8px; }
.ts-trend__row {
    display: grid; grid-template-columns: 68px 1fr 58px; gap: 10px; align-items: center;
}
.ts-trend__label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-trend__track {
    position: relative; height: 14px;
    background: var(--ts-line-2, rgba(255,255,255,.05));
    border-radius: 3px;
}
.ts-trend__zero {
    position: absolute; left: 50%; top: 0; bottom: 0;
    width: 1px; background: var(--ts-line);
}
.ts-trend__bar { position: absolute; top: 3px; bottom: 3px; border-radius: 2px; }
.ts-trend__bar.up { background: var(--ts-up); }
.ts-trend__bar.down { background: var(--ts-down); }
/* On the average (within half a percent): neither side. */
.ts-trend__bar.at { background: var(--ts-fg-3); }
.ts-trend__pct { font-size: 12px; text-align: right; }

/* The bars are the only moving thing here, and they encode a measurement --
   so they animate into place once and never loop. Anyone who has asked for
   less motion gets the end state directly. */
@media (prefers-reduced-motion: no-preference) {
    .ts-locator__fill { transition: width .34s cubic-bezier(.22,.61,.36,1); }
    .ts-locator__marker { transition: left .34s cubic-bezier(.22,.61,.36,1); }
    .ts-trend__bar { transition: width .28s cubic-bezier(.22,.61,.36,1); }
}

/* --------------------------------------------------------------------------
   Grouped technical metrics with inline definitions
   --------------------------------------------------------------------------
   <details> rather than a tooltip: definitions have to open on click, on
   focus and on touch, and a hover-only affordance gives a phone reader
   nothing at all.
   -------------------------------------------------------------------------- */

.ts-viz-pair {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.ts-metric-group { margin-bottom: 18px; }
.ts-metric-group:last-child { margin-bottom: 0; }
.ts-metric-group__title {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ts-fg-3);
    padding-bottom: 6px; margin-bottom: 10px;
    border-bottom: 1px solid var(--ts-line);
}

.ts-metric__def { border: 0; }
.ts-metric__def > summary {
    list-style: none;
    cursor: help;
    padding: 4px 0;
    border-radius: 4px;
}
.ts-metric__def > summary::-webkit-details-marker { display: none; }
.ts-metric__def > summary:focus-visible {
    outline: 2px solid var(--ts-accent);
    outline-offset: 2px;
}
.ts-metric__label {
    display: block;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3);
    margin-bottom: 4px;
}
/* A dotted underline is the long-standing convention for "there is a
   definition here", and it survives on touch where a hover cue does not. */
.ts-metric__label { border-bottom: 1px dotted var(--ts-line-2, rgba(255,255,255,.18)); display: inline-block; }
.ts-metric__value { font-size: 15px; display: block; }
.ts-metric__def[open] > summary .ts-metric__label { color: var(--ts-fg-2); }
.ts-metric__def > p {
    margin: 6px 0 2px;
    font-size: 12px; line-height: 1.5; color: var(--ts-fg-2);
    padding-left: 10px;
    border-left: 2px solid var(--ts-accent);
}

@media (max-width: 700px) {
    /* Metadata a decision depends on should not be set at decorative sizes. */
    .ts-metric__label { font-size: 11px; }
    .ts-metric__value { font-size: 16px; }
    .ts-metric__def > summary { min-height: 44px; }
}

/* --------------------------------------------------------------------------
   Chart workspace controls
   -------------------------------------------------------------------------- */

.ts-chart-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.ts-chart-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* NAMESPACED, because .ts-seg IS ALREADY TAKEN.
   Reusing it redefined the shared segmented control that /pricing and the
   dashboard both use -- and an .active rule painting the accent behind text
   whose colour did not change put .ts-seg__count on an accent background at
   failing contrast. axe caught it on /pricing. A page-specific control gets a
   page-specific class. */
.ts-range {
    display: inline-flex;
    border: 1px solid var(--ts-line);
    border-radius: 6px;
    overflow: hidden;
}
.ts-range__item {
    border: 0; background: transparent;
    color: var(--ts-fg-3);
    font-family: var(--ts-mono); font-size: 11.5px; letter-spacing: .06em;
    padding: 7px 12px;
    min-height: 34px;
    cursor: pointer;
    transition: background .14s, color .14s;
}
.ts-range__item + .ts-range__item { border-left: 1px solid var(--ts-line); }
.ts-range__item:hover { color: var(--ts-fg); }
.ts-range__item.active { background: var(--ts-accent); color: #06121f; }
.ts-range__item:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: -2px; }

.ts-chart-toggles { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-end; }
.ts-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .05em;
    color: var(--ts-fg-3);
    cursor: pointer;
    min-height: 30px;
}
.ts-toggle.active { color: var(--ts-fg-2); }
.ts-toggle input { accent-color: var(--ts-accent); width: 14px; height: 14px; cursor: pointer; }
.ts-toggle__swatch { width: 12px; height: 2px; border-radius: 1px; }

.ts-volume-pane { margin-top: -6px; }

@media (max-width: 700px) {
    .ts-chart-head { flex-direction: column; }
    .ts-chart-controls { align-items: stretch; width: 100%; }
    .ts-chart-toggles { justify-content: flex-start; }
    .ts-range { width: 100%; }
    .ts-range__item { flex: 1; min-height: 44px; }
    .ts-toggle { min-height: 44px; }
}

/* The report offer: price stated before the reader pays it. */
.ts-offer {
    border: 1px solid var(--ts-line);
    border-left: 3px solid var(--ts-accent);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.ts-offer__head { font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.ts-offer__body { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ts-fg-2); }
.ts-offer__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* --------------------------------------------------------------------------
   Catalyst feed: headline first
   --------------------------------------------------------------------------
   The table put five database fields in front of the sentence a reader came
   to read. This is a reading surface, not a record viewer.
   -------------------------------------------------------------------------- */

.ts-newsfeed { display: flex; flex-direction: column; max-height: 460px; overflow-y: auto; }
.ts-news { padding: 14px 0; border-bottom: 1px solid var(--ts-line); }
.ts-news:last-child { border-bottom: 0; }
.ts-news__headline {
    margin: 0 0 6px;
    font-size: 14.5px; font-weight: 500; line-height: 1.45;
}
.ts-news__headline a { color: var(--ts-fg); text-decoration: none; }
.ts-news__headline a:hover { text-decoration: underline; }
.ts-news__headline a:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-news__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    font-family: var(--ts-mono); font-size: 11.5px; color: var(--ts-fg-3);
}
.ts-news__chip {
    padding: 1px 7px; border-radius: 999px;
    border: 1px solid var(--ts-line);
    font-size: 11px; letter-spacing: .04em;
}
.ts-news__chip--bullish { color: var(--ts-up); border-color: color-mix(in oklch, var(--ts-up) 40%, transparent); }
.ts-news__chip--bearish { color: var(--ts-down); border-color: color-mix(in oklch, var(--ts-down) 40%, transparent); }
.ts-news__move { font-size: 11.5px; }

@media (max-width: 700px) {
    .ts-news__headline { font-size: 15.5px; }
    .ts-news__meta { font-size: 12px; }
}

/* --------------------------------------------------------------------------
   Research brief: the answer before the evidence
   -------------------------------------------------------------------------- */

.ts-brief__row { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.ts-brief__score {
    flex: 0 0 auto;
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 16px;
    border: 1px solid var(--ts-line); border-radius: 8px;
}
.ts-brief__score span { font-size: 30px; font-weight: 600; line-height: 1; }
.ts-brief__score em {
    font-style: normal; font-family: var(--ts-mono);
    font-size: 11px; letter-spacing: .1em; color: var(--ts-fg-3); margin-top: 4px;
}
.ts-brief__headline { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.ts-brief__sub { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ts-fg-3); }

.ts-brief__grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px; margin-bottom: 18px;
}
.ts-brief__block--wide { grid-column: 1 / -1; }
.ts-brief__block h4 {
    margin: 0 0 8px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-brief__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ts-brief__list li {
    display: flex; align-items: baseline; gap: 8px;
    font-size: 13px; line-height: 1.5;
}
.ts-brief__list--warn li {
    display: block;
    padding-left: 12px;
    border-left: 2px solid var(--ts-warn, #f0b357);
    color: var(--ts-fg-2);
}
.ts-brief__pill { flex: 1; }
.ts-brief__trend { font-family: var(--ts-mono); font-size: 11px; }
.ts-brief__none { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ts-fg-3); }

.ts-brief__foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px; padding-top: 14px; border-top: 1px solid var(--ts-line);
}
.ts-brief__prov, .ts-brief__jump {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    font-family: var(--ts-mono); font-size: 11.5px; color: var(--ts-fg-3);
}
.ts-brief__jump a { color: var(--ts-accent); text-decoration: none; }
.ts-brief__jump a:hover { text-decoration: underline; }
.ts-brief__separation {
    margin: 14px 0 0; padding-top: 12px;
    border-top: 1px dashed var(--ts-line);
    font-size: 12.5px; line-height: 1.55; color: var(--ts-fg-3);
}

/* --------------------------------------------------------------------------
   Stage-history ribbon
   -------------------------------------------------------------------------- */

.ts-ribbon { margin-bottom: 6px; }
.ts-ribbon__head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 10px; margin-bottom: 10px;
}
.ts-ribbon__track {
    display: flex; width: 100%; height: 30px;
    border-radius: 5px; overflow: hidden;
    border: 1px solid var(--ts-line);
}
.ts-ribbon__seg {
    display: flex; align-items: center; justify-content: center;
    min-width: 2px; overflow: hidden;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .06em;
    white-space: nowrap; color: #06121f;
}
/* Four stages, four hues, each with enough lightness contrast to survive
   greyscale and the commonest colour-vision deficiencies. */
.ts-ribbon__seg--basing     { background: #8ab4f8; }
.ts-ribbon__seg--advancing  { background: #5bd6a4; }
.ts-ribbon__seg--topping    { background: #f0b357; }
.ts-ribbon__seg--declining  { background: #ff8a80; }
.ts-ribbon__seg--unknown    { background: var(--ts-line-2, rgba(255,255,255,.12)); }

.ts-ribbon__scale {
    display: flex; justify-content: space-between;
    margin-top: 6px; font-size: 11px; color: var(--ts-fg-3);
}
.ts-ribbon__legend {
    display: flex; flex-wrap: wrap; gap: 6px 16px;
    margin: 12px 0 0; padding: 0; list-style: none;
    font-size: 12px; color: var(--ts-fg-2);
}
.ts-ribbon__legend li { display: flex; align-items: center; gap: 6px; }
.ts-ribbon__legend em {
    font-style: normal; font-family: var(--ts-mono);
    font-size: 11px; color: var(--ts-fg-3);
}
.ts-ribbon__swatch { width: 11px; height: 11px; border-radius: 2px; }

/* Filing rows: the document is the link, the accession is reference data. */
.ts-filing__accession {
    font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-4, var(--ts-fg-3));
    margin-top: 2px;
}

.ts-setup-card__links {
    display: flex; flex-direction: column; gap: 4px;
    margin-top: 10px;
    font-size: 12px;
}
.ts-setup-card__links a { color: var(--ts-accent); text-decoration: none; }
.ts-setup-card__links a:hover { text-decoration: underline; }

@media (max-width: 700px) {
    .ts-brief__row { flex-direction: column; gap: 12px; }
    .ts-brief__foot { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Methodology page
   -------------------------------------------------------------------------- */

.ts-methodology__toc {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    padding: 12px 0 18px; margin-bottom: 8px;
    border-bottom: 1px solid var(--ts-line);
    font-family: var(--ts-mono); font-size: 12px;
}
.ts-methodology__toc a { color: var(--ts-accent); text-decoration: none; }
.ts-methodology__toc a:hover { text-decoration: underline; }
.ts-methodology__toc a:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }

.ts-methodology__ladder {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 14px; padding: 14px;
    border: 1px solid var(--ts-line); border-radius: 8px;
}
.ts-methodology__total {
    padding-top: 8px; margin-top: 4px;
    border-top: 1px solid var(--ts-line);
    font-weight: 600;
}

.ts-methodology__defs { margin: 14px 0 0; }
.ts-methodology__defs dt {
    font-weight: 600; font-size: 14px;
    margin-top: 16px;
}
.ts-methodology__defs dt:first-child { margin-top: 0; }
.ts-methodology__defs dd {
    margin: 6px 0 0; padding-left: 14px;
    border-left: 2px solid var(--ts-line);
    font-size: 13.5px; line-height: 1.6; color: var(--ts-fg-2);
}

.ts-methodology__compare {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px; margin-top: 16px;
}
.ts-methodology__compare h3 { margin: 0 0 8px; font-size: 15px; }
.ts-methodology__compare p { font-size: 13.5px; line-height: 1.6; }

.ts-methodology__costs {
    margin: 14px 0 10px; padding-left: 18px;
    font-size: 13.5px; line-height: 1.7;
}

/* Calculator: real inputs, no assumed account. */
.ts-calc {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin-top: 16px;
}
.ts-calc label { display: flex; flex-direction: column; gap: 5px; }
.ts-calc label > span {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
/* Same colour as the label it sits in -- deliberately NOT dimmer. This text
   is 10px, so it has no large-text contrast exemption, and "optional" is
   exactly the word a reader needs to be able to read. */
.ts-calc__opt { font-style: normal; opacity: 1; }
.ts-calc__opt::before { content: "("; }
.ts-calc__opt::after { content: ")"; }

.ts-calc input, .ts-calc select {
    background: var(--ts-track, rgba(255,255,255,.04));
    border: 1px solid var(--ts-line); border-radius: 6px;
    color: var(--ts-fg);
    font-family: var(--ts-mono); font-size: 14px;
    padding: 9px 10px;
    min-height: 42px;
}
.ts-calc input:focus-visible, .ts-calc select:focus-visible {
    outline: 2px solid var(--ts-accent); outline-offset: -1px;
}

.ts-calc__result {
    margin-top: 18px; padding: 16px;
    border: 1px solid var(--ts-line); border-left: 3px solid var(--ts-accent);
    border-radius: 8px;
}
.ts-calc__headline { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.ts-calc__headline span { font-size: 30px; font-weight: 600; line-height: 1; }
.ts-calc__headline em {
    font-style: normal; font-family: var(--ts-mono);
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-calc__facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px; margin: 0 0 12px;
}
.ts-calc__facts dt {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-calc__facts dd { margin: 3px 0 0; font-size: 15px; }
.ts-calc__explain { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ts-fg-2); }
.ts-calc__warn {
    margin: 8px 0 0; padding-left: 12px;
    border-left: 2px solid var(--ts-warn);
    font-size: 12.5px; line-height: 1.55; color: var(--ts-fg-2);
}


/* ============================================================
   PACKET FEEDBACK -- the product asking whether it did its job.
   Collapsed by default; a survey that opens itself is a survey
   whose sample is everyone too polite to close a dialog.
   ============================================================ */
.ts-pf { margin-top: 12px; }
.ts-pf__ask {
    width: 100%; text-align: left; cursor: pointer;
    background: var(--ts-surface-2); border: 1px dashed var(--ts-line);
    border-radius: var(--ts-radius-sm); color: var(--ts-fg-2);
    padding: 10px 12px; font-size: 13px; font-family: inherit;
}
.ts-pf__ask:hover { color: var(--ts-fg); border-color: var(--ts-accent); }
.ts-pf__ask:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }

.ts-pf__panel {
    background: var(--ts-surface-2); border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm); padding: 14px;
}
.ts-pf__head { display: flex; align-items: center; justify-content: space-between; }
.ts-pf__title { font-size: 15px; font-weight: 600; color: var(--ts-fg); }
.ts-pf__close {
    background: none; border: 0; cursor: pointer; font-size: 20px; line-height: 1;
    color: var(--ts-fg-2); padding: 0 4px;
}
.ts-pf__close:hover { color: var(--ts-fg); }
.ts-pf__close:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-pf__note { margin: 6px 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--ts-fg-2); }
.ts-pf__missed {
    margin: 0 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--ts-fg);
    border-left: 2px solid var(--ts-accent); padding-left: 10px;
}

.ts-pf__group { border: 0; padding: 0; margin: 0 0 12px; }
.ts-pf__group legend {
    padding: 0; margin-bottom: 6px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-pf__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-pf__chip {
    cursor: pointer; font-family: inherit; font-size: 13px;
    background: var(--ts-surface); color: var(--ts-fg-2);
    border: 1px solid var(--ts-line); border-radius: 999px; padding: 5px 12px;
}
.ts-pf__chip:hover { color: var(--ts-fg); border-color: var(--ts-accent); }
.ts-pf__chip:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
/* The selected state carries a border and a weight change as well as a fill,
   so it is not signalled by colour alone. */
.ts-pf__chip.active {
    background: var(--ts-surface-3); color: var(--ts-fg);
    border-color: var(--ts-accent); font-weight: 600;
}

.ts-pf__comment { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.ts-pf__comment > span {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-pf__comment textarea {
    background: var(--ts-track, rgba(255,255,255,.04));
    border: 1px solid var(--ts-line); border-radius: 6px;
    color: var(--ts-fg); font-family: inherit; font-size: 13.5px; padding: 8px 10px;
    resize: vertical;
}
.ts-pf__comment textarea:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }

.ts-pf__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-pf__save {
    cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600;
    background: var(--ts-accent); color: var(--ts-on-accent);
    border: 1px solid var(--ts-accent); border-radius: 6px; padding: 7px 16px;
}
.ts-pf__save:disabled { opacity: .5; cursor: not-allowed; }
.ts-pf__save:focus-visible { outline: 2px solid var(--ts-fg); outline-offset: 2px; }
.ts-pf__hint { font-size: 12.5px; color: var(--ts-fg-2); }

/* ============================================================
   PROVENANCE TIERS -- three kinds of R, side by side, so the
   limitation is legible rather than merely admitted.
   ============================================================ */
.ts-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ts-tier {
    border: 1px solid var(--ts-line); border-radius: var(--ts-radius-sm);
    padding: 10px 12px; background: var(--ts-surface-2);
}
.ts-tier--here { border-color: var(--ts-accent); }
.ts-tier__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ts-tier__name { font-size: 13.5px; font-weight: 600; color: var(--ts-fg); }
.ts-tier__badge {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ts-fg-2);
    border: 1px solid var(--ts-line); border-radius: 999px; padding: 2px 7px; white-space: nowrap;
}
.ts-tier__badge--absent { border-style: dashed; }
.ts-tier__caveat { margin: 6px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ts-fg-2); }

/* A capability the plan grants and the product cannot do yet. Same colour as
   the surrounding heading text -- it is a qualifier on a paid promise, not a
   decorative aside, and it is small enough to have no large-text contrast
   exemption. */
.ts-price-table__pending {
    display: inline-block; margin-left: 8px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ts-fg-2);
    border: 1px dashed var(--ts-line); border-radius: 999px; padding: 2px 7px;
    white-space: nowrap; vertical-align: middle;
}

/* The account-level answer to "where does this go and when", above the rules
   themselves. Three facts, equal weight, no decoration. */
.ts-alertsum {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px;
}
.ts-alertsum__label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3); margin-bottom: 4px;
}
.ts-alertsum__value { font-size: 15px; color: var(--ts-fg); }
.ts-alertsum__note { font-size: 12px; color: var(--ts-fg-2); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Watchlist: a review workspace, not a shelf of saved tickers
   --------------------------------------------------------------------------

   The old page was a three-across grid of cards, each showing a ticker, the
   date it was added, a delete icon, and -- if a setup existed -- a type, a
   direction and an unlabelled reward ratio. Everything on it had the same
   visual weight, including the destructive action, and none of it answered the
   question somebody returns to a watchlist with: what changed.

   The layout below puts identity, price with its date, the reason a row was
   raised, its qualification state and a price-versus-plan rail on one line, and
   moves rationale, evidence, notes and sizing into an inspector that opens on
   request. Removal is inside that inspector, in words. */

.ts-wl__head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; margin-bottom: 20px;
}
.ts-wl__capacity { min-width: 150px; }
.ts-wl__capacity-value {
    font-size: 22px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1;
}
.ts-wl__capacity-label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3); margin-top: 2px;
}

/* Price freshness, scan freshness and refresh state, side by side and
   separately dated. They fail separately, so one "Live" dot over all three
   would assert something about each from evidence about none. */
.ts-wl__status {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
}
.ts-wl__status-cell { padding: 12px 16px; border-right: 1px solid var(--ts-line); }
.ts-wl__status-cell:last-child { border-right: 0; }
.ts-wl__status-label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3); margin-bottom: 4px;
}
.ts-wl__status-value { font-size: 15px; color: var(--ts-fg); }
.ts-wl__status-note { font-size: 11.5px; color: var(--ts-fg-2); margin-top: 3px; }

.ts-wl__add { display: flex; gap: 12px; align-items: flex-start; }
.ts-wl__add > .mud-input-control { flex: 1 1 auto; }
.ts-wl__sugg { display: flex; align-items: baseline; gap: 10px; }
.ts-wl__sugg-sym { font-weight: 600; min-width: 56px; }
.ts-wl__sugg-name { color: var(--ts-fg-2); font-size: 13px; }
.ts-wl__sugg-sector, .ts-wl__sugg-flag {
    margin-left: auto; font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-wl__sugg-flag { color: var(--ts-accent); }

.ts-wl__toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.ts-wl__toolbar-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-wl__search { min-width: 200px; }
.ts-wl__sort { min-width: 190px; }

.ts-wl__list { border: 1px solid var(--ts-line); border-radius: var(--ts-radius); overflow: hidden; }
.ts-wl__row { border-bottom: 1px solid var(--ts-line); background: var(--ts-surface); }
.ts-wl__row:last-child { border-bottom: 0; }
.ts-wl__row.is-open { background: var(--ts-surface-2); }

/* A row that has something to say carries a rule down its leading edge. Colour
   alone would not survive a monochrome print or a colour-vision difference, so
   the reason is also written in words in the row itself. */
.ts-wl__row.needs-review { box-shadow: inset 3px 0 0 var(--ts-accent); }

.ts-wl__main {
    display: grid;
    grid-template-columns: minmax(120px, 1.1fr) 88px minmax(150px, 1.3fr) minmax(180px, 1.4fr) minmax(120px, 1fr) 84px;
    gap: 14px; align-items: center; padding: 12px 14px;
}
.ts-wl__sym { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.ts-wl__name {
    font-size: 12px; color: var(--ts-fg-2); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ts-wl__price { text-align: right; }
.ts-wl__price-value { font-size: 15px; font-variant-numeric: tabular-nums; }
.ts-wl__price-date { font-size: 11px; color: var(--ts-fg-3); margin-top: 2px; }

.ts-wl__reason-chip {
    display: inline-block; font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px;
    border-radius: 999px; border: 1px solid var(--ts-line); white-space: nowrap;
}
.ts-wl__reason-chip.is-lapsed { border-color: var(--ts-warn); color: var(--ts-warn); }
.ts-wl__reason-chip.is-new { border-color: var(--ts-accent); color: var(--ts-accent); }
.ts-wl__reason-chip.is-triggered { border-color: var(--ts-up); color: var(--ts-up); }
.ts-wl__reason-chip.is-data { border-style: dashed; color: var(--ts-fg-2); }
.ts-wl__reason-note { font-size: 11.5px; color: var(--ts-fg-2); margin-top: 3px; }

.ts-wl__setup { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; flex-wrap: wrap; }
.ts-wl__setup-type { font-size: 12.5px; }
.ts-wl__qual {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .08em;
    text-transform: uppercase; white-space: nowrap;
}
.ts-wl__qual.is-qualified { color: var(--ts-fg-2); }
.ts-wl__qual.is-lapsed { color: var(--ts-warn); }
.ts-wl__more { font-size: 11.5px; color: var(--ts-fg-3); }

.ts-wl__coverage {
    display: inline-block; font-size: 12px; color: var(--ts-fg-2);
    border-left: 2px solid var(--ts-line); padding-left: 8px;
}
.ts-wl__coverage.is-clear { border-left-color: var(--ts-line-4); }
.ts-wl__coverage.is-plan { border-left-color: var(--ts-accent); }
.ts-wl__coverage.is-unknown { border-left-style: dashed; border-left-color: var(--ts-warn); }

.ts-wl__actions { display: flex; justify-content: flex-end; gap: 2px; }

.ts-wl__inspector { padding: 4px 16px 18px; border-top: 1px solid var(--ts-line); }
.ts-wl__detail { padding: 10px 0; border-bottom: 1px solid var(--ts-line); }
.ts-wl__detail:last-child { border-bottom: 0; }
.ts-wl__detail-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ts-wl__stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px; margin-top: 10px;
}
.ts-wl__evidence { padding: 8px 0; border-bottom: 1px solid var(--ts-line); }
.ts-wl__evidence:last-child { border-bottom: 0; }
.ts-wl__evidence-name { font-size: 13px; }
.ts-wl__evidence-value { font-size: 18px; font-weight: 500; }
.ts-wl__evidence-note { font-size: 12px; color: var(--ts-fg-2); }
.ts-wl__remove { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ts-line); }

/* MOBILE KEEPS THE DECISION HIERARCHY, NOT THE DESKTOP GEOMETRY. Shrinking a
   six-column grid, or asking somebody to swipe sideways to find out whether a
   setup still qualifies, would preserve the shape and lose the point. */
@media (max-width: 900px) {
    .ts-wl__main {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "ident   price"
            "reason  reason"
            "state   state"
            "track   track"
            "actions actions";
        row-gap: 8px;
    }
    .ts-wl__ident { grid-area: ident; }
    .ts-wl__price { grid-area: price; }
    .ts-wl__reason { grid-area: reason; }
    .ts-wl__state { grid-area: state; }
    .ts-wl__track { grid-area: track; }
    .ts-wl__actions { grid-area: actions; justify-content: flex-start; }
    .ts-wl__status-cell { border-right: 0; border-bottom: 1px solid var(--ts-line); }
    .ts-wl__status-cell:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Level track: observed price against a planned set of levels
   --------------------------------------------------------------------------

   Price on the horizontal axis, low to high, whichever direction the trade is
   pointing. A bar that filled toward the target would turn a short into a
   backwards-running progress meter and would suggest an outcome the diagram
   has no basis for. */

.ts-lt { width: 100%; }
.ts-lt__rail {
    position: relative; height: 10px; border-radius: 3px;
    background: var(--ts-track); overflow: hidden;
}
.ts-lt__risk, .ts-lt__reward { position: absolute; top: 0; bottom: 0; }
.ts-lt__risk   { background: color-mix(in oklab, var(--ts-down) 34%, transparent); }
.ts-lt__reward { background: color-mix(in oklab, var(--ts-up) 26%, transparent); }
.ts-lt__mark {
    position: absolute; top: 0; bottom: 0; width: 2px;
    transform: translateX(-1px); background: var(--ts-fg-3);
}
.ts-lt__mark--stop  { background: var(--ts-down); }
.ts-lt__mark--entry { background: var(--ts-fg); width: 3px; }
.ts-lt__mark--t1, .ts-lt__mark--t2, .ts-lt__mark--t3 { background: var(--ts-up); }

/* The observed close. A ring rather than a filled dot so it reads as a
   measurement placed on the plan rather than as part of it. */
.ts-lt__close {
    position: absolute; top: 50%; width: 11px; height: 11px;
    margin: -5.5px 0 0 -5.5px; border-radius: 50%;
    border: 2px solid var(--ts-fg); background: var(--ts-bg);
}
.ts-lt--detailed .ts-lt__rail { height: 14px; }
.ts-lt__legend {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px;
}
.ts-lt__legend-item { display: flex; align-items: center; gap: 5px; }
.ts-lt__legend-key { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.ts-lt__legend-name {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-lt__legend-price { font-size: 12px; }
.ts-lt__asof { font-size: 11.5px; color: var(--ts-fg-2); margin-top: 6px; }

/* MOTION THAT EXPLAINS, AND NOTHING ELSE.
   The close marker and the bands move when the underlying numbers change, so
   the eye can follow one value to its new place instead of re-finding it.
   There is no entrance stagger, no pulsing marker and no counter animation:
   none of those helps anybody review a watchlist more accurately. */
@media (prefers-reduced-motion: no-preference) {
    .ts-lt__close { transition: left .22s cubic-bezier(.22,.61,.36,1); }
    .ts-lt__risk, .ts-lt__reward { transition: left .22s ease, width .22s ease; }
    .ts-wl__row { transition: background-color .16s ease; }
}

/* --------------------------------------------------------------------------
   Weinstein stage screener: shortlist, evidence, and the levels behind both
   --------------------------------------------------------------------------

   The old page put four static stage tiles, a grid of sector cards and six
   independent controls above an eighteen-column table sorted alphabetically.
   Everything the engine had computed was on screen and nothing said which of it
   mattered, so the reader's first job was to reduce a wall of indicators to a
   question -- work the page could have done for them.

   The layout below is a shortlist beside an evidence panel: pick a candidate,
   read what supports its classification and what argues against it, and see the
   levels both refer to, without leaving the list. */

.ts-wz__title { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 4px; }

.ts-wz__status {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.ts-wz__status-cell { padding: 12px 16px; border-right: 1px solid var(--ts-line); }
.ts-wz__status-cell:last-child { border-right: 0; }
.ts-wz__status-label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3); margin-bottom: 4px;
}
.ts-wz__status-value { font-size: 15px; color: var(--ts-fg); }
.ts-wz__status-note { font-size: 11.5px; color: var(--ts-fg-2); margin-top: 3px; }

/* The stage breakdown, as buttons. Each one filters, and each one prints its
   share of the tracked universe beside its count so the denominator is on
   screen rather than inferred. */
.ts-wz__stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.ts-wz__stage {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 10px 12px; border: 1px solid transparent; border-radius: var(--ts-radius);
    cursor: pointer; text-align: left; font: inherit; min-height: 44px;
}
.ts-wz__stage:hover { filter: brightness(1.08); }
.ts-wz__stage.is-active { outline: 2px solid var(--ts-fg); outline-offset: 2px; }
.ts-wz__stage:focus-visible { outline: 2px solid var(--ts-fg); outline-offset: 2px; }
.ts-wz__stage-name { font-size: 12px; font-weight: 600; }
.ts-wz__stage-count { font-size: 22px; font-weight: 500; line-height: 1.1; }
.ts-wz__stage-share { font-size: 11px; opacity: .85; }

/* STAGE COLOURS CLASSIFY A STAGE. They are not a verdict on the stock, and the
   labels carry the stage NUMBER as well as the hue so the classification
   survives a monochrome print or a colour-vision difference.

   The topping treatment was white on #ef6c00, which is 3.08:1 -- below the
   4.5:1 required at this text size. Darkening the foreground rather than the
   background keeps the orange distinguishable from the Stage 4 red, which
   swapping in a dark brown would have cost. */
.ts-wz__stage--basing    { background: #0d47a1; color: #fff; }
.ts-wz__stage--advancing { background: #1b5e20; color: #fff; }
.ts-wz__stage--topping   { background: #ef6c00; color: #1f1200; }
.ts-wz__stage--declining { background: #b71c1c; color: #fff; }
.ts-wz__stage--unknown   { background: #424242; color: #fff; }

.ts-wz__stage-chip {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
/* The chip opens the evidence panel; a button so it can be reached by keyboard. */
.ts-wz__stage-chip--button { border: 0; font-family: inherit; line-height: inherit; cursor: pointer; }
.ts-wz__stage-chip--button:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
/* A button that reads as an inline link. */
.ts-linkbutton {
    background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
    color: var(--mud-palette-primary); text-decoration: underline;
}
.ts-linkbutton:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }

.ts-wz__presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-chip__count { margin-left: 6px; font-size: 11px; opacity: .8; }
.ts-wz__preset-detail { background: var(--ts-surface-2); }
.ts-wz__preset-purpose { font-size: 13.5px; margin-bottom: 6px; }
.ts-wz__preset-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ts-fg-2); }
.ts-wz__preset-list li { margin-bottom: 2px; }

.ts-wz__active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ts-wz__active-label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-wz__clear {
    background: none; border: 0; padding: 4px 6px; font: inherit; font-size: 12px;
    color: var(--ts-accent); text-decoration: underline; cursor: pointer;
}

/* Shortlist and evidence, side by side on a large screen. Below that the panel
   stacks under the list rather than shrinking into a column too narrow to hold
   a sentence. */
.ts-wz__split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1100px) {
    .ts-wz__split { grid-template-columns: minmax(0, 1fr); }
    .ts-wz__status-cell { border-right: 0; border-bottom: 1px solid var(--ts-line); }
    .ts-wz__status-cell:last-child { border-bottom: 0; }
}

.ts-wz__ident { min-width: 0; }
.ts-wz__sym { font-size: 14px; font-weight: 600; }
.ts-wz__name {
    font-size: 11.5px; color: var(--ts-fg-2); margin-top: 1px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px;
}
.ts-wz__tier { font-family: var(--ts-mono); font-size: 11px; letter-spacing: .06em; color: var(--ts-fg-2); }
.ts-wz__badge {
    display: inline-block; padding: 1px 6px; border-radius: 999px;
    border: 1px solid var(--ts-line); font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .08em; text-transform: uppercase;
}
.ts-wz__badge--warn { border-color: var(--ts-warn); color: var(--ts-warn); }

/* "not measured" is a state, not a value, and it is styled as one: no
   monospaced digits, no alignment with the numbers above and below it. */
.ts-wz__unmeasured {
    font-size: 11px; font-style: italic; color: var(--ts-fg-3);
    border-bottom: 1px dotted var(--ts-line-4); cursor: help;
}

.ts-wz__ev { font-size: 12px; }
.ts-wz__ev--support { color: var(--ts-fg); }
.ts-wz__ev--risk { color: var(--ts-warn); }
.ts-wz__ev--data { color: var(--ts-fg-3); font-style: italic; }

.ts-wz__row-selected { background: var(--ts-surface-3) !important; }

.ts-wz__panel {
    position: sticky; top: calc(var(--ts-topbar-h) + 16px);
    border: 1px solid var(--ts-line); border-radius: var(--ts-radius);
    background: var(--ts-surface); padding: 14px 16px; max-height: 78vh; overflow-y: auto;
}
.ts-wz__panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ts-wz__panel-sym { font-size: 20px; font-weight: 600; }
.ts-wz__panel-claim {
    display: inline-block; margin: 10px 0 6px; padding: 4px 10px;
    border-radius: 999px; font-size: 12.5px; font-weight: 600;
}
.ts-wz__panel-hint { font-size: 12.5px; color: var(--ts-fg-2); line-height: 1.5; margin-bottom: 12px; }
.ts-wz__panel-links {
    display: flex; flex-direction: column; gap: 4px; margin-top: 14px;
    padding-top: 12px; border-top: 1px solid var(--ts-line); font-size: 12.5px;
}
.ts-wz__panel-empty { text-align: center; padding: 32px 12px; color: var(--ts-fg-2); }
.ts-wz__panel-empty-title { font-size: 15px; font-weight: 600; color: var(--ts-fg); margin-top: 8px; }
.ts-wz__panel-empty-note { font-size: 12.5px; margin-top: 6px; line-height: 1.5; }

.ts-wz__ev-group { margin-top: 14px; }
.ts-wz__ev-title {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3); margin-bottom: 6px;
}
.ts-wz__ev-item {
    display: block; width: 100%; text-align: left; font: inherit; cursor: pointer;
    background: none; border: 0; border-left: 2px solid var(--ts-line);
    padding: 6px 0 6px 10px; margin-bottom: 6px;
}
.ts-wz__ev-item.is-support { border-left-color: var(--ts-up); }
.ts-wz__ev-item.is-risk { border-left-color: var(--ts-warn); }
.ts-wz__ev-item.is-context { border-left-color: var(--ts-line-4); }
.ts-wz__ev-item.is-data { border-left-style: dashed; cursor: default; }
.ts-wz__ev-item.is-selected { background: var(--ts-surface-3); }
.ts-wz__ev-item:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-wz__ev-label { display: block; font-size: 13px; color: var(--ts-fg); }
.ts-wz__ev-detail { display: block; font-size: 11.5px; color: var(--ts-fg-2); line-height: 1.5; margin-top: 2px; }

/* Sector breadth as one comparison rather than a grid of separate cards: a
   shared baseline is what makes two percentages comparable at a glance. */
.ts-wz__sector {
    display: grid; grid-template-columns: minmax(120px, 1.4fr) minmax(80px, 3fr) 44px 64px;
    gap: 10px; align-items: center; width: 100%; padding: 5px 6px;
    background: none; border: 0; border-radius: 4px; font: inherit; cursor: pointer; text-align: left;
}
.ts-wz__sector:hover { background: var(--ts-surface-2); }
.ts-wz__sector.is-active { background: var(--ts-surface-3); outline: 1px solid var(--ts-accent); }
.ts-wz__sector:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
.ts-wz__sector-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-wz__sector-bar { height: 8px; border-radius: 2px; background: var(--ts-track); overflow: hidden; }
.ts-wz__sector-fill { display: block; height: 100%; background: color-mix(in oklab, var(--ts-accent) 55%, transparent); }
.ts-wz__sector-fill.is-top { background: var(--ts-up); }
.ts-wz__sector-pct { font-size: 12px; text-align: right; }
.ts-wz__sector-n { font-size: 11px; color: var(--ts-fg-3); text-align: right; }

/* --------------------------------------------------------------------------
   Level ladder: the prices a classification was made from
   --------------------------------------------------------------------------

   Ordered by price rather than by time, because the ORDER is the argument: a
   stock above a rising 150-day average with resistance below it is a different
   picture from one below a falling one, and that is legible here without the
   price history the screener does not load. */

.ts-lm { margin: 4px 0 8px; }
.ts-lm__row {
    display: grid; grid-template-columns: minmax(96px, 1.2fr) minmax(60px, 2fr) 62px 54px;
    gap: 8px; align-items: center; padding: 3px 0;
}
.ts-lm__label { font-size: 11.5px; color: var(--ts-fg-2); }
.ts-lm__rail { position: relative; height: 6px; border-radius: 2px; background: var(--ts-track); }
.ts-lm__tick { position: absolute; top: -2px; bottom: -2px; width: 2px; transform: translateX(-1px); background: var(--ts-fg-3); }
.ts-lm__tick--price { background: var(--ts-fg); width: 3px; }
.ts-lm__tick--ma50 { background: color-mix(in oklab, var(--ts-accent) 80%, transparent); }
.ts-lm__tick--ma150 { background: var(--ts-accent); }
.ts-lm__tick--ma200 { background: color-mix(in oklab, var(--ts-accent) 55%, transparent); }
.ts-lm__tick--resistance { background: var(--ts-warn); }
.ts-lm__tick--support { background: var(--ts-down); }
.ts-lm__tick--neckline { background: var(--ts-down); }
.ts-lm__now {
    position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
    border-radius: 50%; border: 2px solid var(--ts-fg); background: var(--ts-bg);
}
.ts-lm__price { font-size: 12px; text-align: right; }
.ts-lm__delta { font-size: 11px; text-align: right; }
.ts-lm__row.is-highlighted .ts-lm__label { color: var(--ts-fg); font-weight: 600; }
.ts-lm__row.is-dimmed { opacity: .38; }
.ts-lm__foot { font-size: 11px; color: var(--ts-fg-3); line-height: 1.5; }
.ts-lm__empty { font-size: 12px; color: var(--ts-fg-2); padding: 8px 0; }

/* Visible only to assistive technology. Used where an icon-shaped control
   carries a "×" that means "remove this filter". */
.ts-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* MOTION THAT EXPLAINS A STATE CHANGE, AND NOTHING ELSE.

   Selecting an observation dims the levels it is not about, so the eye is led
   to the one it IS about; the dimming is worth easing because an instant jump
   reads as a redraw rather than as a focus change. There is no entrance
   stagger, no counting-up of the stage totals, no pulsing freshness badge and
   no auto-reordering while somebody reads: none of those helps anybody screen
   more accurately, and the last actively harms it. */
@media (prefers-reduced-motion: no-preference) {
    .ts-lm__row { transition: opacity .18s ease; }
    .ts-wz__ev-item { transition: background-color .14s ease; }
    .ts-wz__sector-fill { transition: width .28s cubic-bezier(.22,.61,.36,1); }
}

/* --------------------------------------------------------------------------
   Evidence chart: the price history a classification was made from
   --------------------------------------------------------------------------

   The screener described moving averages, resistance, breakouts and structure
   as columns of numbers, so the reader rebuilt the picture in their head before
   any of it meant anything. This is the picture, annotated with the levels that
   produced the classification -- and cut off at the session those levels were
   measured on, because a chart that runs to today under an older analysis
   presents the two as contemporaneous. */

.ts-ec { margin: 0 0 10px; }
.ts-ec__plot { position: relative; }
.ts-ec__svg { display: block; width: 100%; height: 190px; overflow: visible; }
.ts-ec__svg--volume { height: 40px; margin-top: 4px; }

.ts-ec__band { fill: color-mix(in oklab, var(--ts-fg-4) 22%, transparent); stroke: none; }
.ts-ec__close { fill: none; stroke: var(--ts-fg); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.ts-ec__ma { fill: none; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.ts-ec__ma--50  { stroke: color-mix(in oklab, var(--ts-accent) 85%, transparent); }
.ts-ec__ma--150 { stroke: var(--ts-accent); stroke-width: 1.6; }
.ts-ec__ma--200 { stroke: color-mix(in oklab, var(--ts-accent) 45%, transparent); }
.ts-ec__last { fill: var(--ts-bg); stroke: var(--ts-fg); stroke-width: 2; vector-effect: non-scaling-stroke; }

.ts-ec__level { stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.ts-ec__level--resistance { stroke: var(--ts-warn); }
.ts-ec__level--support    { stroke: var(--ts-down); }
.ts-ec__level--neckline   { stroke: color-mix(in oklab, var(--ts-down) 70%, transparent); }
/* Labels sit OVER the plot rather than inside the SVG. The plot is stretched
   to the panel width with preserveAspectRatio="none", which is right for the
   geometry and would have stretched glyphs with it. */
.ts-ec__level-label {
    position: absolute; left: 2px; transform: translateY(-100%);
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .04em;
    background: color-mix(in oklab, var(--ts-surface) 82%, transparent);
    padding: 0 3px; border-radius: 2px; pointer-events: none; white-space: nowrap;
}
.ts-ec__level-label--resistance { color: var(--ts-warn); }
.ts-ec__level-label--support    { color: var(--ts-down); }
.ts-ec__level-label--neckline   { color: color-mix(in oklab, var(--ts-down) 80%, transparent); }

/* WHEN THE STAGE CHANGED. A thin dashed vertical in the colour of the stage
   that BEGAN there, so the mark and the badge above the chart agree. Behind the
   price line in document order, because a rule that dates the evidence must not
   cover it. */
/* EARLIER CHANGES ARE FAINT; THE ONE THE CAPTION IS ABOUT IS SOLID. A stock on
   a stage boundary is reclassified every day the refresh runs, so a real symbol
   can carry a fortnight of flips -- and drawing them all at equal weight buries
   the only mark most readers want, which is where the CURRENT stage began. */
.ts-ec__stage {
    stroke-width: 1; stroke-dasharray: 2 3; opacity: .4;
    vector-effect: non-scaling-stroke;
}
.ts-ec__stage.is-current { opacity: 1; stroke-width: 1.6; stroke-dasharray: none; }
.ts-ec__stage--basing    { stroke: var(--ts-stage-basing); }
.ts-ec__stage--advancing { stroke: var(--ts-up); }
.ts-ec__stage--topping   { stroke: var(--ts-warn); }
.ts-ec__stage--declining { stroke: var(--ts-down); }
.ts-ec__stage--unknown   { stroke: var(--ts-fg-4); }

.ts-ec__stage-start { color: var(--ts-fg-2); }
.ts-ec__stage-start strong { color: var(--ts-fg); font-weight: 600; }

/* THE CATALYST SUMMARY, UNDER THE CHART. It replaces a hover: a tooltip on an
   x-axis annotation is not something this charting library offers, and the
   attempt to fake one through its tooltip formatter took the page down. A list
   says the same thing with nothing but markup, and reaches a reader who cannot
   hover and one who cannot separate the hues -- which a tooltip does not. */
/* WHEN A CHART CANNOT BE DRAWN, in the space the chart would have used.

   Not a silent fallback and not a blank box: the reason the last chart failure
   cost a round trip is that it arrived as an empty screen instead of a
   sentence. Sized so the panel does not collapse and reflow everything under
   it while the reader is reading. */
.ts-chartfail {
    min-height: 180px;
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    padding: 16px;
    border: 1px solid var(--ts-line);
    border-radius: 8px;
    background: var(--ts-surface-2, var(--ts-surface));
}
/* THE ECONOMIC RELEASE CALENDAR: a day, then the releases on it. Grouped by
   date rather than tabulated, because the question is "what is coming on
   Thursday" rather than "sort these by name". */
.ts-cal__day { padding: 10px 0; border-bottom: 1px solid var(--ts-line); }
.ts-cal__day:last-child { border-bottom: 0; }
.ts-cal__date {
    display: flex; align-items: baseline; gap: 10px;
    font-size: 12.5px; color: var(--ts-fg); margin-bottom: 6px;
}
.ts-cal__row {
    display: flex; align-items: baseline; gap: 10px;
    padding: 3px 0 3px 4px; min-width: 0;
}
.ts-cal__short { flex: 0 0 130px; color: var(--ts-fg); font-size: 12.5px; }
.ts-cal__name {
    color: var(--ts-fg-2); font-size: 12.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Three states, and the colour is never the only carrier -- each marker has a
   title saying the same thing in words. WCAG 1.4.1 applies harder to a 7px
   square than to text: there is no fallback once the hue is gone. */
.ts-cal__imp {
    flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
    align-self: center;
}
.ts-cal__imp.is-high     { background: var(--ts-down); }
.ts-cal__imp.is-medium   { background: var(--ts-warn); }
.ts-cal__imp.is-low      { background: var(--ts-fg-3); }
.ts-cal__imp.is-unranked { background: transparent; border: 1px solid var(--ts-fg-4); }

/* ONE BODY OF A TRACED MODEL CALL: a prompt, the thinking, or the answer.

   Capped in height and scrolled inside itself rather than allowed to run: a
   fundamental-analysis prompt carries filing text, and four of them stacked at
   full height would put the next row of the page a screen and a half away. */
.ts-llmbody { margin-top: 12px; }
.ts-llmbody__label {
    font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
    color: var(--ts-fg-3); margin-bottom: 4px;
}
.ts-llmbody__text {
    margin: 0; padding: 10px 12px;
    max-height: 320px; overflow: auto;
    border: 1px solid var(--ts-line); border-radius: 6px;
    background: var(--ts-surface-2);
    font-family: var(--ts-mono); font-size: 11.5px; line-height: 1.5;
    color: var(--ts-fg-2);
    white-space: pre-wrap; overflow-wrap: anywhere;
}

.ts-chartfail__head { margin: 0; font-weight: 600; color: var(--ts-fg); }
.ts-chartfail__body { margin: 0; color: var(--ts-fg-2); font-size: 12.5px; max-width: 60ch; }
.ts-chartfail__detail {
    margin: 0; color: var(--ts-fg-3); font-size: 11.5px;
    font-family: var(--ts-mono, ui-monospace, monospace);
    overflow-wrap: anywhere;
}
.ts-chartfail .ts-btn { align-self: flex-start; margin-top: 4px; }

.ts-cat { margin-top: 10px; border-top: 1px solid var(--ts-line); padding-top: 10px; }
.ts-cat__head { font-size: 11.5px; color: var(--ts-fg-3); margin-bottom: 8px; }
.ts-cat__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ts-cat__item {
    display: grid; grid-template-columns: 62px 132px minmax(0, 1fr);
    gap: 10px; align-items: baseline; font-size: 12px;
}
.ts-cat__day { color: var(--ts-fg-2); font-size: 11px; }
.ts-cat__tone { font-size: 11px; white-space: nowrap; }
/* The same five readings the markers use, in the same colours -- and each one
   carries its word beside the glyph, so the colour is never the only signal. */
.ts-cat__tone--bullish { color: var(--ts-up); }
.ts-cat__tone--bearish { color: var(--ts-down); }
.ts-cat__tone--mixed   { color: var(--ts-warn); }
.ts-cat__tone--neutral { color: var(--ts-fg-2); }
.ts-cat__tone--unread  { color: var(--ts-fg-3); }
.ts-cat__text { color: var(--ts-fg-2); }

@media (max-width: 720px) {
    .ts-cat__item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* A layer that could not be drawn says so. The chart is fine without it, and a
   reader who is not told would take an empty overlay for a symbol with no news. */
.ts-cat__error {
    margin-top: 8px; font-size: 11.5px; color: var(--ts-warn);
    border-left: 2px solid var(--ts-warn); padding-left: 8px;
}

.ts-ec__vol { fill: color-mix(in oklab, var(--ts-fg-4) 45%, transparent); }

/* SELECTING AN OBSERVATION POINTS AT ITS OWN EVIDENCE. Everything the claim is
   not about fades, so "above a rising 150-day average" emphasises that line
   rather than leaving the reader to find it among four. Opacity rather than
   colour, so the emphasis does not invent a new meaning for a hue that already
   has one. */
.ts-ec[class*="is-focus-"] .ts-ec__close,
.ts-ec[class*="is-focus-"] .ts-ec__ma,
.ts-ec[class*="is-focus-"] .ts-ec__level,
.ts-ec[class*="is-focus-"] .ts-ec__level-label,
.ts-ec[class*="is-focus-"] .ts-ec__stage,
.ts-ec[class*="is-focus-"] .ts-ec__band { opacity: .18; }

.ts-ec.is-focus-price .ts-ec__close,
.ts-ec.is-focus-price .ts-ec__band,
.ts-ec.is-focus-ma50 .ts-ec__ma--50,
.ts-ec.is-focus-ma150 .ts-ec__ma--150,
.ts-ec.is-focus-ma200 .ts-ec__ma--200,
.ts-ec.is-focus-resistance .ts-ec__level--resistance,
.ts-ec.is-focus-resistance .ts-ec__level-label--resistance,
.ts-ec.is-focus-support .ts-ec__level--support,
.ts-ec.is-focus-support .ts-ec__level-label--support,
.ts-ec.is-focus-neckline .ts-ec__level--neckline,
.ts-ec.is-focus-neckline .ts-ec__level-label--neckline { opacity: 1; }

/* The close line stays half-visible under every focus, because a level with no
   price near it is not evidence of anything. */
.ts-ec.is-focus-ma50 .ts-ec__close,
.ts-ec.is-focus-ma150 .ts-ec__close,
.ts-ec.is-focus-ma200 .ts-ec__close,
.ts-ec.is-focus-resistance .ts-ec__close,
.ts-ec.is-focus-support .ts-ec__close,
.ts-ec.is-focus-neckline .ts-ec__close { opacity: .55; }

.ts-ec__caption {
    display: flex; flex-direction: column; gap: 5px;
    font-size: 11px; color: var(--ts-fg-3); line-height: 1.5; margin-top: 6px;
}
.ts-ec__key { display: flex; flex-wrap: wrap; gap: 12px; }
.ts-ec__key-item { display: inline-flex; align-items: center; gap: 5px; }
.ts-ec__swatch { width: 12px; height: 2px; display: inline-block; }
.ts-ec__swatch--close { background: var(--ts-fg); height: 2px; }
.ts-ec__swatch--50  { background: color-mix(in oklab, var(--ts-accent) 85%, transparent); }
.ts-ec__swatch--150 { background: var(--ts-accent); height: 3px; }
.ts-ec__swatch--200 { background: color-mix(in oklab, var(--ts-accent) 45%, transparent); }

/* The legend swatch shows the mark is a rule rather than a series, so it is a
   short vertical rather than the horizontal dash the lines use.

   AFTER .ts-ec__swatch, not before it. Declared above, the generic rule's
   `width: 12px; height: 2px` won on source order and the "vertical" was a
   horizontal dash like every other entry.

   NEUTRAL, not green. It was --ts-up, which is the advancing colour: the marks
   on the chart are drawn in the colour of the stage each one begins, so one
   swatch cannot match them all, and picking a stage's colour for the key
   asserts a reading of a chart that may show the opposite one. */
.ts-ec__swatch--stage {
    width: 2px; height: 11px;
    background: linear-gradient(var(--ts-fg-3), var(--ts-fg-3)) 0 0 / 2px 3px repeat-y;
}

/* The solid one, drawn the way the chart draws it: unbroken and at full
   weight. The two keys differ in the same two properties the two rules differ
   in, so the legend is a sample of the chart rather than a description of it. */
.ts-ec__swatch--stage-current {
    width: 2px; height: 11px;
    background: var(--ts-fg-3);
}
.ts-ec__provenance { color: var(--ts-fg-2); }
.ts-ec__provenance a { color: var(--ts-accent); text-decoration: underline; }

.ts-ec__empty, .ts-ec__loading {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--ts-fg-2); padding: 14px 0;
}

@media (prefers-reduced-motion: no-preference) {
    .ts-ec__close, .ts-ec__ma, .ts-ec__level, .ts-ec__level-label, .ts-ec__band {
        transition: opacity .18s ease;
    }
}

/* --------------------------------------------------------------------------
   News: distinct stories, with their companies beneath them
   --------------------------------------------------------------------------

   The feed rendered one row per (article, ticker) pair, so a story naming four
   companies took four consecutive rows and a reader looking for the next EVENT
   scrolled past three repetitions of the one they had just read. The reading
   unit is the article now; the associations are kept, and shown where they
   belong.

   The headline was also the eighth column, in plain text, with the article link
   in a ninth. It is first here, and it is the link. */

.ts-nw__title { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 4px; }

/* A ROW OF FACTS ABOUT WHERE THE DATA CAME FROM AND WHEN. Written on the news
   page first and wanted verbatim by the admin model catalogue, which asks the
   same questions of a different feed. Aliased rather than copied: two blocks of
   identical declarations drift, and the second one to drift is always the one
   nobody is looking at. The .ts-nw__ names stay so the news markup is
   untouched; new callers use .ts-statstrip. */
.ts-statstrip,
.ts-nw__status { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ts-statstrip__cell,
.ts-nw__status-cell { padding: 12px 16px; border-right: 1px solid var(--ts-line); }
.ts-statstrip__cell:last-child,
.ts-nw__status-cell:last-child { border-right: 0; }
.ts-statstrip__label,
.ts-nw__status-label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3); margin-bottom: 4px;
}
.ts-statstrip__value,
.ts-nw__status-value { font-size: 14px; color: var(--ts-fg); }
.ts-statstrip__note,
.ts-nw__status-note { font-size: 11.5px; color: var(--ts-fg-2); margin-top: 3px; }

.ts-nw__windows { display: flex; flex-wrap: wrap; gap: 6px; }

.ts-nw__active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ts-nw__active-label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-nw__clear {
    background: none; border: 0; padding: 4px 6px; font: inherit; font-size: 12px;
    color: var(--ts-accent); text-decoration: underline; cursor: pointer;
}

/* When the news arrived. A time-ordered list says what is newest and nothing
   about distribution. Bars count ARTICLES: counting ticker associations would
   make one rebalance naming forty companies the busiest hour of the month,
   which is the misreading the grouping exists to remove. */
.ts-nw__hist-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.ts-nw__hist-title { font-size: 13px; font-weight: 600; }
.ts-nw__hist-note { font-size: 11.5px; color: var(--ts-fg-2); line-height: 1.5; }
.ts-nw__hist { display: flex; align-items: flex-end; gap: 2px; height: 56px; }
.ts-nw__bar {
    flex: 1 1 0; min-width: 4px; height: 100%; padding: 0; border: 0; cursor: pointer;
    background: none; display: flex; align-items: flex-end; position: relative;
}
.ts-nw__bar-fill {
    display: block; width: 100%; min-height: 1px; border-radius: 1px;
    background: color-mix(in oklab, var(--ts-accent) 55%, transparent);
}
.ts-nw__bar:hover .ts-nw__bar-fill { background: var(--ts-accent); }
.ts-nw__bar.is-selected .ts-nw__bar-fill { background: var(--ts-accent); }
.ts-nw__bar:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
/* An interval nothing collected over. Hatched rather than empty, because an
   empty bar and a bar meaning "we did not look" must not read the same. */
.ts-nw__bar.is-gap { background: repeating-linear-gradient(45deg,
    transparent 0 3px, color-mix(in oklab, var(--ts-warn) 22%, transparent) 3px 6px); }
.ts-nw__hist-axis {
    display: flex; justify-content: space-between; margin-top: 4px;
    font-size: 11px; color: var(--ts-fg-3);
}

.ts-nw__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ts-nw__count { font-size: 12px; color: var(--ts-fg-2); }

.ts-nw__split { display: block; }
.ts-nw__feed:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-nw__story:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: -2px; }
.ts-nw__story.is-new { box-shadow: inset 3px 0 0 var(--ts-accent); }
.ts-nw__new { font-size: 11px; color: var(--ts-accent); border: 1px solid var(--ts-accent); border-radius: 999px; padding: 0 6px; }
.ts-nw__pane { display: none; }
.ts-nw__resize { display: none; }
@media (min-width: 1200px) {
    /* The pane's width is --ts-nw-pane when the reader set one (news.js), else
       half. The handle between the columns is the gap. */
    .ts-nw__split.has-pane { display: grid; grid-template-columns: minmax(320px, 1fr) 12px minmax(320px, var(--ts-nw-pane, 1fr)); column-gap: 2px; align-items: start; }
    .ts-nw__resize { display: block; align-self: stretch; min-height: 120px; cursor: col-resize; border-radius: 6px; position: relative; touch-action: none; }
    .ts-nw__resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; background: var(--ts-line); border-radius: 2px; }
    .ts-nw__resize:hover::after, .ts-nw__resize:focus-visible::after, .ts-nw__resize.is-dragging::after { background: var(--ts-accent); }
    .ts-nw__resize:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
    .ts-nw__split.has-pane .ts-nw__detail--inline { display: none; }
    .ts-nw__pane { display: block; position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto;
        border: 1px solid var(--ts-line); border-radius: var(--ts-radius); background: var(--ts-surface); padding: 12px 14px; }
}
.ts-nw__pane-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.ts-nw__permalink { font-size: 13px; }
.ts-nw__more-row { padding: 12px; text-align: center; border-top: 1px solid var(--ts-line); }
.ts-nw__live { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
    border: 1px solid var(--ts-accent); border-radius: var(--ts-radius); padding: 8px 12px; margin-bottom: 12px; color: var(--ts-fg); }
.ts-nw__pending { font-size: 13px; color: var(--ts-fg-2); margin-bottom: 8px; }
.ts-nw__refresh { margin-left: 8px; font-size: 12px; background: none; border: 1px solid var(--ts-line-2); border-radius: var(--ts-radius-sm); color: var(--ts-fg); padding: 1px 8px; cursor: pointer; }
.ts-nw__range { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; }
.ts-nw__range input { background: var(--ts-surface); color: var(--ts-fg); border: 1px solid var(--ts-line-2); border-radius: var(--ts-radius-sm); padding: 2px 6px; }
.ts-nw__range-note { color: var(--ts-fg-3); }
.ts-nw__outside-note { font-size: 13px; color: var(--ts-fg-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.ts-nw__feed { border: 1px solid var(--ts-line); border-radius: var(--ts-radius); overflow: hidden; }
.ts-nw__story { padding: 14px 16px; border-bottom: 1px solid var(--ts-line); background: var(--ts-surface); }
.ts-nw__story:last-child { border-bottom: 0; }
.ts-nw__story.is-open { background: var(--ts-surface-2); }

.ts-nw__headline { font-size: 15px; line-height: 1.45; font-weight: 600; margin: 0 0 5px; }
.ts-nw__headline a { color: var(--ts-fg); text-decoration: underline; text-underline-offset: 2px; }
.ts-nw__headline a:hover { color: var(--ts-accent); }

.ts-nw__meta {
    display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
    font-size: 11.5px; color: var(--ts-fg-3); margin-bottom: 8px;
}
.ts-nw__dot { color: var(--ts-fg-4); }

/* One article can be good for one company and bad for another -- an index
   change, a merger. The old row-per-ticker layout showed that by accident;
   a grouping that flattened it into one badge would be a regression. */
.ts-nw__mixed {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--ts-warn);
    border: 1px solid var(--ts-warn); border-radius: 999px; padding: 1px 7px;
}
/* A SETTLED STORY IS MARKED, NOT REMOVED. A duplicate is the same article said
   again and is collapsed away upstream; this one happened, it is still the
   reason the price moved that day, and it has only stopped being the current
   state of its event. --ts-fg-3 rather than --ts-fg-4: this text sits on a card
   surface, where fg-4 does not clear 4.5:1. */
.ts-nw__stale {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--ts-fg-3);
    border: 1px dashed var(--ts-line-4); border-radius: 999px; padding: 1px 7px;
}
.ts-nw__sent {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .08em;
    text-transform: uppercase; border-radius: 999px; padding: 1px 7px;
    border: 1px solid currentColor;
}
.ts-nw__sent--bullish { color: var(--ts-up); }
.ts-nw__sent--bearish { color: var(--ts-down); }
.ts-nw__sent--neutral { color: var(--ts-fg-2); }

.ts-nw__tickers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ts-nw__ticker {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
    border: 1px solid var(--ts-line); border-radius: 999px;
    font-size: 12px; color: var(--ts-fg); text-decoration: none;
}
.ts-nw__ticker:hover { border-color: var(--ts-line-4); background: var(--ts-surface-3); }
.ts-nw__ticker-sent { font-size: 11px; border: 0; padding: 0; }
.ts-nw__more { font-size: 11.5px; color: var(--ts-fg-3); }
.ts-nw__cat {
    display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11px;
    background: color-mix(in oklab, var(--ts-accent) 16%, transparent); color: var(--ts-fg);
}
.ts-nw__cat--secondary { background: none; border: 1px dashed var(--ts-line-4); color: var(--ts-fg-2); }
.ts-nw__cat--none { background: none; border: 1px dashed var(--ts-line); color: var(--ts-fg-3); }
.ts-nw__unknown { font-size: 11.5px; font-style: italic; color: var(--ts-fg-3); }

.ts-nw__actions { margin-top: 8px; }
.ts-nw__details {
    background: none; border: 1px solid var(--ts-line); border-radius: 6px;
    padding: 4px 12px; font: inherit; font-size: 12px; color: var(--ts-fg-2);
    cursor: pointer; min-height: 32px;
}
.ts-nw__details:hover { border-color: var(--ts-line-4); color: var(--ts-fg); }
.ts-nw__details:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }

.ts-nw__detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ts-line); }
.ts-nw__detail-title {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3); margin-bottom: 6px;
}
.ts-nw__assoc { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ts-nw__assoc th {
    text-align: left; font-family: var(--ts-mono); font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ts-fg-3); font-weight: 400;
    padding: 4px 8px 4px 0; border-bottom: 1px solid var(--ts-line);
}
.ts-nw__assoc td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--ts-line); vertical-align: top; }
.ts-nw__assoc tr:last-child td { border-bottom: 0; }
.ts-nw__assoc .ts-nw__num { text-align: right; }
.ts-nw__assoc-name { font-size: 11px; color: var(--ts-fg-2); margin-top: 2px; }

.ts-nw__note { font-size: 12px; color: var(--ts-fg-2); line-height: 1.55; margin: 10px 0 0; }
.ts-nw__links {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px;
    padding-top: 10px; border-top: 1px solid var(--ts-line); font-size: 12.5px;
}

/* MOBILE READS AS STORIES, NOT AS A STACKED TABLE. The story layout is already
   headline-first and wraps, so it needs narrowing rather than restructuring --
   which is the point of having changed the reading unit. */
@media (max-width: 700px) {
    .ts-nw__status-cell { border-right: 0; border-bottom: 1px solid var(--ts-line); }
    .ts-nw__status-cell:last-child { border-bottom: 0; }
    .ts-nw__headline { font-size: 15.5px; }
    .ts-nw__assoc, .ts-nw__assoc thead, .ts-nw__assoc tbody,
    .ts-nw__assoc tr, .ts-nw__assoc td { display: block; width: 100%; }
    .ts-nw__assoc thead { display: none; }
    .ts-nw__assoc tr { padding: 8px 0; border-bottom: 1px solid var(--ts-line); }
    .ts-nw__assoc td { border-bottom: 0; padding: 2px 0; }
    .ts-nw__assoc .ts-nw__num { text-align: left; }
    /* The header is hidden when the rows stack, so each value carries its own label. */
    .ts-nw__assoc td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ts-fg-3); }
}

@media (prefers-reduced-motion: no-preference) {
    .ts-nw__bar-fill { transition: background-color .14s ease; }
    .ts-nw__story { transition: background-color .16s ease; }
}

/* --------------------------------------------------------------------------
   News session chart: which two closes that number is
   --------------------------------------------------------------------------

   The constraint that shapes this: daily closes cannot show a reaction to a
   headline. A marker on the price line at the moment of publication would claim
   a causal link between an instant and a bar covering a whole trading day of
   everything else -- and it would claim it visually, where a caption cannot
   take it back.

   So the publication is NOT on the price line. The two sessions the stored
   return is measured between are shaded and named; the publication time sits on
   a separate timing row, positioned against the session boundary rather than
   against the price. */

.ts-nc { margin: 10px 0 0; }
.ts-nc__plot { position: relative; }
.ts-nc__svg { display: block; width: 100%; height: 110px; overflow: visible; }

/* The measured span, as a region of the record rather than a level. */
.ts-nc__span { fill: color-mix(in oklab, var(--ts-accent) 14%, transparent); }
.ts-nc__edge {
    stroke: color-mix(in oklab, var(--ts-accent) 70%, transparent);
    stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke;
}
.ts-nc__close { fill: none; stroke: var(--ts-fg-2); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.ts-nc__dot { fill: var(--ts-fg-3); }
.ts-nc__dot.is-edge { fill: var(--ts-bg); stroke: var(--ts-accent); stroke-width: 2; vector-effect: non-scaling-stroke; }

/* Labels are HTML over the plot: the viewBox is stretched to the panel width,
   which is right for the geometry and would distort glyphs inside it. */
.ts-nc__span-label {
    position: absolute; bottom: -2px; transform: translateX(-50%);
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .04em;
    color: var(--ts-accent); background: color-mix(in oklab, var(--ts-surface) 85%, transparent);
    padding: 0 3px; border-radius: 2px; white-space: nowrap; pointer-events: none;
}
.ts-nc__span-label--end { transform: translateX(-50%); }

.ts-nc__timing { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.ts-nc__timing-row {
    display: grid; grid-template-columns: 120px minmax(120px, auto) 1fr;
    gap: 10px; align-items: baseline;
}
.ts-nc__timing-label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-nc__timing-value { font-size: 12.5px; color: var(--ts-fg); }
.ts-nc__timing-note { font-size: 11.5px; color: var(--ts-fg-2); line-height: 1.5; }
.ts-nc__unresolved { font-style: italic; color: var(--ts-fg-3); }

.ts-nc__caption { font-size: 11px; color: var(--ts-fg-3); line-height: 1.55; margin-top: 10px; }
.ts-nc__empty {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--ts-fg-2); padding: 12px 0;
}

.ts-nw__sessions {
    display: block; margin-top: 4px; background: none; border: 0; padding: 0;
    font: inherit; font-size: 11px; color: var(--ts-accent);
    text-decoration: underline; cursor: pointer;
}
.ts-nw__sessions:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-nw__chart-row td { padding: 4px 0 12px !important; }

@media (max-width: 700px) {
    .ts-nc__timing-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ==========================================================================
   Gann confluence screener (.ts-gz) and its confluence map (.ts-gm)
   --------------------------------------------------------------------------
   The page previously painted four summary cards with hardcoded hex
   backgrounds -- #1b5e20, #0d47a1, #ef6c00 and #424242 -- and white text on
   each. They bypassed every token in this file, so they did not move when the
   palette did, and white on #ef6c00 measures 3.08:1 against a 4.5:1
   requirement. Nothing below sets a colour that is not a token.

   Muted text is --ts-fg-3, never --ts-fg-4. fg-4 was raised to clear 4.5:1
   against the PAGE GROUND and only just; every muted line on this page sits on
   a card surface, which is lighter, and one of them sits on the selected-row
   surface, which is lighter still. fg-4 survives here only as a fill: band
   shading and legend swatches, where nothing has to be read.
   ========================================================================== */

.ts-gz__title {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

/* --- provenance strip ---------------------------------------------------- */

.ts-gz__status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0;
    background: var(--ts-surface);
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    overflow: hidden;
}

.ts-gz__status-cell {
    padding: 12px 16px;
    border-right: 1px solid var(--ts-line);
}

.ts-gz__status-cell:last-child { border-right: 0; }

.ts-gz__status-label {
    font-family: var(--ts-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ts-fg-3);
}

.ts-gz__status-value {
    font-size: 15px;
    color: var(--ts-fg);
    margin-top: 3px;
}

.ts-gz__status-value.ts-warn { color: var(--ts-warn); }

.ts-gz__status-note {
    font-size: 11.5px;
    color: var(--ts-fg-3);
    margin-top: 3px;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .ts-gz__status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ts-gz__status-cell:nth-child(2) { border-right: 0; }
    .ts-gz__status-cell:nth-child(-n+2) { border-bottom: 1px solid var(--ts-line); }
}

/* --- the qualification funnel -------------------------------------------- */

.ts-gz__funnel {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ts-gz__rung {
    flex: 1 1 170px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    background: var(--ts-surface);
    border: 1px solid var(--ts-line);
    border-left: 3px solid var(--ts-line-3);
    border-radius: var(--ts-radius-sm);
    color: var(--ts-fg-2);
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: border-color 120ms ease, background 120ms ease;
}

.ts-gz__rung:hover { background: var(--ts-surface-2); border-color: var(--ts-line-3); }

.ts-gz__rung:focus-visible {
    outline: 2px solid var(--ts-accent);
    outline-offset: 2px;
}

.ts-gz__rung.is-active {
    border-left-color: var(--ts-accent);
    background: var(--ts-surface-3);
    color: var(--ts-fg);
}

/* Each rung is a narrower population than the one before it, and the left
   border narrows with it -- the only decorative thing on the page, and it is
   carrying the one idea the old cards could not: these are nested. */
.ts-gz__funnel .ts-gz__rung:nth-child(1) { border-left-color: var(--ts-line-4); }
.ts-gz__funnel .ts-gz__rung:nth-child(2) { border-left-color: var(--ts-warn); }
.ts-gz__funnel .ts-gz__rung:nth-child(3) { border-left-color: var(--ts-up); }
.ts-gz__funnel .ts-gz__rung:nth-child(4) { border-left-color: var(--ts-accent); }

.ts-gz__rung-name { font-size: 12px; color: var(--ts-fg-3); }
.ts-gz__rung-count { font-size: 22px; color: var(--ts-fg); line-height: 1.1; }
.ts-gz__rung-share { font-size: 11px; color: var(--ts-fg-3); }

/* --- presets ------------------------------------------------------------- */

.ts-gz__presets { display: flex; gap: 8px; flex-wrap: wrap; }

.ts-gz__preset {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 12px;
    background: var(--ts-surface);
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: var(--ts-fg-2);
}

.ts-gz__preset:hover { border-color: var(--ts-line-3); background: var(--ts-surface-2); }
.ts-gz__preset:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-gz__preset.is-active { border-color: var(--ts-accent); background: var(--ts-surface-3); color: var(--ts-fg); }

.ts-gz__preset-label { font-size: 13px; font-weight: 600; }
.ts-gz__preset-q { font-size: 11.5px; color: var(--ts-fg-3); line-height: 1.35; }

.ts-gz__slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ts-fg-3);
    margin-bottom: -4px;
}

/* --- table cells --------------------------------------------------------- */

.ts-gz__sym { display: flex; flex-direction: column; gap: 1px; }
.ts-gz__sym-name {
    font-size: 11px;
    color: var(--ts-fg-3);
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ts-gz__chip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid currentColor;
    white-space: nowrap;
}

.ts-gz__chip--feed { color: var(--ts-accent); }
.ts-gz__chip--evidenced { color: var(--ts-up); }
.ts-gz__chip--stacked { color: var(--ts-warn); }
.ts-gz__chip--band { color: var(--ts-fg-2); }
.ts-gz__chip--out { color: var(--ts-fg-3); border-style: dashed; }

/* An absence, drawn as one. Never a zero. */
.ts-gz__none { color: var(--ts-fg-3); font-style: italic; font-size: 12px; }

.ts-gz__ev { font-size: 12.5px; }
.ts-gz__ev--measured { color: var(--ts-fg); }
.ts-gz__ev--thin { color: var(--ts-warn); }
.ts-gz__ev--absent { color: var(--ts-fg-3); font-style: italic; }

.ts-gz__rel { display: block; font-size: 11px; color: var(--ts-fg-3); }
.ts-gz__level { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.ts-gz__gap { font-size: 11px; color: var(--ts-fg-3); }

.ts-gz__row-selected { background: var(--ts-surface-3) !important; }

/* --- evidence panel ------------------------------------------------------ */

.ts-gz__panel { padding: 16px 18px; background: var(--ts-surface); }

.ts-gz__panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ts-gz__panel-sym { font-size: 20px; color: var(--ts-fg); }
.ts-gz__panel-name { font-size: 12px; color: var(--ts-fg-3); }

.ts-gz__verdict {
    margin: 10px 0 12px;
    font-size: 15px;
    color: var(--ts-fg);
}

.ts-gz__ladder {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.ts-gz__step { display: flex; gap: 10px; align-items: flex-start; }
.ts-gz__step-mark { color: var(--ts-fg-3); font-size: 11px; line-height: 1.6; }
.ts-gz__step.is-reached .ts-gz__step-mark { color: var(--ts-accent); }
.ts-gz__step-body { display: flex; flex-direction: column; gap: 1px; }
.ts-gz__step-label { font-size: 13px; color: var(--ts-fg-3); }
.ts-gz__step.is-reached .ts-gz__step-label { color: var(--ts-fg); }
.ts-gz__step-detail { font-size: 12px; color: var(--ts-fg-3); line-height: 1.45; }

.ts-gz__map-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px;
    color: var(--ts-fg-3);
    font-size: 13px;
}

.ts-gz__panel-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 14px;
}

@media (max-width: 900px) {
    .ts-gz__panel-cols { grid-template-columns: 1fr; }
}

.ts-gz__panel-h {
    font-family: var(--ts-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ts-fg-3);
    margin-bottom: 6px;
}

.ts-gz__evidence-head { font-size: 14px; color: var(--ts-fg); margin-bottom: 4px; }
.ts-gz__evidence-body { font-size: 12.5px; color: var(--ts-fg-3); line-height: 1.5; margin: 0 0 8px; }

.ts-gz__dates, .ts-gz__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ts-gz__dates li { display: flex; flex-direction: column; font-size: 12.5px; color: var(--ts-fg-2); }
.ts-gz__dates-price { color: var(--ts-fg); }
.ts-gz__dates-note { font-size: 11px; color: var(--ts-fg-3); }
.ts-gz__links li { font-size: 12.5px; }

.ts-gz__deciles { display: flex; flex-wrap: wrap; gap: 6px; }

.ts-gz__decile {
    display: flex;
    gap: 6px;
    padding: 2px 8px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    font-size: 11.5px;
    color: var(--ts-fg-3);
}

.ts-gz__decile.is-current { border-color: var(--ts-accent); color: var(--ts-fg); }

/* ==========================================================================
   The confluence map
   ========================================================================== */

.ts-gm { margin: 0; }

.ts-gm__empty {
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--ts-fg-3);
    border: 1px dashed var(--ts-line-2);
    border-radius: var(--ts-radius-sm);
}

.ts-gm__plot {
    position: relative;
    background: var(--ts-bg);
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    padding-bottom: 18px;
}

.ts-gm__svg { display: block; width: 100%; height: 260px; }

/* preserveAspectRatio="none" stretches the viewBox to the container, which
   would scale stroke widths with it. Every stroked element opts out. */
.ts-gm__svg line, .ts-gm__svg path, .ts-gm__svg rect { vector-effect: non-scaling-stroke; }

.ts-gm__future { fill: var(--ts-surface); opacity: 0.55; }

.ts-gm__band { stroke-width: 1; }
.ts-gm__band--now { fill: color-mix(in oklab, var(--ts-accent) 26%, transparent); stroke: var(--ts-accent); }
.ts-gm__band--ahead {
    fill: color-mix(in oklab, var(--ts-warn) 14%, transparent);
    stroke: var(--ts-warn);
    stroke-dasharray: 3 2;
}
.ts-gm__band--past { fill: color-mix(in oklab, var(--ts-fg-4) 22%, transparent); stroke: none; }
.ts-gm__band--undated { fill: color-mix(in oklab, var(--ts-fg-4) 10%, transparent); stroke: none; }

.ts-gm__price { fill: none; stroke: var(--ts-fg); stroke-width: 1.4; }
.ts-gm__close-rule { stroke: var(--ts-accent); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.7; }
.ts-gm__now { stroke: var(--ts-fg-2); stroke-width: 1.2; stroke-dasharray: 4 3; }
.ts-gm__tick { stroke: var(--ts-warn); stroke-width: 1.5; }

.ts-gm__axis-label {
    position: absolute;
    bottom: 3px;
    font-family: var(--ts-mono);
    font-size: 11px;
    color: var(--ts-fg-3);
    white-space: nowrap;
}

.ts-gm__axis-label--start { left: 6px; }
.ts-gm__axis-label--end { right: 6px; }
.ts-gm__axis-label--now { left: var(--ts-gm-now, 50%); transform: translateX(-50%); color: var(--ts-fg-3); }

.ts-gm__close-label {
    position: absolute;
    right: 6px;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--ts-accent);
    background: var(--ts-bg);
    padding: 0 4px;
    white-space: nowrap;
}

.ts-gm__legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 11px;
    color: var(--ts-fg-3);
}

.ts-gm__key { display: inline-flex; align-items: center; gap: 5px; }

.ts-gm__swatch {
    width: 14px;
    height: 9px;
    border-radius: 2px;
    display: inline-block;
    border: 1px solid transparent;
}

.ts-gm__swatch--now { background: color-mix(in oklab, var(--ts-accent) 26%, transparent); border-color: var(--ts-accent); }
.ts-gm__swatch--ahead { background: color-mix(in oklab, var(--ts-warn) 14%, transparent); border-color: var(--ts-warn); border-style: dashed; }
.ts-gm__swatch--past { background: color-mix(in oklab, var(--ts-fg-4) 22%, transparent); }
.ts-gm__swatch--undated { background: color-mix(in oklab, var(--ts-fg-4) 10%, transparent); }

.ts-gm__caption {
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--ts-fg-3);
    line-height: 1.5;
}

.ts-gm__caption strong { color: var(--ts-fg-3); }

.ts-gm__omission { display: block; margin-top: 3px; }

/* --- the one animation on this page -------------------------------------
   It is here because it carries the map's single most important fact and
   nothing else does: the price line draws left to right and STOPS at the
   vertical rule, and only then do the projected bands appear. The motion ends
   exactly where the record ends, so the boundary between what happened and
   what is arithmetic is something the reader watches rather than something a
   caption asserts.

   Everything else on the map is static. A band that pulsed, a count that rolled
   up, a row that slid in -- none of those would be saying anything, and a
   product whose whole claim is measurement cannot afford motion that means
   nothing.

   Runs once per selection, and not at all for a reader who has asked their
   system for less movement. */

@keyframes ts-gm-draw {
    from { stroke-dashoffset: 4000; }
    to   { stroke-dashoffset: 0; }
}

@keyframes ts-gm-emerge {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ts-gm__price {
    stroke-dasharray: 4000;
    animation: ts-gm-draw 620ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.ts-gm__band--ahead, .ts-gm__tick {
    opacity: 0;
    animation: ts-gm-emerge 260ms ease-out 620ms forwards;
}

@media (prefers-reduced-motion: reduce) {
    .ts-gm__price {
        stroke-dasharray: none;
        animation: none;
    }

    .ts-gm__band--ahead, .ts-gm__tick {
        opacity: 1;
        animation: none;
    }
}

/* Fault lists inside the operations banners: the named products behind a
   verdict, rather than a count the reader has to go and look up. */
.ts-ops__faults {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 12.5px;
    line-height: 1.55;
}

.ts-ops__faults code { font-size: 12px; }

/* A COMPUTED VALUE WHOSE PROVENANCE WAS NOT RECORDED.
   Shown, because we have it, and marked, because the session it was measured
   against is missing from the row. Not styled as an absence -- it is a
   measurement with an incomplete record, and those are different. */
.ts-wz__unrecorded {
    font-family: var(--ts-mono);
    font-variant-numeric: tabular-nums;
    color: var(--ts-fg-2);
    border-bottom: 1px dotted var(--ts-line-4);
    cursor: help;
}

.ts-wz__unrecorded-mark {
    color: var(--ts-warn);
    margin-left: 2px;
    font-family: var(--ts-sans);
}

/* A VERDICT PRODUCED BY THE REDUCED METHOD, MARKED AS ONE.
   Below 300 sessions the stage comes from price against the 150-day average
   and its slope, without the 200-day average, the stack, relative strength,
   resistance or base structure. It is a real classification and it rests on
   less, so it is not styled as a warning -- it is styled as a qualifier. */
.ts-wz__partial {
    display: block;
    margin-top: 3px;
    font-family: var(--ts-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ts-fg-3);
    border-bottom: 1px dotted var(--ts-line-4);
    cursor: help;
    width: fit-content;
}

/* AN INTERVAL WE CANNOT VOUCH FOR.
   Distinct from a known gap, which is hatched, and from an observed quiet
   hour, which is a plain short bar. Drawn faintly and outlined rather than
   filled: something may have happened here and we did not see it either way. */
.ts-nw__bar.is-unknown {
    background: transparent;
    border: 1px dashed var(--ts-line-4);
    opacity: 0.75;
}

/* AN INTERVAL WE WATCHED PART OF.
   Between the two above, and drawn between them: the hatching of a gap at
   half strength, because half the interval is what it describes. A bucket
   used to reach the plain state on one overlapping hour out of six. */
.ts-nw__bar.is-partial {
    background: repeating-linear-gradient(45deg,
        transparent 0 4px, color-mix(in oklab, var(--ts-line-4) 40%, transparent) 4px 6px);
    border: 1px dashed color-mix(in oklab, var(--ts-line-4) 60%, transparent);
}

/* NOTHING WAS DUE: a weekend or a night. Plain and light, neither hatched
   like a gap nor dashed like an interval we cannot vouch for. */
.ts-nw__bar.is-pause {
    background: color-mix(in oklab, var(--ts-line-2) 35%, transparent);
}

/* NOT LOADED: older than the newest 5,000 associations the page shows. A
   dotted top edge says the bar's height is a floor, not a count. */
.ts-nw__bar.is-truncated {
    border-top: 2px dotted var(--ts-fg-3);
}

/* OUR READING, WHERE THE PUBLISHER'S SENTENCE WOULD OTHERWISE SIT.
   Styled as a statement of what we established rather than as a quotation,
   because that is what it is. */
.ts-nw__derived { font-weight: 500; color: var(--ts-fg); }

.ts-nw__original {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
}

/* --------------------------------------------------------------------------
   Fundamentals: screens, charts, and the comparison rows
   --------------------------------------------------------------------------

   The tab had analytical depth and no reading order. These styles exist to
   make one thing true: a conclusion, the evidence under it, and the state of
   that evidence are visible together, and nothing that is missing is styled
   like something that was measured.
   -------------------------------------------------------------------------- */

/* ---- accounting screens -------------------------------------------------
   Four chips became four readings. A chip carried a number and a colour, and
   the colour was the only thing that said which way the number pointed --
   unavailable to anyone who cannot separate the greens from the reds, and
   contradicted two screens above by a sentence derived from a second copy of
   the thresholds. */

.ts-screens {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px; margin: 0 0 18px; padding: 0; list-style: none;
}
.ts-screen {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 10px;
    padding: 10px 12px;
    border: 1px solid var(--ts-line);
    border-left-width: 3px;
    border-radius: var(--ts-radius-sm);
    background: var(--ts-surface-2);
}
.ts-screen__name { font-size: 12.5px; font-weight: 500; }
.ts-screen__value { font-size: 15px; font-weight: 600; text-align: right; }
.ts-screen__band {
    grid-column: 1 / -1;
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .12em; text-transform: uppercase;
}
.ts-screen__note {
    grid-column: 1 / -1;
    margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--ts-fg-3);
}
.ts-screen--ok      { border-left-color: var(--ts-up); }
.ts-screen--ok      .ts-screen__band { color: var(--ts-up); }
.ts-screen--watch   { border-left-color: var(--ts-warn); }
.ts-screen--watch   .ts-screen__band { color: var(--ts-warn); }
.ts-screen--adverse { border-left-color: var(--ts-down); }
.ts-screen--adverse .ts-screen__band { color: var(--ts-down); }
/* NOT COMPUTED IS ITS OWN LOOK. A neutral grey chip beside three coloured
   ones reads as a fourth measurement that happened to be unremarkable. */
.ts-screen--none {
    border-left-color: var(--ts-line-3);
    border-style: dashed;
    background: transparent;
}
.ts-screen--none .ts-screen__band { color: var(--ts-fg-4); }

/* ---- charts ------------------------------------------------------------- */

.ts-chart { margin: 0 0 6px; }
.ts-chart__note {
    margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--ts-fg-3);
}
.ts-chart__note--warn {
    padding-left: 10px; border-left: 2px solid var(--ts-warn); color: var(--ts-fg-2);
}
/* A chart that declines to draw says why, in the space the chart would have
   occupied — not by disappearing, which reads as a page fault. */
.ts-chart__refuse {
    margin: 0; padding: 14px 16px;
    border: 1px dashed var(--ts-line-3); border-radius: var(--ts-radius-sm);
    font-size: 12.5px; line-height: 1.55; color: var(--ts-fg-3);
}
.ts-chart__key {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
    margin-top: 8px; font-size: 11.5px; color: var(--ts-fg-3);
}
.ts-chart__key-label { font-family: var(--ts-mono); letter-spacing: .04em; }
.ts-chart__key-item { display: inline-flex; align-items: center; gap: 6px; }
.ts-chart__data { margin-top: 10px; font-size: 12px; }
.ts-chart__data summary {
    cursor: pointer; color: var(--ts-fg-3);
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .06em;
}
.ts-chart__data summary:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-chart__data table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.ts-chart__data th, .ts-chart__data td {
    padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--ts-line);
}
.ts-chart__data th:first-child, .ts-chart__data td:first-child { text-align: left; }
.ts-chart__data th { color: var(--ts-fg-3); font-weight: 500; }

/* The narrow-screen composition. NOT the desktop SVG scaled down: an 11-unit
   label inside a 572-unit viewBox rendered at 340 CSS pixels is 6.5 pixels
   tall, which is unreadable at any contrast. */
.ts-chart__steps { display: none; }
.ts-chart__wide { display: block; overflow-x: auto; }

@media (max-width: 720px) {
    .ts-chart--bridge .ts-chart__wide { display: none; }
    .ts-chart--bridge .ts-chart__steps {
        display: flex; flex-direction: column; gap: 1px;
        margin: 0; padding: 0; list-style: none;
        border: 1px solid var(--ts-line); border-radius: var(--ts-radius-sm);
        overflow: hidden;
    }
    .ts-step {
        display: flex; align-items: baseline; justify-content: space-between;
        gap: 12px; padding: 10px 12px;
        background: var(--ts-surface-2);
        font-size: 13.5px;
    }
    .ts-step__value { font-size: 14px; font-weight: 600; }
    .ts-step--none .ts-step__value { font-weight: 400; color: var(--ts-fg-4); font-style: italic; }
    .ts-step--out { opacity: .7; }
    .ts-step--out .ts-step__label::after { content: ''; }
}

/* ---- a measure the reader chooses --------------------------------------- */

.ts-measure {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin: 10px 0 4px;
}
.ts-measure__label {
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-measure__btn {
    padding: 4px 11px;
    border: 1px solid var(--ts-line-2); border-radius: 999px;
    background: transparent; color: var(--ts-fg-2);
    font-family: inherit; font-size: 12px; cursor: pointer;
}
.ts-measure__btn:hover { border-color: var(--ts-line-4); color: var(--ts-fg); }
.ts-measure__btn:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-measure__btn.is-on {
    border-color: var(--ts-accent);
    background: color-mix(in oklab, var(--ts-accent) 16%, transparent);
    color: var(--ts-fg);
}

/* ---- brief: a missing reading is not a reassuring one -------------------- */

.ts-brief__none--warn {
    padding-left: 10px;
    border-left: 2px solid var(--ts-warn);
    color: var(--ts-fg-2);
}
/* A pillar with no comparable prior assessment gets a dot, not a flat arrow.
   A flat arrow is the claim "unchanged since last time". */
.ts-pillar__notrend { color: var(--ts-fg-4); font-size: 15px; line-height: 1; }

/* ---- "What this price assumes" -------------------------------------------
   The signature comparison. Three inversions the solver already ran, set out
   as rows with two directly labelled markers each, ordered so the widest
   disagreement is the first thing read. They were three bullet points in an
   information box, which left the subtraction and the ranking to the reader.

   Each row has its OWN scale: years and percentage points do not share one,
   and forcing them onto a common track would draw a four-year gap and a
   two-point gap at the same width. */

.ts-assume__headline {
    margin: 0 0 16px;
    font-size: 15px; line-height: 1.5; font-weight: 500;
    padding-left: 12px;
    border-left: 3px solid var(--ts-warn);
}
.ts-assume__headline--none {
    border-left-color: var(--ts-line-3);
    color: var(--ts-fg-2); font-weight: 400;
}
.ts-assume__rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ts-assume__row {
    padding: 14px 14px 12px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-surface-2);
}
.ts-assume__row.is-widest {
    border-color: color-mix(in oklab, var(--ts-warn) 45%, var(--ts-line));
    background: color-mix(in oklab, var(--ts-warn) 5%, var(--ts-surface-2));
}
.ts-assume__name { margin: 0; font-size: 13.5px; font-weight: 600; }
.ts-assume__q { margin: 2px 0 0; font-size: 12px; color: var(--ts-fg-3); }

/* Room above the track for the two marker labels, which sit on alternating
   sides so they never collide when the two values are close. */
.ts-assume__track {
    position: relative;
    height: 4px;
    margin: 46px 46px 42px;
    border-radius: 2px;
    background: var(--ts-track);
}
.ts-assume__span {
    position: absolute; top: 0; height: 100%;
    border-radius: 2px;
    background: color-mix(in oklab, var(--ts-warn) 55%, transparent);
}
.ts-assume__marker { position: absolute; top: 50%; }
.ts-assume__marker::before {
    content: '';
    position: absolute; left: -6px; top: -6px;
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid var(--ts-bg);
}
.ts-assume__marker--supported::before { background: var(--ts-accent); }
.ts-assume__marker--implied::before   { background: var(--ts-warn); }
.ts-assume__val, .ts-assume__who {
    position: absolute; left: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}
.ts-assume__val { font-size: 13px; font-weight: 600; }
.ts-assume__who {
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ts-fg-3);
}
/* Supported above the track, price-implied below it. Fixed sides rather than
   value-dependent ones: a label that jumps across the line when the numbers
   cross makes two companies impossible to compare. */
.ts-assume__marker--supported .ts-assume__val { top: -40px; }
.ts-assume__marker--supported .ts-assume__who { top: -24px; }
.ts-assume__marker--implied   .ts-assume__val { top: 22px; }
.ts-assume__marker--implied   .ts-assume__who { top: 38px; }

.ts-assume__gap { margin: 0; font-size: 13px; line-height: 1.5; }
.ts-assume__gap.is-over  { color: var(--ts-warn); }
.ts-assume__gap.is-under { color: var(--ts-up); }
.ts-assume__unavailable {
    margin: 10px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ts-fg-3);
    padding-left: 10px; border-left: 2px dashed var(--ts-line-3);
}
.ts-assume__basis {
    margin: 6px 0 0;
    font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-4);
}
.ts-assume__caveat, .ts-assume__crosslink {
    margin: 14px 0 0; padding-top: 10px;
    border-top: 1px dashed var(--ts-line);
    font-size: 12px; line-height: 1.55; color: var(--ts-fg-3);
}

/* Motion that says something: when a new analysis moves a marker, it travels
   so the reader sees WHICH assumption moved and by how much. Opt-in, per the
   convention above -- no motion unless the reader has asked for none to be
   suppressed. */
@media (prefers-reduced-motion: no-preference) {
    .ts-assume__marker { transition: left .28s cubic-bezier(.22,.61,.36,1); }
    .ts-assume__span { transition: left .28s cubic-bezier(.22,.61,.36,1), width .28s cubic-bezier(.22,.61,.36,1); }
}

@media (max-width: 600px) {
    .ts-assume__track { margin-left: 34px; margin-right: 34px; }
}

/* ---- section hierarchy --------------------------------------------------
   The sections were named after the people who invented the methods, which
   tells an expert reader what ran and every other reader nothing. The
   economic question is the heading; the framework is the subtitle it always
   was. */

.ts-sections {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 14px;
}
.ts-sections a {
    padding: 5px 11px;
    border: 1px solid var(--ts-line); border-radius: 999px;
    background: var(--ts-surface-2);
    font-size: 12px; color: var(--ts-fg-2); text-decoration: none;
}
.ts-sections a:hover { border-color: var(--ts-accent); color: var(--ts-fg); }
.ts-sections a:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }

.ts-section__q {
    margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35;
}
.ts-section__framework {
    margin: 3px 0 14px;
    font-size: 12px; line-height: 1.5; color: var(--ts-fg-3);
}
/* An anchored section must not land under the sticky top bar. */
[id="moat"], [id="earnings-quality"], [id="capital-allocation"],
[id="survivability"], [id="intrinsic-value"], [id="stewardship"],
[id="risk-factors"], [id="mda-changes"], [id="company-stats"] {
    scroll-margin-top: calc(var(--ts-topbar-h) + 12px);
}

.ts-statgroup {
    margin: 0 0 8px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ts-fg-3);
}

/* A link placed where the reader actually arrives at the decision it serves,
   rather than in a block of related resources nobody reads. */
.ts-handoff {
    margin: 16px 0 0; padding-top: 12px;
    border-top: 1px dashed var(--ts-line);
    font-size: 12.5px; line-height: 1.6; color: var(--ts-fg-3);
}

.ts-brief__source a { color: var(--ts-accent); text-decoration: none; }
.ts-brief__source a:hover { text-decoration: underline; }

/* ---- finding-first cards ------------------------------------------------
   Risk factors and MD&A changes were four-column tables whose evidence column
   held a quotation cut at 120 characters with the rest in a tooltip. On a
   phone that is four columns of two words; on a touch screen the tooltip does
   not exist, so the substance was unreachable. Long evidence prose does not
   belong in a narrow column.

   Colour here means SEVERITY and nothing else. It used to mean category as
   well — Cyber, Litigation and Regulatory were painted red whatever their
   severity — so a boilerplate regulatory notice carried the same alarm as a
   going-concern risk. */

.ts-findings { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ts-finding {
    padding: 14px 16px;
    border: 1px solid var(--ts-line);
    border-left-width: 3px;
    border-radius: var(--ts-radius-sm);
    background: var(--ts-surface-2);
}
.ts-finding--critical { border-left-color: var(--ts-down); }
.ts-finding--material { border-left-color: var(--ts-warn); }
.ts-finding--notice   { border-left-color: var(--ts-line-4); }

.ts-finding__head {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
    margin-bottom: 6px;
}
.ts-finding__title { margin: 0; flex: 1 1 240px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.ts-finding__sev, .ts-finding__cat, .ts-finding__new {
    padding: 1px 8px; border-radius: 999px;
    border: 1px solid var(--ts-line-2);
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.ts-finding--critical .ts-finding__sev { color: var(--ts-down); border-color: color-mix(in oklch, var(--ts-down) 45%, transparent); }
.ts-finding--material .ts-finding__sev { color: var(--ts-warn); border-color: color-mix(in oklch, var(--ts-warn) 45%, transparent); }
.ts-finding--notice   .ts-finding__sev { color: var(--ts-fg-3); }
.ts-finding__cat { color: var(--ts-fg-3); }
.ts-finding__new { color: var(--ts-accent); border-color: color-mix(in oklch, var(--ts-accent) 45%, transparent); }

.ts-finding__desc { margin: 0 0 8px; font-size: 13px; line-height: 1.55; color: var(--ts-fg-2); }
.ts-finding__quote {
    margin: 0; padding: 8px 0 8px 12px;
    border-left: 2px solid var(--ts-line-2);
    font-size: 13px; line-height: 1.6; font-style: italic; color: var(--ts-fg);
}
.ts-finding__src {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    margin: 8px 0 0;
    font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-4);
}
.ts-finding__src a { color: var(--ts-accent); }

/* ---- side-by-side filing comparison ------------------------------------- */

.ts-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.ts-diff__side {
    padding: 10px 12px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-surface);
}
.ts-diff__label {
    margin: 0 0 6px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-diff__text { margin: 0; font-size: 12.5px; line-height: 1.65; }
.ts-diff__none { margin: 0; font-size: 12.5px; color: var(--ts-fg-4); font-style: italic; }
/* Marked with an underline as well as a tint: the change must survive being
   printed, and must not depend on separating two similar hues. */
.ts-diff__add {
    background: color-mix(in oklab, var(--ts-up) 22%, transparent);
    text-decoration: underline; text-decoration-thickness: 2px;
    text-decoration-color: var(--ts-up);
}
.ts-diff__del {
    background: color-mix(in oklab, var(--ts-down) 18%, transparent);
    text-decoration: line-through;
    text-decoration-color: var(--ts-down);
}
.ts-diff__note { margin: 6px 0 0; font-size: 11.5px; color: var(--ts-fg-4); }

@media (max-width: 780px) {
    .ts-diff { grid-template-columns: 1fr; gap: 8px; }
}

/* ---- explicit states ----------------------------------------------------
   Not assessed, assessing, complete, partial, outdated, not applicable,
   failed. A pending panel used to describe the implementation ("stores them
   as queryable rows"), which says nothing about what a reader will get or
   what to do next. */

.ts-empty {
    margin: 0; padding: 14px 16px;
    border: 1px dashed var(--ts-line-3); border-radius: var(--ts-radius-sm);
    font-size: 13px; line-height: 1.6; color: var(--ts-fg-3);
}
.ts-empty strong { color: var(--ts-fg-2); }

/* Sub-headings inside a methodology card. The fundamentals page has four
   long sections and needed a level between the section title and body prose. */
.ts-section__sub {
    margin: 20px 0 6px;
    font-size: 14px; font-weight: 600; line-height: 1.4;
    color: var(--ts-fg);
}
.ts-section__sub:first-of-type { margin-top: 14px; }

/* ---- where the money went ------------------------------------------------
   Eight amounts as text inside eight cards in a two-column grid: comparing
   them meant reading numbers in different orders of magnitude and holding
   them in your head. Bars rather than a pie or a Sankey, because the buckets
   do not reconcile to a whole — some are uses of cash, some are sources, and
   one can be measured as negative — so a shape implying a total would assert
   something the data does not support.

   A bucket with no figure gets no row here. A zero-length bar is the claim
   that nothing was deployed, which is the one thing a missing figure does not
   tell us. */

.ts-deploy { margin: 0 0 6px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ts-deploy__row {
    display: grid;
    grid-template-columns: minmax(110px, 1.1fr) minmax(90px, 3fr) auto auto;
    align-items: center; gap: 10px;
    font-size: 13px;
}
.ts-deploy__name { color: var(--ts-fg-2); }
.ts-deploy__track { height: 14px; border-radius: 3px; background: var(--ts-track); overflow: hidden; }
.ts-deploy__bar { display: block; height: 100%; border-radius: 3px; background: var(--ts-accent); }
/* A bucket measured as NEGATIVE — a company that borrowed rather than repaid —
   is a measurement, and it is drawn at its true size in its own colour rather
   than vanishing or inverting the scale. */
.ts-deploy__bar.is-negative { background: var(--ts-down); }
.ts-deploy__amount { font-size: 12.5px; font-weight: 600; text-align: right; }
.ts-deploy__grade {
    min-width: 26px; text-align: center;
    padding: 1px 6px; border-radius: 4px;
    border: 1px solid var(--ts-line-2);
    font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-2);
}

@media (prefers-reduced-motion: no-preference) {
    .ts-deploy__bar { transition: width .3s cubic-bezier(.22,.61,.36,1); }
}

@media (max-width: 600px) {
    .ts-deploy__row { grid-template-columns: 1fr auto auto; }
    .ts-deploy__track { grid-column: 1 / -1; order: 3; }
}

/* ---- guidance against what arrived ---------------------------------------
   A range and an outcome, so it is drawn as one: the band is what management
   said, the marker is what happened. A five-column table of low, high and
   actual asked the reader to do the comparison the picture exists to make.

   Grouped by metric: a revenue range in millions and a margin range in
   percent do not share a scale, and putting them on one would make the wider
   band look like the less certain forecast. */

.ts-guide { margin: 0 0 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ts-guide__row {
    display: grid;
    grid-template-columns: minmax(64px, auto) minmax(90px, 3fr) auto auto;
    align-items: center; gap: 10px;
    font-size: 12.5px;
}
.ts-guide__period { font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-3); }
.ts-guide__track { position: relative; height: 14px; border-radius: 3px; background: var(--ts-track); }
.ts-guide__band {
    position: absolute; top: 3px; height: 8px;
    border-radius: 2px;
    background: color-mix(in oklab, var(--ts-accent) 40%, transparent);
}
.ts-guide__dot {
    position: absolute; top: 1px;
    width: 12px; height: 12px; margin-left: -6px;
    border-radius: 50%;
    border: 2px solid var(--ts-bg);
    background: var(--ts-fg-3);
}
.ts-guide__dot.is-hit  { background: var(--ts-up); }
.ts-guide__dot.is-miss { background: var(--ts-down); }
.ts-guide__values { color: var(--ts-fg-3); font-size: 11.5px; text-align: right; }
.ts-guide__actual { font-weight: 600; text-align: right; min-width: 54px; }

@media (max-width: 600px) {
    .ts-guide__row { grid-template-columns: 1fr auto auto; }
    .ts-guide__track { grid-column: 1 / -1; order: 3; }
}

/* ---- scenarios against the price ----------------------------------------
   The table already carried the assumptions and the per-share values, and
   answering "under which modelled outcomes does this price look demanding?"
   from it meant three subtractions against a number in another panel.

   Three MARKS, not a shaded band between the outer two: three discrete
   scenarios are not a probability distribution, they are not equally likely,
   and the space between them is not a confidence interval. */

.ts-scenscale { padding: 34px 12px 30px; }
.ts-scenscale__track {
    position: relative;
    height: 4px; border-radius: 2px;
    background: var(--ts-track);
}
.ts-scenscale__mark { position: absolute; top: -5px; }
.ts-scenscale__mark::before {
    content: '';
    position: absolute; left: -5px;
    width: 10px; height: 14px; border-radius: 2px;
    background: var(--ts-accent);
}
.ts-scenscale__name {
    position: absolute; left: 0; top: 16px;
    transform: translateX(-50%);
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--ts-fg-3); white-space: nowrap;
}
/* The price is the reference, so it is a full-height rule rather than another
   mark of the same weight. */
.ts-scenscale__price { position: absolute; top: -22px; }
.ts-scenscale__price::before {
    content: '';
    position: absolute; left: -1px; top: 0;
    width: 2px; height: 30px;
    background: var(--ts-warn);
}
.ts-scenscale__price-label, .ts-scenscale__price-who {
    position: absolute; left: 0; transform: translateX(-50%);
    white-space: nowrap;
}
.ts-scenscale__price-label { top: -18px; font-size: 12.5px; font-weight: 600; color: var(--ts-warn); }
.ts-scenscale__price-who {
    top: -32px;
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ts-fg-3);
}

@media (prefers-reduced-motion: no-preference) {
    /* When the assumptions change, the marks travel and the price stays put —
       so what moved is visible, which is the only reason to animate at all. */
    .ts-scenscale__mark { transition: left .28s cubic-bezier(.22,.61,.36,1); }
}

/* ---- landing on a section you jumped to ----------------------------------
   Motion that communicates NAVIGATION, which is the one thing the section
   navigator could not do on its own: nine anchors on a long page, and after
   a jump the reader has no way to tell which card they landed on from the
   one above it. A brief rail on the destination says "here".

   Not decoration, and not a permanent highlight either — it fades, because a
   section that stays marked for the rest of the visit is noise by the second
   jump. Suppressed entirely under reduced motion, where the scroll position
   is the whole signal and a fading edge is not information. */

@media (prefers-reduced-motion: no-preference) {
    .ts-page :target,
    [id="moat"]:target, [id="earnings-quality"]:target, [id="capital-allocation"]:target,
    [id="survivability"]:target, [id="intrinsic-value"]:target, [id="stewardship"]:target,
    [id="risk-factors"]:target, [id="mda-changes"]:target, [id="company-stats"]:target {
        animation: ts-landed 1.6s ease-out 1;
    }

    @keyframes ts-landed {
        0%   { box-shadow: inset 3px 0 0 0 var(--ts-accent); }
        70%  { box-shadow: inset 3px 0 0 0 var(--ts-accent); }
        100% { box-shadow: inset 3px 0 0 0 transparent; }
    }
}

/* Smooth scrolling for the in-page jumps, again only where motion is wanted.
   An instant jump on a long page is disorienting; a scroll shows the reader
   they moved DOWN the same document rather than to a new one. */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ---- test an assumption --------------------------------------------------
   The reader's own arithmetic, run through the product's model. Two things
   the styling has to carry, because they are the whole design:

   1. It is SEPARATE from the assessment. Collapsed by default, inset, with a
      different accent from every published figure on the page, and a line at
      the bottom saying so in words. A reader must never come away thinking
      their exploration changed the research.

   2. What MOVED is the point. The value marker travels rather than jumping,
      because seeing which way a number went when you moved a control is the
      entire reason for building this rather than printing a table. */

.ts-sandbox {
    margin: 18px 0 0;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-surface-2);
}
.ts-sandbox__summary {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px; font-weight: 600;
    list-style: none;
}
.ts-sandbox__summary::-webkit-details-marker { display: none; }
.ts-sandbox__summary::before {
    content: '▸';
    display: inline-block; width: 14px;
    color: var(--ts-fg-3);
}
.ts-sandbox[open] > .ts-sandbox__summary::before { content: '▾'; }
.ts-sandbox__summary:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: -2px; }
.ts-sandbox__hint { font-weight: 400; color: var(--ts-fg-3); font-size: 12.5px; }

.ts-sandbox__body { padding: 0 16px 16px; }
.ts-sandbox__preamble, .ts-sandbox__scope {
    margin: 0 0 10px; font-size: 12.5px; line-height: 1.6; color: var(--ts-fg-3);
}
.ts-sandbox__scope {
    padding-left: 10px;
    border-left: 2px solid var(--ts-line-3);
}

.ts-sandbox__grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px; margin: 16px 0;
}
.ts-sandbox__control { min-width: 0; }
.ts-sandbox__label {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 10px; margin-bottom: 4px;
}
.ts-sandbox__name { font-size: 12.5px; font-weight: 500; }
.ts-sandbox__value { font-size: 14px; font-weight: 600; color: var(--ts-accent); }
.ts-sandbox__range { width: 100%; accent-color: var(--ts-accent); }
.ts-sandbox__range:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 3px; }
.ts-sandbox__q { margin: 3px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ts-fg-3); }
/* Where the assessment sits, on every control, so the reader can always find
   their way back and can see how far they have moved from it. */
.ts-sandbox__pub { display: block; color: var(--ts-fg-4); }

.ts-sandbox__actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    margin-bottom: 14px;
}
.ts-sandbox__dirty {
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .06em; color: var(--ts-fg-3);
}

.ts-sandbox__result {
    padding-top: 14px;
    border-top: 1px solid var(--ts-line);
}
.ts-sandbox__figures {
    display: flex; flex-wrap: wrap; gap: 10px 28px;
    margin-bottom: 10px;
}
.ts-sandbox__figure { display: flex; flex-direction: column; gap: 2px; }
.ts-sandbox__figure-label {
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-sandbox__figure-value { font-size: 20px; font-weight: 600; }
.ts-sandbox__figure:first-child .ts-sandbox__figure-value { color: var(--ts-accent); }

.ts-sandbox__delta { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; }
.ts-sandbox__delta.is-up { color: var(--ts-up); }
.ts-sandbox__delta.is-down { color: var(--ts-down); }

.ts-sandbox__notes {
    margin: 10px 0 0; padding: 0 0 0 12px; list-style: none;
    display: flex; flex-direction: column; gap: 8px;
    border-left: 2px solid var(--ts-line-3);
}
.ts-sandbox__notes li { font-size: 12.5px; line-height: 1.55; color: var(--ts-fg-2); }

.ts-sandbox__separation {
    margin: 14px 0 0; padding-top: 10px;
    border-top: 1px dashed var(--ts-line);
    font-size: 12px; line-height: 1.55; color: var(--ts-fg-3);
}

/* The reader's mark is a different shape from the published ones, so the two
   can never be confused on the same track. */
.ts-scenscale__mark--yours::before {
    background: var(--ts-fg);
    border-radius: 50%;
    width: 14px; height: 14px; left: -7px; top: -1px;
}
.ts-scenscale__mark--yours .ts-scenscale__name { color: var(--ts-fg); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
    /* The whole point: move a control and watch WHICH way the value went. */
    .ts-scenscale__mark--yours { transition: left .2s cubic-bezier(.22,.61,.36,1); }
    .ts-sandbox__figure-value { transition: color .2s ease; }
}

/* ---- how old the analysis is --------------------------------------------
   Beside the conclusion it ages, rather than only in the provenance line at
   the foot of the brief — which answered the question for a reader who
   already knew to ask it and would do the subtraction.

   Three bands, and the third is a real state: nothing recomputes an analysis
   in the background, so one can sit past its refresh window indefinitely if
   nobody runs a new one. */

.ts-age {
    padding: 2px 9px;
    border: 1px solid var(--ts-line-2);
    border-radius: 999px;
    font-family: var(--ts-mono); font-size: 11px;
    letter-spacing: .04em; white-space: nowrap;
    cursor: help;
    color: var(--ts-fg-3);
}
.ts-age--fresh  { color: var(--ts-fg-3); }
.ts-age--ageing {
    color: var(--ts-warn);
    border-color: color-mix(in oklch, var(--ts-warn) 40%, transparent);
}
.ts-age--stale  {
    color: var(--ts-down);
    border-color: color-mix(in oklch, var(--ts-down) 40%, transparent);
}
/* An unreadable timestamp is not a fresh one. Dashed, so it does not sit in
   the row looking like a measurement that happened to be unremarkable. */
.ts-age--unknown { border-style: dashed; color: var(--ts-fg-4); }

/* ---- reference data ----------------------------------------------------
   Fourteen StatCells in a MudGrid, and StatCell is
   `d-flex justify-space-between` with no gap. In a quarter-width cell a long
   label leaves nothing to distribute, so label and value butted together:
   the page read "Shares Float233.76M" and "Institutional own.—". Each cell
   also drew its own bottom border, and since grid items pad independently
   those borders never lined up into rows — they rendered as ragged underlines
   that looked like broken links.

   THE LABEL GOES ABOVE THE VALUE, which is the fix rather than adding a gap.
   A gap has to clear the longest label at the narrowest width, and that is a
   number nobody can pick correctly for every screen. Stacked, collision is
   impossible at any width — and the labels get to be words instead of
   abbreviations. */

.ts-refdata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px 28px;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--ts-line);
}
.ts-refdata__item { min-width: 0; }
/* Label and value typography come from the shared idiom above; only the
   spacing and the wrapping behaviour are this block's own. */
.ts-refdata dd { margin: 0; line-height: 1.3; overflow-wrap: break-word; }
/* Names, sectors and industries are prose, not measurements: they wrap and
   they do not sit in a monospace column pretending to be comparable to each
   other. */
.ts-refdata__item--text dd { font-family: var(--ts-sans); font-size: 14.5px; }

/* A qualifier belongs with the label rather than inside the value. "20 days"
   is part of what the number IS; putting it in the value would make the
   number unreadable as a number. */
.ts-refdata__qual {
    letter-spacing: .04em; text-transform: none;
    color: var(--ts-fg-4);
}
.ts-refdata__qual::before { content: '· '; }

/* WHERE THE NUMBER CAME FROM, ON THE PAGE. These were tooltips, which a touch
   reader cannot reach at all — and the provenance of a share count is
   something this page has already been wrong about once. */
.ts-refdata__src {
    margin: 4px 0 0;
    font-size: 11px; line-height: 1.45;
    color: var(--ts-fg-4);
}
/* An absent value is not a small one. Dimmed and lighter, with the reason on
   the line below it rather than behind a hover. */
.ts-refdata__absent { color: var(--ts-fg-4); font-weight: 400; }

@media (max-width: 480px) {
    .ts-refdata { gap: 14px 18px; }
}

/* ==========================================================================
   Sector rotation (.ts-rotation, .ts-rotation-map, .ts-rotation-table)
   --------------------------------------------------------------------------
   The map is the page's centrepiece and the table is its accessible twin, so
   both are drawn from the same tokens and the same quadrant colours: green
   leading, amber weakening, red lagging, indigo improving -- the conventional
   reading of a rotation map, in this file's semantic colours rather than new
   ones. Group hues come from RotationPalette and arrive as attributes; every
   other colour here is a token.

   Muted text is --ts-fg-3 on card surfaces, as on the Gann page; fg-4 appears
   only as fills where nothing has to be read.
   ========================================================================== */

.ts-rotation__head { margin-bottom: 14px; }
.ts-rotation__title { font-size: 1.5rem; margin-bottom: 4px; }
.ts-rotation__lede { margin: 0 0 6px; max-width: 760px; color: var(--ts-fg-2); font-size: 14px; }
.ts-rotation__asof { margin: 0; }

.ts-rotation__controls {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    padding: 10px 14px; margin-bottom: 12px;
    border: 1px solid var(--ts-line); border-radius: var(--ts-radius);
    background: var(--ts-surface);
}

/* Namespaced: .ts-seg belongs to /pricing and the dashboard, and redefining it
   once already cost a contrast failure there. */
.ts-rotation-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--ts-track); border-radius: 7px; }
.ts-rotation-seg__item {
    min-height: 32px; padding: 0 12px;
    border: 0; border-radius: 5px; background: transparent;
    color: var(--ts-fg-2); font-family: var(--ts-sans); font-size: 13px;
    cursor: pointer; transition: background .16s, color .16s;
}
.ts-rotation-seg__item:hover { color: var(--ts-fg); }
.ts-rotation-seg__item.active { background: var(--ts-surface-3); color: var(--ts-fg); box-shadow: inset 0 0 0 1px var(--ts-line-3); }
.ts-rotation-seg__item:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }

.ts-rotation-field, .ts-rotation-check {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--ts-fg-2);
}
.ts-rotation-field__select {
    min-height: 32px; padding: 0 8px;
    border: 1px solid var(--ts-line-2); border-radius: 6px;
    background: var(--ts-track); color: var(--ts-fg);
    font-size: 12px;
}
.ts-rotation-field__select:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
.ts-rotation-check input { width: 18px; height: 18px; accent-color: var(--ts-accent); }
.ts-rotation-check input:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }

.ts-rotation__crumbs ol {
    display: flex; flex-wrap: wrap; gap: 6px; list-style: none;
    margin: 0 0 12px; padding: 0;
    font-size: 13px; color: var(--ts-fg-2);
}
.ts-rotation__crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--ts-fg-3); }
.ts-rotation__crumbs a { text-decoration: underline; text-underline-offset: 2px; }
.ts-rotation__crumbs [aria-current] { color: var(--ts-fg); font-weight: 600; }

.ts-rotation__state {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 28px 20px;
    border: 1px dashed var(--ts-line-3); border-radius: var(--ts-radius);
    color: var(--ts-fg-2); font-size: 14px;
}
.ts-rotation__state a { text-decoration: underline; text-underline-offset: 2px; }

.ts-rotation__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
    gap: 14px; margin-bottom: 14px;
    align-items: start;
}
.ts-rotation__h2 { font-size: 15px; }
.ts-rotation__hint p { color: var(--ts-fg-2); font-size: 13.5px; margin: 8px 0 0; }

.ts-rotation-swatch {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    margin-right: 7px; vertical-align: baseline; flex: none;
}

/* Quadrant chips: the colour names the quadrant, and so does the word, so
   neither has to carry the meaning alone. */
.ts-rotation-quad {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
    border: 1px solid currentColor; border-radius: 3px;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    white-space: nowrap;
}
.ts-rotation-quad--leading { color: var(--ts-up); }
.ts-rotation-quad--weakening { color: var(--ts-warn); }
.ts-rotation-quad--lagging { color: var(--ts-down); }
.ts-rotation-quad--improving { color: oklch(0.76 0.12 275); }

/* --- the map ------------------------------------------------------------- */

.ts-rotation-map { margin: 0; }
/* The plot keeps the viewBox's aspect ratio, so the tooltip's percentage
   position and the SVG's own coordinates describe the same point. */
.ts-rotation-map__plot { position: relative; width: 100%; aspect-ratio: 720 / 540; }
.ts-rotation-map__svg { display: block; width: 100%; height: 100%; overflow: visible; }

.ts-rotation-map__q { fill-opacity: .07; }
.ts-rotation-map__q--leading { fill: var(--ts-up); }
.ts-rotation-map__q--weakening { fill: var(--ts-warn); }
.ts-rotation-map__q--lagging { fill: var(--ts-down); }
.ts-rotation-map__q--improving { fill: var(--ts-stage-basing); }

.ts-rotation-map__grid { stroke: var(--ts-line); stroke-width: 1; }
.ts-rotation-map__centre { stroke: var(--ts-line-4); stroke-width: 1.2; stroke-dasharray: 4 4; }
/* Text sizes are multiplied by --ts-rot-k, the viewBox units per screen pixel
   that rotation-map.js keeps current, so the map's text stays a readable
   size however wide the map is drawn. Without the script it is 1 and the
   text simply scales with the drawing, as before. */
.ts-rotation-map__tick { fill: var(--ts-fg-3); font-family: var(--ts-mono); font-size: calc(10.5px * var(--ts-rot-k, 1)); }
.ts-rotation-map__axis { fill: var(--ts-fg-3); font-family: var(--ts-mono); font-size: calc(10px * var(--ts-rot-k, 1)); letter-spacing: .1em; }
.ts-rotation-map__zoomnote { fill: var(--ts-warn); }
.ts-rotation-map__date { font-family: var(--ts-mono); font-size: calc(10px * var(--ts-rot-k, 1)); paint-order: stroke; stroke: var(--ts-surface); stroke-width: 3px; stroke-linejoin: round; }
.ts-rotation-map__qlabel { font-family: var(--ts-mono); font-size: calc(11px * var(--ts-rot-k, 1)); letter-spacing: .16em; font-weight: 600; opacity: .8; }
.ts-rotation-map__qlabel--leading { fill: var(--ts-up); }
.ts-rotation-map__qlabel--weakening { fill: var(--ts-warn); }
.ts-rotation-map__qlabel--lagging { fill: var(--ts-down); }
.ts-rotation-map__qlabel--improving { fill: oklch(0.76 0.12 275); }

.ts-rotation-map__tail path { fill: none; stroke-linecap: round; }
.ts-rotation-map__proxy path { fill: none; stroke-width: 1; stroke-dasharray: 3 3; }
.ts-rotation-map__proxy circle { fill: var(--ts-surface); stroke-width: 1.6; }

/* MOTION. A change of date, weighting or tail drawn on the same axes moves
   each point, label and tail segment from where it was to where it now is, so
   the eye follows a group instead of re-finding it; on new axes the map jumps
   (is-reframed, below). The duration sits just under the play
   step, so playing reads as one continuous drift. Tails bend through the CSS
   d property where the browser supports it; elsewhere they redraw. */
.ts-rotation-map__mv { transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.ts-rotation-map__tail path, .ts-rotation-map__proxy path {
    transition: d .5s cubic-bezier(.4, 0, .2, 1), stroke-opacity .3s, stroke-width .3s;
}

/* New axes: every position changes because the scale did, so the map jumps
   to it rather than showing a movement that did not happen. */
.ts-rotation-map__plot.is-reframed .ts-rotation-map__mv,
.ts-rotation-map__plot.is-reframed .ts-rotation-map__tail path,
.ts-rotation-map__plot.is-reframed .ts-rotation-map__proxy path { transition: none; }

/* A crowded map keeps every tail in the page but draws only the asked-for
   ones; pointing at a group reveals its own. */
.ts-rotation-map__tail.is-latent { display: none; }
.ts-rotation-map__tail.is-latent.is-hover { display: inline; }
.ts-rotation-map .is-dimmed.is-hover { opacity: 1; }

.ts-rotation-map__pt { cursor: pointer; outline: none; }
.ts-rotation-map__hit { fill: transparent; stroke: transparent; stroke-width: 2; }
.ts-rotation-map__dot { stroke-width: 1.5; stroke-opacity: .9; fill-opacity: .95; }
.ts-rotation-map__halo { fill: none; stroke: var(--ts-fg); stroke-width: 1.5; }
.ts-rotation-map__pt:hover .ts-rotation-map__dot { stroke: var(--ts-fg); }
.ts-rotation-map__pt:focus-visible .ts-rotation-map__hit { stroke: var(--ts-accent); }
/* A thin group is still drawn -- dropping it would be a silent omission --
   but hollowed and dashed, so it does not claim the weight of a full index. */
.ts-rotation-map__pt.is-thin .ts-rotation-map__dot { fill-opacity: .3; stroke-dasharray: 2 2; }
/* Pinned to the edge of a zoomed map: a ring, because its place is "further". */
.ts-rotation-map__pt.is-offscale .ts-rotation-map__dot { fill-opacity: 0; stroke-width: 2.4; }
.ts-rotation-map__pt.is-compared .ts-rotation-map__dot { stroke: var(--ts-fg); stroke-width: 2; }
.ts-rotation-map__pt.is-hover .ts-rotation-map__dot { stroke: var(--ts-fg); }

.ts-rotation-map__label { font-family: var(--ts-sans); font-size: calc(12px * min(var(--ts-rot-k, 1), 1.8)); font-weight: 500; paint-order: stroke; stroke: var(--ts-surface); stroke-width: 3px; stroke-linejoin: round; }
.ts-rotation-map__label.is-emphasised { font-weight: 700; }
.ts-rotation-map__label.is-crowded { opacity: .6; }
.ts-rotation-map__label.is-hover { font-weight: 700; opacity: 1; }
/* A narrow map keeps the five most important labels -- focused groups and
   the furthest from the centre -- and the table carries the rest. */
.ts-rotation-map__plot[data-narrow] .ts-rotation-map__label:not(.is-emphasised):not(.is-hover):not([data-rank="1"]):not([data-rank="2"]):not([data-rank="3"]):not([data-rank="4"]):not([data-rank="5"]) { display: none; }

.ts-rotation-map .is-dimmed { opacity: .3; }
.ts-rotation-map .ts-rotation-map__label.is-dimmed { opacity: .35; }

.ts-rotation-map__tip {
    position: absolute; z-index: 2; pointer-events: none;
    min-width: 200px; max-width: 260px;
    transform: translate(14px, -100%);
    padding: 10px 12px;
    border: 1px solid var(--ts-line-3); border-radius: var(--ts-radius-sm);
    background: var(--ts-surface-2);
    box-shadow: 0 8px 24px oklch(0 0 0 / .35);
    font-size: 12.5px; color: var(--ts-fg);
}
.ts-rotation-map__tip.is-left { transform: translate(calc(-100% - 14px), -100%); }
.ts-rotation-map__tip.is-below { transform: translate(14px, 14px); }
.ts-rotation-map__tip.is-left.is-below { transform: translate(calc(-100% - 14px), 14px); }
.ts-rotation-map__tip-name { display: flex; align-items: center; font-weight: 600; margin-bottom: 6px; }
.ts-rotation-map__tip-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 0; }
.ts-rotation-map__tip-grid dt { color: var(--ts-fg-3); font-weight: 400; }
.ts-rotation-map__tip-grid dd { margin: 0; text-align: right; }
.ts-rotation-map__tip-note { margin-top: 6px; color: var(--ts-warn); font-size: 11.5px; }
.ts-rotation-map__tip-hint { margin-top: 6px; color: var(--ts-fg-3); font-size: 11.5px; }

.ts-rotation-map__caption { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--ts-fg-3); }
.ts-rotation-map__caption span + span::before { content: ' '; }
.ts-rotation-map__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 11.5px; color: var(--ts-fg-3); }
.ts-rotation-map__key { display: inline-flex; align-items: center; gap: 6px; }
.ts-rotation-map__key-tail { width: 22px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--ts-fg-2)); }
/* The week (or month) so far: hollow heads, because the point will still move. */
.ts-rotation-map__plot.is-partial .ts-rotation-map__dot { fill-opacity: .18; stroke-width: 2; }
.ts-rotation-map__key-partial { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ts-fg-2); background: color-mix(in oklab, var(--ts-fg-2) 18%, transparent); }
.ts-rotation-map__key-thin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px dashed var(--ts-fg-2); }
.ts-rotation-map__key-proxy { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ts-fg-2); }
.ts-rotation-map__key-off { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ts-fg-2); }

/* --- the scrubber -------------------------------------------------------- */

.ts-rotation-scrub {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ts-line);
}
.ts-rotation-scrub__btn {
    min-width: 36px; min-height: 36px;
    border: 1px solid var(--ts-line-2); border-radius: 6px;
    background: var(--ts-track); color: var(--ts-fg);
    font-size: 14px; cursor: pointer;
}
.ts-rotation-scrub__btn:disabled { color: var(--ts-fg-5); cursor: default; }
.ts-rotation-scrub__btn:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
.ts-rotation-scrub__btn--play { color: var(--ts-accent); }
.ts-rotation-scrub__range { flex: 1 1 200px; min-width: 160px; height: 36px; accent-color: var(--ts-accent); }
.ts-rotation-scrub__range:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-rotation-scrub__date { font-size: 12px; color: var(--ts-fg-2); min-width: 170px; }
.ts-rotation-scrub__latest {
    margin-left: 6px; padding: 1px 6px; border-radius: 3px;
    border: 1px solid var(--ts-line-3); color: var(--ts-fg-3);
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}

/* --- the detail panel ---------------------------------------------------- */

.ts-rotation-detail__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ts-rotation-detail__title { display: flex; align-items: center; font-size: 18px; margin-top: 2px; }
.ts-rotation-detail__close {
    min-width: 32px; min-height: 32px; border: 1px solid var(--ts-line-2); border-radius: 6px;
    background: transparent; color: var(--ts-fg-2); font-size: 18px; line-height: 1; cursor: pointer;
}
.ts-rotation-detail__close:hover { color: var(--ts-fg); }
.ts-rotation-detail__close:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
.ts-rotation-detail__journey { margin: 10px 0 12px; font-size: 13.5px; color: var(--ts-fg-2); line-height: 1.6; }
.ts-rotation-detail__journey .ts-rotation-quad { margin-right: 6px; }
.ts-rotation-detail__thin { display: block; margin-top: 4px; color: var(--ts-warn); font-size: 12.5px; }
.ts-rotation-detail__label {
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ts-fg-3); margin-bottom: 4px;
}
.ts-rotation-detail__qual { letter-spacing: .04em; text-transform: none; }
.ts-rotation-detail__axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ts-fg-3); }
.ts-rotation-detail__sub {
    margin: 16px 0 6px; font-size: 11px; font-family: var(--ts-mono);
    letter-spacing: .1em; text-transform: uppercase; color: var(--ts-fg-3); font-weight: 500;
}
.ts-rotation-detail__facts, .ts-rotation-detail__perf, .ts-rotation-detail__breadth, .ts-rotation-detail__split { margin: 0; display: grid; gap: 6px; }
.ts-rotation-detail__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.ts-rotation-detail__perf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ts-rotation-detail__facts > div, .ts-rotation-detail__perf > div, .ts-rotation-detail__breadth > div, .ts-rotation-detail__split > div {
    padding: 6px 8px; border-radius: 5px; background: var(--ts-surface-2);
}
.ts-rotation-detail__facts dt, .ts-rotation-detail__perf dt, .ts-rotation-detail__breadth dt, .ts-rotation-detail__split dt { font-size: 11px; color: var(--ts-fg-3); font-weight: 400; }
.ts-rotation-detail__facts dd, .ts-rotation-detail__perf dd, .ts-rotation-detail__breadth dd, .ts-rotation-detail__split dd { margin: 0; font-size: 14px; }
.ts-rotation-detail__breadth dd { display: flex; align-items: center; gap: 10px; }
.ts-rotation-detail__note { font-size: 13px; color: var(--ts-fg-3); margin: 4px 0; }
.ts-rotation-detail__members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ts-rotation-detail__links { margin: 14px 0 0; font-size: 13px; }

.ts-rotation-members { list-style: none; margin: 0; padding: 0; }
.ts-rotation-members__row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 2px 8px;
    padding: 5px 0; border-bottom: 1px solid var(--ts-line); font-size: 12.5px;
}
.ts-rotation-members__sym { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ts-rotation-members__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ts-fg-3); }
.ts-rotation-members__trend { grid-column: 1 / -1; display: inline-flex; gap: 4px; font-family: var(--ts-mono); font-size: 11px; }
.ts-rotation-members__trend > span:not(.ts-sr-only) { padding: 0 4px; border: 1px solid var(--ts-line-2); border-radius: 3px; color: var(--ts-fg-3); }
.ts-rotation-members__trend > span.is-on { border-color: var(--ts-up); color: var(--ts-up); }

.ts-rotation-rs { display: block; width: 100%; height: 150px; }
.ts-rotation-spark { display: block; width: 96px; height: 24px; }
.ts-rotation-spark__line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ts-rotation-spark__base { stroke: var(--ts-line-4); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ts-rotation-spark__cursor { stroke: var(--ts-fg-3); vector-effect: non-scaling-stroke; }
.ts-rotation-spark__mark { stroke: var(--ts-warn, #b7791f); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ts-rotation-spark__none { color: var(--ts-fg-3); }

/* --- the table ----------------------------------------------------------- */

.ts-rotation__table-card { margin-bottom: 24px; }
/* The table scrolls in its own box; the page body never scrolls sideways. */
/* Positioned, so the screen-reader-only text inside its cells is clipped
   with them instead of positioning itself against the page and widening it. */
.ts-rotation-table__scroll { position: relative; overflow-x: auto; }
.ts-rotation-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ts-rotation-table__caption {
    caption-side: top; text-align: left; padding: 10px 16px;
    font-size: 12px; color: var(--ts-fg-3);
}
.ts-rotation-table th, .ts-rotation-table td {
    padding: 7px 10px; border-bottom: 1px solid var(--ts-line);
    text-align: left; white-space: nowrap; vertical-align: middle;
}
.ts-rotation-table thead th { padding: 0; background: var(--ts-surface-2); font-weight: 500; }
.ts-rotation-table thead th:last-child { padding: 7px 10px; font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-3); letter-spacing: .06em; }
.ts-rotation-table .num { text-align: right; }
.ts-rotation-table__sort {
    width: 100%; min-height: 34px; padding: 6px 10px;
    border: 0; background: transparent; color: var(--ts-fg-3);
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .06em; text-align: inherit;
    cursor: pointer; white-space: nowrap;
}
.num > .ts-rotation-table__sort { text-align: right; }
.ts-rotation-table__sort:hover, .ts-rotation-table__sort.is-active { color: var(--ts-fg); }
.ts-rotation-table__sort:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: -2px; }
.ts-rotation-table__arrow { margin-left: 4px; opacity: .7; }

.ts-rotation-table__row { cursor: pointer; }
.ts-rotation-table__row:hover { background: var(--ts-surface-2); }
.ts-rotation-table__row.is-selected { background: var(--ts-surface-3); box-shadow: inset 3px 0 0 var(--ts-accent); }
.ts-rotation-table__row.is-thin .ts-rotation-table__pick { color: var(--ts-fg-2); }
.ts-rotation-table__name { font-weight: 500; }
.ts-rotation-table__pick {
    padding: 4px 0; min-height: 28px; border: 0; background: transparent;
    color: var(--ts-fg); font: inherit; text-align: left; cursor: pointer;
}
.ts-rotation-table__pick:hover { text-decoration: underline; text-underline-offset: 2px; }
.ts-rotation-table__pick:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-rotation-table__thin { margin-left: 6px; height: 18px; }
.ts-rotation-table__drill { margin-left: 8px; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.ts-rotation-table__absent { color: var(--ts-fg-3); font-size: 12px; }
.ts-rotation-table__up { color: var(--ts-up); }
.ts-rotation-table__down { color: var(--ts-down); }
.ts-rotation-table__share { min-width: 92px; }
.ts-rotation-table__share .mono { display: inline-block; min-width: 34px; }

/* THE RETURN HEATMAP. The tint is mixed into the cell from the up or down
   colour at a capped share (RotationTableModel.MaxHeat), so the figure keeps
   the page's light ink and its contrast at every shade. The sign is also in
   the text, so the colour never carries the meaning alone. */
.ts-rotation-heat.is-up { background: color-mix(in oklab, var(--ts-up) var(--ts-rotation-heat, 0%), transparent); }
.ts-rotation-heat.is-down { background: color-mix(in oklab, var(--ts-down) var(--ts-rotation-heat, 0%), transparent); }
.ts-rotation-heat { color: var(--ts-fg); }
/* On a tinted tile the muted label colour falls below 4.5:1, so the label
   takes the main text colour there, slightly softened. */
.ts-rotation-detail__perf .ts-rotation-heat dt { color: var(--ts-fg); opacity: .82; }

.ts-rotation-bar { display: inline-block; width: 44px; height: 4px; margin-left: 6px; vertical-align: middle; border-radius: 2px; background: var(--ts-track); overflow: hidden; }
.ts-rotation-bar--wide { width: 100%; max-width: 160px; margin-left: 0; }
.ts-rotation-bar__fill { display: block; height: 100%; background: var(--ts-fg-3); }

/* THE STAGE SPREAD. One bar, each band grown by its member count; the legend
   under it prints every count, so the colours only group what the text says.
   The hues are the stage chart's: indigo basing, green advancing, amber
   topping, red declining. */
.ts-rotation-stages { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--ts-track); gap: 1px; }
.ts-rotation-stages__band { display: block; min-width: 3px; }
.ts-rotation-stages__band--basing { background: var(--ts-stage-basing); }
.ts-rotation-stages__band--advancing { background: var(--ts-up); }
.ts-rotation-stages__band--topping { background: var(--ts-warn); }
.ts-rotation-stages__band--declining { background: var(--ts-down); }
.ts-rotation-stages__band--unclassified { background: var(--ts-line-4); }
.ts-rotation-stages__legend { margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; font-size: 12px; }
.ts-rotation-stages__legend > div { display: flex; justify-content: space-between; gap: 8px; }
.ts-rotation-stages__legend dt { font-weight: 400; color: var(--ts-fg-2); }
.ts-rotation-stages__legend dd { margin: 0; }
.ts-rotation-stages__key { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; }

/* --- tools for a crowded map ------------------------------------------- */

.ts-rotation__tools {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    margin: -4px 0 12px;
}
.ts-rotation-quadfilter { display: inline-flex; flex-wrap: wrap; gap: 6px; }
/* Off is outlined in the quadrant's colour, on is filled with it: the same
   chip as the table's quadrant badge, so the two read as one vocabulary. */
.ts-rotation-quadfilter__item {
    min-height: 30px; padding: 0 10px;
    border: 1px solid currentColor; border-radius: 4px; background: transparent;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    cursor: pointer; opacity: .55;
}
.ts-rotation-quadfilter__item.is-on { opacity: 1; background: color-mix(in oklch, currentColor 14%, transparent); }
.ts-rotation-quadfilter__item:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
.ts-rotation-find input { width: 210px; font-family: var(--ts-sans); font-size: 13px; }

.ts-rotation-compare { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ts-rotation-compare__label { font-size: 12px; color: var(--ts-fg-3); }
.ts-rotation-compare__chip { display: inline-flex; align-items: center; gap: 2px; cursor: pointer; }
.ts-rotation-compare__chip > span[aria-hidden] { margin-left: 6px; color: var(--ts-fg-3); }
.ts-rotation-compare__clear {
    min-height: 24px; border: 0; background: transparent; color: var(--ts-accent); font-size: 12px;
    text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}

.ts-rotation__head-actions { display: inline-flex; align-items: center; gap: 10px; }
.ts-rotation__action {
    min-height: 28px; padding: 0 10px;
    border: 1px solid var(--ts-line-2); border-radius: 6px; background: var(--ts-track);
    color: var(--ts-fg-2); font-size: 12px; cursor: pointer;
}
.ts-rotation__action:hover { color: var(--ts-fg); border-color: var(--ts-line-3); }
.ts-rotation__action:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }

.ts-rotation-sectorkey { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; }
.ts-rotation-sectorkey__item { display: inline-flex; align-items: center; color: var(--ts-fg-2); text-decoration: none; }
.ts-rotation-sectorkey__item:hover { color: var(--ts-fg); text-decoration: underline; text-underline-offset: 2px; }

/* A heading arrow: one glyph turned to the group's last step. */
.ts-rotation-arrow { display: inline-block; width: 1em; text-align: center; line-height: 1; font-weight: 700; }
.ts-rotation-table__heading { display: table-cell; }
.ts-rotation-table__heading > span + span { margin-left: 6px; }
.ts-rotation-table__plain {
    padding: 7px 10px !important; font-family: var(--ts-mono); font-size: 11px;
    color: var(--ts-fg-3); letter-spacing: .06em; font-weight: 500;
}
.ts-rotation-pace { font-size: 11px; color: var(--ts-fg-3); }
.ts-rotation-pace--fast { color: var(--ts-fg); font-weight: 600; }

.ts-rotation-detail__actions { display: inline-flex; align-items: flex-start; gap: 8px; }
.ts-rotation-detail__compare {
    min-height: 32px; padding: 0 12px;
    border: 1px solid var(--ts-line-2); border-radius: 6px; background: var(--ts-track);
    color: var(--ts-fg-2); font-size: 12.5px; cursor: pointer;
}
.ts-rotation-detail__compare[aria-pressed="true"] { color: var(--ts-fg); border-color: var(--ts-accent); }
.ts-rotation-detail__compare:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
.ts-rotation-detail__heading { display: block; margin-top: 6px; color: var(--ts-fg-2); }

/* --- the summary beside the map ------------------------------------------- */

.ts-rotation-summary__grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px;
}
.ts-rotation-summary__cell {
    padding: 10px; border-radius: var(--ts-radius-sm);
    border: 1px solid var(--ts-line); background: var(--ts-surface-2);
}
.ts-rotation-summary__q { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ts-rotation-summary__count { font-size: 12px; color: var(--ts-fg-3); }
.ts-rotation-summary__cell ul { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.ts-rotation-summary__cell li { display: flex; align-items: center; min-width: 0; }
/* Each name is a link in a list, not a word in a sentence, so it gets a full
   24px target (WCAG 2.5.8). */
.ts-rotation-summary__cell li a, .ts-rotation-summary__movers a, .ts-rotation-sectorkey__item {
    display: inline-flex; align-items: center; min-height: 24px;
}
.ts-rotation-summary__cell li a, .ts-rotation-summary__movers a {
    color: var(--ts-fg); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ts-rotation-summary__cell li a:hover, .ts-rotation-summary__movers a:hover { text-decoration: underline; text-underline-offset: 2px; }
.ts-rotation-summary__none, .ts-rotation-summary__more { margin: 0; font-size: 12px; color: var(--ts-fg-3); }
.ts-rotation-summary__sub {
    margin: 14px 0 6px; font-family: var(--ts-mono); font-size: 11px; font-weight: 500;
    letter-spacing: .12em; text-transform: uppercase; color: var(--ts-fg-3);
}
.ts-rotation-summary__movers { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ts-rotation-summary__movers li { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.ts-rotation-summary__toward { margin-left: auto; font-size: 12px; color: var(--ts-fg-3); white-space: nowrap; }
.ts-rotation-summary__read { margin: 14px 0 0; font-size: 12.5px; color: var(--ts-fg-3); line-height: 1.5; }

/* --- the four pictures ----------------------------------------------------- */

.ts-rotation-tabs {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px;
}
.ts-rotation-tabs__item {
    display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; min-height: 44px;
    border: 1px solid var(--ts-line); border-radius: var(--ts-radius-sm);
    background: var(--ts-surface); color: var(--ts-fg-2); text-decoration: none;
}
.ts-rotation-tabs__item:hover { border-color: var(--ts-line-3); color: var(--ts-fg); }
.ts-rotation-tabs__item.active { border-color: var(--ts-accent); color: var(--ts-fg); background: var(--ts-surface-2); }
.ts-rotation-tabs__item:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
.ts-rotation-tabs__label { font-weight: 600; font-size: 14px; }
.ts-rotation-tabs__q { font-size: 12px; color: var(--ts-fg-3); }
@media (max-width: 640px) {
    .ts-rotation-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ts-rotation__even { margin-top: 8px; font-size: 12.5px; }
.ts-rotation__even-note { color: var(--ts-fg-3); }

/* Leadership heatmap */
.ts-rotation-lead__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ts-rotation-lead__scale { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ts-fg-3); font-family: var(--ts-mono); }
.ts-rotation-lead__ramp {
    display: inline-block; width: 120px; height: 10px; border-radius: 2px;
    background: linear-gradient(90deg, #d94f4f, #242931, #2fa86f);
}
.ts-rotation-lead__note { margin: 8px 0; font-size: 12px; color: var(--ts-fg-3); line-height: 1.5; }
.ts-rotation-lead__scroll { position: relative; overflow-x: auto; max-height: 720px; overflow-y: auto; }
.ts-rotation-lead__scroll:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts-rotation-lead__table { border-collapse: separate; border-spacing: 1px; font-size: 12px; }
.ts-rotation-lead__table thead th {
    position: sticky; top: 0; z-index: 2; background: var(--ts-surface);
    font-weight: 500; color: var(--ts-fg-3); text-align: left; vertical-align: bottom;
}
.ts-rotation-lead__namecol, .ts-rotation-lead__name {
    position: sticky; left: 0; z-index: 1; background: var(--ts-surface);
    width: 160px; min-width: 160px; max-width: 160px; padding: 0 8px 0 0; text-align: left; font-weight: 400; white-space: nowrap;
}
.ts-rotation-lead__table thead .ts-rotation-lead__namecol { z-index: 3; }
.ts-rotation-lead__name a {
    color: var(--ts-fg); text-decoration: none; display: inline-block; vertical-align: middle;
    max-width: 136px; min-height: 24px; line-height: 24px; overflow: hidden; text-overflow: ellipsis;
}
.ts-rotation-lead__name a:hover { text-decoration: underline; text-underline-offset: 2px; }
.ts-rotation-lead__top { min-width: 38px; padding: 0 6px; text-align: right; color: var(--ts-fg-2); }
.ts-rotation-lead__date { min-width: 10px; padding: 0 0 4px; font-family: var(--ts-mono); font-size: 11px; white-space: nowrap; }
.ts-rotation-lead__date.is-mark { border-left: 1px solid var(--ts-line-3); padding-left: 2px; }
.ts-rotation-lead__cell { width: 10px; min-width: 10px; height: 18px; padding: 0; border-radius: 1px; }
.ts-rotation-lead__cell.is-now { outline: 1px solid var(--ts-fg); outline-offset: -1px; }
.ts-rotation-lead__row.is-selected .ts-rotation-lead__name { font-weight: 700; }
.ts-rotation-lead__row:hover .ts-rotation-lead__name a { text-decoration: underline; }
.ts-rotation-lead__sector-name { position: sticky; left: 0; display: inline-flex; align-items: center; background: var(--ts-surface); padding-right: 8px; }
.ts-rotation-lead__sector th {
    padding: 10px 0 3px; text-align: left; font-family: var(--ts-mono);
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ts-fg-3); font-weight: 500;
}

/* Breadth picture */
.ts-rotation-breadth__plot { position: relative; }
.ts-rotation-breadth__svg { display: block; width: 100%; height: auto; overflow: visible; }
.ts-rotation-breadth__q { fill-opacity: .07; }
.ts-rotation-breadth__q--good { fill: var(--ts-up); }
.ts-rotation-breadth__q--narrow { fill: var(--ts-warn); }
.ts-rotation-breadth__q--broad { fill: var(--ts-stage-basing); }
.ts-rotation-breadth__q--weak { fill: var(--ts-down); }
.ts-rotation-breadth__ql--good { fill: var(--ts-up); }
.ts-rotation-breadth__ql--narrow { fill: var(--ts-warn); }
.ts-rotation-breadth__ql--broad { fill: oklch(0.76 0.12 275); }
.ts-rotation-breadth__ql--weak { fill: var(--ts-down); }
.ts-rotation-breadth__pt circle { fill-opacity: .85; stroke-width: 1.5; }
.ts-rotation-breadth__pt:hover circle, .ts-rotation-breadth__pt:focus-visible circle { stroke: var(--ts-fg); fill-opacity: 1; }
.ts-rotation-breadth__pt:focus-visible { outline: none; }
.ts-rotation-breadth__explain { margin: 6px 0 8px; font-size: 12.5px; color: var(--ts-fg-3); }
.ts-rotation-breadth__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ts-rotation-breadth__table th, .ts-rotation-breadth__table td { padding: 6px 8px; border-bottom: 1px solid var(--ts-line); text-align: left; font-weight: 400; }
.ts-rotation-breadth__table thead th { font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-3); }
.ts-rotation-breadth__table .num { text-align: right; }
.ts-rotation-breadth__table a { color: var(--ts-fg); text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }

/* Regime */
.ts-rotation-regime__readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ts-rotation-regime__reading {
    padding: 12px; border: 1px solid var(--ts-line); border-radius: var(--ts-radius-sm); background: var(--ts-surface-2);
}
.ts-rotation-regime__reading p { margin: 6px 0 0; font-size: 13px; color: var(--ts-fg-2); line-height: 1.5; }
.ts-rotation-regime__verdict { margin-top: 4px; font-size: 20px; font-weight: 700; }
.ts-rotation-regime__verdict--risk-on { color: var(--ts-up); }
.ts-rotation-regime__verdict--risk-off { color: var(--ts-down); }
.ts-rotation-regime__verdict--mixed { color: var(--ts-warn); }
.ts-rotation-regime__chart { margin: 0 0 12px; }
.ts-rotation-regime__svg { display: block; width: 100%; height: auto; }
.ts-rotation-regime__line { fill: none; stroke: var(--ts-accent); stroke-width: 2; }
.ts-rotation-regime__avg { fill: none; stroke: var(--ts-fg-3); stroke-width: 1.2; stroke-dasharray: 4 3; }
.ts-rotation-regime__now { stroke: var(--ts-fg-2); stroke-width: 1; stroke-dasharray: 2 3; }
.ts-rotation-regime__bar { fill: var(--ts-line-4); }
.ts-rotation-regime__bar.is-now { fill: var(--ts-accent); }
.ts-rotation-regime__baskets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) {
    .ts-rotation-regime__readings, .ts-rotation-regime__baskets { grid-template-columns: minmax(0, 1fr); }
}

/* Members treemap and evidence */
.ts-rotation-tree { display: block; width: 100%; height: auto; margin-top: 6px; border-radius: var(--ts-radius-sm); }
.ts-rotation-tree__tile { stroke: var(--ts-surface); stroke-width: 1.5; }
.ts-rotation-tree a:hover .ts-rotation-tree__tile, .ts-rotation-tree a:focus-visible .ts-rotation-tree__tile { stroke: var(--ts-fg); }
.ts-rotation-tree a:focus-visible { outline: none; }
.ts-rotation-tree__label { fill: #fff; font-family: var(--ts-mono); font-size: 11px; font-weight: 600; pointer-events: none; }
.ts-rotation-detail__evidence { font-size: 13px; color: var(--ts-fg-2); line-height: 1.55; margin: 6px 0 0; }
.ts-rotation-summary__evidence { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ts-rotation-summary__evidence th, .ts-rotation-summary__evidence td { padding: 4px 6px; border-bottom: 1px solid var(--ts-line); text-align: left; font-weight: 400; }
.ts-rotation-summary__evidence thead th { font-family: var(--ts-mono); font-size: 11px; color: var(--ts-fg-3); }
.ts-rotation-summary__evidence .num { text-align: right; }
.ts-rotation-summary__caption { caption-side: top; text-align: left; font-size: 12px; color: var(--ts-fg-3); padding-bottom: 6px; }

@media (max-width: 1100px) {
    .ts-rotation__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .ts-rotation__controls { padding: 10px; }
    .ts-rotation-map__tip { min-width: 160px; font-size: 12px; }
    .ts-rotation-detail__members, .ts-rotation-detail__perf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ts-rotation-detail__members { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .ts-rotation-seg__item, .ts-rotation-map__pt *, .ts-rotation-map__mv,
    .ts-rotation-map__tail path, .ts-rotation-map__proxy path { transition: none; }
}

/* LabelledTablePager: MudBlazor's paging buttons beside a named page-size select. */
.ts-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 12px; }
.ts-pager__size { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ts-fg-2); }
.ts-pager__size select {
    min-height: 30px; padding: 0 6px;
    border: 1px solid var(--ts-line-2); border-radius: 6px;
    background: var(--ts-track); color: var(--ts-fg); font-size: 13px;
}
.ts-pager__size select:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }

/* Rotation: the reader's own list of symbols. */
.ts-rotation-list { margin: -4px 0 12px; }
.ts-rotation-list__form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ts-rotation-list__label { font-size: 13px; color: var(--ts-fg-2); }
.ts-rotation-list__input { flex: 1 1 280px; max-width: 520px; font-size: 13px; }
.ts-rotation__action.is-on { color: var(--ts-fg); border-color: var(--ts-accent); }
.ts-rotation-list__note { margin: 6px 0 10px; font-size: 12px; line-height: 1.5; color: var(--ts-fg-3); }
.ts-rotation-list__omitted { display: block; margin-top: 2px; color: var(--ts-warn); }
/* --- .ts-rotation-alert: "Alert me" for one rotation group ---------------- */
/* RotationAlertButton. The toggle wears the detail panel's Compare button; the
   four quadrant choices wear the quadrant filter's chips (outlined when off,
   filled when on), so the alert reads as part of the same vocabulary. */
.ts-rotation-alert { position: relative; display: inline-block; }
.ts-rotation-alert__toggle {
    min-height: 32px; padding: 0 12px;
    border: 1px solid var(--ts-line-2); border-radius: 6px; background: var(--ts-track);
    color: var(--ts-fg-2); font-size: 12.5px; cursor: pointer;
}
.ts-rotation-alert__toggle[aria-expanded="true"] { color: var(--ts-fg); border-color: var(--ts-accent); }
.ts-rotation-alert__toggle:hover { color: var(--ts-fg); }
.ts-rotation-alert__panel {
    margin-top: 8px; padding: 10px 12px; max-width: 360px;
    border: 1px solid var(--ts-line-2); border-radius: var(--ts-radius-sm); background: var(--ts-track);
    font-size: 12.5px; color: var(--ts-fg-2);
}
.ts-rotation-alert__hint { margin: 0 0 8px; line-height: 1.5; }
.ts-rotation-alert__quads { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-rotation-alert__quad {
    min-height: 30px; padding: 0 10px;
    border: 1px solid currentColor; border-radius: 4px; background: transparent;
    font-family: var(--ts-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    cursor: pointer; opacity: .7;
}
.ts-rotation-alert__quad.is-on,
.ts-rotation-alert__quad[aria-pressed="true"] { opacity: 1; background: color-mix(in oklch, currentColor 14%, transparent); }
.ts-rotation-alert__quad:disabled { cursor: progress; }
.ts-rotation-alert__status { margin: 8px 0 0; color: var(--ts-fg); }
.ts-rotation-alert__status a { margin-left: 4px; }
.ts-rotation-alert__list { list-style: none; margin: 10px 0 0; padding: 0; }
.ts-rotation-alert__item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 4px 0; border-top: 1px solid var(--ts-line-2);
}
.ts-rotation-alert__remove {
    flex: none; min-height: 28px; padding: 0 10px;
    border: 1px solid var(--ts-line-2); border-radius: 6px; background: transparent;
    color: var(--ts-fg-2); font-size: 12px; cursor: pointer;
}
.ts-rotation-alert__remove:hover { color: var(--ts-down); border-color: currentColor; }
.ts-rotation-alert__foot { margin: 10px 0 0; font-size: 12px; color: var(--ts-fg-3); }
.ts-rotation-alert__foot a, .ts-rotation-alert__status a { color: var(--ts-fg); text-underline-offset: 2px; }
.ts-rotation-alert__toggle:focus-visible,
.ts-rotation-alert__quad:focus-visible,
.ts-rotation-alert__remove:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
@media (max-width: 640px) {
    .ts-rotation-alert__panel { max-width: none; }
}
/* --- end .ts-rotation-alert ------------------------------------------------- */

/* Most groups on one side of the benchmark: a note above the map, with the
   one-click way to the average of the groups. */
.ts-rotation__lopsided {
    margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5;
    color: var(--ts-fg-2); background: color-mix(in oklab, var(--ts-warn, #d9a441) 9%, transparent);
    border: 1px solid color-mix(in oklab, var(--ts-warn, #d9a441) 35%, transparent);
}
.ts-rotation__lopsided strong { color: var(--ts-fg); font-weight: 600; }

/* The plain verdict over the past-entries tables, and the baseline row. */
.ts-rotation-summary__verdict { margin: 4px 0 10px; font-size: 13px; line-height: 1.5; color: var(--ts-fg); }
.ts-rotation-summary__evidence + .ts-rotation-summary__evidence { margin-top: 12px; }
.ts-rotation-summary__evidence tr.is-baseline th, .ts-rotation-summary__evidence tr.is-baseline td {
    border-top: 1px solid var(--ts-line-2, rgba(255,255,255,.12)); color: var(--ts-fg-3);
}

/* THE TILT: overweight / market weight / underweight, on the map, in the
   table, on the quote page. Overweight and underweight differ by shape
   (solid / dashed) as well as hue, so colour is never the only cue. */
.ts-rotation-map__tilt { fill: none; stroke-width: 2; pointer-events: none; }
.ts-rotation-map__tilt--overweight { stroke: var(--ts-up); }
.ts-rotation-map__tilt--underweight { stroke: var(--ts-down); stroke-dasharray: 3 2.5; }
.ts-rotation-map__key-overweight { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ts-up); }
.ts-rotation-map__key-underweight { width: 12px; height: 12px; border-radius: 50%; border: 2px dashed var(--ts-down); }
.ts-rotation-tilt {
    display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
    letter-spacing: .02em; border: 1px solid currentColor; white-space: nowrap;
}
.ts-rotation-tilt--overweight { color: var(--ts-up); }
.ts-rotation-tilt--underweight { color: var(--ts-down); border-style: dashed; }
.ts-rotation-tilt--market { color: var(--ts-fg-2); }

/* The quote page's sector and industry backdrop. */
.ts-rotation-backdrop { display: grid; gap: 12px; }
.ts-rotation-backdrop__row { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--ts-line-2); }
.ts-rotation-backdrop__level { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ts-fg-3); }
.ts-rotation-backdrop__name { font-weight: 600; }
.ts-rotation-backdrop__name a { color: inherit; }
.ts-rotation-backdrop__reading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; }
.ts-rotation-backdrop__heading, .ts-rotation-backdrop__rank { color: var(--ts-fg-2); }
.ts-rotation-backdrop__record, .ts-rotation-backdrop__none { font-size: 12.5px; color: var(--ts-fg-2); line-height: 1.45; }
.ts-rotation-backdrop__thin { margin-left: 6px; font-size: 11px; color: var(--ts-warn); font-weight: 500; }
.ts-rotation-backdrop__sum { margin: 12px 0 6px; font-size: 13.5px; line-height: 1.5; }
.ts-rotation-backdrop__foot { margin: 0; font-size: 11.5px; color: var(--ts-fg-3); line-height: 1.45; }

/* The map's prices stopped arriving. */
.ts-rotation__stale {
    margin-top: 8px; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--ts-fg);
    background: color-mix(in oklab, var(--ts-warn) 12%, transparent);
    border: 1px solid color-mix(in oklab, var(--ts-warn) 40%, transparent);
}

/* A line that stopped pricing: named, never carried into a reading. */
.ts-rotation-table__stale { margin-left: 6px; font-size: 11px; color: var(--ts-warn); border-color: color-mix(in oklab, var(--ts-warn) 45%, transparent); }
.ts-rotation-detail__stale { margin-top: 4px; font-size: 12.5px; color: var(--ts-warn); }

/* A research date: one banner above everything it governs. */
.ts-rotation-research { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin: 0 0 12px; padding: 10px 14px; border: 1px solid color-mix(in oklab, var(--ts-accent, currentColor) 40%, transparent); border-radius: 8px; font-size: 13px; }
.ts-rotation-research__clamp { display: block; margin-top: 4px; opacity: .8; }
.ts-rotation-research__latest { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; opacity: .9; }
.ts-rotation-spark__after { opacity: .35; stroke-dasharray: 3 2; }
/* Evidence judgement: consistent so far stands out; descriptive stays quiet. */
.ts-rotation-evidence { font-size: 11.5px; white-space: nowrap; }
.ts-rotation-evidence--consistentsofar { color: var(--ts-accent, currentColor); font-weight: 600; }
.ts-rotation-summary__sources { margin: 6px 0; flex-wrap: wrap; }
.ts-rotation-summary__source { font-size: 12px; margin: 4px 0 8px; opacity: .85; }
.ts-rotation-detail__fullname { font-size: 12.5px; margin-top: 2px; }
.ts-rotation-detail__basis { font-size: 11px; margin-top: 2px; letter-spacing: .02em; }
.ts-rotation-detail__perf + .ts-rotation-detail__chart { margin-top: 16px; }
/* The grid: six readings per line side by side. */
.ts-rotation-grid-wrap { overflow-x: auto; }
.ts-rotation-grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ts-rotation-grid th, .ts-rotation-grid td { padding: 6px 8px; border-bottom: 1px solid var(--ts-border, rgba(127,127,127,.25)); text-align: left; white-space: nowrap; }
.ts-rotation-grid__reading { white-space: normal; min-width: 260px; }
.ts-rotation-grid tr.is-agreed .ts-rotation-grid__reading { font-weight: 600; }
/* A cell opens its own map; it shows where the line is, where it is heading,
   how long it has been there and how firm the reading is. */
.ts-rotation-grid__cell { display: grid; grid-template-columns: auto auto; gap: 2px 6px; align-items: center; color: inherit; text-decoration: none; border-radius: 6px; padding: 2px 4px; }
.ts-rotation-grid__cell:hover, .ts-rotation-grid__cell:focus-visible { background: var(--ts-surface-2, rgba(127,127,127,.12)); }
.ts-rotation-grid__nums { font-size: 11px; opacity: .8; }
.ts-rotation-grid__meta { display: flex; gap: 6px; align-items: center; font-size: 11px; opacity: .8; grid-column: 1 / -1; }
.ts-rotation-grid__arrow { display: inline-block; line-height: 1; }
.ts-rotation-grid__flag { font-size: 11px; padding: 0 4px; border-radius: 4px; border: 1px dashed currentColor; }
.ts-rotation-grid__trail { width: 40px; height: 16px; grid-column: 1 / -1; }
.ts-rotation-grid__trail polyline { fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .7; }
.ts-rotation-grid td.is-provisional .ts-rotation-quad { opacity: .75; outline: 1px dashed currentColor; }
/* What the grid compares, and how it is narrowed. */
.ts-rotation-grid-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin: 0 0 10px; }
.ts-rotation-grid-tools__set { display: flex; flex-wrap: wrap; gap: 4px; border: 0; padding: 0; margin: 0; }
.ts-rotation-grid-tools__set legend { font-size: 11.5px; opacity: .75; padding: 0; margin-bottom: 2px; width: 100%; }
.ts-rotation-grid-tools__field { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; }
.ts-rotation-grid-tools__count { font-size: 12px; opacity: .8; margin-left: auto; }
.ts-rotation-chip { font: inherit; font-size: 12px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--ts-border, rgba(127,127,127,.35)); background: transparent; color: inherit; cursor: pointer; }
.ts-rotation-chip.is-on { background: var(--ts-accent-soft, rgba(80,120,255,.15)); border-color: var(--ts-accent, #5078ff); }
.ts-rotation-chip:disabled { cursor: default; opacity: .7; }
.ts-rotation-grid__pin { font: inherit; background: none; border: 0; padding: 0 4px 0 0; cursor: pointer; color: inherit; opacity: .7; }
.ts-rotation-grid tr.is-pinned th { font-weight: 600; }
.ts-rotation-grid-saved { margin: 0 0 10px; font-size: 12.5px; }
.ts-rotation-grid-saved summary { cursor: pointer; margin-bottom: 6px; }
.ts-rotation-grid-saved__list { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.ts-rotation-grid-tools__inline { display: flex; gap: 4px; align-items: center; }
.ts-rotation-grid__changes { margin: 4px 0 0; padding-left: 16px; font-size: 11.5px; }
.ts-rotation-grid__changes .is-market, .ts-rotation-grid__changes .is-rank { font-weight: 600; }
.ts-rotation-grid__actions { display: block; font-size: 11px; font-weight: 400; opacity: .8; }
.ts-rotation-grid__actions a { margin-right: 8px; }
.ts-rotation-grid tr.ts-rotation-grid__group th { background: var(--ts-surface-2, rgba(127,127,127,.08)); font-size: 12px; }
.ts-rotation-list__import { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; margin-top: 6px; }
.ts-rotation-detail__denominator { display: block; font-size: 11px; opacity: .75; }
.ts-rotation-detail__changes { display: flex; gap: 12px; font-size: 11.5px; margin: 2px 0 4px; }
.ts-rotation-detail__windows { display: flex; gap: 4px; margin: 0 0 6px; }
.ts-rotation-detail__contrib { display: flex; flex-wrap: wrap; gap: 12px; }
.ts-rotation-detail__table { font-size: 12px; border-collapse: collapse; }
.ts-rotation-detail__table caption { text-align: left; font-size: 11.5px; font-weight: 600; caption-side: top; color: var(--ts-fg); padding: 0 0 2px; }
.ts-rotation-detail__table th, .ts-rotation-detail__table td { padding: 2px 8px 2px 0; text-align: left; }
/* Touch-sized links in a dense table (WCAG 2.2 target size). */
.ts-rotation-detail__table a { display: inline-block; min-height: 24px; min-width: 24px; line-height: 24px; }
.ts-rotation-grid__changes .is-settings, .ts-rotation-grid__changes .is-datamissing, .ts-rotation-grid__changes .is-datareturned { opacity: .75; }

/* ONE RULE EVENT, as it was frozen. */
.ts-rule-event { max-width: 960px; margin: 24px auto; padding: 0 16px; color: var(--ts-fg); }
.ts-rule-event h1 { font-size: 24px; margin: 4px 0 8px; }
.ts-rule-event__rule { color: var(--ts-fg-2); margin: 0; }
.ts-rule-event__sentence { color: var(--ts-fg-2); font-size: 14px; }
.ts-rule-event__clauses { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.ts-rule-event__clauses caption { caption-side: top; text-align: left; font-weight: 600; color: var(--ts-fg); padding-bottom: 6px; }
.ts-rule-event__clauses th, .ts-rule-event__clauses td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--ts-line); vertical-align: top; }
.ts-rule-event__clauses th[scope="row"] { font-weight: 400; }
.ts-rule-event__timing { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; margin: 12px 0; }
.ts-rule-event__timing > div { padding: 6px 8px; border-radius: 5px; background: var(--ts-surface-2); }
.ts-rule-event__timing dt { font-size: 11px; color: var(--ts-fg-3); }
.ts-rule-event__timing dd { margin: 0; font-size: 13px; }
.ts-rule-event__ids { color: var(--ts-fg-3); font-size: 12px; }
.ts-rule-event a { display: inline-block; min-height: 24px; }

/* ROTATION RULES: the list, the editor, the scan and the preview. */
.ts-rules { max-width: 1100px; margin: 24px auto; padding: 0 16px; color: var(--ts-fg); }
.ts-rules h1 { font-size: 26px; margin: 0 0 6px; }
.ts-rules h2 { font-size: 18px; margin: 24px 0 8px; }
.ts-rules__sub { font-size: 14px; margin: 16px 0 6px; }
.ts-rules__head p, .ts-rules__none, .ts-rules__hint { color: var(--ts-fg-2); }
.ts-rules__list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ts-rules__item { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 12px; border-radius: 6px; background: var(--ts-surface-2); }
.ts-rules__meta { color: var(--ts-fg-2); font-size: 12px; margin-left: 6px; }
.ts-rules__sentence { font-size: 13px; color: var(--ts-fg-2); margin: 6px 0; }
.ts-rules__problem, .ts-rules__problems { color: var(--ts-fg); font-size: 13px; border-left: 3px solid var(--ts-warn); padding-left: 8px; }
.ts-rules__actions, .ts-rules__new { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ts-rules__fields { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 13px; }
fieldset.ts-rotation__decision-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.ts-rules__status { font-size: 13px; }
.ts-rules__counts { font-size: 13px; color: var(--ts-fg-2); }
.ts-rules__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ts-rules__table th, .ts-rules__table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--ts-line); vertical-align: top; }
.ts-rules__table th[scope="row"] { font-weight: 400; }
.ts-rules__expand { background: none; border: 0; padding: 0; color: var(--ts-fg); text-decoration: underline; cursor: pointer; min-height: 24px; font: inherit; }
.ts-rules__table a { display: inline-block; min-height: 24px; }
.ts-rule-group { border: 1px solid var(--ts-line); border-radius: 6px; padding: 8px 10px; margin: 6px 0; }
.ts-rule-group legend { padding: 0 4px; }
.ts-rule-group__item { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed var(--ts-line); }
.ts-rule-group__add { display: flex; gap: 8px; margin-top: 6px; }
.ts-rule-clause { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; flex: 1; }
.ts-rule-clause__check { display: inline-flex; gap: 4px; align-items: center; min-height: 24px; }
.ts-rule-clause__number { width: 90px; }
.ts-rule-clause__small { width: 64px; }
.ts-rotation-detail__event { display: inline-block; min-height: 24px; margin-right: 10px; }
.ts-rule-event__now-head { font-size: 18px; margin: 24px 0 8px; }
.ts-rules__evening h2 { font-size: 16px; }
.ts-rules__bundle { margin: 6px 0; padding: 6px 10px; border-radius: 6px; background: var(--ts-surface-2); }
.ts-rules__bundle summary { cursor: pointer; min-height: 24px; }
.ts-rules__bundle ul { margin: 6px 0 0; padding-left: 18px; }
.ts-rules__bundle li { margin: 4px 0; }
.ts-rules__bundle li.is-new a { font-weight: 600; }
.ts-rules__bundle a, .ts-rules__meta a { display: inline-block; min-height: 24px; }
.ts-rules__hooks { list-style: none; padding: 0; display: grid; gap: 6px; }
.ts-rules__hooks li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.ts-rules__hint code, .ts-rules__meta code { font-size: 12px; word-break: break-all; }
.ts-rule-event__channels { font-size: 13px; color: var(--ts-fg-2); }
.ts-rules code { color: var(--ts-fg); background: var(--ts-surface-2); padding: 0 3px; border-radius: 3px; }
.ts-rules__table caption { caption-side: top; text-align: left; font-weight: 600; color: var(--ts-fg); padding-bottom: 6px; }

/* TIME IN STATE: a strip of the line's completed periods, one cell each. */
.ts-rotation-detail__strip { display: flex; gap: 1px; height: 24px; margin: 6px 0 10px; }
.ts-rotation-detail__cell { flex: 1; min-width: 2px; padding: 0; border: 0; border-radius: 1px; background: var(--ts-line); cursor: pointer; }
.ts-rotation-detail__cell.is-leading { background: var(--ts-up); }
.ts-rotation-detail__cell.is-weakening { background: var(--ts-warn); }
.ts-rotation-detail__cell.is-lagging { background: var(--ts-down); }
.ts-rotation-detail__cell.is-improving { background: oklch(0.76 0.12 275); }
.ts-rotation-detail__cell.is-leader { box-shadow: inset 0 -3px 0 var(--ts-fg); }
.ts-rotation-detail__cell.is-selected { outline: 2px solid var(--ts-fg); outline-offset: 1px; }
.ts-rotation-detail__cell:focus-visible { outline: 2px solid var(--ts-fg); outline-offset: 2px; }
.ts-rotation-detail__synced { display: grid; gap: 6px; }
.ts-rotation-detail__label-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 13px; }
.ts-rotation-detail__badge { padding: 1px 6px; border-radius: 4px; background: var(--ts-surface-2); color: var(--ts-fg); }
.ts-rotation-detail__rule { font-size: 12px; color: var(--ts-fg); margin: 4px 0 8px; }
.ts-rotation-detail__rule summary { cursor: pointer; min-height: 24px; }
.ts-rotation-detail__minor { font-size: 13px; margin: 10px 0 4px; }
.ts-rotation-detail__facts-list { margin: 0; padding-left: 18px; font-size: 13px; }
.ts-rotation-detail__pick { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; margin-bottom: 8px; }
.ts-quote-trail { font-size: 12px; color: var(--ts-fg-2); margin-bottom: 4px; }
.ts-quote-trail a { display: inline-block; min-height: 24px; color: var(--ts-fg); }
.ts-quote-trail__ctx { color: var(--ts-fg-2); }

/* THE CONSTITUENT WORKBENCH. */
.ts-rotation__workbench { margin-top: 16px; }
.ts-rotation__workbench-filters { margin: 10px 0; }
.ts-rotation__workbench-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 1100px) { .ts-rotation__workbench-grid { grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); } }
.ts-rotation__workbench-table { overflow-x: auto; }
.ts-rotation__workbench-table tr.is-picked { background: var(--ts-surface-2); }
.ts-rotation__workbench-preview { padding: 10px 12px; border-radius: 6px; background: var(--ts-surface-2); font-size: 13px; }
.ts-rotation-detail__asks { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ts-rotation-detail__asks a { display: inline-block; min-height: 24px; }

/* Recording a decision under the workbench. */
.ts-rotation__decision { margin-top: 1rem; border-top: 1px solid var(--ts-border, #ccc); padding-top: .75rem; }
.ts-rotation__decision > summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.ts-rotation__decision-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; align-items: start; }
.ts-rotation__decision-wide { grid-column: 1 / -1; display: flex; flex-direction: column; gap: .25rem; }
.ts-rotation__decision-wide textarea { width: 100%; font: inherit; }
.ts-rotation__decision-candidates { display: flex; flex-wrap: wrap; gap: .5rem 1rem; list-style: none; padding: 0; }

/* Holdings lines left out of the totals. */
.ts-rules__table tr.is-excluded td, .ts-rules__table tr.is-excluded th { font-style: italic; }

/* Replay bar and practice. */
.ts-rotation-replay { border: 1px solid var(--ts-border, #ccc); border-radius: 6px; padding: .5rem .75rem; margin: .5rem 0 1rem; }
.ts-rotation-replay__row { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.ts-rotation-replay__row .ts-btn, .ts-rotation-replay__row .ts-rules__expand { min-height: 24px; min-width: 24px; }
.ts-rotation-replay__status { margin: .5rem 0 0; }
.ts-practice-map { width: 100%; max-width: 420px; height: auto; display: block; margin-bottom: .75rem; }
.ts-practice-map__axis { stroke: var(--ts-border, #999); stroke-width: 1; }
.ts-practice-map__q { font-size: 11px; fill: var(--ts-fg); }
.ts-practice-map__tail { fill: none; stroke: var(--ts-fg); stroke-opacity: .5; stroke-width: 1.5; }
.ts-practice-map__head { fill: var(--ts-fg); }
.ts-practice-map__label { font-size: 11px; fill: var(--ts-fg); }
.ts-practice-notes { width: 100%; font: inherit; }
.ts-practice-decision { border-top: 1px solid var(--ts-border, #ccc); padding-top: .5rem; margin-top: .5rem; }

/* ==========================================================================
   PEERS & DRIVERS. One colour per layer, the same everywhere it appears
   (waterfall, strip, profile bar, charts): market slate, sector violet,
   industry amber-orange, the stock's own pink. Signs are written, never
   carried by colour alone.
   ========================================================================== */
:root {
    --ts-drv-market:   #8aa4c8;
    --ts-drv-sector:   #b694e8;
    --ts-drv-industry: #e0a15a;
    --ts-drv-own:      #e77fb0;
}
.ts-drv-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: baseline; }
.ts-drv-swatch--market, .ts-drv-fall__bar--market, .ts-drv-pbar__part--market { background: var(--ts-drv-market); }
.ts-drv-swatch--sector, .ts-drv-fall__bar--sector, .ts-drv-pbar__part--sector { background: var(--ts-drv-sector); }
.ts-drv-swatch--industry, .ts-drv-fall__bar--industry, .ts-drv-pbar__part--industry { background: var(--ts-drv-industry); }
.ts-drv-swatch--own, .ts-drv-fall__bar--own, .ts-drv-pbar__part--own { background: var(--ts-drv-own); }
.ts-drv-swatch--total, .ts-drv-fall__bar--total { background: var(--ts-fg-2); }

.ts-drv-card { background: var(--ts-surface); border: 1px solid var(--ts-line); border-radius: var(--ts-radius); padding: 16px; margin-bottom: 12px; }
.ts-drv-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.ts-drv-card__title { font-size: 16px; font-weight: 600; margin: 0; }
.ts-drv-card__sentence { font-size: 13.5px; color: var(--ts-fg-2); margin: 8px 0 10px; line-height: 1.5; }
.ts-drv-card__peers { font-size: 13px; color: var(--ts-fg-2); margin: 10px 0 4px; }
.ts-drv-card__warn { color: var(--ts-fg); }
.ts-drv-card__foot { font-size: 12px; color: var(--ts-fg-3); margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }

.ts-drv-fall { display: grid; gap: 4px; }
.ts-drv-fall__row { display: grid; grid-template-columns: minmax(160px, 330px) 1fr 84px; align-items: center; gap: 10px; font-size: 13px; }
.ts-drv-fall__row.is-total { border-top: 1px solid var(--ts-line-2); padding-top: 5px; margin-top: 2px; font-weight: 600; }
.ts-drv-fall__label { color: var(--ts-fg-2); display: flex; align-items: baseline; gap: 0; min-width: 0; }
.ts-drv-fall__name { display: flex; flex-direction: column; min-width: 0; color: var(--ts-fg); }
.ts-drv-fall__note { font-size: 11.5px; color: var(--ts-fg-3); font-weight: 400; line-height: 1.3; }
.ts-drv-fall__track { position: relative; height: 14px; background: var(--ts-track); border-radius: 3px; }
.ts-drv-fall__zero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--ts-line-4); }
.ts-drv-fall__bar { position: absolute; top: 2px; bottom: 2px; border-radius: 2px; }
.ts-drv-fall__value { text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.ts-drv-fall__band { font-size: 11px; color: var(--ts-fg-3); }
@media (max-width: 560px) {
    .ts-drv-fall__row { grid-template-columns: 1fr 70px; }
    .ts-drv-fall__track { grid-column: 1 / -1; order: 3; }
}

.ts-drv-avail { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12.5px; margin: 6px 0 4px; color: var(--ts-fg-2); }
.ts-drv-avail__state { font-family: var(--ts-mono, monospace); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 3px; border: 1px solid var(--ts-line-2); color: var(--ts-fg); }
.ts-drv-avail--full .ts-drv-avail__state { border-color: var(--ts-drv-market); }
.ts-drv-avail--combinedgroup .ts-drv-avail__state, .ts-drv-avail--sectoronly .ts-drv-avail__state { border-color: var(--ts-drv-industry); }
.ts-drv-avail--comparisononly .ts-drv-avail__state, .ts-drv-avail--insufficientdata .ts-drv-avail__state { border-color: var(--ts-drv-own); }
.ts-drv-sens { margin-top: 14px; overflow-x: auto; }
.ts-drv-sens__table { width: 100%; font-size: 12.5px; }
.ts-drv-sens__table caption { text-align: left; caption-side: top; margin-bottom: 6px; }
.ts-drv-sens__table th[scope="row"] { font-weight: 500; display: flex; flex-direction: column; }
.ts-drv-sens__table td.is-unstable { text-decoration: underline wavy var(--ts-drv-own); text-underline-offset: 3px; }
.ts-drv-sens__warn { color: var(--ts-fg); font-weight: 600; }
.ts-drv-style__readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; margin: 6px 0 10px; }
.ts-drv-style__readings > div { display: flex; flex-direction: column; gap: 2px; }
.ts-drv-style__label { font-size: 12px; color: var(--ts-fg-3); }
.ts-drv-style__table { width: 100%; font-size: 12.5px; }
.ts-drv-style__table tr.is-muted { opacity: .6; }
.ts-drv-card__style { font-size: 12.5px; color: var(--ts-fg-2); margin: 6px 0 0; }
.ts-drv-bench { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0; }
.ts-drv-banner { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; border: 1px solid var(--ts-drv-industry); border-radius: var(--ts-radius); padding: 10px 12px; margin: 8px 0 12px; font-size: 13px; color: var(--ts-fg-2); }
.ts-drv-banner strong { color: var(--ts-fg); }
.ts-drv-chart__marker line { stroke: var(--ts-line-4); stroke-width: 1; stroke-dasharray: 2 3; }
.ts-drv-chart__marker path { fill: var(--ts-fg-3); }
.ts-drv-chart__marker.is-sensitivity path { fill: var(--ts-drv-market); }
.ts-drv-chart__marker.is-decoupling path { fill: var(--ts-drv-industry); }
.ts-drv-chart__marker.is-owndrift path { fill: var(--ts-drv-own); }
.ts-drv-chart__mark { font-size: 11px; padding: 0 5px; border-radius: 3px; border: 1px solid var(--ts-line-2); color: var(--ts-fg-2); }
.ts-drv-chart__mark.is-sensitivity { border-color: var(--ts-drv-market); }
.ts-drv-chart__mark.is-decoupling { border-color: var(--ts-drv-industry); }
.ts-drv-chart__mark.is-owndrift { border-color: var(--ts-drv-own); }
.ts-drv-changes { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 6px; font-size: 13px; color: var(--ts-fg-2); }
.ts-drv-profile { margin-top: 10px; }
.ts-drv-profile__label { font-size: 12px; color: var(--ts-fg-3); margin-bottom: 4px; }
.ts-drv-pbar__track { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--ts-track); }
.ts-drv-pbar.is-compact .ts-drv-pbar__track { height: 8px; min-width: 80px; }
.ts-drv-pbar__part { height: 100%; }
.ts-drv-pbar__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ts-fg-2); margin-top: 5px; }
.ts-drv-pbar__fit { color: var(--ts-fg-3); }
.ts-drv-strip { margin-top: 6px; }
.ts-drv-ws { display: grid; gap: 14px; }
.ts-drv-ws__bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.ts-drv-ws__views { display: flex; gap: 4px; }
.ts-drv-section { background: var(--ts-surface); border: 1px solid var(--ts-line); border-radius: var(--ts-radius); padding: 14px 16px; }
.ts-drv-chart__svg { width: 100%; height: auto; display: block; outline: none; }
.ts-drv-chart__svg:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; border-radius: 4px; }
.ts-drv-chart__base { stroke: var(--ts-line-4); stroke-width: 1; }
.ts-drv-chart__cursor { stroke: var(--ts-fg-3); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.ts-drv-chart__hit { fill: transparent; cursor: crosshair; }
.ts-drv-chart__band { fill: color-mix(in oklab, var(--ts-fg-3) 18%, transparent); stroke: none; }
.ts-drv-chart__selection { fill: color-mix(in oklab, var(--ts-accent) 16%, transparent); pointer-events: none; }
.ts-drv-chart__line { fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.ts-drv-chart__line--stock { stroke: var(--ts-fg); stroke-width: 2.2; }
.ts-drv-chart__line--market { stroke: var(--ts-drv-market); }
.ts-drv-chart__line--sector { stroke: var(--ts-drv-sector); }
.ts-drv-chart__line--industry { stroke: var(--ts-drv-industry); }
.ts-drv-chart__line--own { stroke: var(--ts-drv-own); }
.ts-drv-chart__line--implied { stroke: var(--ts-fg-3); stroke-dasharray: 5 4; }
.ts-drv-chart__line--median, line.ts-drv-chart__line--median { stroke: var(--ts-fg-2); stroke-dasharray: 2 3; stroke-width: 1.4; fill: none; }
.ts-drv-chart__dot { fill: var(--ts-fg); }
.ts-drv-chart__dot.is-event { fill: var(--ts-warn); }
.ts-drv-chart__readout { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ts-fg-2); margin-top: 4px; min-height: 18px; }
.ts-drv-chart__event { color: var(--ts-warn); }
.ts-drv-chart__hint { color: var(--ts-accent); }
rect.ts-drv-fall__bar--market { fill: var(--ts-drv-market); }
rect.ts-drv-fall__bar--sector { fill: var(--ts-drv-sector); }
rect.ts-drv-fall__bar--industry { fill: var(--ts-drv-industry); }
rect.ts-drv-fall__bar--own { fill: var(--ts-drv-own); }
.ts-drv-key { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.ts-drv-key--stock { background: var(--ts-fg); }
.ts-drv-key--market { background: var(--ts-drv-market); }
.ts-drv-key--sector { background: var(--ts-drv-sector); }
.ts-drv-key--industry { background: var(--ts-drv-industry); }
.ts-drv-key--own { background: var(--ts-drv-own); }
.ts-drv-key--implied, .ts-drv-key--median { background: repeating-linear-gradient(90deg, var(--ts-fg-3) 0 4px, transparent 4px 7px); }
.ts-drv-dot { cursor: pointer; }
.ts-drv-dot circle { fill: color-mix(in oklab, var(--ts-fg-2) 70%, transparent); stroke: var(--ts-surface); stroke-width: 1; }
.ts-drv-dot.is-focal circle { fill: var(--ts-drv-own); stroke: var(--ts-fg); stroke-width: 1.5; }
.ts-drv-dot.is-selected circle { fill: var(--ts-accent); }
.ts-drv-dot__label { fill: var(--ts-fg); font-size: 11px; font-family: var(--ts-mono); pointer-events: none; }
.ts-drv-quad { fill: var(--ts-fg-4); font-size: 11px; }
.ts-drv-strip-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ts-fg-2); margin: 6px 0; }
.ts-drv-selected { border-left: 3px solid var(--ts-accent); padding: 8px 12px; font-size: 13px; display: grid; gap: 8px; background: var(--ts-surface-2); border-radius: 0 var(--ts-radius-sm) var(--ts-radius-sm) 0; }
.ts-drv-custom { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.ts-drv-table-wrap { overflow-x: auto; }
.ts-drv-table tr.is-focal { background: color-mix(in oklab, var(--ts-drv-own) 12%, transparent); }
.ts-drv-table tr.is-selected { background: color-mix(in oklab, var(--ts-accent) 12%, transparent); }
.ts-drv-table tbody tr { cursor: pointer; }
.ts-drv-table__name { color: var(--ts-fg-3); font-size: 12px; }
.ts-drv-table__why { color: var(--ts-fg-3); font-size: 12px; max-width: 240px; }
.ts-drv-strip__legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ts-fg-3); margin: 8px 0 2px; }
/* The drivers' SVGs scale with their box: their text is set in the
   viewBox's own units so it stays at label size on a wide screen. */
.ts-drv-chart__svg text, .ts-drv-chart__svg .ts-rotation-map__tick { font-size: 11px; }
.ts-drv-chart__svg .ts-drv-quad { font-size: 11px; }
.ts-drv-chart__svg .ts-drv-dot__label { font-size: 11px; }
.ts-rotation-detail__drivers { font-size: 11px; color: var(--ts-fg-3); margin-left: 4px; }

/* ---- Peers & Drivers: Trades like ---------------------------------------- */
.ts-tl__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.ts-tl__card { border: 1px solid var(--ts-line); border-radius: var(--ts-radius); background: var(--ts-surface); padding: 10px 12px; min-width: 0; }
.ts-tl__label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ts-fg-3); }
.ts-tl__value { font-size: 16px; font-weight: 600; color: var(--ts-fg); margin-top: 2px; overflow-wrap: anywhere; }
.ts-tl__sub { font-size: 12px; color: var(--ts-fg-3); margin-top: 2px; }
/* The headline card carries the verdict: a clear difference stands out, an
   unsettled one is muted, so the card never claims more than the sentence. */
.ts-tl__card--differs { border-color: var(--ts-accent); }
.ts-tl__card--differs .ts-tl__value { color: var(--ts-accent); }
.ts-tl__card--undecided { border-style: dashed; }
.ts-tl__card--undecided .ts-tl__value,
.ts-tl__card--neutral .ts-tl__value { color: var(--ts-fg-2); font-weight: 500; }
.ts-tl__verdict { font-size: 14px; color: var(--ts-fg-2); margin: 4px 0; max-width: 80ch; }
.ts-tl__tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ts-tl__tag { font-size: 11px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--ts-line-2); color: var(--ts-fg-2); white-space: nowrap; }
.ts-tl__tag--assigned { border-color: var(--ts-drv-industry); color: var(--ts-drv-industry); }
.ts-tl__tag--returns { border-color: var(--ts-accent); color: var(--ts-accent); }
.ts-tl__tag--model { border-color: var(--ts-drv-sector); color: var(--ts-drv-sector); }
.ts-tl__why { font-size: 12px; color: var(--ts-fg-3); margin-top: 4px; max-width: 60ch; }
.ts-tl__bar { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--ts-line-2); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.ts-tl__bar > span { display: block; height: 100%; background: var(--ts-accent); }
.ts-tl__opposite { margin-left: 6px; font-size: 11px; color: var(--ts-fg-3); border-bottom: 1px dotted var(--ts-fg-3); cursor: help; }

/* The verdict at a glance: a badge, then fit and separation as meters. */
.ts-tl__signal { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 10px 18px; align-items: center; margin: 6px 0 10px; }
.ts-tl__badge { justify-self: start; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--ts-line-2); color: var(--ts-fg-2); white-space: nowrap; }
.ts-tl__badge--differs { border-color: var(--ts-accent); color: var(--ts-accent); }
.ts-tl__badge--confirms { border-color: var(--ts-drv-industry); color: var(--ts-drv-industry); }
.ts-tl__badge--undecided { border-style: dashed; }
.ts-tl__meter-row { display: grid; gap: 3px; min-width: 0; }
.ts-tl__meter-label { font-size: 12px; color: var(--ts-fg-3); }
.ts-tl__meter-label b { color: var(--ts-fg); font-weight: 600; }
.ts-tl__meter { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--ts-line-2); overflow: hidden; }
.ts-tl__meter-fill { position: absolute; inset: 0 auto 0 0; background: var(--ts-accent); border-radius: 5px; }
.ts-tl__meter-fill--none, .ts-tl__meter-fill--weak, .ts-tl__meter-fill--within { background: var(--ts-fg-3); }
.ts-tl__meter-fill--moderate { background: color-mix(in oklab, var(--ts-accent) 70%, var(--ts-fg-3)); }
.ts-tl__meter-noise { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in oklab, var(--ts-fg-3) 35%, transparent) 4px 6px); border-right: 1px solid var(--ts-fg-2); }
.ts-tl__meter-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ts-bg); }
.ts-tl__meter-scale { display: grid; font-size: 11px; color: var(--ts-fg-3); }
.ts-tl__meter-scale > span { white-space: nowrap; overflow: visible; min-width: 0; padding-left: 2px; }
.ts-tl__more > summary { cursor: pointer; font-size: 12.5px; color: var(--ts-fg-3); margin: 4px 0; }

/* How the answer has moved, as a strip: one cell per quarter end, coloured
   by the closest industry, so a change of answer is a change of colour. */
.ts-tl__strip { list-style: none; padding: 0; margin: 4px 0; display: grid; grid-template-columns: repeat(var(--steps, 8), minmax(0, 1fr)); gap: 3px; }
.ts-tl__step { display: grid; gap: 2px; padding: 6px 6px 7px; border-radius: var(--ts-radius-sm); background: color-mix(in oklab, oklch(0.7 0.11 var(--hue)) 16%, var(--ts-surface)); border-top: 3px solid oklch(0.72 0.12 var(--hue)); min-width: 0; font-size: 12px; }
.ts-tl__step.is-change { box-shadow: inset 2px 0 0 var(--ts-fg); }
.ts-tl__step.is-own { outline: 1px dashed var(--ts-drv-industry); outline-offset: -1px; }
.ts-tl__step-when { color: var(--ts-fg-3); font-size: 11px; }
.ts-tl__step-swatch { display: none; }
.ts-tl__step-name { color: var(--ts-fg); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ts-tl__step-r { color: var(--ts-fg-2); }
.ts-tl__step-own { color: var(--ts-fg-3); font-size: 11px; }
@media (max-width: 720px) {
    .ts-tl__signal { grid-template-columns: minmax(0, 1fr); }
    .ts-tl__strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ts-tl__table td, .ts-tl__table th { vertical-align: top; }
.ts-btn--small { padding: 2px 8px; font-size: 12px; }

/* ---- News: evidence per reading ------------------------------------------ */
.ts-nw__ev { border: 1px solid var(--ts-line); border-radius: var(--ts-radius-sm); padding: 6px 10px; margin: 6px 0; }
.ts-nw__ev > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.ts-nw__ev-list { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 2px; font-size: 13px; }
.ts-nw__ev-list dt { color: var(--ts-fg-3); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.ts-nw__ev-list dd { margin: 0; color: var(--ts-fg-2); overflow-wrap: anywhere; }
.ts-nw__ev-src { color: var(--ts-fg-3); font-size: 12px; }
.ts-nw__ev-facts { margin: 0; padding-left: 16px; }
.ts-nw__timeline { margin: 0; padding-left: 16px; display: grid; gap: 2px; }
.ts-nw__timeline li { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-nw__timeline li.is-this { font-weight: 600; }
.ts-nw__sent--mixed { color: var(--ts-warn); border-color: var(--ts-warn); }
.ts-nw__sent--insufficient, .ts-nw__sent--conflicting { color: var(--ts-fg-3); border-color: var(--ts-line-2); }
@media (max-width: 700px) { .ts-nw__ev-list { grid-template-columns: 1fr; } .ts-nw__ev-list dt { margin-top: 4px; } }

/* ---- News: the reader's own views, flows and reasons --------------------- */
.ts-nw__scopes, .ts-nw__flows { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ts-nw__scope-sep { color: var(--ts-fg-4); }
.ts-nw__flows-label, .ts-nw__flows-note { font-size: 13px; color: var(--ts-fg-3); }
.ts-nw__flow-name, .ts-nw__flows select { background: var(--ts-surface); color: var(--ts-fg); border: 1px solid var(--ts-line-2); border-radius: var(--ts-radius-sm); padding: 3px 8px; font-size: 13px; }
.ts-nw__reasons { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
/* News sweep 15: the filing in one sentence, and wire reports folded under it. */
.ts-nw__reading { margin: 2px 0 4px; font-size: 13px; color: var(--mud-palette-text-primary); }
.ts-nw__reading-label { color: var(--mud-palette-text-secondary); margin-right: 4px; }
.ts-nw__companions { list-style: none; margin: 4px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--mud-palette-lines-default); font-size: 12.5px; }
.ts-nw__companions li { margin: 2px 0; color: var(--mud-palette-text-secondary); }
.ts-nw__companion-label { margin-right: 4px; }
.ts-nw__reason { font-size: 11px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--ts-line-2); color: var(--ts-fg-2); }
.ts-nw__reason--held, .ts-nw__reason--followed { border-color: var(--ts-accent); color: var(--ts-accent); }
.ts-nw__reason--setup, .ts-nw__reason--watch { border-color: var(--ts-drv-industry, var(--ts-warn)); color: var(--ts-drv-industry, var(--ts-warn)); }
.ts-nw__mine { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.ts-nw__related { margin: 4px 0; padding-left: 18px; font-size: 13px; color: var(--ts-fg-2); display: grid; gap: 4px; }

/* News routes: one line per route in the status strip. */
.ts-nw__route { font-size: 11.5px; color: var(--ts-fg-2); margin-top: 3px; }
.ts-nw__route-name { font-weight: 600; color: var(--ts-fg-1); }
.ts-nw__route.ts-warn, .ts-nw__route.ts-warn .ts-nw__route-name { color: var(--ts-warn, #b26a00); }
.ts-nw__primary { display: inline-block; font-size: 11px; padding: 0 5px; margin-left: 4px; border: 1px solid currentColor; border-radius: 3px; }

/* The event, step by step. */
.ts-nw__steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ts-nw__step { font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.ts-nw__step-kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ts-fg-2); min-width: 92px; }
.ts-nw__step--correction .ts-nw__step-kind, .ts-nw__step--readingchanged .ts-nw__step-kind { color: var(--ts-warn, #b26a00); }
.ts-nw__step--current .ts-nw__step-kind { color: var(--ts-fg-1); }
.ts-nw__saved { font-size: 11px; margin-left: 4px; color: var(--ts-fg-1); }
.ts-nw__story.is-read .ts-nw__meta::after { content: " · read"; color: var(--ts-fg-3); }
.ts-nw__promise { font-size: 11.5px; color: var(--ts-fg-2); margin-top: 4px; }
.ts-nw__promise summary { cursor: pointer; }
.ts-nw__promise p { margin: 3px 0; }
.ts-nw__feedback { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }

/* Which scanners looked at this symbol, per scanner. */
.ts-status-card__coverage { margin: 6px 0 10px; font-size: 13px; color: var(--ts-fg-2); }
.ts-status-card__coverage > summary { cursor: pointer; }
.ts-status-card__coverage ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; color: var(--ts-fg-3); }
.ts-status-card__coverage li[data-state="Examined"] { color: var(--ts-fg-2); }

/* ---- Quote overview: the verdict strip -------------------------------------
   Each card's conclusion in a few words, linked to the card. */
.ts-verdict { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ts-verdict__chip { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 12px; border-radius: var(--ts-radius); border: 1px solid var(--ts-line-2); background: var(--ts-surface); color: var(--ts-fg); text-decoration: none; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.ts-verdict__chip:hover { border-color: var(--ts-fg-3); }
.ts-verdict__label { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ts-fg-3); }
.ts-verdict__value { font-family: var(--ts-sans); font-size: 14px; font-weight: 600; }
.ts-verdict__chip--up { border-left: 3px solid var(--ts-up); }
.ts-verdict__chip--down { border-left: 3px solid var(--ts-down); }
.ts-verdict__chip--accent { border-left: 3px solid var(--ts-accent); }
.ts-anchor { scroll-margin-top: 90px; }

/* Method notes and limits, one click away: the conclusion is on the card,
   the caveats are kept word for word behind this. */
.ts-limits { margin-top: 8px; }
.ts-limits > summary { cursor: pointer; font-size: 11.5px; color: var(--ts-fg-3); list-style: none; }
.ts-limits > summary::before { content: "ⓘ "; }
.ts-limits[open] > summary { margin-bottom: 4px; }

/* One dot per reading along a tail; the spacing reads as speed. */
.ts-rotation-map__step { pointer-events: none; }
/* From a dot to its label when the label had to move away. */
.ts-rotation-map__leader { stroke-width: 0.8; stroke-opacity: 0.6; pointer-events: none; }

/* Buybacks sweep 16: mechanism tags, controls, the list of headlines not counted. */
.ts-bb__controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ts-bb__tag { display: inline-block; margin-left: 6px; padding: 0 5px; font-size: 11px; border: 1px solid var(--mud-palette-lines-default); border-radius: 3px; color: var(--mud-palette-text-secondary); }
.ts-bb__excluded { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }

/* A symbol that no longer trades, beside the one its company trades as now. */
.ts-nw__renamed { margin-left: 4px; font-size: 11px; color: var(--ts-fg-3); }
