/* Match with Tactix window (see tactix.js) — uses the page's colour tokens and .btn styles. */
dialog.tx-dialog{width:min(1100px, 94vw); max-height:88vh; border:1px solid var(--line); border-radius:12px; padding:0; background:var(--surface); color:var(--ink); box-shadow:0 20px 60px rgba(0,0,0,.35)}
dialog.tx-dialog::backdrop{background:rgba(0,0,0,.45)}
dialog.tx-dialog[open]{display:flex; flex-direction:column}
.tx-head{display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line)}
.tx-head .btn{margin-left:auto}
.tx-body{padding:12px 16px 16px; display:flex; flex-direction:column; gap:10px; overflow:auto}
.tx-body [data-tx="result"]{display:flex; flex-direction:column; gap:10px}
.tx-body [data-tx="result"][hidden]{display:none}
.tx-intro{margin:0; font-size:12.5px; color:var(--muted); line-height:1.5}
.tx-intro code{font-family:var(--mono); font-size:11.5px}
.tx-row{display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px}
.tx-check{display:inline-flex; align-items:center; gap:6px; font-size:12.5px}
.tx-busy{display:flex; align-items:center; gap:10px; background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:10px 12px; font-size:13px; font-weight:600}
.tx-busy[hidden]{display:none}
.tx-spin{width:16px; height:16px; border-radius:50%; border:2px solid var(--line); border-top-color:var(--run); flex:0 0 auto}
@media (prefers-reduced-motion:no-preference){ .tx-spin{animation:tx-spin .8s linear infinite} }
@keyframes tx-spin{to{transform:rotate(360deg)}}
.tx-dimmed{opacity:.45; pointer-events:none}
dialog.tx-dialog input:disabled, dialog.tx-dialog button:disabled{cursor:not-allowed}
.tx-saved{display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; background:var(--run-soft); border:1px solid var(--run); border-radius:8px; padding:8px 12px; font-size:13px}
.tx-saved[hidden], .tx-row[hidden]{display:none}
.tx-savedacts{margin-left:auto; display:flex; gap:6px}
.tx-summary{display:flex; flex-wrap:wrap; gap:8px}
.tx-warn{background:var(--accent-soft); border:1px solid var(--accent); border-radius:8px; padding:8px 12px; font-size:13px}
.tx-warn[hidden]{display:none}
.tx-summary > span{background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:4px 10px; font-size:12.5px}
.tx-tabs{display:inline-flex; border:1px solid var(--line); border-radius:6px; overflow:hidden}
.tx-tabs button{border:0; background:var(--surface-2); padding:5px 11px; font:inherit; font-size:12.5px; color:var(--muted); cursor:pointer}
.tx-tabs button + button{border-left:1px solid var(--line)}
.tx-tabs button[aria-selected="true"], .tx-tabs button[aria-pressed="true"]{background:var(--ink); color:var(--surface); font-weight:600}
.tx-dim{font-size:12px; color:var(--muted)}
.tx-table{max-height:300px; overflow:auto; border:1px solid var(--line); border-radius:8px}
.tx-table table{width:100%; border-collapse:collapse; font-size:12.5px}
.tx-table th{position:sticky; top:0; background:var(--surface); text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); padding:7px 10px; border-bottom:1px solid var(--line); white-space:nowrap}
.tx-table td{padding:7px 10px; border-bottom:1px solid var(--line); vertical-align:top}
.tx-table tr:last-child td{border-bottom:0}
.tx-t{font-family:var(--mono); font-size:11.5px; white-space:nowrap}
.tx-id{font-size:10.5px}
.tx-empty{text-align:center; color:var(--muted); padding:20px}
.tx-chip{display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:600; border-radius:999px; padding:2px 8px; white-space:nowrap}
.tx-chip::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor}
.tx-chip.ok{color:var(--ok); background:var(--ok-soft)}
.tx-chip.warn{color:var(--accent-strong); background:var(--accent-soft)}
.tx-chip.info{color:var(--run); background:var(--run-soft)}
.tx-report{max-height:min(560px, 60vh); border:1px solid var(--line); border-radius:8px; padding:12px}
.tx-preview{margin:0; max-height:220px; overflow:auto; padding:10px; font:11.5px/1.5 var(--mono); white-space:pre; background:var(--surface-2); border-radius:8px}

/* The "Match Tactix" button on every page: a solid blue, full-size button so it
   stands apart from the outlined CSV / JSON / Sheet downloads beside it. */
.btn.tactix{background:var(--run); border-color:var(--run); color:var(--surface); font-weight:600; padding:7px 14px; font-size:13px}
.btn.tactix:hover{filter:brightness(1.08); border-color:var(--run)}
.btn.tactix::before{content:"⇄"; font-weight:700; margin-right:2px}
/* a game with a saved match: green with a tick */
.btn.tactix.matched{background:var(--ok); border-color:var(--ok)}
.btn.tactix.matched:hover{border-color:var(--ok)}
.btn.tactix.matched::before{content:"✓"}
/* "Is this Tactix's final clipping?" — use the file for Clip Test */
.tx-ask{display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; background:var(--surface-2); border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:8px; padding:10px 12px; font-size:13px; line-height:1.5}
.tx-ask[hidden]{display:none}
.tx-ask > div{flex:1 1 420px}
.tx-ask .tx-dim{margin-top:4px}
dialog.tx-dialog [hidden]{display:none !important}
