/* Action–Reaction Pairs: the clip file and the call on the left, the replay booth (monitor + telestrator notes) on the
 * right, inside the practice shell's stage. */
.arp { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; padding: 8px 12px; }
.arp-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 2px; }

/* the clip file */
.arp-file { padding: 8px 14px 10px; border-radius: var(--tlg-radius-lg, 14px); border: 2px solid #9db4cf; background: #eef4fb; color: #12233a;
  box-shadow: inset 0 0 0 4px #f8fbff; }
.arp-file-k { margin: 0 0 4px; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps, .08em); color: #1f5fa8; }
.arp-file-g { margin: 4px 0 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
html[data-theme="dark"] .arp-file { background: #16233a; color: #e3edf9; border-color: #3a5378; box-shadow: inset 0 0 0 4px #1b2a44; }
html[data-theme="dark"] .arp-file-k { color: #8fc0ff; }

/* the call */
.arp-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.arp-field legend { padding: 0; margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--tlg-text, #172c38); }
.arp-cards { display: grid; gap: 8px; }
.arp-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 6px 12px; font: inherit; font-size: 18px; font-weight: 700; line-height: 1.25; text-align: left; cursor: pointer;
  border-radius: 12px; color: var(--tlg-text, #172c38); background: var(--tlg-surface, #fff); border: 2px solid var(--tlg-border, #a5b6c1);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .1); touch-action: manipulation; }
.arp-card svg { flex: none; width: 32px; height: 32px; color: #6b3fa0; }
.arp-card:hover:not(:disabled) { border-color: #1f5fa8; }
.arp-card[aria-pressed="true"] { border-color: #6b3fa0; border-width: 3px; background: #f3ecfb; box-shadow: inset 0 0 0 2px #dccbf2; }
.arp-card[aria-pressed="true"]::after { content: '✓ my call'; margin-left: auto; flex: none; font-size: 16px; font-weight: 800; color: #6b3fa0; }
html[data-theme="dark"] .arp-card svg { color: #c9a8f5; }
html[data-theme="dark"] .arp-card[aria-pressed="true"] { background: #2a1d3d; box-shadow: inset 0 0 0 2px #4b3270; border-color: #b58ff0; }
html[data-theme="dark"] .arp-card[aria-pressed="true"]::after { color: #d4b8ff; }
html[data-theme="dark"] .arp-card:hover:not(:disabled) { border-color: #8fc0ff; }

.arp-price { display: flex; align-items: center; gap: 8px; }
.arp-num { width: 170px; height: 52px; font: inherit; font-size: 26px; font-weight: 800; text-align: right; padding: 0 12px; border-radius: 10px;
  border: 2px solid var(--tlg-border, #a5b6c1); background: var(--tlg-surface, #fff); color: var(--tlg-text, #172c38); font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield; }
.arp-num::-webkit-outer-spin-button, .arp-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.arp-num:focus { border-color: #1f5fa8; }
.arp-unit { font-size: 22px; font-weight: 800; }
.arp-formula { margin: 0; font-size: 18px; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--tlg-text-muted, #4b5d68); }

.arp :focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }
.arp button:disabled, .arp input:disabled { cursor: default; }
.arp.is-locked .arp-card:not([aria-pressed="true"]) { opacity: .7; }
.arp-msg { margin: 0; min-height: 1.2em; font-size: 16px; font-weight: 700; color: var(--tlg-danger, #b42318); }
html[data-theme="dark"] .arp-msg { color: #ffb4a8; }
.arp-about { font-size: 16px; line-height: 1.4; }
.arp-about summary { cursor: pointer; font-weight: 700; }
.arp-about p { margin: 4px 0 0; }

/* the booth */
.arp-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.arp-scene { position: relative; width: 100%; aspect-ratio: 720 / 620; border-radius: var(--tlg-radius-lg, 14px); overflow: hidden; border: var(--tlg-border-width, 1px) solid var(--tlg-border, #a5b6c1); user-select: none; -webkit-user-select: none; }
.arp-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.arp-wall { fill: url(#arp-g-wall); }
.arp-desk { fill: url(#arp-g-desk); }
html[data-theme="dark"] .arp-wall { fill: url(#arp-g-wall-d); }
html[data-theme="dark"] .arp-desk { fill: url(#arp-g-desk-d); }
.arp-rec { fill: #e5484d; animation: arp-blink 1.6s ease-in-out infinite; }

.arp-t { font-family: var(--tlg-font-body, system-ui, sans-serif); fill: #1d2b33; }
.arp-t-title { font-size: 24px; font-weight: 900; fill: #f2f6fb; letter-spacing: .08em; }
.arp-t-sub { font-size: 18px; font-weight: 700; fill: #9fb4cc; }
.arp-t-tag { font-size: 18px; font-weight: 800; fill: #fff6df; }
.arp-t-letter { font-size: 24px; font-weight: 900; fill: #ffffff; }
.arp-t-cover { font-size: 17px; font-weight: 800; fill: #f1ead7; letter-spacing: .08em; }
.arp-t-cart { font-size: 17px; font-weight: 800; fill: #ffffff; }
.arp-t-q { font-size: 34px; font-weight: 900; fill: #5a2d00; }
.arp-t-notek { font-size: 17px; font-weight: 800; fill: #6b5a2f; letter-spacing: .06em; }
.arp-t-notel { font-size: 19px; font-weight: 800; fill: #6b5a2f; }
.arp-t-note { font-size: 20px; font-weight: 800; fill: #1b2a4a; }
.arp-t-note.is-empty { fill: #6b3fa0; }
.arp-pill rect { fill: rgba(255, 255, 255, .95); stroke: #1d2b33; stroke-width: 1.5; }
.arp-pill text { font-family: var(--tlg-font-body, system-ui, sans-serif); font-size: 17px; font-weight: 800; fill: #1d2b33; }
.arp-pill--given rect { fill: #fff1e6; stroke: #c2410c; stroke-width: 2; }
.arp-pill--given text { fill: #7c2d12; }
.arp-pill--partner rect { fill: #e2f6f4; stroke: #0b7a75; stroke-width: 2; }
.arp-pill--partner text { fill: #064e4a; }
.arp-pill--pick rect { fill: #f3ecfb; stroke: #6b3fa0; stroke-width: 2; stroke-dasharray: 5 3; }
.arp-pill--pick text { fill: #4a2775; }
.arp-pill--f1 rect { fill: #fff1e6; stroke: #c2410c; stroke-width: 2; } .arp-pill--f1 text { fill: #7c2d12; }
.arp-pill--f2 rect { fill: #e8f0fb; stroke: #1f5fa8; stroke-width: 2; } .arp-pill--f2 text { fill: #12335c; }
.arp-pill--ask rect { fill: #fffbe6; stroke: #6b3fa0; stroke-width: 2; stroke-dasharray: 5 3; } .arp-pill--ask text { fill: #4a2775; }
.arp-pill--name rect { fill: #182436; stroke: #0b1119; } .arp-pill--name text { fill: #f2f6fb; }
.arp-pill--note rect { fill: #0b7a75; stroke: #064e4a; } .arp-pill--note text { fill: #ffffff; }
.arp-pill--live rect { fill: #e5484d; stroke: #8f1d22; } .arp-pill--live text { fill: #ffffff; }
.arp-pill--paused rect { fill: rgba(15, 22, 32, .85); stroke: #475569; } .arp-pill--paused text { fill: #e2e8f0; }

/* force arrows: orange = the shown force (and force 1), blue = force 2, teal = the partner (reveal), purple dashed = your pick */
.arp-force .arp-shaft { fill: none; stroke-width: 9; stroke-linecap: round; }
.arp-force--given .arp-shaft, .arp-force--f1 .arp-shaft { stroke: #e8590c; } .arp-force--given .arp-head, .arp-force--given circle, .arp-force--f1 .arp-head, .arp-force--f1 circle { fill: #e8590c; }
.arp-force--f2 .arp-shaft { stroke: #1f5fa8; } .arp-force--f2 .arp-head, .arp-force--f2 circle { fill: #1f5fa8; }
.arp-force--partner .arp-shaft { stroke: #0b7a75; } .arp-force--partner .arp-head, .arp-force--partner circle { fill: #0b7a75; }
.arp-force--pick .arp-shaft { stroke: #6b3fa0; stroke-dasharray: 12 8; } .arp-force--pick .arp-head, .arp-force--pick circle { fill: #6b3fa0; }
.arp-force { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.arp-force--partner, .arp-force--partner + .arp-pill { animation: arp-in .5s ease-out both; }
.arp-ring { fill: none; stroke: #ffd43b; stroke-width: 5; stroke-dasharray: 10 6; animation: arp-in .5s ease-out both; }

/* replay motion (after Check, practice only) */
.arp-mover { transform-box: view-box; }
.arp-cart.arp-roll { animation: arp-roll 1.6s cubic-bezier(.45, 0, .7, 1) .3s both; }
.arp-fly { animation: arp-fly 1.2s ease-in .3s both; }
.arp-flame { animation: arp-flick .18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 0; }
.arp-steam { animation: arp-steam 2.6s ease-in-out infinite; }
@keyframes arp-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes arp-roll { from { transform: translateX(0); } to { transform: translateX(var(--dx, 0)); } }
@keyframes arp-fly { from { transform: translate(0, 0); } to { transform: translate(60px, -20px); } }
@keyframes arp-flick { from { transform: scaleY(.92); } to { transform: scaleY(1.06); } }
@keyframes arp-steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .8; } 100% { opacity: 0; transform: translateY(-12px); } }
@keyframes arp-blink { 50% { opacity: .3; } }

/* reveal badge (over the top bar) */
.arp-badge { position: absolute; left: 2%; right: 2%; top: 1.2%; padding: 7px 12px; border-radius: 10px; font-size: 17px; font-weight: 700; line-height: 1.3; pointer-events: none;
  background: rgba(255, 255, 255, .97); color: #10202c; border: 3px solid #1d6b40; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); animation: arp-pop .25s ease-out; }
.arp-badge.is-bad { border-color: #b42318; }
@keyframes arp-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* briefing + start */
.arp-example-svg { display: block; width: 100%; height: auto; max-height: 460px; border-radius: 10px; }
.arp-start-svg { display: block; width: 100%; height: 100%; }

.arp-static *, .arp-static { animation: none !important; }
.arp-static .arp-cart.arp-roll { transform: translateX(var(--dx, 0)); }
.arp-static .arp-fly { transform: translate(60px, -20px); }
@media (prefers-reduced-motion: reduce) {
  .arp *, .arp-badge, .arp-start-svg *, .arp-example-svg * { animation: none !important; }
  .arp .arp-cart.arp-roll { transform: translateX(var(--dx, 0)); }
  .arp .arp-fly { transform: translate(60px, -20px); }
}
@media (max-width: 1100px) { .arp { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .arp { position: static; grid-template-columns: 1fr; }
  .arp-panel { overflow: visible; }
  .arp-view { display: block; order: -1; }
  .arp-scene { width: 100% !important; }
}
.arp-t-mass { font-size: 18px; font-weight: 800; fill: #1d2b33; }
.arp-go { animation: arp-go 1.4s cubic-bezier(.3, 0, .6, 1) .3s both; }
@keyframes arp-go { from { transform: translate(0, 0); } to { transform: translate(var(--mx, 0), var(--my, 0)); } }
.arp-static .arp-go { transform: translate(var(--mx, 0), var(--my, 0)); }
@media (prefers-reduced-motion: reduce) { .arp .arp-go { transform: translate(var(--mx, 0), var(--my, 0)); } }
