/* Page styles: /spots/ (spots). Owned by this page's agent. Shared styles live in /assets/css/site.css. */

/* Every widget root carries .spots-w. The page script adds .spots-live while the widget is on
   screen (never under reduced motion). Looping CSS animation is declared only under .spots-live,
   so the base styles are always the complete still state. */
.spots-w:not(.spots-live) *,
.spots-w:not(.spots-live) *::before,
.spots-w:not(.spots-live) *::after { animation-play-state: paused; }

.spots-tagline { max-width: 17em; font-family: var(--font-display); font-size: clamp(1.25rem, 2.3vw, 1.875rem); line-height: 1.1; letter-spacing: 0.01em; color: var(--text); text-wrap: balance; }
.spots-tbc { max-width: 36em; margin-top: 20px; }

/* Small legend: square swatch + word */
.spots-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.6875rem; color: var(--subtle); }
.spots-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.spots-legend i { width: 8px; height: 8px; border: 1px solid var(--panel-line-strong); }
.spots-legend i.is-sold { background: var(--panel-line-strong); }
.spots-legend i.is-new { background: var(--accent); border-color: var(--accent); }
.spots-legend i.is-out { background: var(--text); border-color: var(--text); }

@keyframes spots-blink { 0% { opacity: 1; } 50%, 100% { opacity: 0.25; } }

/* 1. Hero widget: a buy, start to finish -------------------------------------- */

.spots-hero { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin: 0 auto; }
.spots-hero figcaption { color: var(--subtle); }
.spots-buy__body { display: flex; flex-direction: column; gap: 14px; padding: clamp(14px, 2vw, 20px); }
.spots-buy__ask { display: flex; flex-direction: column; gap: 8px; }
.spots-buy__ask .label { color: var(--accent); }
.spots-buy__rest { color: transparent; }
.spots-caret { display: none; width: 8px; height: 1em; margin: 0 1px; vertical-align: -2px; background: var(--accent); }
.spots-buy.is-typing .spots-caret { display: inline-block; }
.spots-live.is-typing .spots-caret { animation: caret 0.8s steps(1) infinite; }
.spots-buy__gridhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.spots-buy__count { font-size: 0.75rem; white-space: nowrap; color: var(--muted); }
.spots-buy__count b { font-family: var(--font-display); font-weight: 400; color: var(--accent); font-variant-numeric: tabular-nums; }

.spots-week { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); gap: 4px; align-items: center; }
.spots-week__d, .spots-week__t { font-family: var(--font-display); font-size: 0.625rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); font-variant-numeric: tabular-nums; }
.spots-week__d { text-align: center; }
.spots-week__d.is-on { color: var(--accent); }
.spots-week__gap { grid-column: 1 / -1; height: 1px; margin-block: 3px; background: var(--panel-line); }
.spots-week i { height: clamp(20px, 2.1vw, 26px); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-week i[data-s='sold'] { background: var(--panel-line-strong); }
.spots-week i[data-s='avail'] { border-color: var(--accent); }
.spots-week i[data-s='prop'] { background: var(--accent-dim); border-color: var(--accent); }
.spots-week i[data-s='booked'] { background: var(--accent); border-color: var(--accent); }

.spots-buy__rules { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius); }
.spots-buy__leds { display: flex; gap: 4px; }
.spots-buy__leds i { width: 8px; height: 8px; background: var(--panel-line-strong); }
.spots-buy__leds i.is-on { background: var(--ok); }
.spots-buy__rules .tag { margin-left: auto; }
.spots-buy__rules .tag:not(.is-on) { visibility: hidden; }
.spots-buy .chip b { font-size: 0.6875rem; }

/* 2. Connection diagram -------------------------------------------------------- */

.spots-mcp__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 16px; border-bottom: 1px solid var(--panel-line); }
.spots-mcp__row { display: flex; align-items: stretch; padding: clamp(20px, 3.4vw, 44px) clamp(14px, 2.4vw, 28px); }
.spots-node { flex: 0 1 200px; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding: 18px 10px; text-align: center; background: var(--panel-raised); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-node > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.spots-node .ico { width: 28px; height: 28px; color: var(--text); }
.spots-node b { font-family: var(--font-display); font-weight: 400; font-size: 0.8125rem; line-height: 1.2; letter-spacing: 0.02em; color: var(--text); }
.spots-node small { font-size: 0.75rem; line-height: 1.35; color: var(--muted); }
.spots-node--self { background: var(--panel-black); border-color: var(--accent-dim); }
.spots-node.is-on { border-color: var(--accent); }
.spots-link { position: relative; flex: 1 1 40px; align-self: center; min-width: 28px; height: 36px; }
.spots-link::before, .spots-link::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--panel-line-strong) 0 4px, transparent 4px 8px); }
.spots-link::before { top: 8px; }
.spots-link::after { bottom: 8px; }
.spots-link i { position: absolute; left: calc(50% - 4px); width: 8px; height: 8px; }
.spots-link__out { top: 5px; background: var(--text); }
.spots-link__back { bottom: 5px; background: var(--accent); }
/* While the script runs the story, a packet shows only on the link it is crossing */
.spots-mcp[data-anim] .spots-link i { opacity: 0; }
.spots-mcp[data-anim] .spots-link.is-out .spots-link__out { opacity: 1; animation: spots-go 0.6s steps(8) both; }
.spots-mcp[data-anim] .spots-link.is-back .spots-link__back { opacity: 1; animation: spots-come 0.6s steps(8) both; }
@keyframes spots-go { from { left: 0; } to { left: calc(100% - 8px); } }
@keyframes spots-come { from { left: calc(100% - 8px); } to { left: 0; } }
@keyframes spots-go-v { from { top: 0; } to { top: calc(100% - 8px); } }
@keyframes spots-come-v { from { top: calc(100% - 8px); } to { top: 0; } }
.spots-mcp__foot { flex-wrap: nowrap; align-items: flex-start; min-height: 46px; }
.spots-mcp__foot .tag { flex: none; min-width: 5.2em; justify-content: center; }
.spots-mcp__msg { min-width: 0; padding-top: 1px; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }

.spots-strips { margin-top: 40px; gap: 40px 24px; }
.spots-strip { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.spots-strip__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.spots-strip__more { color: var(--subtle); border-style: dashed; }

/* 3. Station rules console ----------------------------------------------------- */

.spots-checks { align-self: stretch; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.spots-checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 14px; padding: 13px 0; color: var(--text); border-bottom: 1px solid var(--line); }
.spots-checks .ico { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.spots-say { font-family: var(--font-display); font-size: clamp(1.125rem, 1.2vw + 0.7rem, 1.5rem); line-height: 1.15; color: var(--text); text-wrap: balance; }

.spots-rules__req { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; font-size: 0.8125rem; color: var(--text); border-bottom: 1px solid var(--panel-line); }
.spots-rules__req .label { color: var(--accent); }
.spots-rules__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 12px; list-style: none; }
.spots-rule { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 62px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius); }
.spots-rule__led { width: 8px; height: 8px; background: var(--panel-line-strong); }
.spots-rule__main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.spots-rule__main b { font-size: 0.8125rem; font-weight: 500; color: var(--text); }
.spots-rule__set { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--muted); }
.spots-opt { padding: 2px 6px; font-size: 0.625rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; color: var(--subtle); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-opt.is-on { color: var(--text); background: var(--panel-line-strong); }
.spots-pips { display: inline-flex; gap: 2px; margin-right: 6px; }
.spots-pips i { width: 10px; height: 10px; border: 1px solid var(--panel-line-strong); }
.spots-pips i.is-on { background: var(--muted); border-color: var(--muted); }
.spots-pips i.is-a { background: var(--accent); border-color: var(--accent); }
.spots-rule__act { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.spots-rule__st { visibility: hidden; }
.spots-rule[data-state='check'] { background: var(--panel-raised); border-color: var(--accent-dim); }
.spots-rule[data-state='check'] .spots-rule__led { background: var(--accent); }
.spots-live .spots-rule[data-state='check'] .spots-rule__led { animation: spots-blink 0.3s steps(1) infinite; }
.spots-rule[data-state='ok'] .spots-rule__led, .spots-rule[data-state='approved'] .spots-rule__led { background: var(--ok); }
.spots-rule[data-state='ok'] .spots-rule__st, .spots-rule[data-state='wait'] .spots-rule__st, .spots-rule[data-state='approved'] .spots-rule__st { visibility: visible; }
.spots-rule[data-state='wait'] { background: var(--panel-raised); border-color: var(--warn); }
.spots-rule[data-state='wait'] .spots-rule__led { background: var(--warn); }
.spots-rule[data-state='wait'] .spots-rule__st { color: var(--warn); border-color: var(--warn); }
.spots-rule[data-state='wait'] .spots-rule__key { border-color: var(--accent); }
.spots-live .spots-rule[data-state='wait'] .spots-rule__led { animation: spots-blink 0.85s steps(1) infinite; }
.spots-rule[data-state='approved'] .spots-rule__st { color: var(--ok); border-color: var(--ok); }
.spots-rules__msg { font-size: 0.8125rem; color: var(--muted); }
.spots-rules__msg.is-done { color: var(--accent); }

/* Drawn figures inside cards --------------------------------------------------- */

.spots-figcards .card { gap: 12px; }
.spots-fig { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; height: clamp(184px, 20vw, 224px); min-width: 0; margin-bottom: 8px; padding: 16px; overflow: hidden; background: var(--panel-black); border: 1px solid var(--panel-line); border-radius: var(--radius); }
.spots-fig .label { white-space: nowrap; }
.spots-fig__col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@keyframes spots-turn3 { 0% { opacity: 1; } 34%, 100% { opacity: 0.3; } }

/* dashed line with a square packet stepping along it */
.spots-flow { position: relative; display: block; height: 2px; background: repeating-linear-gradient(90deg, var(--panel-line-strong) 0 4px, transparent 4px 8px); }
.spots-flow i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; background: var(--text); opacity: 0; }
.spots-live .spots-flow i { animation: spots-flow-move 2.8s steps(14) infinite, spots-flow-tone 2.8s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.7s); }
@keyframes spots-flow-move { from { left: 0; } to { left: calc(100% - 8px); } }
@keyframes spots-flow-tone {
  0% { opacity: 0; background: var(--text); }
  8% { opacity: 1; background: var(--text); }
  64% { opacity: 1; background: var(--accent); }
  93%, 100% { opacity: 0; background: var(--accent); }
}
.spots-fig__lines { display: flex; flex-direction: column; gap: 36px; flex: 1 1 40px; min-width: 28px; max-width: 160px; }

/* a booking written into the breaks of the station's log */
.spots-fig--log { gap: 0; }
.spots-fig__box { display: flex; flex-direction: column; gap: 9px; flex: 0 1 150px; min-width: 0; padding: 12px; background: var(--panel-raised); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-fig__brk { display: flex; align-items: center; gap: 3px; height: 32px; padding: 0 7px; background: var(--panel-raised); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-fig__brk i { width: 12px; height: 14px; background: var(--panel-line-strong); }
.spots-fig__brk i.is-new { background: var(--accent); }
.spots-live .spots-fig__brk i.is-new { animation: spots-land 2.8s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.7s); }
@keyframes spots-land { 0% { background: var(--accent); } 10% { background: var(--panel-line-strong); } 93%, 100% { background: var(--accent); } }

/* every kind of buyer through the same door */
.spots-fig--buyers { gap: 0; }
.spots-fig__lines--tight { gap: 32px; }
.spots-fig__chan { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: var(--muted); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-fig__chan i { width: 6px; height: 6px; flex: none; background: var(--accent); }
.spots-live .spots-fig__chan i { animation: spots-turn3 2.1s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.7s - 2.1s); }
.spots-fig__self { display: flex; align-items: center; justify-content: center; flex: none; width: 64px; height: 64px; color: var(--text); background: var(--panel-raised); border: 1px solid var(--accent-dim); border-radius: var(--radius); }

/* what the station keeps */
.spots-fig--keep { flex-direction: column; align-items: stretch; gap: 8px; }
.spots-fig__keep { display: grid; grid-template-columns: auto minmax(12px, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px; background: var(--panel-raised); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-fig__keep .label { overflow: hidden; text-overflow: ellipsis; }
.spots-live .spots-fig__keep .tag { animation: spots-turn3 2.4s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.8s - 2.4s); }

/* free slots found and booked */
.spots-fig--inventory { flex-direction: column; align-items: stretch; gap: 10px; }
.spots-fig__lane { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); align-items: center; gap: 10px; }
.spots-fig__cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.spots-fig__cells i { height: 24px; border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-fig__cells i.is-sold { background: var(--panel-line-strong); }
.spots-fig__cells i.is-new { background: var(--accent); border-color: var(--accent); }
.spots-live .spots-fig__cells i.is-new { animation: spots-find 3.4s steps(1) infinite; animation-delay: calc(var(--i, 0) * -1.7s); }
@keyframes spots-find {
  0% { background: transparent; border-color: var(--panel-line-strong); }
  15% { background: transparent; border-color: var(--accent); }
  35% { background: var(--accent-dim); border-color: var(--accent); }
  50%, 100% { background: var(--accent); border-color: var(--accent); }
}
.spots-fig--inventory .spots-legend { margin-top: 4px; }

/* 4. Managing a booking: one day's breaks as a lane ---------------------------- */

.spots-fig--lane { flex-direction: column; align-items: stretch; gap: 8px; }
.spots-lane { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); align-items: center; gap: 8px; }
.spots-cells { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin-top: 10px; }
.spots-cells i { position: relative; height: 38px; border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.spots-cells i.is-sold { background: var(--panel-line-strong); }
.spots-times { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.spots-times em { overflow: hidden; font-family: var(--font-display); font-size: 0.5625rem; font-style: normal; letter-spacing: 0; text-align: center; white-space: nowrap; color: var(--subtle); font-variant-numeric: tabular-nums; }
.spots-fig__state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 22px; margin-top: 8px; }
.spots-fig__state .push { margin-left: auto; }
.spots-arrow { position: relative; flex: none; width: 14px; height: 2px; background: var(--subtle); }
.spots-arrow::after { content: ''; position: absolute; right: 0; top: -2px; width: 6px; height: 6px; background: var(--subtle); }
.spots-live .spots-fig__done { animation: spots-late 5.1s steps(1, end) infinite; }
@keyframes spots-late { 0% { opacity: 0; } 54%, 100% { opacity: 1; } }

/* move: the block lifts, steps across three breaks and sets down */
.spots-cells i.is-from { border-style: dashed; border-color: var(--accent-dim); }
.spots-mover { position: absolute; top: 0; bottom: 0; left: calc(4 * (100% + 3px) / 6); width: calc((100% - 15px) / 6); background: var(--accent); border-radius: var(--radius); }
.spots-live .spots-mover { animation: spots-move 5.1s steps(1, end) infinite; }
@keyframes spots-move {
  0% { left: calc(1 * (100% + 3px) / 6); transform: none; }
  18% { left: calc(1 * (100% + 3px) / 6); transform: translateY(-8px); }
  27% { left: calc(2 * (100% + 3px) / 6); transform: translateY(-8px); }
  36% { left: calc(3 * (100% + 3px) / 6); transform: translateY(-8px); }
  45% { left: calc(4 * (100% + 3px) / 6); transform: translateY(-8px); }
  54%, 100% { left: calc(4 * (100% + 3px) / 6); transform: none; }
}

/* cancel: the block blinks out and the slot is free again */
.spots-cells i.is-cancel { border-style: dashed; border-color: var(--accent-dim); }
.spots-live .spots-cells i.is-cancel { animation: spots-cancel 5.1s steps(1, end) infinite; }
@keyframes spots-cancel {
  0%, 36%, 48% { background: var(--accent); border-color: var(--accent); border-style: solid; }
  30%, 42% { background: transparent; border-color: var(--accent); border-style: solid; }
  54%, 100% { background: transparent; border-color: var(--accent-dim); border-style: dashed; }
}

/* make-good: a spot is missed, then placed again in a later break */
.spots-cells i.is-missed { border-color: var(--error); }
.spots-cells i.is-missed::after { content: ''; position: absolute; inset: 0; width: 10px; height: 2px; margin: auto; background: var(--error); }
.spots-cells i.is-good { background: var(--accent); border-color: var(--accent); }
.spots-fig__miss { color: var(--error); border-color: var(--error); }
.spots-live .spots-cells i.is-missed { animation: spots-miss 5.1s steps(1, end) infinite; }
.spots-live .spots-cells i.is-missed::after, .spots-live .spots-fig__miss, .spots-live .spots-fig--good .spots-arrow { animation: spots-miss-mark 5.1s steps(1, end) infinite; }
.spots-live .spots-cells i.is-good { animation: spots-good 5.1s steps(1, end) infinite; }
@keyframes spots-miss { 0% { background: var(--accent); border-color: var(--accent); } 22%, 100% { background: transparent; border-color: var(--error); } }
@keyframes spots-miss-mark { 0% { opacity: 0; } 22%, 100% { opacity: 1; } }
@keyframes spots-good {
  0% { background: transparent; border-color: var(--panel-line-strong); }
  40% { background: transparent; border-color: var(--accent); }
  47% { background: var(--accent-dim); border-color: var(--accent); }
  54%, 100% { background: var(--accent); border-color: var(--accent); }
}

/* 5. The ad break on air -------------------------------------------------------- */

.spots-break { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr); gap: clamp(28px, 4.5vw, 58px); align-items: center; }
.spots-steps { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.spots-steps > li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 16px; border: 1px solid transparent; border-radius: var(--radius); opacity: 0.6; transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.spots-steps > li > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.spots-steps > li.is-active { opacity: 1; background: var(--panel); border-color: var(--panel-line-strong); }
.spots-steps > li.is-active .chain__n { color: var(--bg); background: var(--text); border-color: var(--text); }

.spots-log { min-width: 0; }
.spots-log__rows { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.spots-log__row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 30px 112px; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; font-size: 0.8125rem; background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius); transition: border-color 0.15s ease, background 0.15s ease; }
.spots-log__t, .spots-log__len { font-family: var(--font-display); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--subtle); font-variant-numeric: tabular-nums; }
.spots-log__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text); }
.spots-log__status { position: relative; display: flex; align-items: center; justify-content: flex-end; height: 18px; min-width: 0; }
.spots-log__row[data-state='seen'], .spots-log__row[data-state='dl'], .spots-log__row[data-state='done'] { border-color: var(--accent-dim); }
.spots-log__row[data-state='air'] { background: var(--panel-raised); border-color: var(--text); box-shadow: inset 3px 0 0 var(--onair); }
.spots-log__segs { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; visibility: hidden; }
.spots-log__segs i { flex: 1; height: 8px; background: var(--panel-line-strong); transition: background 0s linear 0s; }
.spots-log__row[data-state='dl'] .spots-log__segs { visibility: visible; }
.spots-log__row[data-state='dl'] .spots-log__segs i { background: var(--accent); transition-delay: calc(var(--n, 0) * 36ms); }
.spots-log__wave { position: absolute; inset: 0; display: none; align-items: center; gap: 2px; }
.spots-log__wave i { flex: 1; height: 100%; background: var(--text); transform: scaleY(0.5); }
.spots-log__wave i:nth-child(even) { transform: scaleY(0.8); }
.spots-log__row[data-state='air'] .spots-log__wave { display: flex; }
.spots-live .spots-log__row[data-state='air'] .spots-log__wave i { animation: spots-flick-a 0.5s steps(1) infinite; }
.spots-live .spots-log__row[data-state='air'] .spots-log__wave i:nth-child(even) { animation-name: spots-flick-b; }
.spots-live .spots-log__row[data-state='air'] .spots-log__wave i:nth-child(3n) { animation-delay: -0.12s; }
@keyframes spots-flick-a { 0% { transform: scaleY(1); } 50% { transform: scaleY(0.35); } }
@keyframes spots-flick-b { 0% { transform: scaleY(0.3); } 50% { transform: scaleY(0.85); } }
.spots-log__aired { display: none; font-family: var(--font-display); font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: var(--accent); }
.spots-log__row[data-state='done'] .spots-log__aired { display: inline; }
.spots-log__scan { position: absolute; left: 4px; right: 4px; top: 0; height: 2px; background: var(--accent); opacity: 0; pointer-events: none; transition: top 0.4s steps(5), opacity 0.2s steps(2); }
.spots-log__scan::before, .spots-log__scan::after { content: ''; position: absolute; top: -2px; width: 6px; height: 6px; background: var(--accent); }
.spots-log__scan::before { left: 0; }
.spots-log__scan::after { right: 0; }
.spots-log__scan.is-on { opacity: 1; }
.spots-log__msg { font-size: 0.8125rem; color: var(--muted); }
.spots-log__msg.is-done { color: var(--accent); }
.spots-log__pill { opacity: 0; transform: translateX(-10px); transition: opacity 0.3s steps(3), transform 0.4s steps(4); }
.spots-log__pill.is-on { opacity: 1; transform: none; }

/* 6. Reporting ------------------------------------------------------------------ */

.spots-report__cols, .spots-report__row { display: grid; grid-template-columns: 40px 56px minmax(0, 1fr); align-items: center; gap: 10px; }
.spots-report__cols { padding: 10px 22px 0; font-size: 0.625rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); }
.spots-report__cols span:last-child, .spots-report__a { justify-self: end; }
.spots-report__rows { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 12px; }
.spots-report__row { min-height: 40px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius); }
.spots-report__d, .spots-report__b, .spots-report__a { font-family: var(--font-display); font-size: 0.6875rem; letter-spacing: 0.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.spots-report__d { color: var(--text); }
.spots-report__b { color: var(--subtle); }
.spots-report__a { color: var(--accent); }
.spots-report__row[data-state='idle'] { opacity: 0.4; }
.spots-report__row[data-state='idle'] .spots-report__a { visibility: hidden; }
.spots-report__row[data-state='done'] { border-color: var(--accent-dim); }
.spots-report__row.is-missed .spots-report__a { color: var(--error); }
.spots-report__row.is-missed[data-state='done'] { border-color: var(--panel-line-strong); }
.spots-report__sum { font-size: 0.8125rem; color: var(--muted); }
.spots-report__sum.is-done { color: var(--accent); }
.spots-report__to { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spots-report__dest { font-size: 0.75rem; color: var(--subtle); }
.spots-report__send { display: inline-flex; gap: 3px; }
.spots-report__send i { width: 6px; height: 6px; background: var(--panel-line-strong); }
.spots-report__send.is-sent i { background: var(--accent); }
.spots-live .spots-report__send.is-sending i { animation: spots-chase 0.6s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.2s - 0.6s); }
@keyframes spots-chase { 0% { background: var(--accent); } 34%, 100% { background: var(--panel-line-strong); } }
.spots-report__pill:not(.is-on) { visibility: hidden; }

/* 7. Chain: product tags that link to their pages -------------------------------- */

.spots-chain a.chain__tag { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.spots-chain a.chain__tag:hover { color: var(--text); }

/* Below 900px the shared chain drops its thread and pulses. Here the chain becomes one
   column with a connector between steps and a block that is handed down step by step. */
@media (max-width: 900px) {
  .spots-break { grid-template-columns: minmax(0, 1fr); }
  .spots-fig { height: 200px; }
  .spots-chain { grid-template-columns: minmax(0, 1fr); row-gap: 0; max-width: 34rem; margin-inline: auto; }
  .spots-chain .chain__step { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 18px; row-gap: 6px; align-items: start; justify-items: start; padding-bottom: 40px; text-align: left; }
  .spots-chain .chain__step:nth-child(4) { padding-bottom: 0; }
  .spots-chain .chain__n { grid-row: 1 / span 3; }
  .spots-chain .chain__body { max-width: none; }
  .spots-chain .chain__step:nth-child(-n+3)::before { content: ''; position: absolute; left: 23px; top: 52px; bottom: 4px; width: 2px; background: var(--panel-line-strong); }
  .spots-chain .chain__step:nth-child(-n+3)::after { content: ''; position: absolute; left: 20px; bottom: 4px; width: 8px; height: 8px; background: var(--accent); }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .spots-chain.is-on .chain__step:nth-child(-n+3)::after { animation: spots-hand 3.6s steps(10) infinite; animation-delay: -3.6s; }
  .spots-chain.is-on .chain__step:nth-child(2)::after { animation-delay: -2.4s; }
  .spots-chain.is-on .chain__step:nth-child(3)::after { animation-delay: -1.2s; }
}
@keyframes spots-hand {
  0% { bottom: calc(100% - 62px); opacity: 1; }
  33% { bottom: 4px; opacity: 1; }
  34%, 100% { bottom: 4px; opacity: 0.25; }
}

/* Connection diagram stands upright on narrow screens */
@media (max-width: 900px) {
  .spots-mcp__row { flex-direction: column; align-items: stretch; max-width: 26rem; margin-inline: auto; }
  .spots-node { flex: none; flex-direction: row; gap: 14px; padding: 12px 14px; text-align: left; }
  .spots-link { flex: none; align-self: center; width: 40px; height: 34px; min-width: 0; }
  .spots-link::before, .spots-link::after { top: 0; bottom: 0; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--panel-line-strong) 0 4px, transparent 4px 8px); }
  .spots-link::before { left: 8px; }
  .spots-link::after { left: auto; right: 8px; }
  .spots-link i { top: calc(50% - 4px); }
  .spots-link .spots-link__out { left: 5px; }
  .spots-link .spots-link__back { left: auto; right: 5px; bottom: auto; }
  .spots-mcp[data-anim] .spots-link.is-out .spots-link__out { animation-name: spots-go-v; }
  .spots-mcp[data-anim] .spots-link.is-back .spots-link__back { animation-name: spots-come-v; }
}

@media (max-width: 520px) {
  .spots-log__row { grid-template-columns: 62px minmax(0, 1fr) 30px; }
  .spots-log__status { grid-column: 1 / -1; justify-content: flex-start; }
  .spots-log__name { white-space: normal; }
  .spots-fig { padding: 12px; }
  .spots-fig__box { flex-basis: 110px; }
  .spots-rule__act { flex-direction: column-reverse; align-items: flex-end; gap: 6px; }
  .spots-week { grid-template-columns: 40px repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .spots-flow i { display: none; }
}
@media (max-width: 420px) {
  .spots-buy .panel__bar .tag, .spots-report .panel__bar .tag { display: none; }
  .spots-report .panel__foot > .spots-report__to { width: 100%; margin-left: 0; }
}

/* Roadmap list */
.spots-road { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.spots-road li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: baseline; color: var(--muted); }
.spots-road .tag { justify-self: start; }
.spots-steps code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; color: var(--accent); }
