/* Till page. Palette, type and motif: briefs/till.md "Design". Dark register: green-black page, brass strokes, lifecycle dots. */

:root {
  --bg: #011A14; --panel: #0C251D; --ink: #F2EFE8; --muted: #A9B8B0; --rule: rgba(158, 129, 80, 0.45);
  --brass: #9E8150; --hi: #D8B56A; --green: #356555; --slot: #0A0F0D;
  --l-trial: #7CC4F0; --l-active: #E9C46A; --l-due: #F28B9B; --l-rec: #8FE0B0; --l-cancel: #F26B5E;
  --lk-bg: var(--bg); --lk-panel: var(--panel); --lk-ink: var(--ink); --lk-muted: var(--muted); --lk-line: var(--rule);
  --lk-main: var(--hi); --lk-on-main: var(--bg); --lk-link: var(--hi); --lk-focus: var(--hi); --lk-accent: var(--hi);
  --lk-font-display: "Tenor Sans", "Jost", system-ui, sans-serif;
  --lk-font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lk-radius: 4px; --lk-max: 1120px; --lk-gutter: 16px;
  --gut: clamp(16px, 5.56vw, 80px);
  color-scheme: dark;
}
body { font: 400 18px/1.6 var(--lk-font-body); font-variant-numeric: tabular-nums; background: var(--bg); color: var(--ink); }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; border-radius: 4px; }
a { color: var(--hi); }
a:hover { color: var(--ink); }
code { font: 500 0.88em/1.4 var(--lk-font-mono); }
::selection { background: var(--hi); color: var(--bg); }

/* ---------- Hero (desktop: positions are percentages of the whole hero box) ---------- */
.tl-hero { position: relative; overflow: hidden; max-width: 1440px; margin-inline: auto; min-height: clamp(760px, calc(100svh - var(--lk-bar)), 820px); }
.tl-hero > * { position: absolute; }
.tl-arcs { left: 47%; top: -26%; width: 1px; height: 1px; overflow: visible; fill: none; stroke: var(--brass); stroke-opacity: 0.6; stroke-width: 1; pointer-events: none; }
.tl-dots { width: 58px; height: 58px; fill: var(--brass); pointer-events: none; }
.tl-dots--a { left: 29%; top: 18%; }
.tl-dots--b { left: 89%; top: 50%; }

.tl-h1 { position: static; font-weight: 400; }
.tl-name, .tl-headline, .tl-one, .tl-ledger { z-index: 2; }
.tl-name { position: absolute; left: var(--gut); top: 7%; display: flex; align-items: center; gap: 12px; font: 400 26px/1 var(--lk-font-display); color: var(--hi); }
.tl-tick { width: 22px; height: 22px; fill: none; stroke: var(--brass); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tl-headline { position: absolute; left: var(--gut); top: 17%; display: block; max-width: 6.2em; font: 400 clamp(56px, 6.667vw, 96px)/0.92 var(--lk-font-display); letter-spacing: -0.01em; color: var(--ink); }
.tl-one { left: var(--gut); top: 63%; width: calc(31% - var(--gut)); font: 500 20px/1.45 var(--lk-font-body); color: var(--ink); text-wrap: balance; }

.tl-ledger { left: var(--gut); top: 76%; width: calc(31% - var(--gut)); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; list-style: none; }
.tl-cat { display: block; white-space: normal; font: 500 14px/1.35 var(--lk-font-body); color: var(--ink); text-decoration: none; }
.tl-cat::before { content: ""; display: block; width: 20px; height: 2px; margin-bottom: 10px; background: var(--brass); transition: width 0.2s ease, background-color 0.2s ease; }
.tl-cat:hover, .tl-cat:focus-visible { color: var(--ink); }
.tl-cat:hover::before, .tl-cat:focus-visible::before { width: 34px; background: var(--hi); }

/* Plate: raster till, bottom-centre, cut by the hero bottom, edges melting into the page */
.tl-plate { left: 19%; width: 64%; bottom: 0; aspect-ratio: 16 / 9; z-index: 0; pointer-events: none;
  --slot-x: 33.3%; --slot-y: 86.6%; --slot-w: 14.8%; --slot-h: 6%;
  -webkit-mask-image: radial-gradient(70% 80% at 50% 70%, #000 50%, transparent 71%); mask-image: radial-gradient(70% 80% at 50% 70%, #000 50%, transparent 71%); }
.tl-plate picture, .tl-plate img { display: block; width: 100%; height: 100%; }
/* Code till (SVG): shown once JS runs with motion allowed; the raster plate stays for no-JS, reduced motion and sharing */
.tl-till { display: none; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl-brush { mix-blend-mode: overlay; opacity: 0.22; }
.tl-live .tl-plate { -webkit-mask-image: none; mask-image: none; --slot-x: 26.25%; --slot-y: 83.33%; --slot-w: 23.44%; --slot-h: 5.22%; }
.tl-live .tl-plate picture { display: none; }
.tl-live .tl-till { display: block; animation: tl-rise 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.tl-live .tl-shaft { animation: tl-drift 9s ease-in-out 900ms infinite alternate; }
@keyframes tl-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes tl-drift { from { transform: translateX(-40px); } to { transform: translateX(70px); } }
.tl-drawer { position: absolute; left: var(--slot-x); top: calc(var(--slot-y) - var(--slot-h) * 0.5854); width: var(--slot-w); height: calc(var(--slot-h) * 1.6585);
  overflow: visible; transform-origin: 50% 60%; transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.tl-drawer-top { fill: var(--panel); stroke: var(--hi); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 300ms ease; }
.tl-drawer-front { fill: var(--slot); stroke: var(--hi); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.tl-hero:has(.tl-btn:hover, .tl-btn:focus-visible) .tl-drawer, .tl-hero.tl-out .tl-drawer { transform: translateY(22px) scale(1.06); transition-duration: 420ms; }
.tl-hero:has(.tl-btn:hover, .tl-btn:focus-visible) .tl-drawer-top, .tl-hero.tl-out .tl-drawer-top { opacity: 1; transition-duration: 420ms; }

/* Lifecycle */
.tl-life-title { left: 57%; width: 40%; top: 19%; text-align: center; font: 600 17px/1.3 var(--lk-font-body); color: var(--ink); z-index: 2; }
.tl-line { left: 57%; width: 40%; top: 26%; height: 84px; z-index: 2; }
.tl-steps { list-style: none; }
.tl-s0 { --c: var(--l-trial); --i: 0; --d: 0ms; }
.tl-s1 { --c: var(--l-active); --i: 1; --d: 450ms; }
.tl-s2 { --c: var(--l-due); --i: 2; --d: 900ms; }
.tl-s3 { --c: var(--l-rec); --i: 3; --d: 1760ms; }
.tl-s4 { --c: var(--l-cancel); --i: 4; --d: 1760ms; }
.tl-step { position: absolute; top: 0; left: calc(6px + var(--i) * (20% - 1.2px)); height: 20px; }
.tl-dot { position: absolute; left: -5px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent); }
.tl-lab { position: absolute; left: 14px; top: 0; white-space: nowrap; font: 500 14px/20px var(--lk-font-body); color: var(--c); }
.tl-conn { position: absolute; left: 6px; right: 0; top: 28px; height: 48px; }
.tl-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--muted); stroke-opacity: 0.5; stroke-width: 1; }
.tl-p { vector-effect: non-scaling-stroke; clip-path: inset(-2px -2px -2px -2px); }
.tl-chev { position: absolute; display: block; width: 6px; height: 6px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); }
.tl-chev--r { transform: translate(-5px, -3px) rotate(45deg); }
.tl-chev--u { transform: translate(-3px, -1px) rotate(-45deg); }
.tl-ch1 { left: 20%; top: 22px; }
.tl-ch2 { left: 38%; top: 22px; }
.tl-ch3 { left: 60%; top: 8px; }
.tl-ch4 { left: 80%; top: 8px; }
.tl-replay { position: absolute; right: 0; top: 68px; padding: 2px 4px; border: 0; background: none; color: var(--muted); font: 400 13px/1.4 var(--lk-font-body); }
.tl-replay:hover { color: var(--ink); }
.tl-replay:focus-visible { outline-offset: 3px; }

/* States: dim before the intro, lit afterwards. Without JavaScript the lit state is the default. */
.tl-pre .tl-dot { opacity: 0.3; transform: scale(0.8); box-shadow: 0 0 0 0 transparent; }
.tl-pre .tl-lab { color: var(--muted); }
.tl-pre .tl-p { clip-path: inset(-2px 100% -2px -2px); }
.tl-pre .tl-chev { opacity: 0; }
.tl-play .tl-dot { animation: tl-lit 360ms ease-out var(--d) both; }
.tl-play .tl-lab { animation: tl-lab 360ms ease-out var(--d) both; }
.tl-play .tl-p { animation: tl-draw 400ms cubic-bezier(0.4, 0, 0.2, 1) var(--pd, 0ms) both; }
.tl-play .tl-p1 { --pd: 50ms; }
.tl-play .tl-p2 { --pd: 500ms; }
.tl-play .tl-p3, .tl-play .tl-p4 { --pd: 1260ms; animation-duration: 500ms; }
.tl-play .tl-chev { animation: tl-show 120ms linear var(--cd, 0ms) both; }
.tl-play .tl-ch1 { --cd: 420ms; }
.tl-play .tl-ch2 { --cd: 880ms; }
.tl-play .tl-ch3, .tl-play .tl-ch4 { --cd: 1700ms; }
@keyframes tl-lit { from { opacity: 0.3; transform: scale(0.8); box-shadow: 0 0 0 0 transparent; } to { opacity: 1; transform: scale(1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent); } }
@keyframes tl-lab { from { color: var(--muted); } to { color: var(--c); } }
@keyframes tl-draw { from { clip-path: inset(-2px 100% -2px -2px); } to { clip-path: inset(-2px -2px -2px -2px); } }
@keyframes tl-show { from { opacity: 0; } to { opacity: 1; } }

/* Copy button */
.tl-cta { left: 57%; width: 40%; top: 38%; display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 2; }
.tl-btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 28px; border: 1.5px solid var(--hi); border-radius: 3px; background: transparent; color: var(--ink); font: 600 16px/1.2 var(--lk-font-body); box-shadow: 0 3px 0 #5e4826; transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease; }
.tl-btn:hover, .tl-btn:focus-visible { background: var(--hi); color: var(--bg); border-radius: 3px; }
.tl-link { font-size: 16px; font-weight: 500; }
.tl-status { min-height: 0; font-size: 14px; text-align: center; }
.tl-status:empty { display: none; }

/* Anchor circles */
.tl-anchors { left: 74%; width: 24%; top: 75%; display: grid; grid-template-columns: repeat(3, max-content); justify-content: space-between; gap: 0 10px; list-style: none; z-index: 2; }
.tl-anchor { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; text-decoration: none; color: var(--ink); }
.tl-anchor:hover { color: var(--ink); }
.tl-ring { display: grid; place-items: center; width: 48px; height: 48px; border: 1.5px solid var(--ink); border-radius: 50%; transition: background-color 0.2s ease; }
.tl-ring svg { width: 22px; height: 22px; fill: none; stroke: var(--hi); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tl-anchor:hover .tl-ring, .tl-anchor:focus-visible .tl-ring { background: var(--panel); }
.tl-al { white-space: nowrap; font: 500 14px/1.3 var(--lk-font-body); }

/* ---------- The tape: one long paper roll, perforated between sections ---------- */
.tl-tape { counter-reset: sec; position: relative; width: min(1040px, calc(100% - 2 * var(--gut))); margin: 88px auto 96px; background: var(--panel); border-inline: 1px dashed var(--rule); box-shadow: 0 50px 90px -40px #000; }
.tl-tape::before, .tl-tape::after { content: ""; position: absolute; left: -1px; right: -1px; height: 10px; }
.tl-tape::before { top: -10px; background: linear-gradient(135deg, var(--panel) 25%, transparent 25%) -10px 0 / 20px 10px, linear-gradient(225deg, var(--panel) 25%, transparent 25%) -10px 0 / 20px 10px; }
.tl-tape::after { bottom: -10px; background: linear-gradient(315deg, var(--panel) 25%, transparent 25%) -10px 0 / 20px 10px, linear-gradient(45deg, var(--panel) 25%, transparent 25%) -10px 0 / 20px 10px; }
.tl-sec { position: relative; padding: 72px clamp(20px, 6vw, 80px); scroll-margin-top: 16px; }
.tl-dbl { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: linear-gradient(90deg, var(--brass) 0 1px, transparent 1px 3px, var(--brass) 3px 4px) 50% 72px / 4px calc(100% - 144px) no-repeat; }
.tl-tape > * + * { position: relative; }
.tl-tape > * + *::before { content: ""; position: absolute; top: -1px; left: 14px; right: 14px; height: 0; border-top: 2px dashed var(--rule); transform-origin: left; z-index: 1; }
.tl-tape > * + *::after { content: ""; position: absolute; top: -11px; left: -1px; right: -1px; height: 20px; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 0 50%, var(--bg) 10px, transparent 11px) left / 20px 20px no-repeat, radial-gradient(circle at 100% 50%, var(--bg) 10px, transparent 11px) right / 20px 20px no-repeat; }
.tl-dbl .tl-sec + .tl-sec { border-left: 0; }

.tl-eye { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; font: 400 13px/1 var(--lk-font-display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--hi); counter-increment: sec; }
.tl-eye::before { content: counter(sec, decimal-leading-zero); padding: 5px 8px 4px; border: 1px solid var(--brass); border-radius: 2px; font: 500 12px/1 var(--lk-font-mono); letter-spacing: 0.06em; color: var(--ink); }
.tl-eye::after { content: ""; flex: 0 1 80px; height: 1px; background: var(--brass); }
.tl-h2 { font: 400 clamp(36px, 5.2vw, 68px)/1.02 var(--lk-font-display); letter-spacing: -0.01em; margin-bottom: 28px; text-wrap: balance; color: var(--ink); }
.tl-h2s { font-size: clamp(30px, 3.4vw, 46px); }
.tl-h3 { font: 600 13px/1.3 var(--lk-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--hi); margin-bottom: 14px; }
.tl-sec p, .tl-sec li { max-width: 68ch; }
.tl-sec p + p { margin-top: 1em; }
.tl-lede { font-size: 20px; line-height: 1.5; color: var(--muted); margin-bottom: 40px; max-width: 72ch; }
.tl-list { list-style: none; counter-reset: row; }
.tl-list li { position: relative; padding: 12px 0 12px 44px; border-bottom: 1px dashed var(--rule); max-width: none; counter-increment: row; transition: background-color 0.2s ease, padding-left 0.2s ease; }
.tl-list li::before { content: counter(row, decimal-leading-zero); position: absolute; left: 0; top: 14px; font: 500 12px/1.6 var(--lk-font-mono); color: var(--hi); }
.tl-list li:hover { background: rgba(216, 181, 106, 0.07); padding-left: 52px; }
.tl-files li { padding-left: 0; }
.tl-files li::before { display: none; }
.tl-files li:hover { padding-left: 10px; }

/* Reveal: text stays readable; the furniture moves in */
.tl-armed .tl-sec:not(.in) .tl-eye, .tl-armed .tl-sec:not(.in) .tl-h2 { transform: translateY(18px); }
.tl-eye, .tl-h2 { transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tl-armed .tl-sec:not(.in) .tl-eye::after { width: 0; flex-basis: 0; }
.tl-eye::after { transition: flex-basis 0.9s ease 0.2s; }

/* ---------- Try: subscription state machine ---------- */
#tl-sm, .tl-sm { --c: var(--l-trial); --pos: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; }
.tl-sm[data-state="active"] { --c: var(--l-active); --pos: 1; }
.tl-sm[data-state="due"] { --c: var(--l-due); --pos: 2; }
.tl-sm[data-state="recovered"] { --c: var(--l-rec); --pos: 3; }
.tl-sm[data-state="cancelled"] { --c: var(--l-cancel); --pos: 4; }
.tl-sm[data-state="refunded"] { --c: #B7A6F2; --pos: 5; }
.tl-sm[data-state="disputed"] { --c: #F2A65E; --pos: 6; }
.tl-track { position: relative; height: 40px; margin: 6px 12px 28px; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: repeating-linear-gradient(90deg, var(--brass) 0 6px, transparent 6px 12px); }
.tl-track::after { content: ""; position: absolute; left: 0; top: 19px; height: 2px; width: calc(var(--pos) * 100% / 6); background: var(--c); box-shadow: 0 0 12px var(--c); transition: width 0.7s cubic-bezier(0.3, 0.7, 0.2, 1), background-color 0.3s ease; }
.tl-coin { position: absolute; top: 8px; left: calc(var(--pos) * 100% / 6); width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3d0, var(--hi) 35%, #5e4826); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent), 0 6px 14px rgba(0, 0, 0, 0.5); transition: left 0.7s cubic-bezier(0.3, 0.7, 0.2, 1), box-shadow 0.3s ease; }
.tl-sm[data-state="due"] .tl-coin { animation: tl-shake 0.5s ease 0.55s both; }
.tl-sm[data-state="recovered"] .tl-coin { animation: tl-hop 0.6s ease 0.5s both; }
@keyframes tl-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-5px) rotate(-12deg); } 40% { transform: translateX(5px) rotate(10deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes tl-hop { 0% { transform: none; } 40% { transform: translateY(-14px) scale(1.15); } 100% { transform: none; } }
.tl-card { position: relative; padding: 28px 28px 24px; background: var(--slot); border: 1px solid var(--rule); border-left: 4px solid var(--c); border-radius: 4px; transition: border-color 0.3s ease; }
.tl-card.tl-bump { animation: tl-bump 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes tl-bump { from { transform: translateY(10px); } to { transform: none; } }
.tl-card-k { font: 500 12px/1 var(--lk-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tl-card-state { margin: 12px 0 6px; font: 400 clamp(44px, 6vw, 72px)/1 var(--lk-font-display); color: var(--c); transition: color 0.3s ease; }
.tl-card-say { color: var(--ink); font-size: 17px; line-height: 1.45; }
.tl-card-acc { margin-top: 16px !important; padding: 10px 14px; border: 1px dashed var(--rule); font-size: 15px; color: var(--muted); }
.tl-card-acc b { color: var(--ink); font-weight: 600; }
.tl-card-acc.tl-bad { border-color: var(--l-cancel); }
.tl-card-acc.tl-bad b { color: #FF9A8F; }
.tl-card-h { margin: 22px 0 8px; font: 600 12px/1.3 var(--lk-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--hi); }
.tl-must li { font-size: 16px; }
.tl-fee { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule); font-size: 15px; color: var(--muted); }
.tl-fee[hidden] { display: none; }
.tl-sm-ctl .tl-card-h:first-child { margin-top: 4px; }
.tl-evs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tl-ev { position: relative; min-height: 48px; padding: 10px 14px 10px 30px; border: 1.5px solid var(--rule); border-radius: 3px; background: #111a16; color: var(--ink); font: 500 15px/1.2 var(--lk-font-body); text-align: left; box-shadow: 0 4px 0 #000, inset 0 1px 0 rgba(242, 239, 232, 0.08); transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.08s ease, box-shadow 0.08s ease; }
.tl-ev::before { content: ""; position: absolute; left: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; border: 1.5px solid var(--muted); transition: background-color 0.2s ease, border-color 0.2s ease; }
.tl-ev[data-valid="1"]::before { background: var(--hi); border-color: var(--hi); }
.tl-ev:hover { border-color: var(--hi); background: color-mix(in srgb, var(--hi) 10%, var(--slot)); }
.tl-ev:active { transform: translateY(4px); box-shadow: 0 0 0 #000, inset 0 2px 6px rgba(0, 0, 0, 0.6); }
.tl-trap { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; font-size: 16px; cursor: pointer; }
.tl-trap input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--hi); }
.tl-trapnote { margin-top: 8px; padding-left: 32px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.tl-log { list-style: none; max-height: 190px; overflow-y: auto; padding: 8px 12px; background: var(--slot); border: 1px solid var(--rule); border-radius: 4px; font: 400 13px/1.5 var(--lk-font-mono); counter-reset: ev; }
.tl-log li { padding: 5px 0; border-bottom: 1px dotted var(--rule); counter-increment: ev; max-width: none; color: var(--ink); }
.tl-log li:last-child { border-bottom: 0; }
.tl-log li:not(.tl-log-empty)::before { content: counter(ev, decimal-leading-zero) "  "; color: var(--hi); }
.tl-log .tl-log-empty { color: var(--muted); counter-increment: none; }
.tl-log .tl-noop { color: var(--muted); }
.tl-log .tl-new { animation: tl-feed 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes tl-feed { from { transform: translateY(-14px); background: rgba(216, 181, 106, 0.25); } to { transform: none; background: transparent; } }
.tl-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.tl-fld { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.tl-fld select, .tl-fld input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--rule); border-radius: 4px; background: var(--slot); color: var(--ink); font: 400 16px/1.3 var(--lk-font-body); }
.tl-fld select:hover, .tl-fld input:hover { border-color: var(--brass); }
.tl-sm-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 22px; }
.tl-btn--solid { background: var(--hi); color: var(--bg); }
.tl-btn--solid:hover, .tl-btn--solid:focus-visible { background: var(--ink); border-color: var(--ink); }
.tl-btn:active, .tl-ghost:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.tl-btn--solid[data-copied="1"] { background: var(--l-rec); border-color: var(--l-rec); color: var(--bg); }
.tl-ghost { min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--rule); border-radius: 3px; box-shadow: 0 3px 0 #000; background: transparent; color: var(--ink); font: 500 15px/1.2 var(--lk-font-body); transition: border-color 0.15s ease, transform 0.12s ease; }
.tl-ghost:hover:not(:disabled) { border-color: var(--hi); }
.tl-ghost:disabled { opacity: 0.5; }
.tl-sm-status { font-size: 14px; color: var(--l-rec); }
.tl-sm-status:empty { display: none; }

/* ---------- What: five moments in brass numerals ---------- */
.tl-disc { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding: 10px 14px; border: 1px dashed var(--brass); font-size: 15px; line-height: 1.4; color: var(--hi); }
.tl-disc::before { content: ""; flex: none; width: 12px; height: 7px; margin-top: -3px; border-left: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(-45deg); }
.tl-moments { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 48px; list-style: none; border-top: 1px solid var(--brass); }
.tl-moments li { position: relative; padding: 18px 8px 0 0; max-width: none; transition: transform 0.25s ease; }
.tl-moments li:hover { transform: translateY(-6px); }
.tl-moments b { display: block; font: 400 clamp(56px, 8vw, 104px)/0.9 var(--lk-font-display); color: var(--hi); text-shadow: 0 2px 0 #5e4826, 0 -1px 0 #fff0c4; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 90ms); }
.tl-moments span { display: block; margin-top: 10px; font: 500 15px/1.2 var(--lk-font-body); }
.tl-moments li:nth-child(1) { --c: var(--l-trial); --i: 0; } .tl-moments li:nth-child(2) { --c: var(--l-active); --i: 1; } .tl-moments li:nth-child(3) { --c: var(--l-due); --i: 2; } .tl-moments li:nth-child(4) { --c: var(--l-rec); --i: 3; } .tl-moments li:nth-child(5) { --c: var(--l-cancel); --i: 4; }
.tl-moments span { color: var(--c); }
.tl-moments li::before { content: ""; position: absolute; left: 0; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tl-armed #what:not(.in) .tl-moments b { transform: translateY(40px); }

/* ---------- Why ---------- */
#why p:first-of-type { max-width: 30em; font: 400 clamp(22px, 2.6vw, 32px)/1.35 var(--lk-font-display); color: var(--ink); }
#why p:first-of-type a { text-underline-offset: 5px; }
#why p + p { max-width: 54ch; margin-top: 28px; padding-left: 20px; border-left: 2px solid var(--brass); color: var(--muted); }

/* ---------- Money: itemised bill with small print ---------- */
.tl-money .lk-table-wrap { overflow: visible; border: 0; background: none; border-radius: 0; }
.tl-money .lk-money, .tl-money .lk-money tbody { display: block; font-size: 15px; line-height: 1.5; }
.tl-money .lk-money thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tl-money .lk-money tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); grid-template-areas: "thing paid" "free paid" "catch catch" "chk src"; gap: 2px 28px; padding: 22px 16px 18px; border: 0; border-bottom: 2px dashed var(--rule); transition: background-color 0.2s ease; }
.tl-money .lk-money tr:last-child { border-bottom: 0; }
.tl-money .lk-money tr:hover { background: rgba(216, 181, 106, 0.07); }
.tl-money .lk-money tr::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 20px; width: 3px; background: var(--hi); transform: scaleY(0); transform-origin: top; transition: transform 0.25s ease; }
.tl-money .lk-money tr:hover::before { transform: scaleY(1); }
.tl-money .lk-money td { display: block; padding: 0; border: 0; color: var(--ink); font-size: 15px; background: none; }
.tl-money .lk-money td::before { display: block; margin-bottom: 2px; font: 600 11px/1.3 var(--lk-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tl-money .lk-money td[data-label="Thing"] { grid-area: thing; font: 400 clamp(22px, 2.4vw, 28px)/1.15 var(--lk-font-display); }
.tl-money .lk-money td[data-label="Thing"]::before, .tl-money .lk-money td[data-label="Checked"]::before, .tl-money .lk-money td[data-label="Source"]::before { display: none; }
.tl-money .lk-money td[data-label="Free route"] { grid-area: free; margin-top: 8px; }
.tl-money .lk-money td[data-label="Paid from"] { grid-area: paid; padding: 4px 0 0 18px; border-left: 1px dotted var(--brass); font-size: 17px; color: var(--hi); }
.tl-money .lk-money td[data-label="Paid from"]::before { content: "Paid from"; }
.tl-money .lk-money td[data-label="Free route"]::before { content: "Free route"; }
.tl-money .lk-money td[data-label="The catch"] { grid-area: catch; margin-top: 12px; padding: 10px 14px; border: 0; border-left: 2px solid var(--l-due); background: rgba(242, 139, 155, 0.06); font-size: 13px; line-height: 1.5; color: var(--muted); }
.tl-money .lk-money td[data-label="The catch"]::before { content: "The small print"; color: var(--l-due); }
.tl-money .lk-money td[data-label="Checked"] { grid-area: chk; margin-top: 12px; font: 400 12px/1.4 var(--lk-font-mono); color: var(--muted); white-space: nowrap; }
.tl-money .lk-money td[data-label="Checked"]::after { content: ""; }
.tl-money .lk-money td[data-label="Source"] { grid-area: src; margin-top: 12px; font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.tl-money .lk-fact small { color: var(--muted); }
.tl-money .lk-money td[data-label="Paid from"] .lk-fact small, .tl-money .lk-money td[data-label="Free route"] .lk-fact small { display: block; }

/* ---------- Agent / You: double-entry ledger ---------- */
.tl-dbl .tl-sec { padding-inline: clamp(20px, 4vw, 56px); }
.tl-dbl .tl-sec > .tl-list li { max-width: none; }
.tl-dotl::before { content: ""; display: inline-block; width: 0.28em; height: 0.28em; margin-right: 0.3em; border-radius: 50%; vertical-align: 0.14em; }
.tl-dotl--agent::before { background: var(--l-rec); box-shadow: 0 0 0 0.09em color-mix(in srgb, var(--l-rec) 25%, transparent); }
.tl-dotl--you::before { background: var(--l-active); box-shadow: 0 0 0 0.09em color-mix(in srgb, var(--l-active) 25%, transparent); }
#agent .tl-list li::before { color: var(--l-rec); }
#you .tl-list li::before { color: var(--l-active); }
#agent .tl-list li:hover { background: rgba(143, 224, 176, 0.08); }
#you .tl-list li:hover { background: rgba(233, 196, 106, 0.08); }

/* ---------- When: coin stacks per phase ---------- */
.tl-phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 20px; align-items: stretch; list-style: none; margin-top: 8px; }
.tl-phases .lk-phase { --n: 3; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 0; border: 0; border-radius: 0; background: none; min-height: 260px; }
.tl-phases .lk-phase::before { content: ""; order: 2; width: min(100%, 76px); height: calc(min(var(--n), 24) * 7px + 8px); margin-top: 6px; border-radius: 38px / 4px; background: repeating-linear-gradient(to top, #d8b56a 0 4px, #5e4826 4px 7px); box-shadow: 0 0 0 1px #2c2010, 0 10px 18px -8px #000; transform-origin: 50% 100%; transition: transform 1.1s cubic-bezier(0.3, 0.8, 0.2, 1) calc(var(--k, 0) * 120ms); }
.tl-phases .lk-phase:nth-child(2) { --k: 1; } .tl-phases .lk-phase:nth-child(3) { --k: 2; } .tl-phases .lk-phase:nth-child(4) { --k: 3; }
.tl-phases .lk-phase:hover::before { filter: brightness(1.2); }
.tl-phases strong { order: 1; position: static; font: 400 clamp(36px, 4.4vw, 56px)/1 var(--lk-font-display); color: var(--hi); }
.tl-phases .tl-step-l { order: 3; display: block; width: 100%; margin: 0; padding-top: 10px; border-top: 2px solid var(--brass); font: 500 16px/1.3 var(--lk-font-body); color: var(--ink); }

/* ---------- Checklist: receipt tape ---------- */
#items .lk-items { border-top: 0; font-variant-numeric: tabular-nums; }
#items .lk-filters { padding: 14px 16px; border: 1px dashed var(--rule); background: var(--slot); }
#items .lk-filter { border-color: var(--rule); }
#items .lk-filter:hover { border-color: var(--hi); }
#items .lk-filter-label { color: var(--hi); }
#items .lk-cat { display: flex; align-items: center; gap: 14px; padding: 34px 0 10px; font: 600 12px/1 var(--lk-font-mono); letter-spacing: 0.16em; color: var(--hi); }
#items .lk-cat::before, #items .lk-cat::after { content: ""; flex: 1; height: 0; border-top: 1px dashed var(--brass); }
#items .lk-cat::before { flex: 0 0 24px; }
#items .lk-item { position: relative; grid-template-columns: 4.5rem 1fr auto auto; padding: 11px 12px; border-bottom: 1px dotted var(--rule); transition: background-color 0.18s ease, transform 0.18s ease; }
#items .lk-item::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: var(--c, var(--hi)); transform: scaleY(0); transition: transform 0.18s ease; }
#items .lk-item[data-who="agent"] { --c: var(--l-rec); }
#items .lk-item[data-who="founder"] { --c: var(--l-active); }
#items .lk-item:hover { background: rgba(216, 181, 106, 0.08); transform: translateX(4px); }
#items .lk-item:hover::before { transform: scaleY(1); }
#items .lk-id { color: var(--hi); }
#items .lk-title { color: var(--ink); }
#items .lk-who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
#items .lk-who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tl-catbar { margin-bottom: 20px; }

/* ---------- End: closed till, reconciled ---------- */
.tl-endp { max-width: 760px; }
.tl-rows { list-style: none; max-width: none; }
.tl-rows li { position: relative; max-width: none; padding: 16px 0 16px 44px; border-bottom: 1px dashed var(--rule); font-size: 19px; transition: padding-left 0.2s ease; }
.tl-rows li:hover { padding-left: 52px; }
.tl-rows li::before { content: ""; position: absolute; left: 6px; top: 1.15em; width: 15px; height: 8px; border-left: 3px solid var(--l-rec); border-bottom: 3px solid var(--l-rec); transform: rotate(-45deg) scale(1); transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.4, 1) calc(var(--r, 0) * 90ms); }
.tl-rows li:nth-child(2) { --r: 1; } .tl-rows li:nth-child(3) { --r: 2; } .tl-rows li:nth-child(4) { --r: 3; } .tl-rows li:nth-child(5) { --r: 4; } .tl-rows li:nth-child(6) { --r: 5; } .tl-rows li:nth-child(7) { --r: 6; } .tl-rows li:nth-child(8) { --r: 7; }
.tl-armed #end:not(.in) .tl-rows li::before { transform: rotate(-45deg) scale(0); }
.tl-rows::after { content: "Till closed · reconciled"; display: block; margin-top: 36px; padding: 18px 0; border-block: 4px double var(--brass); text-align: center; font: 400 clamp(18px, 2.4vw, 26px)/1.2 var(--lk-font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--hi); transition: transform 0.6s cubic-bezier(0.3, 1.5, 0.4, 1) 0.8s; }
.tl-armed #end:not(.in) .tl-rows::after { transform: scale(1.12) rotate(-2deg); }

/* ---------- Run ---------- */
.tl-prompt { margin-bottom: 44px; max-width: 860px; }
.tl-prompt .lk-prompt-text { padding: 20px 22px; border: 0; border-left: 4px solid var(--hi); border-radius: 2px; background: var(--slot); font-size: 16px; transition: box-shadow 0.2s ease; }
.tl-prompt:hover .lk-prompt-text { box-shadow: 0 0 0 1px var(--brass), 0 0 30px rgba(216, 181, 106, 0.12); }
.tl-run-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; }
.tl-files code { display: block; color: var(--ink); }
.tl-note { margin-top: 16px; font-size: 16px; color: var(--muted); }
.lk-run-note { margin-top: 28px; color: var(--muted); font: 500 12px/1.4 var(--lk-font-mono); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Terms: footnotes ---------- */
#terms .lk-terms { counter-reset: fn; grid-template-columns: 1fr 1fr; gap: 0 56px; }
#terms .lk-terms > div { position: relative; counter-increment: fn; padding: 16px 0 16px 34px; border-top: 1px dashed var(--rule); font-size: 15px; transition: background-color 0.2s ease; }
#terms .lk-terms > div::before { content: counter(fn); position: absolute; left: 6px; top: 14px; font: 500 12px/1 var(--lk-font-mono); color: var(--hi); }
#terms .lk-terms > div:hover, #terms .lk-terms > div:has(dt:target) { background: rgba(216, 181, 106, 0.08); }
#terms .lk-terms dt { font: 400 21px/1.2 var(--lk-font-display); color: var(--ink); }
#terms .lk-terms dd { margin-top: 6px; color: var(--muted); }

/* ---------- Next: two stubs ---------- */
.lk-next { gap: 28px; }
.lk-next > div { position: relative; padding: 28px 28px 44px; background: var(--slot); border: 1px solid var(--rule); border-bottom: 0; transition: transform 0.25s ease; }
.lk-next > div::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -10px; height: 10px; background: linear-gradient(315deg, var(--slot) 25%, transparent 25%) -10px 0 / 20px 10px, linear-gradient(45deg, var(--slot) 25%, transparent 25%) -10px 0 / 20px 10px; }
.lk-next > div:hover { transform: translateY(-5px) rotate(-0.4deg); }
.lk-next h3 { color: var(--hi); }
.lk-next li { font-size: 18px; }

/* ---------- Scroll-linked: perforation feeds in as it enters ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tl-tape > * + *::before { animation: tl-perf linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  }
}
@keyframes tl-perf { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Phones and narrow screens ---------- */
@media (max-width: 1100px) {
  .tl-hero { min-height: 0; display: flex; flex-direction: column; padding: 12px var(--gut) 0; }
  .tl-hero > * { position: static; }
  .tl-hero > .tl-h1 { order: 1; }
  .tl-name, .tl-headline { position: static; }
  .tl-name { margin-bottom: 18px; }
  .tl-headline { font-size: 46px; line-height: 1; max-width: 6.2em; }
  .tl-one { order: 2; width: auto; margin-top: 22px; font-size: 17px; line-height: 1.45; max-width: 30em; }
  .tl-life-title { order: 3; width: auto; margin-top: 32px; text-align: left; }
  .tl-line { order: 4; position: relative; left: auto; width: auto; height: 104px; margin-top: 18px; }
  .tl-step { left: calc(10% + var(--i) * 20%); }
  .tl-lab { left: 0; top: 20px; transform: translateX(-50%); font-size: 12px; text-align: center; }
  .tl-conn { left: 10%; right: auto; width: 100%; top: 44px; }
  .tl-replay { top: 84px; }
  .tl-cta { order: 5; width: auto; margin-top: 8px; align-items: stretch; text-align: center; }
  .tl-hero .tl-btn { width: 100%; }
  .tl-ledger { order: 6; width: auto; margin-top: 36px; grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .tl-plate { order: 7; position: relative; left: auto; bottom: auto; align-self: center; width: min(100vw, 800px); aspect-ratio: 4 / 3; margin: 28px 0 0; --slot-x: 27.4%; --slot-y: 86.2%; --slot-w: 20.3%; --slot-h: 6.5%; }
  .tl-live .tl-plate { --slot-x: 18.12%; --slot-y: 83.22%; --slot-w: 31.46%; --slot-h: 5.26%; }
  .tl-anchors { order: 8; width: auto; margin-top: 20px; padding-bottom: 36px; gap: 0 8px; position: static; }
  .tl-arcs { position: absolute; left: 85%; top: -105px; transform: scale(0.5); }
  .tl-dots { display: none; }
  body { font-size: 16px; line-height: 1.55; }
  .tl-tape { margin-block: 56px 64px; }
  .tl-sec { padding-block: 48px; }
  .tl-lede { font-size: 17px; margin-bottom: 28px; }
  .tl-sm { grid-template-columns: 1fr; gap: 28px; }
  .tl-dbl { grid-template-columns: 1fr; background: none; }
  .tl-dbl .tl-sec + .tl-sec { border-top: 4px double var(--brass); }
  .tl-run-grid { grid-template-columns: 1fr; }
  #terms .lk-terms { grid-template-columns: 1fr; }
  .tl-prompt .lk-prompt-text { font-size: 14px; padding: 14px 16px; }
}
@media (max-width: 760px) {
  .tl-money .lk-money tr { grid-template-columns: 1fr; grid-template-areas: "thing" "free" "paid" "catch" "chk" "src"; padding-inline: 4px; }
  .tl-money .lk-money td[data-label="Paid from"] { padding: 10px 0 0; margin-top: 10px; border-left: 0; border-top: 1px dotted var(--brass); }
  .tl-money .lk-money td[data-label="Source"] { text-align: left; margin-top: 2px; }
  .tl-moments { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .tl-moments li { padding-bottom: 22px; }
  .tl-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .tl-phases .lk-phase { min-height: 0; }
  .tl-evs, .tl-fields { grid-template-columns: 1fr; }
  .tl-card { padding: 22px 18px 18px; }
  #items .lk-item { grid-template-columns: 4rem 1fr; }
  #items .lk-who, #items .lk-when { grid-column: 2; }
  .tl-eye::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-drawer, .tl-drawer-top, .tl-cat::before, .tl-btn, .tl-ev, .tl-ghost, .tl-list li, .tl-coin, .tl-track::after, .tl-eye, .tl-h2, .tl-phases .lk-phase::before, .tl-moments b, .tl-rows li::before, .tl-rows::after { transition: none !important; }
  .tl-till, .tl-shaft, .tl-coin, .tl-card, .tl-log li { animation: none !important; }
}
.tl-tdot { position: absolute; top: 14px; left: calc(var(--i) * 100% / 6); width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--panel); border: 2px solid var(--brass); }

/* ---------- v3: register keys, thermal tape, receipt leaders, totals ---------- */
:root { --lk-dock-bg: var(--hi); --lk-dock-ink: var(--bg); }
.tl-tape { outline: 1px solid rgba(242, 239, 232, 0.03); outline-offset: -8px; }
.tl-tape > * + *::before { left: 22px; right: 22px; border-top: 2px dashed rgba(158, 129, 80, 0.6); }
.tl-tape > * + *::after { background: radial-gradient(circle at 0 50%, var(--bg) 9px, var(--brass) 9.5px, var(--brass) 10px, transparent 10.5px) left / 20px 20px no-repeat, radial-gradient(circle at 100% 50%, var(--bg) 9px, var(--brass) 9.5px, var(--brass) 10px, transparent 10.5px) right / 20px 20px no-repeat; }
.tl-sec:first-child .tl-eye { margin-top: 0; }

/* filter keys: square register keys that sink when pressed */
#items .lk-filters { border-radius: 3px; }
#items .lk-filter { border-radius: 3px; box-shadow: 0 3px 0 #000; transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.15s ease, background-color 0.15s ease; }
#items .lk-filter:active { transform: translateY(3px); box-shadow: 0 0 0 #000; }
#items .lk-filter[aria-pressed="true"] { transform: translateY(2px); box-shadow: 0 1px 0 #000, inset 0 2px 4px rgba(0, 0, 0, 0.35); }

/* checklist: full-width receipt lines with dotted leaders */
#items .lk-items, #items .lk-cat, #items .lk-item { max-width: none; }
#items .lk-item { align-items: baseline; column-gap: 14px; }
#items .lk-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
#items .lk-title::after { content: ""; flex: 1 1 24px; min-width: 24px; border-bottom: 2px dotted rgba(158, 129, 80, 0.55); transform: translateY(-4px); }
#items .lk-when { min-width: 7.5em; text-align: right; color: var(--muted); }
#items .lk-cat { padding-top: 40px; }

/* totals line under the coin stacks */
.tl-total { display: flex; align-items: baseline; gap: 12px; max-width: none !important; margin-top: 36px; padding: 14px 0 12px; border-block: 4px double var(--brass); font: 600 13px/1 var(--lk-font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.tl-total i { flex: 1; border-bottom: 2px dotted rgba(158, 129, 80, 0.6); }
.tl-total b { font: 400 clamp(30px, 3.4vw, 44px)/1 var(--lk-font-display); letter-spacing: 0; color: var(--hi); }
.tl-phases strong, .tl-total b { font-variant-numeric: tabular-nums; }
.tl-ticking { color: var(--ink) !important; }

/* hero: CTA as a brass register key */
.tl-hero .tl-btn { min-width: 210px; }
@media (max-width: 760px) {
  #items .lk-title::after { display: none; }
  #items .lk-when { min-width: 0; text-align: left; }
  .tl-total { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) { #items .lk-filter, #items .lk-filter:active { transition: none; } }
