/* footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .875rem; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot nav { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.foot .mono { white-space: nowrap; }
/* Touch: every small control gets a 44px target. Inline links grow their hit area with padding,
   which doesn't move the text. */
@media (pointer: coarse) {
  .btn--sm, .chip, .qty button, .switch { min-height: 44px; }
  .qty button { width: 44px; height: 44px; }
  .seg button { min-height: 44px; }
  .swatches { gap: 10px; }
  .swatch::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
  .crumbs a { padding: 14px 4px; margin: 0 -4px; }
  .foot nav { gap: 0 18px; }
  .foot nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .hero-tab { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .brand { min-height: 44px; }
  .stepper button { min-height: 44px; }
  input[type="range"] { height: 44px; }
  .chart-row { height: 44px; }
  details.tableview summary { padding-block: 12px; }
}
.foot p { margin: 0; }

/* Scroll-linked entrances. At rest every element is in its final, readable state (no script,
   print, link previews, full-page captures). Where the browser has view timelines, items ease in
   during their first 120 pixels on screen, and only then: with no fill mode, an item below the
   fold keeps its final style until it actually starts to enter. The range stays short so an item
   the page comes to rest on, such as the second row of tickets, never sits half faded.
   Each blotter row turns from Pending to Matched while it scrolls into view and is Matched once
   it is fully on screen (entry 100%), so the blotter's "0 breaks outstanding" line, which sits
   below the last row, is never on screen beside a row that still reads Pending. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rv { animation: rv-in linear; animation-timeline: view(); animation-range: entry 0px entry 120px; }
    .match-row { view-timeline-name: --match; }
    .match-link::after { animation: match-draw linear; animation-timeline: --match; animation-range: entry 0% entry 100%; }
    .match-link .is-pending { animation: match-pending linear; animation-timeline: --match; animation-range: entry 0% entry 100%; }
    .match-link .is-matched { animation: match-pill linear; animation-timeline: --match; animation-range: entry 0% entry 100%; }
    .match-row .match-card:last-child { animation: match-card linear; animation-timeline: --match; animation-range: entry 0% entry 100%; }
    .strip { view-timeline-name: --strip; }
    .strip-bar { animation: bar-grow linear; animation-timeline: --strip; animation-range: entry 40px entry 380px; }
    .chart { view-timeline-name: --chart; }
    .chart-row .bar { animation: bar-grow linear; animation-timeline: --chart; animation-range: entry 60px entry 360px; }
  }
}
@keyframes rv-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes match-draw { from { transform: scaleX(0); } 60%, to { transform: scaleX(1); } }
@keyframes match-pending { 0%, 58% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes match-pill { 0%, 60% { opacity: 0; transform: scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes match-card { 0%, 45% { opacity: .42; } 100% { opacity: 1; } }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .hero-panel > * { transition: opacity .2s; transform: none !important; }
  .hero-canvas { transition: opacity .6s; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
@media (forced-colors: active) {
  .pill, .ticket, .blotter, .chip[aria-pressed="true"] { border: 1px solid CanvasText; }
  .chart-row .bar { forced-color-adjust: none; }
}
@media print {
  .masthead, .hero-canvas, .viewer, .demo, .band, .foot, .toc { display: none !important; }
  .page[hidden] { display: block !important; }
  body { background: #fff; color: #000; }
  /* screens print as plain ruled tables: dark grounds are dropped on paper, so their light ink would vanish */
  .screen { --ink: #000; --ink-2: #222; --muted: #444; --line: #bbb; --ok: #0e7346; --ok-soft: transparent; --accent-ink: #b23b0b; }
  .blotter { background: none; border-color: #bbb; box-shadow: none; }
  .blotter-bar { background: none; }
  .match-link .pill { box-shadow: none; }
}
