/* Walk the Graph: the sound stage on top; graphs (or graph cards) and the controls below. The stage is a picture of a
 * real place and keeps its colors in dark mode; the graphs, cards and panels follow the site tokens. */
.wtg { position: absolute; inset: 0; display: grid; grid-template-rows: 214px minmax(0, 1fr); gap: 8px; padding: 8px 10px; box-sizing: border-box; }
.wtg-scene { position: relative; min-height: 0; border-radius: var(--tlg-radius-lg); overflow: hidden; background: #1c1f26; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); }
.wtg-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 10px; min-height: 0; }
.wtg-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.wtg-right { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 2px; }
.wtg-h { margin: 0; font-size: 17px; font-weight: 800; }
.wtg-note { margin: 0; font-size: 16px; }

/* graphs */
.wtg-gbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; }
.wtg-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 16px; font-weight: 700; margin-right: auto; }
.wtg-key { display: inline-flex; align-items: center; gap: 6px; }
.wtg-key i { display: inline-block; width: 22px; height: 4px; border-radius: 2px; }
.wtg-key--take i { background: #db2777; }
.wtg-key--truth i { background: var(--tlg-text); }
.wtg-key--band i { height: 14px; background: rgba(22, 163, 74, .3); border: 1.5px dashed #15803d; }
.wtg-togs { display: flex; gap: 6px; }
.wtg-togs[hidden], .wtg-replays[hidden] { display: none; }
.ps-chip.wtg-tog { min-height: 40px; padding: 4px 14px; font-size: 16px; }
.ps-chip.wtg-tog[aria-pressed="true"] { background: var(--ps-accent); border-color: var(--ps-accent); color: var(--ps-accent-ink); }
.ps-chip.wtg-tog[aria-disabled="true"] { cursor: default; }
.wtg-replays { display: flex; gap: 6px; }
.ps-btn.wtg-rbtn { min-height: 40px; padding: 4px 12px; font-size: 16px; }
.wtg-graphs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.wtg-gcell { position: relative; flex: 1; min-height: 0; }
.wtg-gcell .plg { gap: 0; }
.wtg-gcell .plg-legend:empty { display: none; }
.wtg-ov { position: absolute; left: 0; top: 0; pointer-events: none; }

/* drive panel (PracticeMotion) */
.wtg-drive { display: flex; flex-direction: column; gap: 8px; }

/* description cards */
.wtg-dcards { display: flex; flex-direction: column; gap: 8px; }
.wtg-dcard { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; text-align: left; border-radius: 12px; border: 2px solid var(--tlg-border-strong); background: var(--tlg-surface); color: var(--tlg-text); font: inherit; font-size: 16px; font-weight: 600; line-height: 1.25; cursor: pointer; }
.wtg-dcard[aria-checked="true"] { border-color: var(--ps-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ps-accent) 35%, transparent); }
.wtg-letter { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tlg-surface-2); border: 2px solid var(--tlg-border-strong); font-weight: 900; font-size: 16px; }
[aria-checked="true"] > .wtg-letter { background: var(--ps-accent); border-color: var(--ps-accent); color: var(--ps-accent-ink); }
.wtg-dcard.is-right, .wtg-gcard.is-right { border-color: #15803d; box-shadow: 0 0 0 3px rgba(21, 128, 61, .35); }
.wtg-dcard.is-wrong, .wtg-gcard.is-wrong { border-color: #b91c1c; border-style: dashed; }
.wtg-dcard.is-right::after, .wtg-gcard.is-right::after { content: '✓'; margin-left: auto; color: #15803d; font-weight: 900; font-size: 20px; }
.wtg-dcard.is-wrong::after, .wtg-gcard.is-wrong::after { content: '✗'; margin-left: auto; color: #b91c1c; font-weight: 900; font-size: 20px; }
.wtg-dcard:disabled, .wtg-gcard:disabled { cursor: default; opacity: 1; }

/* graph cards */
.wtg-gcards { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); gap: 8px; }
.wtg-gcards--set { grid-template-columns: 1fr; }
.wtg-gcard { position: relative; display: flex; align-items: center; gap: 8px; min-height: 0; padding: 6px 10px 6px 6px; border-radius: 12px; border: 2px solid var(--tlg-border-strong); background: var(--tlg-surface); color: var(--tlg-text); font: inherit; cursor: pointer; overflow: hidden; }
.wtg-gcard[aria-checked="true"] { border-color: var(--ps-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ps-accent) 35%, transparent); }
.wtg-gcard-g { flex: 1; min-width: 0; height: 100%; display: flex; gap: 4px; align-items: center; justify-content: center; }
.wtg-gcard-g svg { display: block; width: 100%; height: 100%; max-height: 100%; border-radius: 6px; }
.wtg-gcards--set .wtg-gcard-g svg { width: 33%; }
.wtg-gcard.is-right::after, .wtg-gcard.is-wrong::after { position: absolute; top: 4px; right: 8px; }
.ps-btn.wtg-watch { min-height: 52px; font-size: 18px; }
.wtg-picked { margin: 0; font-size: 16px; font-weight: 700; }

/* Briefing example */
.wtg-example svg { display: block; width: 100%; height: auto; }
.wtg-example { background: #fff; border-radius: 10px; padding: 4px; }

/* The assignment card's usual corner (bottom-right of the stage) covers Retry take / the keypad: use the empty bottom
   of the customer column instead (as Free-Body Garage does). */
@media (min-width: 901px) {
  html.ps-locked:has(.wtg) .lga-card { right: auto; left: 12px; }
  html.ps-locked:has(.wtg):has(.lga-card) .ps-side { padding-bottom: 84px; }
}
@media (max-width: 1100px) { .wtg-bottom { grid-template-columns: minmax(0, 1fr) 380px; } }
@media (max-width: 900px) {
  .wtg { position: static; grid-template-rows: 200px auto; }
  .wtg-bottom { grid-template-columns: 1fr; }
  .wtg-graphs { min-height: 300px; }
  .wtg-gcards { min-height: 420px; }
  .wtg-right { overflow: visible; }
}
