/* Cobotic ticket animations: hero ticket, race, scroll timeline, ticket split. Driven by anim.js. Tokens from styles.css. */
.tk-ic { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: background .25s, border-color .25s; }
.tk-ic svg { width: 10px; height: 10px; opacity: 0; }
.tk-done > .tk-ic svg { opacity: 1; }
.tk-done > .tk-ic { background: var(--accent); border-color: var(--accent); animation: tk-pop .45s cubic-bezier(.34,1.8,.64,1); }
@keyframes tk-pop { from { transform: scale(.6); } to { transform: scale(1); } }
.tk-num { font-variant-numeric: tabular-nums; }
.tk-replay { font: inherit; font-size: .9rem; font-weight: 600; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px 14px; cursor: pointer; }
.tk-replay:hover { border-color: var(--accent); }

/* 1. Hero ticket */
.hero-ticket { align-self: center; }
.tk-card { border: 1px solid var(--line); border-radius: var(--r-media); background: #fff; box-shadow: 0 1px 2px rgba(11,31,42,.04), 0 24px 48px -24px rgba(11,31,42,.18); overflow: hidden; transition: opacity .4s; }
.tk-card.tk-fade { opacity: 0; }
.tk-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.tk-clock { font-weight: 600; color: var(--ink); }
.tk-bar { height: 3px; background: var(--line); }
.tk-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.tk-body { padding: 16px 20px 4px; }
.tk-title { display: grid; color: var(--ink); font-weight: 600; font-size: 1.1rem; line-height: 1.3; letter-spacing: -.015em; }
.tk-title > span { grid-area: 1 / 1; transition: opacity .4s; }
.tk-title .tk-raw { color: var(--muted); font-weight: 500; }
.tk-title .tk-clean { opacity: 0; }
.tk-clean-on .tk-raw { opacity: 0; }
.tk-clean-on .tk-clean { opacity: 1; }
.tk-fields { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.tk-field { display: inline-flex; gap: 6px; font-size: .8rem; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 3px 10px; color: var(--muted); white-space: nowrap; transition: background .3s, border-color .3s; }
.tk-field b { font-weight: 600; color: var(--ink); }
.tk-field s { color: var(--muted); font-weight: 500; }
.tk-field.tk-set { border-color: var(--accent); background: var(--tint); }
.tk-jobs { list-style: none; margin: 10px 0 0; padding: 12px 20px 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.tk-jobs li { display: flex; gap: 8px; align-items: center; font-size: .84rem; line-height: 1.3; color: var(--ink); }
@media (min-width: 901px) {
  .tk-jobs { grid-template-columns: 1fr; gap: 3px; padding-top: 10px; padding-bottom: 12px; }
  .tk-jobs li { white-space: nowrap; }
  .hero-ticket .tk-title { min-height: 2.6em; }
  .hero-ticket .tk-fields { min-height: 66px; align-content: flex-start; }
}
.tk-jobs.tk-moments { grid-template-columns: 1fr; gap: 10px; padding-top: 14px; padding-bottom: 16px; }
.tk-moments li { font-size: .95rem; font-weight: 500; white-space: normal; }
.tk-m-name { flex: 1; }
.tk-m-n { color: var(--muted); font-size: .85rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-done > .tk-m-n { color: var(--accent-strong); }
.tk-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--tint); font-size: .9rem; font-weight: 600; color: var(--ink); }

/* 2. Race */
.tk-race { padding: 0 0 clamp(80px, 10vw, 140px); }
.tk-race h2 { max-width: 18ch; margin-bottom: clamp(32px, 5vw, 56px); }
.tk-lane { margin-bottom: clamp(36px, 5vw, 52px); }
.tk-lane-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 24px; margin-bottom: 14px; }
.tk-lane-name { display: block; color: var(--ink); font-weight: 600; font-size: 1.15rem; letter-spacing: -.015em; }
.tk-lane-stat { display: block; color: var(--muted); font-size: .95rem; }
.tk-with .tk-lane-stat { color: var(--accent); font-weight: 600; }
.tk-figs { display: flex; align-items: baseline; gap: clamp(16px, 3vw, 32px); }
.tk-fig { display: inline-block; min-width: 4em; font-weight: 600; color: var(--ink); letter-spacing: -.03em; line-height: 1; font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
.tk-fig.tk-time { min-width: 3.6em; text-align: right; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.5rem); }
.tk-with .tk-fig.tk-cost { color: var(--accent); }
.tk-track { position: relative; height: 44px; border-radius: var(--r-ctl); background: #F4F6F7; overflow: hidden; }
.tk-seg { position: absolute; top: 0; bottom: 0; width: 0; overflow: hidden; }
.tk-seg.tk-wait { background: repeating-linear-gradient(-45deg, #E3E8EA 0 6px, #EEF1F2 6px 12px); }
.tk-seg.tk-work { background: #C9D1D5; box-shadow: inset -2px 0 #fff; }
.tk-seg.tk-alt { background: #AEB8BE; }
.tk-seg span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: .78rem; font-weight: 500; color: var(--ink); white-space: nowrap; }
.tk-ai { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); opacity: 0; }
.tk-flag { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: .88rem; font-weight: 600; color: var(--accent); white-space: nowrap; opacity: 0; transition: opacity .5s; }
.tk-head-line { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--ink); }
.tk-axis { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.tk-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; padding: 4px 10px; border-radius: var(--r-ctl); border: 1px solid var(--line); color: var(--muted); transition: color .3s, border-color .3s, background .3s; }
.tk-chip svg { width: 12px; height: 12px; visibility: hidden; }
.tk-chip.tk-done { color: var(--ink); border-color: #AEB8BE; }
.tk-chip.tk-done svg { visibility: visible; }
.tk-with .tk-chip.tk-done { border-color: var(--accent); background: var(--tint); }
.tk-chip.tk-never { text-decoration: line-through; border-style: dashed; }
@media (max-width: 600px) { .tk-seg span { display: none; } .tk-track { height: 36px; } .tk-lane-top { flex-direction: column; align-items: flex-start; } .tk-fig.tk-time { text-align: left; } }

/* 3. Scroll timeline */
.tk-tl { padding: 0 0 clamp(64px, 8vw, 104px); }
.tk-tl-head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); padding-top: 32px; border-top: 1px solid var(--line); max-width: 24ch; }
.tk-tl-head p { margin-top: 12px; max-width: 52ch; }
.tk-score { position: sticky; top: 68px; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); margin-top: 28px; }
.tk-grid { display: grid; grid-template-columns: 92px 1fr 1fr; gap: clamp(12px, 3vw, 32px); }
.tk-score .tk-grid { padding-top: 12px; padding-bottom: 12px; align-items: center; }
.tk-now { font-weight: 600; color: var(--ink); }
.tk-side-name { display: block; color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.3; }
.tk-side-cost { display: block; font-weight: 600; color: var(--ink); font-size: clamp(1.2rem, 2.6vw, 1.7rem); letter-spacing: -.03em; line-height: 1.15; }
.tk-side-count { display: block; font-size: .85rem; color: var(--muted); }
.tk-sw .tk-side-cost, .tk-sw .tk-side-count { color: var(--accent); }
.tk-sw .tk-side-count { font-weight: 600; }
.tk-meter { height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.tk-meter i { display: block; height: 100%; width: 0; background: #AEB8BE; transition: width .4s var(--ease); }
.tk-sw .tk-meter i { background: var(--accent); }
.tk-rows { position: relative; padding: 16px 0 8vh; }
.tk-rail { position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tk-rail i { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--ink); }
.tk-row { padding: clamp(24px, 5vh, 48px) 0; }
.tk-t { position: relative; padding-left: 24px; font-weight: 600; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.tk-t::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--line); transition: background .3s, border-color .3s; }
.tk-cell { font-size: 1rem; line-height: 1.5; color: var(--muted); opacity: .28; transform: translateY(8px); transition: opacity .45s, transform .45s var(--ease); }
.tk-cell b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.tk-cell.tk-w b { color: var(--accent); }
.tk-on .tk-cell { opacity: 1; transform: none; }
.tk-on .tk-t { color: var(--ink); }
.tk-on .tk-t::before { background: var(--ink); border-color: var(--ink); }
.tk-on.tk-airow .tk-t::before { background: var(--accent); border-color: var(--accent); }
.tk-tag { display: inline-block; margin-top: 8px; font-size: .8rem; font-weight: 600; color: var(--accent); background: var(--tint); border-radius: var(--r-ctl); padding: 3px 10px; }
@media (max-width: 600px) {
  .tk-grid { grid-template-columns: 64px 1fr 1fr; gap: 12px; }
  .tk-t { font-size: .72rem; padding-left: 20px; }
  .tk-t::before { width: 12px; height: 12px; left: 1px; }
  .tk-cell { font-size: .86rem; }
  .tk-side-name { font-size: .8rem; }
  .tk-side-cost { font-size: 1.1rem; }
  .tk-side-count { font-size: .75rem; }
}

/* 4. Ticket split */
.tk-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 32px); align-items: start; margin-top: 28px; }
.tk-side-label { font-weight: 600; color: var(--ink); font-size: 1.05rem; margin: 0 0 10px; transition: opacity .5s; }
.tk-scard { border: 1px solid var(--line); border-radius: var(--r-media); background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(11,31,42,.04), 0 24px 48px -28px rgba(11,31,42,.2); transition: filter .8s, background .8s; }
.tk-scard .tk-head { padding: 12px 18px; font-size: .82rem; }
.tk-badge { font-weight: 600; color: var(--ink); white-space: nowrap; }
.tk-scard .tk-title { padding: 12px 18px 10px; font-size: 1.02rem; }
.tk-list { list-style: none; margin: 0; padding: 0; }
.tk-list li { display: flex; align-items: center; gap: 10px; padding: 7px 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink); }
.tk-list .tk-n { flex: 1; }
.tk-list .tk-st { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.tk-man li.tk-done > .tk-ic { background: #AEB8BE; border-color: #AEB8BE; }
.tk-man li.tk-never { color: var(--muted); }
.tk-man li.tk-never .tk-n { text-decoration: line-through; }
.tk-man li.tk-never > .tk-ic { border-style: dashed; }
.tk-sfoot { padding: 12px 18px; font-size: .88rem; font-weight: 600; border-top: 1px solid var(--line); }
.tk-man .tk-sfoot { background: #F4F6F7; color: var(--muted); }
.tk-aic .tk-sfoot { background: var(--tint); color: var(--ink); }
.tk-man.tk-aged { filter: grayscale(1); background: #FAFAF8; }
.tk-split .tk-replay { margin-top: 24px; }
@media (max-width: 720px) { .tk-pair { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .tk-list li { padding: 7px 14px; font-size: .86rem; } .tk-scard .tk-head, .tk-scard .tk-title, .tk-sfoot { padding-left: 14px; padding-right: 14px; } }

@media (max-width: 520px) {
  .tk-head, .tk-body, .tk-foot { padding-left: 16px; padding-right: 16px; }
  .tk-jobs { padding: 12px 16px 14px; gap: 8px 12px; }
  .tk-jobs li { font-size: .78rem; gap: 6px; }
  .tk-jobs .tk-ic { width: 16px; height: 16px; }
}
@media (max-width: 560px) {
  .hero:has(#tk-hero) { padding-top: 20px; }
  .hero:has(#tk-hero) .wrap { gap: 24px; }
  .hero:has(#tk-hero) h1 { font-size: 2.3rem; }
  .hero:has(#tk-hero) .hero-copy p { font-size: 1.05rem; line-height: 1.5; margin-top: 14px; }
  .hero:has(#tk-hero) .hero-copy .hero-price { margin-top: 10px; }
  .hero:has(#tk-hero) .hero-actions { margin-top: 18px; gap: 12px; }
  .tk-jobs.tk-moments { gap: 6px; padding-top: 10px; padding-bottom: 12px; }
  .tk-foot { padding-top: 10px; padding-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-card, .tk-cell, .tk-meter i, .tk-scard, .tk-title > span, .tk-flag { transition: none; }
  .tk-done > .tk-ic { animation: none; }
}
