/* Live numbers (assets/live.js): a changed value flashes in its rule's tone (up green, down red, neutral grey), then fades. */
@keyframes rv-flash-up { from { background-color: rgba(30, 127, 79, 0.22); } to { background-color: transparent; } }
@keyframes rv-flash-down { from { background-color: rgba(198, 40, 40, 0.22); } to { background-color: transparent; } }
@keyframes rv-flash-neutral { from { background-color: rgba(17, 17, 17, 0.10); } to { background-color: transparent; } }
.rv-flash-up { animation: rv-flash-up 0.9s ease-out; }
.rv-flash-down { animation: rv-flash-down 0.9s ease-out; }
.rv-flash-neutral { animation: rv-flash-neutral 0.9s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .rv-flash-up, .rv-flash-down, .rv-flash-neutral { animation: none; }
}

/* The Status button (apps/freshness.py): a dot (green while live data arrives) and a quiet label; on a phone, the dot alone. Its modal's table
   says what is live and what is as of when; a refreshable row has a ↻ that spins while the refresh runs. */
.app .refresh-box .rv-data-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; min-height: 36px; padding: 0 6px; background: none; border: 0;
  font: 500 12px var(--rv-mono, monospace); color: var(--rv-mute, #666); cursor: pointer; }
.app .refresh-box .rv-data-btn:hover .rv-data-label { color: var(--rv-ink, #111); text-decoration: underline; }
.rv-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #bbb; display: inline-block; flex: none; }
.rv-live-dot.on { background: #1e7f4f; box-shadow: 0 0 0 3px rgba(30, 127, 79, 0.15); }
@media (max-width: 700px) {
  .app .refresh-box .rv-data-btn::before { content: none; }  /* not the old refresh glyph */
  .app .refresh-box .rv-data-btn { justify-content: center; }  /* where the refresh glyph was, a tap target of 44 px */
  .rv-data-label { display: none; }
  .rv-live-dot { width: 10px; height: 10px; }
}
.rv-data-modal { z-index: 6000; }  /* above the chart's own headers and labels */
.rv-data-modal .rv-data-doc { width: min(760px, 94vw); }
.rv-data-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rv-data-head h4 { margin: 0; }
.rv-modal-x { background: none; border: 0; font: 400 22px/1 var(--rv-mono, monospace); color: var(--rv-mute, #666); cursor: pointer; padding: 2px 6px; }
.rv-modal-x:hover { color: var(--rv-ink, #111); }
.rv-data-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 10px 0 8px; }
.rv-data-table th { text-align: left; font-weight: 600; border-bottom: 1px solid var(--rv-ink, #111); padding: 4px 6px; }
.rv-data-table td { vertical-align: top; border-bottom: 1px solid #e2e2e2; padding: 6px; }
.rv-data-table td:nth-child(2) { min-width: 150px; font-family: var(--rv-mono, monospace); }
.rv-now { display: inline-flex; align-items: baseline; gap: 6px; }
.app .rv-row-refresh, .rv-row-refresh { background: none; border: 0; padding: 0 4px; min-height: 0; display: inline-flex; align-items: center;
  font: 500 14px/1 var(--rv-mono, monospace); color: var(--rv-mute, #666); cursor: pointer; }  /* .app: above the app's button style (a border) */
.app .rv-row-refresh:hover:not(:disabled), .rv-row-refresh:hover { background: none; color: var(--rv-ink, #111); }
.app .rv-row-refresh:disabled { border: 0; background: none; color: var(--rv-ink, #111); }
.rv-row-refresh .rv-glyph { display: inline-block; }  /* the glyph turns, not the button (it once took its box along: 2026-10-15) */
.rv-row-refresh.loading { cursor: progress; color: var(--rv-ink, #111); }
.rv-row-refresh.loading .rv-glyph { animation: rv-spin 0.9s linear infinite; }
@keyframes rv-spin { to { transform: rotate(360deg); } }
.rv-data-actions { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 4px; }
.tk-q .tk-kpi-sub { white-space: pre-line; }  /* a card's lines (features/perps.py: market_answers) */
.tk-q .rv-asof, .tk-kpi .rv-asof { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .rv-row-refresh.loading .rv-glyph { animation: none; } }

/* The Watchlist page (apps/pages/watchlist.py) */
.wl-account { margin: 4px 0 10px; font-size: 13px; }
.wl-controls { align-items: center; gap: 12px; }
.wl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wl-table th { text-align: left; font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--rv-ink, #111); padding: 6px; }
.wl-table td { vertical-align: top; border-bottom: 1px solid #e2e2e2; padding: 8px 6px; }
.wl-sym { font-weight: 600; }
.wl-price .tk-kpi-value { font: 600 15px var(--rv-mono, monospace); }
.wl-price .tk-kpi-sub { font: 400 11px var(--rv-mono, monospace); color: var(--rv-mute, #666); }
.wl-readings, .wl-events { font-size: 12px; }
.wl-table .up { color: #1e7f4f; } .wl-table .down { color: #c62828; }
.wl-warn { color: #c62828; }
@media (max-width: 700px) { .wl-table .wl-readings, .wl-table .wl-events { display: none; } }
.wl-settings { font-size: 13px; margin: 0 0 8px; } .wl-settings label { margin-right: 16px; }
.app .wl-table .wl-rm { border: 0; background: none; min-height: 0; height: auto; padding: 0 4px; font-size: 18px; color: var(--rv-mute, #666); }
.app .wl-table .wl-rm:hover { color: #c62828; }

/* The matrix and its live commentary side by side (assets/live.js: narr): the matrix takes the width, the panel ~300 px at the matrix's height,
   its feed scrolling inside. Without the panel (any other selection) the matrix has the whole row; under 860 px the panel goes below it. */
.mx-split.mx-split-on { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 29%, 340px); gap: 16px; align-items: stretch; }
.mx-split.mx-split-on > :first-child { min-width: 0; }
.rv-narr { position: relative; min-height: 420px; }
.rv-narr-in { position: absolute; inset: 0; display: flex; flex-direction: column; border: 1px solid var(--rv-rule, #e2e2e2); border-radius: 8px;
  background: var(--rv-paper, #fff); overflow: hidden; font: 400 13px/1.45 var(--rv-font, system-ui, sans-serif); color: var(--rv-ink, #111); }
.mx-split .mx { margin-bottom: 0; }
.rv-narr-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; border-bottom: 1px solid var(--rv-rule-soft, #eee); }
.rv-narr-title { font: 600 12.5px/1 var(--rv-font, sans-serif); letter-spacing: .01em; }
.rv-narr-utc { margin-left: auto; font: 400 10.5px/1 var(--rv-mono, monospace); color: var(--rv-mute, #777); }
.rv-narr-cap { padding: 10px 12px 12px; background: var(--rv-wash, #f6f6f3); border-bottom: 1px solid var(--rv-rule-soft, #eee); }
.rv-narr-capk { display: flex; align-items: center; gap: 8px; font: 600 10.5px/1 var(--rv-mono, monospace); text-transform: uppercase; letter-spacing: .06em;
  color: var(--rv-mute, #666); margin-bottom: 6px; }
.rv-narr-badge { font: 500 9.5px/1 var(--rv-mono, monospace); padding: 3px 5px; border-radius: 3px; border: 1px solid var(--rv-rule, #ddd); letter-spacing: .04em; }
.rv-narr-cap p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.rv-narr-cap b, .rv-narr-body b { font-weight: 600; }
.rv-narr-off { color: var(--rv-mute, #666); }
.rv-narr-meta { margin-top: 6px; font: 400 10.5px/1.4 var(--rv-mono, monospace); color: var(--rv-mute, #777); }
.rv-narr-skel i { display: block; height: 10px; margin: 7px 0; border-radius: 4px; background: linear-gradient(90deg, var(--rv-rule-soft, #eee) 25%, var(--rv-rule, #ddd) 50%, var(--rv-rule-soft, #eee) 75%);
  background-size: 200% 100%; animation: rv-narr-shimmer 1.4s linear infinite; }
.rv-narr-skel i:nth-child(2) { width: 88%; } .rv-narr-skel i:nth-child(3) { width: 62%; }
@keyframes rv-narr-shimmer { to { background-position: -200% 0; } }
.rv-narr-feed { position: relative; flex: 1; min-height: 160px; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; scrollbar-width: thin; }
.rv-narr-feed:focus-visible { outline: 2px solid var(--rv-ink, #111); outline-offset: -2px; }
.rv-narr-pill { position: sticky; top: 34px; z-index: 3; display: block; margin: 0 auto -26px; padding: 5px 11px; border: 0; border-radius: 999px;
  background: var(--rv-ink, #111); color: var(--rv-paper, #fff); font: 500 11px/1 var(--rv-mono, monospace); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.rv-narr-pill[hidden] { display: none; }
.rv-narr-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.rv-narr-day { position: sticky; top: 0; z-index: 2; padding: 10px 0 6px; background: var(--rv-paper, #fff); }
.rv-narr-day span { font: 600 10.5px/1 var(--rv-mono, monospace); text-transform: uppercase; letter-spacing: .07em; color: var(--rv-mute, #666); }
.rv-narr-item { display: grid; grid-template-columns: 40px 1fr; gap: 0 12px; position: relative; padding: 7px 0 9px; }
.rv-narr-item time { font: 500 11px/1.6 var(--rv-mono, monospace); color: var(--rv-mute, #777); font-variant-numeric: tabular-nums; }
.rv-narr-body { position: relative; padding-left: 14px; border-left: 2px solid var(--rv-rule-soft, #eee); margin-left: -6px; }
.rv-narr-body::before { content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--rv-paper, #fff);
  border: 2px solid currentColor; box-sizing: border-box; }
.rv-narr-up .rv-narr-body::before { color: var(--rv-up, #1e7f4f); }
.rv-narr-down .rv-narr-body::before { color: var(--rv-down, #c62828); }
.rv-narr-info .rv-narr-body::before { color: var(--rv-mute, #777); }  /* a pattern (live/patterns.py): neither up nor down */
.rv-narr-recap .rv-narr-body::before, .rv-narr-review .rv-narr-body::before { color: var(--rv-ink, #111); background: var(--rv-ink, #111); }
/* a week's close: a divider across the feed, its AI review under it */
.rv-narr-week { margin: 8px 0 0; padding: 10px 0 8px; border-top: 2px solid var(--rv-ink, #111); }
.rv-narr-week .rv-narr-body { border-left-color: transparent; }
.rv-narr-week .rv-narr-body::before { color: var(--rv-ink, #111); border-radius: 2px; transform: rotate(45deg); }
.rv-narr-week .rv-narr-tag { color: var(--rv-ink, #111); }
.rv-narr-week p { font-weight: 500; }
.rv-narr-tag { display: block; font: 600 9.5px/1.6 var(--rv-mono, monospace); text-transform: uppercase; letter-spacing: .07em; color: var(--rv-mute, #777); }
.rv-narr-up .rv-narr-tag { color: var(--rv-up, #1e7f4f); } .rv-narr-down .rv-narr-tag { color: var(--rv-down, #c62828); }
.rv-narr-body p { margin: 1px 0 0; }
.rv-narr-recap .rv-narr-body p, .rv-narr-review .rv-narr-body p { padding: 7px 9px; margin-top: 3px; background: var(--rv-wash, #f6f6f3); border-radius: 6px; }
.rv-narr-review .rv-narr-body p { border-left: 3px solid var(--rv-ink, #111); }
.rv-narr-wait .rv-narr-skel { margin-top: 4px; }
.rv-narr-end { padding: 10px 0 2px; text-align: center; font: 400 11px/1.5 var(--rv-mono, monospace); color: var(--rv-mute, #888); }
.rv-narr-end.rv-narr-empty { text-align: left; font-family: var(--rv-font, sans-serif); font-size: 12.5px; padding-top: 14px; }
@keyframes rv-narr-in { from { opacity: 0; transform: translateY(-6px); background-color: rgba(17, 17, 17, 0.06); } to { opacity: 1; transform: none; background-color: transparent; } }
.rv-narr-new { animation: rv-narr-in .7s ease-out; }
@media (prefers-reduced-motion: reduce) { .rv-narr-new, .rv-narr-skel i { animation: none; } }
@media (max-width: 860px) {
  .mx-split.mx-split-on { grid-template-columns: minmax(0, 1fr); gap: 12px; }  /* not 1fr: its minimum is the content's (a chart's canvas, a
     row of chips that does not wrap), which made the ticker's section wider than a phone and iOS enlarged its text */
  .mx-split.mx-split-on > * { min-width: 0; }
  .rv-narr { min-height: 0; }
  .rv-narr-in { position: static; max-height: 460px; }
}

/* A ticker's section (assets/live.js: tickerOpen): below the matrix and the commentary, across the row; on a phone between them (the matrix,
   the ticker, the feed). Its name and its week's figures as chips; its chart across (assets/tvcharts.js, as every chart here); its read with
   its links, and beside it the timeline's lines about it; one column on a phone. */
.mx-split.mx-split-on > .rv-tk { grid-column: 1 / -1; }
.rv-tk { min-width: 0; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; padding: 12px 14px 14px; border: 1px solid var(--rv-rule, #e2e2e2); border-radius: 8px; background: var(--rv-paper, #fff);
  font: 400 13px/1.5 var(--rv-font, system-ui, sans-serif); color: var(--rv-ink, #111); }
.rv-tk[hidden] { display: none; }
.rv-tk-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--rv-rule-soft, #eee); }
.rv-tk-h b { font: 600 18px/1.2 var(--rv-font, sans-serif); letter-spacing: -.01em; }
.rv-tk-sub { color: var(--rv-mute, #666); font: 400 11px/1.3 var(--rv-mono, monospace); }
.rv-tk-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; order: 3; }
.rv-tk-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 8px; border: 1px solid var(--rv-rule, #e2e2e2); border-radius: 999px;
  font: 500 12px/1.4 var(--rv-mono, monospace); white-space: nowrap; }
.rv-tk-chip i { font: 400 10.5px/1 var(--rv-font, sans-serif); font-style: normal; color: var(--rv-mute, #777); text-transform: uppercase; letter-spacing: .05em; }
.rv-tk-chip.rv-tk-up { color: var(--rv-up, #1e7f4f); } .rv-tk-chip.rv-tk-down { color: var(--rv-down, #c62828); }
.app .rv-tk-x, .rv-tk-x { margin-left: auto; min-height: 0; padding: 0 4px; border: 0; background: none; font: 400 20px/1 var(--rv-font, sans-serif);
  color: var(--rv-mute, #666); cursor: pointer; }
.app .rv-tk-x:hover:not(:disabled), .rv-tk-x:hover { background: none; color: var(--rv-ink, #111); }
.rv-tk .tv-host.rv-tk-chart { min-height: 360px; margin: 6px 0 12px; }
.rv-tk-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 20px; align-items: start; }
.rv-tk-k { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font: 600 10.5px/1 var(--rv-mono, monospace); text-transform: uppercase;
  letter-spacing: .06em; color: var(--rv-mute, #666); }
.rv-tk-read { margin: 0; font-size: 14px; line-height: 1.6; }
.app .rv-tk-a, .rv-tk-a { color: var(--rv-ink, #111); font-weight: 600; text-decoration: none; border-bottom: 1px dotted var(--rv-mute, #777); }
.rv-tk-a:hover { border-bottom-style: solid; }
.rv-tk-a:focus-visible { outline: 2px solid var(--rv-ink, #111); outline-offset: 1px; }
/* without a read: the daily data by group, label and value or a table a group */
.rv-tk-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; font-size: 13px; line-height: 1.45; }
.rv-tk-g h4 { margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--rv-rule-soft, #eee); font: 600 10.5px/1.2 var(--rv-mono, monospace);
  text-transform: uppercase; letter-spacing: .06em; color: var(--rv-mute, #666); }
.rv-tk-kv { display: grid; grid-template-columns: 13.5em minmax(0, 1fr); gap: 5px 16px; margin: 0; }
.rv-tk-kv dt { margin: 0; }
.rv-tk-kv dt .rv-tk-a { font-weight: 500; color: var(--rv-mute, #555); }
.rv-tk-kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.rv-tk-kv dd span + span::before { content: '·'; margin: 0 6px; color: var(--rv-mute, #999); }
.rv-tk-kv dd span:first-child { font-weight: 600; }
.rv-tk-kv dd.rv-tk-kv-w { grid-column: 1 / -1; }
.rv-tk-tw { overflow-x: auto; scrollbar-width: thin; }
.rv-tk-t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rv-tk-t th { padding: 3px 8px 3px 0; text-align: right; font: 500 10.5px/1.2 var(--rv-font, sans-serif); color: var(--rv-mute, #777); white-space: nowrap; }
.rv-tk-t td { padding: 4px 8px 4px 0; text-align: right; white-space: nowrap; border-top: 1px solid var(--rv-rule-soft, #f0f0f0); }
.rv-tk-t th:first-child, .rv-tk-t td:first-child { text-align: left; }
.rv-tk-t td .rv-tk-a { font-weight: 500; }
.rv-tk-t td:last-child { white-space: normal; min-width: 140px; }
.rv-tk-t.rv-tk-t-l td:nth-child(3) { white-space: normal; min-width: 160px; }
.rv-tk-t.rv-tk-t-l td { vertical-align: top; }
.rv-tk-t.rv-tk-t-l th, .rv-tk-t.rv-tk-t-l td { text-align: left; }
.rv-tk-data { margin-top: 12px; border-top: 1px solid var(--rv-rule-soft, #eee); padding-top: 8px; }
.rv-tk-data > summary { cursor: pointer; font: 600 10.5px/1.6 var(--rv-mono, monospace); text-transform: uppercase; letter-spacing: .06em;
  color: var(--rv-mute, #666); }
.rv-tk-data > summary:hover { color: var(--rv-ink, #111); }
.rv-tk-data[open] > summary { margin-bottom: 8px; }
.rv-tk-data .rv-tk-facts { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }  /* its height: live.js tkFit */
.rv-tk-feed { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }  /* the feed's style (.rv-narr-*) */
.rv-tk-feed .rv-narr-item { cursor: default; border-radius: 4px; }
.rv-tk-hl { background: var(--rv-wash, #f6f6f3); }
.mx-split-on #mk-matrix .mx-cell { cursor: pointer; }  /* only where the matrix has its notes (a ticker's section opens) */
#mk-matrix .mx-cell.rv-tk-on { outline: 2px solid var(--rv-ink, #111); outline-offset: -2px; }
@media (max-width: 860px) {
  .mx-split.mx-split-on > .rv-tk { order: 1; }
  .mx-split.mx-split-on > .rv-narr { order: 2; }
  .rv-tk-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rv-tk-grid > * { min-width: 0; }
  .rv-tk-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px; }  /* one row, swiped */
  .rv-tk-chips::-webkit-scrollbar { display: none; }
  .rv-tk { padding: 10px 10px 12px; }
  .rv-tk-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }  /* the label above its value */
  .rv-tk-kv dd { margin-bottom: 6px; }
  .rv-tk-data .rv-tk-facts { max-height: 420px; }
}

