/* pages/coo-years.css — COO Radar: each shop against earlier years (2026-10-25). Tokens only (lint_css.js). The blocks use
   the live cards' own grid (overview.css .lv-shops), so each sits under its card; one column on a phone. A block's table
   splits its width into three equal columns (fixed layout) and never scrolls: its figures are whole units of any currency
   (years.js money(…, true)), so the longest -- seven figures of ILS, six of JOD -- fits a 250 px block, and a note's number
   may wrap under its figure. The panel's tables scroll inside their own named region when a phone's sheet is too narrow,
   never the page. */
.cy > .section-head { margin-top: var(--sp-6); align-items: center; }
.cy .section-head h2 { display: flex; align-items: center; gap: 6px; }
.cy .section-head h2 svg { width: 16px; height: 16px; flex: none; }
.cy-stamp { font-size: var(--fs-xs); white-space: nowrap; }
.cy-basis { margin: 0 2px var(--sp-3); font-size: var(--fs-sm); line-height: 1.45; }

.cy-shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.cy-shop { display: flex; flex-direction: column; gap: var(--sp-2); padding: 14px 14px; border: 1px solid var(--line); min-width: 0; margin-bottom: 0; }
.cy-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cy-h h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 0; min-width: 0; color: var(--brand); }
.cy-h h3 svg { width: 15px; height: 15px; flex: none; color: var(--ink-muted); }

.cy-verdict { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: var(--fs-sm); font-weight: 650; line-height: 1.4; color: var(--ink); }
.cy-verdict svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--ink-muted); }
.cy-verdict.is-ahead svg { color: var(--ok); }
.cy-verdict.is-behind svg { color: var(--danger); }

/* the table: figure, chip and a quiet line per cell; alignment comes from ui.js's column classes (the table layer) */
.cy-tbl { overflow-x: auto; min-width: 0; }
.cy-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.cy-table th, .cy-table td { padding: 6px 3px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cy-table :is(th, td):first-child { padding-left: 0; }
.cy-table :is(th, td):last-child { padding-right: 0; }
.cy-btable { table-layout: fixed; }
.cy-table thead th { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-strong); white-space: nowrap; }
/* the panel's headers wrap ("Same weekday / 2025"): kept on one line they widened the day-by-day table past a 320 px sheet */
.cy-ptable thead th { white-space: normal; }
.cy-table tbody th, .cy-table tfoot th { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); line-height: 1.3; }
.cy-table tr:last-child > * { border-bottom: 0; }
/* the block's periods: a quiet heading line over the three figures */
.cy-btable .cy-rg > th { padding: 8px 0 0; border-bottom: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-strong); }
.cy-rs { font-weight: 500; color: var(--ink-muted); }
.cy-btable tbody > tr:last-child > td { border-bottom: 1px solid var(--line); padding-top: 2px; }
.cy-btable tbody:last-child > tr:last-child > td { border-bottom: 0; }
.cy-btable .cy-fig { display: inline; }
.cy-btable .cy-chip { margin-left: 4px; }
.cy-table tfoot > tr > * { border-top: 1px solid var(--line-strong); }
.cy-hd { display: block; font-weight: 500; color: var(--ink-muted); white-space: nowrap; font-size: var(--fs-xs); }
.cy-fig { display: block; font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cy-cell.is-partial .cy-fig { color: var(--ink-faint); font-weight: 500; }
.cy-sub, .cy-why { display: block; font-size: var(--fs-xs); line-height: 1.3; }
.cy-sub { color: var(--ink-muted); }
.cy-why { color: var(--ink-faint); white-space: normal; min-width: 56px; }
.cy-dash { color: var(--ink-faint); }
.cy-ref { margin-left: 2px; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-faint); line-height: 1; }
/* the numbered reasons under a block's table: what a cell's small number points at (a screen reader hears it in the cell) */
.cy-refs { margin: 0; padding-left: 18px; font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-faint); }

/* this year against that year: the arrow and a word say which way, the colour only repeats it */
.cy-chip { display: inline-flex; align-items: center; gap: 2px; margin: 2px 0 1px; padding: 0 6px; border: 1px solid transparent;
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cy-chip.is-ahead { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.cy-chip.is-behind { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.cy-chip.is-level { background: var(--surface-3); color: var(--ink); }

/* the month's running total: series colours from the chart tokens, earlier years thinner and dashed */
.cy-chart { margin: 0; }
.cy-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cy-grid { stroke: var(--line); stroke-width: 1; }
.cy-grid.is-faint { stroke-dasharray: 2 3; }
.cy-line, .cy-today { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cy-y0 { stroke: var(--chart-1); stroke-width: 2.4; }
.cy-y1 { stroke: var(--chart-2); stroke-width: 1.4; stroke-dasharray: 5 3; }
.cy-y2 { stroke: var(--chart-3); stroke-width: 1.4; stroke-dasharray: 1.6 3; }
.cy-today { stroke: var(--chart-1); stroke-width: 2; stroke-dasharray: 1.5 3.5; }
.cy-dot { fill: var(--chart-1); stroke: var(--surface); stroke-width: 1.4; }
.cy-end1 { fill: var(--chart-2); }
.cy-end2 { fill: var(--chart-3); }
.cy-axis { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-muted); margin-top: 2px; }
.cy-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-muted); }
.cy-key { display: inline-flex; align-items: center; gap: 5px; }
.cy-key i { width: 16px; height: 0; border-top: 2px solid var(--chart-1); flex: none; }
.cy-k1 i { border-top: 2px dashed var(--chart-2); }
.cy-k2 i { border-top: 2px dotted var(--chart-3); }
.cy-key-note { flex-basis: 100%; }

.cy-note { margin: 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink); }
.cy-online { color: var(--ink-muted); }
.cy-notes { margin: 0; padding-left: 18px; font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-muted); }
.cy-notes li.is-wait { color: var(--warn); }
.cy-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: auto; }
.cy-more svg { width: 14px; height: 14px; flex: none; }

/* the details panel: the months as grouped bars, then the tables */
.cy-ph { display: flex; align-items: center; gap: 6px; margin: var(--sp-5) 0 var(--sp-2); font-size: var(--fs-md); color: var(--brand); }
.cy-ph svg { width: 15px; height: 15px; flex: none; color: var(--ink-muted); }
.cy-bars-fig { margin-bottom: var(--sp-3); }
.cy-bar { stroke: none; }
.cy-b0 { fill: var(--chart-1); }
.cy-b1 { fill: var(--chart-2); }
.cy-b2 { fill: var(--chart-3); }
.cy-bar.is-partial, .cy-bar.is-sofar { opacity: .45; }
.cy-kb0 i { border-top: 6px solid var(--chart-1); }
.cy-kb1 i { border-top: 6px solid var(--chart-2); }
.cy-kb2 i { border-top: 6px solid var(--chart-3); }
.cy-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); font-size: var(--fs-xs); color: var(--ink-muted); margin-top: 2px; }
.cy-months span { justify-self: center; }
.cy-ptable { font-size: var(--fs-sm); }
.cy-ptable tr.is-current > * { background: var(--info-wash); }

/* ---- motion: once, when the data first arrives (coo-years.js adds .is-entering, then takes it away) ------------------------
   The blocks rise in, staggered; this year's line draws itself (pathLength 1); today's dot pulses once after it; the bars in
   the panel grow. Durations, delays and curves are tokens; styles.css's reduced-motion guard puts every one at its end. The
   rise names .card so it outranks the page's own settled rule (.anim .is-settled .card). */
@keyframes cy-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes cy-pulse { 0% { transform: scale(1); } 45% { transform: scale(1.9); } 100% { transform: scale(1); } }
@keyframes cy-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* the section owns its motion: the page's own first-paint rise (.anim .card) never replays on a block when it is redrawn */
.cy .cy-shop.card { animation: none; }
.anim .cy.is-entering .cy-shop.card { animation: fade-up var(--dur-slow) var(--ease-spring) both; animation-delay: calc(var(--stagger) * var(--i, 0)); }
.cy.is-entering .cy-y0 { stroke-dasharray: 1; stroke-dashoffset: 1; animation: cy-draw var(--dur-count) var(--ease) both;
  animation-delay: calc(var(--dur-slow) + var(--stagger) * var(--i, 0)); }
.cy.is-entering .cy-dot.is-today { transform-box: fill-box; transform-origin: center; animation: cy-pulse var(--dur-slow) var(--ease-spring) both;
  animation-delay: calc(var(--dur-slow) + var(--dur-count) + var(--stagger) * var(--i, 0)); }
.cy-bars .cy-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: cy-grow var(--dur-slow) var(--ease-spring) both;
  animation-delay: calc(var(--stagger) * var(--m, 0) / 2); }

@media (max-width: 640px) {
  .cy-shops { grid-template-columns: minmax(0, 1fr); }
  .cy-stamp { display: none; }
}
