/* Results tab (js/results-view.js). Built on the Fundamentals tab's open sections
   (css/fundamentals.css: .fv, .fv-q, .fv-t, .fv-qchart…); only what is new lives here.
   No boxes: the three cases are columns divided by thin lines. */
.results-view { min-width: 0; max-width: 100%; }

.rv-read { position: relative; }
.rv-new { display: inline-block; margin-bottom: 6px; font: 650 .72rem var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.fv-dot.live { background: var(--positive); box-shadow: 0 0 0 0 color-mix(in srgb, var(--positive) 55%, transparent); animation: rv-pulse 1.6s ease-out infinite; }
@keyframes rv-pulse { to { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .fv-dot.live { animation: none; } }

/* pessimistic | neutral | optimistic */
.rv-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; max-width: 980px; }
.rv-case { padding: 2px 22px 4px; border-left: 1px solid var(--hairline); display: grid; gap: 10px; align-content: start; }
.rv-case:first-child { border-left: 0; padding-left: 0; }
.rv-case-h { font-size: .76rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rv-case.avg .rv-case-h { color: var(--text); }
.rv-case-v b { display: block; font: 650 1.32rem var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.rv-case.avg .rv-case-v b { color: var(--accent-strong, var(--accent)); }
.rv-case-v small { display: block; font-size: .76rem; color: var(--muted); }
.rv-case-v small span { color: var(--text); font-weight: 600; font-family: var(--font-mono); }

/* the range of estimates, with last year, the usual beat and the result on it */
.rv-bars { display: grid; gap: 4px; margin-top: 22px; max-width: 980px; }
.rv-bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; align-items: center; min-height: 74px; }
.rv-bar-lbl { font-weight: 600; font-size: .86rem; }
.rv-range { position: relative; height: 74px; }
.rv-track { position: absolute; left: 0; right: 0; top: 36px; height: 2px; background: var(--hairline); }
.rv-band { position: absolute; top: 31px; height: 12px; border-radius: 6px; background: var(--fv-band); }
.rv-tick { position: absolute; top: 4px; transform: translateX(-50%); text-align: center; white-space: nowrap; font: 500 .7rem var(--font-mono); color: var(--muted); }
.rv-tick span { display: block; }
.rv-tick i { display: block; width: 2px; height: 14px; margin: 3px auto 0; background: var(--fv-bar-soft); }
.rv-tick.avg { color: var(--text); font-weight: 650; }
.rv-tick.avg i { background: var(--accent); height: 20px; margin-top: 0; }
.rv-pin { position: absolute; top: 44px; transform: translateX(-50%); text-align: center; white-space: nowrap; font-size: .7rem; color: var(--muted); }
.rv-pin i { display: block; width: 10px; height: 10px; border-radius: 50%; margin: -13px auto 4px; border: 2px solid var(--muted); background: var(--fv-bg); }
.rv-pin.track i { border-style: dashed; border-color: var(--accent); }
.rv-pin.track { color: var(--accent); }
.rv-pin.actual { color: var(--text); font-weight: 650; }
.rv-pin.actual i { width: 14px; height: 14px; margin-top: -15px; border-color: var(--fv-bg); background: var(--text); }
.fv .rv-tick[data-tip], .fv .rv-pin[data-tip] { text-decoration: none; cursor: help; }

.rv-notes { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.rv-notes b { color: var(--text); font-weight: 600; }
.rv-note { margin: 10px 0 0; max-width: 820px; }
.rv-sub { margin: 22px 0 0; font-size: .86rem; font-weight: 650; }
table.fv-t.rv-year { width: auto; min-width: min(100%, 720px); }
table.fv-t tr.rv-next-row td { border-top-style: dashed; }
.fv-latest .fv-facts, .rv-latest .fv-facts { margin-top: 12px; }

/* quarterly chart: surprise dots above the revenue bars */
.rv-qchart circle.s { stroke: none; }
.rv-qchart circle.s.pos { fill: color-mix(in srgb, var(--positive) 70%, transparent); }
.rv-qchart circle.s.neg { fill: color-mix(in srgb, var(--negative) 70%, transparent); }
.rv-qchart circle.s.flat { fill: var(--fv-bar-soft); }
.rv-qchart text.pos { fill: var(--positive); }
.rv-qchart text.neg { fill: var(--negative); }
.rv-qchart rect.b.pend { fill: none; stroke: var(--fv-bar); stroke-dasharray: 3 3; }

@media (max-width: 760px) {
  .rv-cases { grid-template-columns: 1fr; }
  .rv-case { border-left: 0; border-top: 1px solid var(--hairline); padding: 12px 0; grid-template-columns: 110px 1fr 1fr; align-items: baseline; gap: 4px 12px; }
  .rv-case:first-child { border-top: 0; }
  .rv-case-v b { font-size: 1.04rem; }
  .rv-bar-row { grid-template-columns: 1fr; gap: 0; }
  .rv-tick, .rv-pin { font-size: .64rem; }
}
