/* pikola.app/research/punting: the punt study's own pieces, on top of tokens.css, site.css and research.css
   (the article, the facts strip, the limits card, the chart cards and the table box are research.css's).
   This file holds the two-series marks for charts 1 and 2, the dumbbell marks for chart 3, the HTML legend,
   the takeaways and the numbers table. The charts are inline SVG whose marks take their colours from the
   classes below, so dark mode is the tokens' switch and nothing else. */

/* Two series, two hues from the brand's primitives, re-stepped for each surface:
   dill for Categories, chalk for One Win. Checked for lightness, chroma, colour-vision
   separation and contrast against each surface before they were chosen. */
:root { --chart-cat: var(--pk-pickle-600); --chart-ow: var(--pk-chalk-500); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --chart-cat: var(--pk-pickle-500); --chart-ow: var(--pk-chalk-300); } }
:root[data-theme='dark'] { --chart-cat: var(--pk-pickle-500); --chart-ow: var(--pk-chalk-300); }

/* ── The head ────────────────────────────────────────────────────────── */
.study-head p + p { margin-top: 14px; }

/* ── The marks. Text in the SVG wears the text tokens; only bars and dots carry a series colour. ── */
.chart-svg .lbl { font-family: var(--font-display); font-weight: 700; fill: var(--text); letter-spacing: .02em; text-transform: uppercase; }
.chart-svg .lbl-sub { font-family: var(--font-body); font-weight: 400; fill: var(--dim); letter-spacing: 0; text-transform: none; }
.chart-svg .tick { fill: var(--faint); }
.chart-svg .anno { fill: var(--dim); font-weight: 600; }
.chart-svg .val { font-family: var(--font-display); font-weight: 700; fill: var(--text); letter-spacing: .01em; }
.chart-svg .val.dim { fill: var(--dim); }
.chart-svg .zero { stroke: var(--line-strong); stroke-width: 1.5; }
.chart-svg .bar.s-cat, .chart-svg .sw.s-cat { fill: var(--chart-cat); }
.chart-svg .bar.s-ow, .chart-svg .sw.s-ow { fill: var(--chart-ow); }
.chart-svg .halo { stroke: var(--surface); stroke-width: 5; fill: none; stroke-linecap: butt; }
.chart-svg .whisk { stroke: var(--text); stroke-width: 1.75; fill: none; }
.chart-svg .whisk2 { stroke: var(--text); stroke-width: 1; fill: none; opacity: .75; }
.chart-svg .link { stroke: var(--line-strong); stroke-width: 2; }
.chart-svg .arrow { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .dot.s-base { fill: var(--surface); stroke: var(--dim); stroke-width: 2; }
.chart-svg .dot.s-punt { fill: var(--chart-cat); stroke: var(--surface); stroke-width: 2; }
/* A bar within two errors of Balanced is drawn hollow: the study cannot call it. Chart 1's legend carries the key. */
.chart-svg .bar.hollow { fill: var(--surface); stroke-width: 2; }
.chart-svg .bar.s-cat.hollow { stroke: var(--chart-cat); }
.chart-svg .bar.s-ow.hollow { stroke: var(--chart-ow); }
/* Between the phone chart and the column's full width the wide chart is drawn a little under scale; the ticks
   are set larger in user units there so they never render under the guidelines' floor. */
@media (max-width: 760px) and (min-width: 641px) { .chart-wide .tick { font-size: 14px; } }

/* The legend, in HTML so it wraps on a phone. */
.research p.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 12px 0 0; font-size: 13.5px; color: var(--dim); max-width: none; }
.legend .key { display: inline-flex; align-items: center; gap: 7px; }
.legend .key::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--chart-cat); flex: none; }
.legend .key.s-ow::before { background: var(--chart-ow); }
.legend .key.s-base::before { border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--dim); }
.legend .key.s-punt::before { border-radius: 50%; }
.legend .key.hollow::before { background: var(--surface); box-shadow: inset 0 0 0 2px var(--chart-cat); }

/* ── Takeaways ───────────────────────────────────────────────────────── */
.research .takeaways { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; max-width: 44em; }
.research .takeaways li { margin: 0; padding-left: 14px; border-left: 3px solid var(--acid); color: var(--dim); line-height: 1.55; }

/* ── The numbers ─────────────────────────────────────────────────────── */
table.numbers { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; color: var(--dim); }
table.numbers th, table.numbers td { padding: 8px 10px; border-bottom: 1px dotted var(--line-strong); text-align: left; vertical-align: baseline; white-space: nowrap; }
table.numbers thead th { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border-bottom: 2px solid var(--rule); white-space: normal; }
table.numbers tbody th { font-weight: 600; color: var(--text); }
table.numbers .num { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--text); }
table.numbers thead th.num { font-family: var(--font-body); font-weight: 700; font-size: 11px; color: var(--faint); }
/* The Balanced rows on a tint that lets the box's scroll shadow show through. */
table.numbers tr.base td, table.numbers tr.base th { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }

/* The one line about the product. Quiet, at the end. */
.research .about-line { margin: 56px 0 0; padding-top: 18px; border-top: 1px dotted var(--line-strong); font-size: 14px; color: var(--faint); max-width: none; }
/* A note inside a cell, such as the control a difference is taken against. */
table.numbers .dim { color: var(--faint); font-weight: 400; white-space: normal; }
/* A reference line drawn dashed (the white paper's cheat sheet at 1), and a chart's group heading. */
.chart-svg .ref { stroke: var(--dim); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart-svg .lbl.group { fill: var(--dim); }
.legend .key.ref::before { width: 16px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--dim); }
table.numbers td.wrap { white-space: normal; min-width: 16em; }
/* The robustness table: each check named, with what it changes under it; a gap that could be luck says so. */
table.numbers.robust tbody th { white-space: normal; min-width: 13em; }
table.numbers .row-sub { display: block; font-weight: 400; font-size: 12.5px; color: var(--faint); margin-top: 2px; }
table.numbers .luck { display: block; font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--faint); }
/* The white paper's flow diagram: boxes on the card, the shared core outlined in ink, each room in its series
   colour, what each room tells you as an inverse pill, the loop dashed. */
.chart-svg .fbox { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.chart-svg .fbox.core { stroke: var(--text); stroke-width: 2; }
.chart-svg .fchip { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1; }
.chart-svg .fchip-text { font-weight: 650; fill: var(--text); }
.chart-svg .ftitle { font-family: var(--font-display); font-weight: 700; fill: var(--text); letter-spacing: .03em; text-transform: uppercase; }
.chart-svg .fnum { font-weight: 800; fill: var(--accent); }
.chart-svg .fsub { fill: var(--dim); }
.chart-svg .farrow { stroke: var(--dim); stroke-width: 1.75; fill: none; }
.chart-svg .fhead { fill: var(--dim); }
.chart-svg .flab { fill: var(--dim); font-weight: 600; }
.chart-svg .floop { stroke: var(--dim); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.chart-svg .ftag.s-ow { fill: var(--chart-ow); }
.chart-svg .ftag.s-cat { fill: var(--chart-cat); }
.chart-svg .ftag-text { font-family: var(--font-display); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; fill: var(--surface); }
.chart-svg .fout { fill: var(--text); }
.chart-svg .fout-text { font-weight: 650; fill: var(--bg); }

/* The white paper's mechanism charts: the edge against the swing, the slope chart's bands and states, the price
   curve, and the survival curves with their tails. */
.chart-svg .swing { fill: color-mix(in srgb, var(--text) 9%, transparent); }
.chart-svg .edge { fill: var(--chart-cat); }
.chart-svg tspan.dim { fill: var(--dim); font-weight: 500; }
.chart-svg .band { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.chart-svg .band-label { fill: var(--faint); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.chart-svg .dot.st-live { fill: var(--chart-cat); stroke: var(--surface); stroke-width: 2; }
.chart-svg .dot.st-given { fill: color-mix(in srgb, var(--chart-cat) 40%, var(--surface)); stroke: var(--chart-cat); stroke-width: 2; }
.chart-svg .dot.st-yours { fill: var(--dim); stroke: var(--surface); stroke-width: 2; }
.chart-svg .leader { stroke: var(--line-strong); stroke-width: 1; }
.chart-svg .chg { fill: var(--faint); }
.chart-svg .area { fill: color-mix(in srgb, var(--chart-cat) 28%, transparent); stroke: var(--chart-cat); stroke-width: 2; stroke-linejoin: round; }
.chart-svg .marker { stroke: var(--dim); stroke-width: 1.25; stroke-dasharray: 3 3; }
.chart-svg .curve { fill: none; stroke-width: 2.25; stroke-linejoin: round; }
.chart-svg .curve.s-cat { stroke: var(--chart-cat); }
.chart-svg .curve.s-ow { stroke: var(--chart-ow); }
.chart-svg .curve.faint { opacity: .45; stroke-dasharray: 4 3; }
.chart-svg .tail.s-cat { fill: color-mix(in srgb, var(--chart-cat) 35%, transparent); }
.chart-svg .tail.s-ow { fill: color-mix(in srgb, var(--chart-ow) 35%, transparent); }
.chart-svg .sw-text.s-cat { fill: var(--chart-cat); }
.chart-svg .sw-text.s-ow { fill: var(--chart-ow); }
.legend .key.swing::before { background: color-mix(in srgb, var(--text) 12%, transparent); }
.legend .key.k-live::before { border-radius: 50%; background: var(--chart-cat); }
.legend .key.k-given::before { border-radius: 50%; background: color-mix(in srgb, var(--chart-cat) 40%, var(--surface)); box-shadow: inset 0 0 0 2px var(--chart-cat); }
.legend .key.k-yours::before { border-radius: 50%; background: var(--dim); }

/* The white paper's flow diagram, walked through one pick: the situation line, the step cards, the bars inside
   them, and the loop. Drawn complete; the animations below only add the reveal and the moving loop. */
.chart-svg .fsit { font-family: var(--font-display); font-weight: 700; fill: var(--text); letter-spacing: .02em; text-transform: uppercase; }
.chart-svg .fval { font-family: var(--font-display); font-weight: 700; fill: var(--text); }
.chart-svg .fbar-bg { fill: color-mix(in srgb, var(--text) 9%, transparent); }
.chart-svg .fbar.st-live { fill: var(--chart-cat); }
.chart-svg .fbar.st-given { fill: color-mix(in srgb, var(--chart-cat) 45%, transparent); }
.chart-svg .fbar.st-yours { fill: var(--dim); }
.chart-svg .fbar.s-cat { fill: var(--chart-cat); }
.chart-svg .fbar.s-ow { fill: var(--chart-ow); }

/* Motion. Every chart is complete without it. Where the browser drives animations from scroll, bars grow and
   lines draw as a chart comes into view, and the flow's steps arrive one after another; the loop's dashes move
   on their own. Readers who ask for reduced motion get none of it. */
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes march { to { stroke-dashoffset: -18; } }
.chart-svg .floop.fmarch { animation: march 1.6s linear infinite; }
@supports (animation-timeline: view()) {
  .research .chart .plot { view-timeline: --plot block; }
  .chart-svg .edge, .chart-svg .bar, .chart-svg .fbar { transform-box: fill-box; transform-origin: left center; animation: grow-x cubic-bezier(.2,.7,.2,1) both; animation-timeline: --plot; animation-range: entry 15% entry 65%; }
  .chart-svg .link, .chart-svg .curve:not(.faint) { stroke-dasharray: 1; animation: draw ease-out both; animation-timeline: --plot; animation-range: entry 15% entry 65%; }
  .chart-svg .area, .chart-svg .tail { animation: fade ease-out both; animation-timeline: --plot; animation-range: entry 15% entry 65%; }
  .chart-svg .fstep { animation: fade-up ease-out both; animation-timeline: --plot; }
  .chart-svg .f-s0 { animation-range: entry 0% entry 12%; }
  .chart-svg .f-s1 { animation-range: entry 6% entry 24%; }
  .chart-svg .f-s2 { animation-range: entry 18% entry 36%; }
  .chart-svg .f-s3 { animation-range: entry 30% entry 50%; }
  .chart-svg .f-s3b { animation-range: entry 40% entry 60%; }
  .chart-svg .f-s5 { animation-range: entry 55% entry 75%; }
  .chart-svg .fstep .fbar { animation-range: entry 20% entry 60%; }
}
@media (prefers-reduced-motion: reduce) {
  .chart-svg .edge, .chart-svg .bar, .chart-svg .fbar, .chart-svg .link, .chart-svg .curve, .chart-svg .area, .chart-svg .tail, .chart-svg .fstep, .chart-svg .floop.fmarch { animation: none; }
}

/* The waiver-wire study. Every mark is drawn the same way. The names: one short line each. */
.research h3.names-head { margin: 22px 0 6px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.research ul.names { list-style: none; margin: 0 0 8px; padding: 0; max-width: 44em; }
.research ul.names li { margin: 0; padding: 4px 0; border-bottom: 1px dotted var(--line-strong); color: var(--dim); font-size: 15.5px; line-height: 1.4; }
.research ul.names .rounds { margin-left: 6px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; }
.research ul.names .dim { margin-left: 6px; color: var(--faint); }
.research .tag-rookie { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
/* Tables that fit: no forced width, wrapping cells, the first column held in place when a phone scrolls sideways. */
table.numbers.snug { min-width: 0; }
table.numbers.snug th, table.numbers.snug td { padding: 8px 8px; white-space: normal; }
table.numbers.snug tbody th, table.numbers.snug thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
