/* ==========================================================================
   TACTICS LAB — Phase 1 styles
   Everything is scoped to #tl-root / .tl-* so nothing here can affect the
   rest of the platform (and nothing in the platform's CSS is relied on
   beyond the fonts index.html already loads).
   ========================================================================== */
body.tl-open{overflow:hidden;}

.tl-root{
  --tl-bg:#06080c; --tl-panel:#090c12; --tl-line:rgba(255,255,255,0.08); --tl-line-2:rgba(255,255,255,0.14);
  --tl-text:#eef2f7; --tl-muted:#8791a1; --tl-dim:#5a6372; --tl-accent:#5ac8fa; --tl-danger:#ff6b7d;
  position:fixed;inset:0;z-index:9000;background:var(--tl-bg);color:var(--tl-text);
  font-family:'Manrope','Segoe UI',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
}
.tl-root[hidden]{display:none;}
.tl-root *{box-sizing:border-box;}
.tl-root button{font:inherit;color:inherit;cursor:pointer;}
.tl-root h1,.tl-root h2{margin:0;font-weight:600;}

/* ---------- layout ---------- */
.tl-app{
  height:100dvh;display:grid;grid-template-columns:380px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);
  grid-template-areas:"head head" "side stage";
}
.tl-head{grid-area:head;}
.tl-side{grid-area:side;overflow-y:auto;background:var(--tl-panel);border-right:1px solid var(--tl-line);}
.tl-stage{grid-area:stage;display:flex;flex-direction:column;min-width:0;min-height:0;}

/* ---------- header ---------- */
.tl-head{
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;
  padding:12px 22px;border-bottom:1px solid var(--tl-line);background:var(--tl-bg);
}
.tl-head-l{display:flex;align-items:center;gap:18px;min-width:0;}
.tl-head-r{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.tl-exit{background:none;border:1px solid var(--tl-line-2);border-radius:999px;padding:7px 14px;font-size:13px;font-weight:600;color:var(--tl-muted);}
.tl-exit:hover{color:var(--tl-text);border-color:var(--tl-text);}
.tl-title h1{font-family:'Outfit','Manrope',sans-serif;font-size:22px;letter-spacing:0.14em;text-transform:uppercase;line-height:1;}
.tl-title span{display:block;margin-top:5px;font-size:10.5px;font-weight:700;letter-spacing:0.22em;text-transform:uppercase;color:var(--tl-dim);}
.tl-team-switch{display:inline-flex;gap:6px;}
.tl-team-item{position:relative;}
.tl-team-btn{display:inline-flex;align-items:center;gap:9px;background:rgba(255,255,255,0.03);border:1px solid var(--tl-line-2);border-radius:999px;padding:6px 14px;}
.tl-team-btn i{width:14px;height:14px;border-radius:50%;border:1.5px solid rgba(255,255,255,0.8);display:inline-block;flex:none;}
.tl-team-btn-txt{display:flex;flex-direction:column;align-items:flex-start;line-height:1.15;}
.tl-team-btn-txt small{font-size:9px;font-weight:800;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-dim);}
.tl-team-btn-txt b{font-size:13px;font-weight:700;color:var(--tl-muted);}
.tl-team-btn .tl-caret{width:9px;height:6px;color:var(--tl-dim);flex:none;margin-left:2px;}
.tl-team-btn.is-active{border-color:var(--tl-text);background:rgba(255,255,255,0.07);}
.tl-team-btn.is-active .tl-team-btn-txt b{color:var(--tl-text);}
.tl-team-menu{left:0;right:auto;top:calc(100% + 6px);min-width:200px;}
.tl-kit-item{display:flex;align-items:center;gap:10px;}
.tl-ghost-btn{background:none;border:1px solid var(--tl-line);border-radius:8px;padding:7px 12px;font-size:12px;font-weight:600;color:var(--tl-muted);}
.tl-ghost-btn:hover{color:var(--tl-text);border-color:var(--tl-line-2);}
.tl-ghost-btn.is-active{color:var(--tl-accent);border-color:var(--tl-accent);}
.tl-ghost-btn.is-danger:hover{color:var(--tl-danger);border-color:var(--tl-danger);}
/* "chrome" cluster (undo/redo, orientation, zoom, panel show/hide, focus) — always in the
   top bar, deliberately smaller and quieter than page-level actions so it reads as utility,
   not as more choices to weigh. */
.tl-chrome{display:flex;align-items:center;gap:6px;padding-left:10px;margin-left:2px;border-left:1px solid var(--tl-line);}
.tl-chrome .tl-viewctl{gap:5px;}
.tl-chrome .tl-tool,.tl-chrome .tl-zoomctl button{opacity:0.85;}

/* ---------- side panels ---------- */
.tl-block{padding:22px 24px 26px;border-bottom:1px solid var(--tl-line);}
.tl-block-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:16px;}
.tl-block-head h2{font-size:11px;font-weight:700;letter-spacing:0.22em;text-transform:uppercase;color:var(--tl-muted);}
.tl-big{font-family:'Outfit','Manrope',sans-serif;font-size:38px;font-weight:600;line-height:1;letter-spacing:0.02em;}
.tl-big small{display:block;font-family:'Manrope',sans-serif;font-size:10px;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-accent);text-align:right;margin-top:4px;}
.tl-for{font-size:11.5px;font-weight:600;color:var(--tl-accent);text-align:right;}
.tl-sub-head{margin:22px 0 10px;font-size:10.5px;font-weight:700;letter-spacing:0.2em;text-transform:uppercase;color:var(--tl-dim);}
.tl-adv-head{margin-top:26px;color:var(--tl-muted);}
.tl-count{margin-left:6px;color:var(--tl-accent);letter-spacing:0.05em;}
.tl-note,.tl-hint,.tl-preview{margin:12px 0 0;font-size:12.5px;line-height:1.5;color:var(--tl-muted);}
.tl-preview{margin:-4px 0 4px;padding:9px 12px;border-left:2px solid var(--tl-accent);background:rgba(90,200,250,0.06);font-size:12px;}
.tl-note b{color:var(--tl-text);}

.tl-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.tl-chip{background:none;border:1px solid var(--tl-line);border-radius:8px;padding:11px 0;font-size:14px;font-weight:700;color:var(--tl-muted);transition:border-color .15s,color .15s;}
.tl-chip:hover{color:var(--tl-text);border-color:var(--tl-line-2);}
.tl-chip.is-active{color:#0a0d12;background:var(--tl-text);border-color:var(--tl-text);}
.tl-formation-select{position:relative;}
.tl-formation-cur{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;background:none;border:1px solid var(--tl-line);border-radius:10px;padding:12px 14px;color:var(--tl-text);}
.tl-formation-cur:hover{border-color:var(--tl-line-2);}
.tl-formation-cur b{font-family:'Outfit','Manrope',sans-serif;font-size:20px;font-weight:600;letter-spacing:0.02em;}
.tl-formation-cur .tl-caret{width:10px;height:7px;color:var(--tl-dim);flex:none;}
.tl-formation-menu{left:0;right:0;top:calc(100% + 6px);max-height:60vh;overflow-y:auto;}
.tl-formation-item{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.tl-formation-item.is-active{background:rgba(255,255,255,0.07);}
.tl-menu-check{font-style:normal;color:var(--tl-accent);}
.tl-fluid{margin-top:16px;padding-top:14px;border-top:1px solid var(--tl-line);position:relative;}
.tl-row-actions{margin-top:12px;}
.tl-link{background:none;border:none;padding:0;font-size:12px;font-weight:600;color:var(--tl-accent);}
.tl-link:hover{text-decoration:underline;}
.tl-kits{display:flex;flex-direction:column;gap:6px;}
.tl-kit{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:8px;border:1px solid var(--tl-line);background:none;text-align:left;transition:border-color .15s,background .15s;}
.tl-kit:hover{border-color:var(--tl-line-2);}
.tl-kit.is-active{border-color:var(--tl-text);background:rgba(255,255,255,0.06);}
.tl-kit-swatch{flex:0 0 auto;width:22px;height:22px;border-radius:50%;border:2px solid rgba(255,255,255,0.35);background:var(--tl-shirt);}
.tl-kit.is-active .tl-kit-swatch{border-color:var(--tl-text);}
.tl-kit-name{font-size:13px;font-weight:600;color:var(--tl-muted);}
.tl-kit.is-active .tl-kit-name{color:var(--tl-text);}
.tl-player-edit{display:grid;grid-template-columns:1fr 70px;gap:10px;}
.tl-player-edit label{display:flex;flex-direction:column;gap:5px;font-size:10.5px;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-dim);}
.tl-player-edit label:last-child{grid-column:1 / -1;}
.tl-player-edit input,.tl-player-edit select{
  background:rgba(255,255,255,0.04);border:1px solid var(--tl-line-2);border-radius:8px;padding:9px 11px;color:var(--tl-text);
  font:600 14px 'Manrope',sans-serif;text-transform:none;letter-spacing:0;width:100%;
}
.tl-player-edit input:focus,.tl-player-edit select:focus{outline:none;border-color:var(--tl-accent);}
.tl-player-edit select option{background:#0b0f15;}

/* settings */
.tl-set{margin-bottom:16px;}
.tl-set-label{display:flex;justify-content:space-between;font-size:12.5px;font-weight:600;color:var(--tl-text);margin-bottom:8px;}
.tl-val{font-family:'Outfit',sans-serif;font-size:16px;color:var(--tl-accent);}
.tl-seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;border:1px solid var(--tl-line-2);border-radius:9px;overflow:hidden;}
.tl-seg button{background:none;border:none;padding:10px 6px;font-size:12px;font-weight:600;color:var(--tl-muted);}
.tl-seg button + button{border-left:1px solid var(--tl-line-2);}
.tl-seg button:hover{color:var(--tl-text);}
.tl-seg button.is-active{background:rgba(255,255,255,0.1);color:var(--tl-text);box-shadow:inset 0 -2px 0 var(--tl-accent);}
.tl-range{width:100%;accent-color:var(--tl-accent);margin:2px 0 0;}
.tl-scale{display:flex;justify-content:space-between;font-size:10.5px;color:var(--tl-dim);}
.tl-instr{display:flex;flex-wrap:wrap;gap:7px;}
.tl-pill{background:none;border:1px solid var(--tl-line-2);border-radius:999px;padding:7px 12px;font-size:12px;font-weight:600;color:var(--tl-muted);}
.tl-pill:hover:not(:disabled){color:var(--tl-text);border-color:var(--tl-text);}
.tl-pill.is-active{border-color:var(--tl-accent);color:var(--tl-accent);background:rgba(90,200,250,0.1);}
.tl-pill:disabled{opacity:0.35;cursor:not-allowed;}

/* ---------- tactical state bar ---------- */
.tl-state{padding:14px 26px 0;flex:none;}
.tl-state-select{position:relative;display:inline-block;max-width:100%;}
.tl-state-tab{
  display:flex;align-items:center;gap:14px;text-align:left;background:none;border:1px solid var(--tl-line);border-radius:12px;
  padding:9px 14px;transition:border-color .15s,background .15s;position:relative;width:100%;
}
.tl-state-tab:hover{border-color:var(--tl-line-2);}
.tl-state-tab.is-active{border-color:var(--tl-text);background:rgba(255,255,255,0.05);}
.tl-state-select > .tl-state-tab.is-active::after{content:'';position:absolute;left:14px;right:14px;bottom:-1px;height:2px;background:var(--tl-accent);}
.tl-state-tab.is-trigger .tl-caret{width:10px;height:7px;color:var(--tl-dim);flex:none;margin-left:auto;}
.tl-state-menu{left:0;right:auto;top:calc(100% + 6px);min-width:100%;padding:6px;display:flex;flex-direction:column;gap:4px;}
.tl-state-menu .tl-state-tab{border:none;border-radius:8px;padding:8px 10px;}
.tl-state-menu .tl-state-tab:hover{background:rgba(255,255,255,0.07);}
.tl-state-menu .tl-state-tab.is-active::after{display:none;}
.tl-state-menu .tl-mini{width:26px;height:40px;}
.tl-mini{width:34px;height:52px;flex:none;}
.tl-mini-bg{fill:rgba(255,255,255,0.03);stroke:rgba(255,255,255,0.2);stroke-width:1;}
.tl-mini-ln{stroke:rgba(255,255,255,0.15);stroke-width:1;}
.tl-state-text{display:flex;flex-direction:column;gap:3px;min-width:0;}
.tl-state-text b{font-size:12px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;white-space:nowrap;}
.tl-state-text em{font-style:normal;font-family:'Outfit',sans-serif;font-size:19px;color:var(--tl-muted);white-space:nowrap;}
.tl-state-tab.is-active .tl-state-text em{color:var(--tl-text);}

/* ---------- pitch ---------- */
.tl-pitch-wrap{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:26px 26px 30px;container-type:size;}
.tl-pitch-frame{
  position:relative;container-type:inline-size;aspect-ratio:680 / 1050;
  width:min(100cqw, calc(100cqh * 0.6476));border-radius:3px;
  box-shadow:0 30px 80px rgba(0,0,0,0.55),0 0 0 1px rgba(255,255,255,0.05);
  touch-action:pan-y;user-select:none;-webkit-user-select:none;
}
.tl-pitch-svg,.tl-zones,.tl-trail{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
.tl-pitch-svg{overflow:visible;}
.tl-band{fill:#0d1d19;}
.tl-band.is-alt{fill:#0f2420;}
.tl-ln{stroke:rgba(255,255,255,0.5);stroke-width:1.6;vector-effect:non-scaling-stroke;}
.tl-spot{fill:rgba(255,255,255,0.6);}
.tl-goal{stroke:rgba(255,255,255,0.75);stroke-width:2;vector-effect:non-scaling-stroke;}
.tl-zones line{stroke:rgba(90,200,250,0.35);stroke-width:1;stroke-dasharray:4 6;vector-effect:non-scaling-stroke;}
.tl-trail{opacity:0;}
.tl-trail.is-on{opacity:1;}
.tl-trail line{stroke:var(--tl-accent);stroke-width:2;stroke-dasharray:5 5;vector-effect:non-scaling-stroke;}
.tl-side-tag{
  position:absolute;left:50%;transform:translateX(-50%);z-index:2;pointer-events:none;
  font-size:clamp(9px,1.8cqw,11px);font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:rgba(255,255,255,0.35);white-space:nowrap;
}
.tl-side-tag.is-top{top:1.2%;}
.tl-side-tag.is-bottom{bottom:1.2%;color:rgba(255,255,255,0.6);}
.tl-side-tag i{font-style:normal;color:var(--tl-accent);letter-spacing:0.1em;}

.tl-nodes{position:absolute;inset:0;}
.tl-node{
  --n:clamp(32px,7.8cqw,56px);
  position:absolute;width:var(--n);height:var(--n);transform:translate(-50%,-50%);padding:0;background:none;border:none;
  touch-action:none;cursor:grab;z-index:5;-webkit-tap-highlight-color:transparent;
}
.tl-node.is-gliding,.tl-ball.is-gliding{transition:left var(--tl-glide,450ms) cubic-bezier(.3,.7,.2,1),top var(--tl-glide,450ms) cubic-bezier(.3,.7,.2,1);}
.is-preview .tl-node:not(.is-ghost){cursor:default;}
.is-preview .tl-ball{cursor:default;pointer-events:none;}
.tl-shirt{
  display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;
  background:var(--tl-shirt);border:2px solid rgba(255,255,255,0.9);box-shadow:0 4px 12px rgba(0,0,0,0.5);
  transition:transform .12s ease,box-shadow .12s ease;
}
.tl-node.is-light .tl-shirt{border-color:rgba(255,255,255,0.9);}
.tl-shirt b{font-family:'Outfit',sans-serif;font-weight:600;font-size:calc(var(--n) * 0.44);line-height:1;color:var(--tl-shirt-text);text-shadow:none;}
.tl-name,.tl-role{position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap;pointer-events:none;text-align:center;}
.tl-name{
  top:calc(100% + 3px);padding:1px 6px;border-radius:5px;background:rgba(6,8,12,0.78);
  font-size:clamp(9px,1.9cqw,12px);font-weight:800;letter-spacing:0.05em;color:#fff;
}
.tl-role{top:calc(100% + clamp(15px,3.3cqw,21px));font-size:clamp(8px,1.5cqw,10px);font-weight:700;letter-spacing:0.12em;color:var(--tl-accent);text-shadow:0 1px 2px rgba(0,0,0,0.8);}
.tl-node:hover .tl-shirt{transform:scale(1.07);}
.tl-node:focus-visible{outline:none;}
.tl-node:focus-visible .tl-shirt,.tl-node.is-selected .tl-shirt{box-shadow:0 0 0 3px var(--tl-bg),0 0 0 5px var(--tl-accent),0 6px 16px rgba(0,0,0,0.5);}
.tl-node.is-dragging{z-index:40;cursor:grabbing;}
.tl-node.is-dragging .tl-shirt{transform:scale(1.14);box-shadow:0 0 0 3px var(--tl-bg),0 0 0 5px var(--tl-accent),0 14px 26px rgba(0,0,0,0.6);}
.tl-node.is-ghost{pointer-events:none;opacity:0.4;z-index:3;cursor:default;}
.tl-node.is-ghost .tl-shirt{transform:scale(0.86);box-shadow:none;}
.tl-node.is-ghost .tl-role{display:none;}
.tl-node.is-ghost .tl-name{background:none;color:rgba(255,255,255,0.7);}

.tl-origin{
  position:absolute;width:clamp(32px,7.8cqw,56px);height:clamp(32px,7.8cqw,56px);transform:translate(-50%,-50%);z-index:4;
  border:2px dashed var(--tl-accent);border-radius:50%;opacity:0.7;pointer-events:none;
}
.tl-origin[hidden],.tl-tag[hidden]{display:none;}
.tl-tag{
  position:absolute;z-index:60;transform:translate(-50%,calc(-100% - clamp(30px,7cqw,50px)));pointer-events:none;
  background:rgba(6,8,12,0.94);border:1px solid var(--tl-line-2);border-radius:8px;padding:6px 10px;white-space:nowrap;
  font-size:12px;color:var(--tl-text);
}
.tl-tag.is-below{transform:translate(-50%,clamp(38px,9cqw,64px));}
.tl-tag b{font-weight:800;letter-spacing:0.05em;margin-right:6px;}
.tl-tag span{display:block;margin-top:2px;font-size:11px;color:var(--tl-muted);}

/* ---------- wide desktop: formation | pitch | tactics ---------- */
@media (min-width:1280px){
  .tl-app{grid-template-columns:340px minmax(0,1fr) 380px;grid-template-areas:"head head head" "form stage sett";}
  .tl-side{display:contents;}
  .tl-left{grid-area:form;overflow-y:auto;background:var(--tl-panel);border-right:1px solid var(--tl-line);}
  .tl-settings{grid-area:sett;overflow-y:auto;background:var(--tl-panel);border-left:1px solid var(--tl-line);border-bottom:none;}
  .tl-left .tl-block:last-child{border-bottom:none;}
}

/* ---------- mobile / tablet ---------- */
@media (max-width:959px){
  .tl-root{overflow-y:auto;}
  .tl-app{display:flex;flex-direction:column;height:auto;min-height:100dvh;}
  .tl-side,.tl-stage{display:contents;}
  .tl-head{order:0;grid-template-columns:1fr;gap:10px;padding:12px 14px;position:sticky;top:0;z-index:20;}
  .tl-head-l{justify-content:space-between;}
  .tl-team-switch{display:flex;width:100%;}
  .tl-team-item{flex:1;}
  .tl-team-btn{width:100%;justify-content:center;padding:8px 8px;}
  .tl-head-r{justify-content:flex-start;}
  .tl-state{order:1;padding:14px 14px 0;}
  .tl-pitch-wrap{order:2;display:block;container-type:inline-size;padding:16px 14px 30px;}
  .tl-pitch-frame{width:100%;}
  .tl-settings{order:3;background:var(--tl-panel);}
  .tl-left{display:contents;}
  .tl-formation{order:4;background:var(--tl-panel);}
  .tl-inspector{order:5;background:var(--tl-panel);}
  /* sections collapse on small screens, so the pitch stays first and controls sit below it */
  .tl-block-head{cursor:pointer;}
  .tl-block-head .tl-chev{display:inline-block;}
  .tl-block.is-collapsed .tl-block-body{display:none;}
  .tl-block.is-collapsed .tl-chev{transform:rotate(-90deg);}
  .tl-block.is-collapsed .tl-block-head{margin-bottom:0;}
  .tl-state-tabs{gap:8px;}
  .tl-state-tab{flex-direction:column;align-items:flex-start;gap:6px;padding:9px 10px;}
  .tl-state-text b{font-size:10px;letter-spacing:0.08em;white-space:normal;line-height:1.2;}
  .tl-state-text em{font-size:16px;}
  .tl-mini{width:22px;height:34px;}
  .tl-block{padding:20px 16px 24px;}
  .tl-chips{grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media (max-width:420px){
  .tl-exit span{display:none;}
  .tl-title h1{font-size:18px;}
}

/* ==========================================================================
   Phase 2 — tactical behaviour, fluid formation, cues, inspector
   ========================================================================== */
.tl-chev{display:none;width:8px;height:8px;border-right:2px solid var(--tl-muted);border-bottom:2px solid var(--tl-muted);transform:rotate(45deg);margin:0 4px 3px 10px;transition:transform .15s;flex:none;}
/* SVG dropdown caret (a real path, not the border-trick .tl-chev above) -- kept as its own
   class so it never inherits .tl-chev's border/rotate/margin, which is what was distorting it. */
.tl-caret{display:inline-block;flex:none;}
.tl-block-head{align-items:center;}
.tl-block-head h2{flex:1;}

/* state header + toolbar */
.tl-context{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 14px;padding:14px 4px 4px;}
.tl-context b{font-size:11px;font-weight:700;letter-spacing:0.22em;text-transform:uppercase;color:var(--tl-accent);}
.tl-context span{font-family:'Outfit',sans-serif;font-size:26px;line-height:1;letter-spacing:0.02em;}
.tl-context em{font-style:normal;font-size:12px;color:var(--tl-muted);}
.tl-arrow{color:var(--tl-accent);margin:0 2px;}
.tl-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:10px 0 4px;}
.tl-modes,.tl-poss{display:inline-flex;border:1px solid var(--tl-line-2);border-radius:999px;padding:3px;background:rgba(255,255,255,0.03);}
.tl-modes button,.tl-poss button{background:none;border:none;border-radius:999px;padding:7px 14px;font-size:11.5px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--tl-muted);white-space:nowrap;}
.tl-modes button.is-active,.tl-poss button.is-active{background:var(--tl-text);color:#0a0d12;}
.tl-tools{display:flex;flex-wrap:wrap;gap:6px;margin-left:auto;}
.tl-tool{background:none;border:1px solid var(--tl-line);border-radius:8px;padding:7px 12px;font-size:12px;font-weight:600;color:var(--tl-muted);}
.tl-tool:hover:not(:disabled){color:var(--tl-text);border-color:var(--tl-line-2);}
.tl-tool.is-active{color:var(--tl-accent);border-color:var(--tl-accent);}
.tl-tool:disabled{opacity:0.35;cursor:not-allowed;}
.tl-preview-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:6px 0 2px;}
.tl-seq{display:flex;align-items:center;gap:8px;font-size:11.5px;font-weight:600;color:var(--tl-dim);flex-wrap:wrap;}
.tl-seq i{font-style:normal;color:var(--tl-dim);}
.tl-seq span.is-active{color:var(--tl-text);}

/* ball, compare ghosts */
.tl-ball{
  position:absolute;width:clamp(16px,3.6cqw,26px);height:clamp(16px,3.6cqw,26px);transform:translate(-50%,-50%);z-index:20;cursor:grab;touch-action:none;
  border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff 0 40%,#d9dde3 100%);box-shadow:0 3px 8px rgba(0,0,0,0.55),0 0 0 2px rgba(0,0,0,0.25);
}
.tl-ball::after{content:'';position:absolute;inset:28%;border-radius:50%;background:#1a1d24;clip-path:polygon(50% 0,100% 38%,82% 100%,18% 100%,0 38%);}
.tl-ball.is-dragging{cursor:grabbing;transform:translate(-50%,-50%) scale(1.2);z-index:70;}
.tl-baseghost{
  position:absolute;width:clamp(32px,7.8cqw,56px);height:clamp(32px,7.8cqw,56px);transform:translate(-50%,-50%);border:1.5px dashed rgba(255,255,255,0.4);
  border-radius:50%;z-index:2;pointer-events:none;display:flex;align-items:center;justify-content:center;
}
.tl-baseghost i{font-style:normal;font-size:clamp(8px,1.5cqw,10px);font-weight:700;letter-spacing:0.08em;color:rgba(255,255,255,0.5);}

/* cue layer (drawn in the pitch's own 680 x 1050 units) */
.tl-cues,.tl-trails{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:6;overflow:visible;}
.tl-cue-line{stroke:var(--tl-accent);stroke-width:2;stroke-dasharray:6 5;opacity:0.55;vector-effect:non-scaling-stroke;fill:none;}
.tl-cue-line.is-focus{opacity:1;stroke-width:2.6;stroke-dasharray:none;}
.tl-cue-head{fill:var(--tl-accent);opacity:0.6;}
.tl-cue-head.is-focus{opacity:1;}
.tl-cue-link{stroke:var(--tl-accent);stroke-width:1.5;opacity:0.4;vector-effect:non-scaling-stroke;}
.tl-cue-mark{stroke:#ffb454;stroke-width:1.8;stroke-dasharray:2 5;stroke-linecap:round;opacity:0.9;vector-effect:non-scaling-stroke;}
.tl-cue-ring{fill:rgba(90,200,250,0.07);stroke:var(--tl-accent);stroke-width:1.8;stroke-dasharray:8 6;vector-effect:non-scaling-stroke;}
.tl-cue-target{fill:none;stroke:var(--tl-accent);stroke-width:2;stroke-dasharray:4 4;vector-effect:non-scaling-stroke;}
.tl-cue-space{fill:rgba(90,200,250,0.08);stroke:var(--tl-accent);stroke-width:1.5;stroke-dasharray:5 5;vector-effect:non-scaling-stroke;}
.tl-cue-band{stroke:var(--tl-accent);stroke-width:2.4;vector-effect:non-scaling-stroke;}
.tl-cue-guide{stroke:rgba(255,255,255,0.35);stroke-width:1.5;stroke-dasharray:4 6;vector-effect:non-scaling-stroke;}
.tl-cue-block{fill:rgba(90,200,250,0.06);stroke:var(--tl-accent);stroke-width:1.6;stroke-dasharray:6 5;vector-effect:non-scaling-stroke;}
.tl-zone-hl{fill:rgba(90,200,250,0.12);}
.tl-zone-hl.is-soft{fill:rgba(90,200,250,0.07);}
.tl-cue-text{fill:rgba(255,255,255,0.7);font-size:15px;font-weight:700;letter-spacing:3px;font-family:'Manrope',sans-serif;}
.tl-cue-text.is-big{font-size:20px;fill:var(--tl-accent);}
.tl-trail-fade{stroke:rgba(255,255,255,0.55);stroke-width:2;stroke-dasharray:3 5;vector-effect:non-scaling-stroke;animation:tl-fade 1.8s ease-out forwards;}
@keyframes tl-fade{0%{opacity:0.9;}100%{opacity:0;}}

/* ball selector */
.tl-ball-sel{display:flex;gap:14px;align-items:center;}
.tl-zone-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:3px;width:78px;height:112px;flex:none;padding:4px;border:1px solid var(--tl-line-2);border-radius:6px;background:rgba(255,255,255,0.03);}
.tl-zone-cell{background:rgba(255,255,255,0.06);border:none;border-radius:3px;padding:0;}
.tl-zone-cell:hover{background:rgba(255,255,255,0.16);}
.tl-zone-cell.is-active{background:var(--tl-accent);}
.tl-ball-text{display:flex;flex-direction:column;gap:6px;min-width:0;}
.tl-ball-text b{font-size:13px;}
.tl-ball-text span{font-size:11.5px;line-height:1.45;color:var(--tl-muted);}

/* collapsible tactics groups */
.tl-group{border:1px solid var(--tl-line);border-radius:10px;margin-bottom:10px;background:rgba(255,255,255,0.02);}
.tl-group.is-relevant{border-color:var(--tl-line-2);}
.tl-group-head{display:flex;align-items:center;gap:10px;width:100%;background:none;border:none;padding:13px 14px;text-align:left;}
.tl-group-head span{font-size:12px;font-weight:700;letter-spacing:0.16em;text-transform:uppercase;}
.tl-group-head em{flex:1;font-style:normal;font-size:11px;color:var(--tl-dim);}
.tl-group-head .tl-chev{display:inline-block;margin:0;}
.tl-group.is-open .tl-chev{transform:rotate(225deg);}
.tl-group-body{padding:2px 14px 6px;}
.tl-instr-block{margin-bottom:6px;opacity:0.7;}
.tl-instr-block.is-relevant{opacity:1;}
.tl-sub-head em{font-style:normal;margin-left:8px;text-transform:none;letter-spacing:0;font-weight:500;color:var(--tl-dim);}
.tl-count.is-full{color:#ffb454;}
.tl-pill.is-full:not(.is-active){opacity:0.6;}
.tl-replace{margin:0 0 12px;padding:12px 14px;border:1px solid #ffb454;border-radius:10px;background:rgba(255,180,84,0.08);font-size:12.5px;line-height:1.5;}
.tl-replace b{display:block;margin-bottom:4px;color:#ffb454;}
.tl-replace .tl-instr{margin-top:10px;align-items:center;}

/* tactical inspector */
.tl-layers{display:flex;flex-direction:column;gap:10px;margin:16px 0 4px;}
.tl-layers div{display:flex;flex-direction:column;gap:2px;padding-left:12px;border-left:2px solid var(--tl-line-2);}
.tl-layers div:last-child{border-left-color:var(--tl-accent);}
.tl-layers span{font-size:10.5px;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-dim);}
.tl-layers b{font-size:12.5px;font-weight:600;}
.tl-infl{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;}
.tl-infl li{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;align-items:baseline;font-size:12.5px;}
.tl-infl li b{font-weight:700;}
.tl-infl li em{grid-column:2;font-style:normal;color:var(--tl-muted);}
.tl-tier{font-size:9.5px;font-weight:800;letter-spacing:0.1em;text-transform:uppercase;padding:2px 6px;border-radius:4px;background:rgba(255,255,255,0.08);color:var(--tl-muted);grid-row:span 2;}
.tl-tier.is-t2{background:rgba(90,200,250,0.15);color:var(--tl-accent);}
.tl-tier.is-t3{background:rgba(255,180,84,0.15);color:#ffb454;}
.tl-why{margin:14px 0 0;font-size:12.5px;line-height:1.55;color:var(--tl-muted);}
.tl-why b{color:var(--tl-text);display:block;margin-top:4px;}

/* root-level state hints */
.tl-root.is-preview .tl-side-tag.is-bottom i{color:#ffb454;}
.tl-sm{display:none;}
@media (max-width:959px){
  .tl-lg{display:none;}
  .tl-sm{display:inline;}
  /* keep the pitch as high on the screen as possible */
  .tl-head{grid-template-columns:1fr auto;grid-template-areas:"l r" "sw sw";gap:8px 10px;padding:10px 14px;position:static;}
  .tl-head-l{grid-area:l;}
  .tl-head-r{grid-area:r;flex-wrap:wrap;justify-content:flex-end;}
  .tl-chrome{flex-basis:100%;justify-content:flex-end;padding-left:0;margin-left:0;border-left:none;border-top:1px solid var(--tl-line);padding-top:8px;margin-top:4px;overflow-x:auto;scrollbar-width:none;}
  .tl-chrome::-webkit-scrollbar{display:none;}
  .tl-team-switch{grid-area:sw;}
  .tl-head-r .tl-ghost-btn{padding:6px 9px;font-size:11px;white-space:nowrap;}
  .tl-context em{display:none;}
  .tl-context{padding-top:10px;}
  .tl-mini{width:26px;height:40px;}
  .tl-context span{font-size:22px;}
  .tl-toolbar{gap:8px;}
  .tl-tools{margin-left:0;}
  .tl-modes button,.tl-poss button{padding:7px 10px;}
  .tl-ball-sel{flex-direction:row;}
}

/* ==========================================================================
   Phase 3 — tactical lenses & spatial analysis
   Overlays never rely on colour alone: outline style, numbers and labels carry the meaning.
   ========================================================================== */
.tl-lensbar{display:flex;align-items:center;gap:10px;padding:8px 26px 0;flex:none;min-width:0;}
.tl-lens-select{position:relative;display:flex;align-items:center;gap:10px;min-width:0;}
.tl-lens-label{font-size:10.5px;font-weight:800;letter-spacing:0.16em;text-transform:uppercase;color:var(--tl-dim);white-space:nowrap;}
.tl-lens-cur{display:inline-flex;align-items:center;gap:8px;background:none;border:1px solid var(--tl-line);border-radius:999px;padding:7px 13px;color:var(--tl-text);white-space:nowrap;}
.tl-lens-cur:hover{border-color:var(--tl-line-2);}
.tl-lens-cur b{font-size:12.5px;font-weight:700;}
.tl-lens-cur .tl-caret{width:9px;height:6px;color:var(--tl-dim);flex:none;}
.tl-lens-menu{left:0;right:auto;top:calc(100% + 6px);min-width:260px;max-height:60vh;overflow-y:auto;}
/* .tl-menu-item (display:block) and .tl-lens-item are equal specificity and .tl-menu-item comes
   later in the sheet, so it was winning and collapsing this back to inline flow with no gap --
   the doubled-up selector below outranks it regardless of source order. */
.tl-menu-item.tl-lens-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;}
.tl-lens-item b{font-size:13px;font-weight:700;}
.tl-lens-item small{font-size:11px;font-weight:500;color:var(--tl-muted);}
.tl-lens-item.is-active{background:rgba(255,255,255,0.07);}
.tl-lens-tools{display:flex;gap:6px;flex:none;}
.tl-lens{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4;overflow:visible;}
.tl-pitch-wrap.is-zoom{overflow:hidden;}
.tl-pitch-frame{transition:transform .35s ease;}
.tl-pitch-frame.is-zoom{transform:scale(1.6);}
.tl-node.is-dim{opacity:0.28;}

.tl-l-text{fill:rgba(255,255,255,0.75);font-size:17px;font-weight:700;letter-spacing:2px;font-family:'Manrope',sans-serif;}
.tl-l-text.is-small{font-size:14px;letter-spacing:1px;}
.tl-l-text.is-lane{font-size:13px;letter-spacing:2px;fill:rgba(255,255,255,0.4);}
.tl-l-text.is-mine{fill:#5ac8fa;}
.tl-l-text.is-opp,.tl-l-text.is-warn{fill:#ffb454;}
.tl-l-badge rect{fill:rgba(8,12,16,0.82);stroke:rgba(255,255,255,0.35);stroke-width:1.5;vector-effect:non-scaling-stroke;}
.tl-l-badge text{fill:#fff;font-size:15px;font-weight:800;letter-spacing:1.4px;font-family:'Manrope',sans-serif;}
.tl-l-badge.is-mine rect{stroke:#5ac8fa;}
.tl-l-badge.is-opp rect{stroke:#ffb454;stroke-dasharray:5 3;}
.tl-l-frame{fill:none;stroke:rgba(255,255,255,0.22);stroke-width:1.5;stroke-dasharray:3 6;vector-effect:non-scaling-stroke;}
.tl-l-frame.is-opp{stroke:rgba(255,180,84,0.4);}
.tl-l-frame.is-mine{stroke:rgba(90,200,250,0.4);}
.tl-l-shape{stroke-width:2;vector-effect:non-scaling-stroke;opacity:0.7;}
.tl-l-shape.is-strong{opacity:1;stroke-width:3;}
.tl-l-shape.is-mine,.tl-l-link.is-mine,.tl-l-span.is-mine,.tl-l-presslink.is-mine,.tl-l-ring.is-mine,.tl-l-move.is-mine,.tl-l-dot.is-mine,.tl-l-support.is-mine{stroke:#5ac8fa;}
.tl-l-shape.is-opp,.tl-l-link.is-opp,.tl-l-span.is-opp,.tl-l-presslink.is-opp,.tl-l-ring.is-opp,.tl-l-move.is-opp,.tl-l-dot.is-opp,.tl-l-support.is-opp{stroke:#ffb454;}
.tl-l-shape.is-faint{opacity:0.3;}
.tl-l-bracket{stroke:rgba(255,255,255,0.55);stroke-width:1.5;stroke-dasharray:2 4;vector-effect:non-scaling-stroke;}
.tl-l-bracket.is-warn{stroke:#ffb454;stroke-dasharray:none;stroke-width:2.4;}
.tl-l-open{fill:url(#tl-hatch);}
.tl-l-hatch{stroke:rgba(255,255,255,0.16);stroke-width:2;}
.tl-l-heat{fill:#e8edf5;}
.tl-l-heat.is-mine{fill:#5ac8fa;}
.tl-l-heat.is-opp{fill:#ffb454;}
.tl-l-event{fill:none;stroke-width:2;vector-effect:non-scaling-stroke;}
.tl-l-event.is-exposed{stroke:#ffb454;stroke-dasharray:3 4;fill:rgba(255,180,84,0.1);}
.tl-l-event.is-created{stroke:#5ac8fa;stroke-dasharray:8 4;fill:rgba(90,200,250,0.1);}
.tl-l-lane{fill:rgba(255,255,255,0.03);}
.tl-l-lane.is-alt{fill:rgba(255,255,255,0.07);}
.tl-l-laneline{stroke:rgba(255,255,255,0.22);stroke-width:1;stroke-dasharray:4 6;vector-effect:non-scaling-stroke;}
.tl-l-span{stroke-width:2.6;vector-effect:non-scaling-stroke;}
.tl-l-dot{fill:rgba(8,12,16,0.7);stroke-width:2.4;vector-effect:non-scaling-stroke;}
.tl-l-dot.is-opp{stroke-dasharray:3 2;}
.tl-l-corridor{fill:rgba(255,255,255,0.04);stroke:rgba(255,255,255,0.3);stroke-width:1.5;stroke-dasharray:6 6;vector-effect:non-scaling-stroke;}
.tl-l-tint.is-mine{fill:rgba(90,200,250,0.14);}
.tl-l-tint.is-opp{fill:rgba(255,180,84,0.14);}
.tl-l-zone{fill-opacity:0.14;stroke-width:2.4;vector-effect:non-scaling-stroke;}
.tl-l-zone.is-mine{fill:#5ac8fa;stroke:#5ac8fa;}
.tl-l-zone.is-opp{fill:#ffb454;stroke:#ffb454;stroke-dasharray:8 5;}
.tl-l-ring{fill:none;stroke-width:2.4;vector-effect:non-scaling-stroke;}
.tl-l-ring.is-opp{stroke-dasharray:4 3;}
.tl-l-ring.is-first{stroke-width:3.6;}
.tl-l-iso{fill:none;stroke-width:2.4;stroke-dasharray:2 4;vector-effect:non-scaling-stroke;}
.tl-l-iso.is-mine{stroke:#5ac8fa;}
.tl-l-iso.is-opp{stroke:#ffb454;}
.tl-l-ball{fill:rgba(255,255,255,0.05);stroke:rgba(255,255,255,0.6);stroke-width:1.6;stroke-dasharray:3 6;vector-effect:non-scaling-stroke;}
.tl-mu-ball{fill:#f5d947;stroke:rgba(10,13,18,0.8);stroke-width:0.6;vector-effect:non-scaling-stroke;}
.tl-l-link{stroke-width:1.5;opacity:0.4;vector-effect:non-scaling-stroke;}
.tl-l-link.is-focus{opacity:1;stroke-width:2.6;}
.tl-l-link.is-blocked{stroke-dasharray:6 6;}
.tl-l-link.is-foe{stroke:#ffb454;stroke-width:2;stroke-dasharray:5 5;opacity:0.9;}
.tl-l-tri{fill-opacity:0.13;stroke-width:1;vector-effect:non-scaling-stroke;}
.tl-l-tri.is-mine{fill:#5ac8fa;stroke:#5ac8fa;}
.tl-l-tri.is-opp{fill:#ffb454;stroke:#ffb454;}
.tl-l-pressring{fill:none;stroke-width:1.6;stroke-dasharray:6 6;vector-effect:non-scaling-stroke;}
.tl-l-pressring.is-mine{stroke:#5ac8fa;}
.tl-l-pressring.is-opp{stroke:#ffb454;}
.tl-l-presslink{stroke-width:1.6;stroke-dasharray:5 5;opacity:0.7;vector-effect:non-scaling-stroke;}
.tl-l-presslink.is-first{stroke-dasharray:none;stroke-width:3;opacity:1;}
.tl-l-behind{fill:rgba(255,255,255,0.02);stroke:rgba(255,255,255,0.35);stroke-width:1.5;stroke-dasharray:2 5;vector-effect:non-scaling-stroke;}
.tl-l-behind.is-mine{fill:rgba(90,200,250,0.06);}
.tl-l-behind.is-opp{fill:rgba(255,180,84,0.06);}
.tl-l-between{fill:none;stroke-width:2;stroke-dasharray:10 5;vector-effect:non-scaling-stroke;}
.tl-l-between.is-mine{stroke:#5ac8fa;}
.tl-l-between.is-opp{stroke:#ffb454;}
.tl-l-support{fill:rgba(255,255,255,0.03);stroke-width:1.4;stroke-dasharray:6 6;vector-effect:non-scaling-stroke;}
.tl-l-move{stroke-width:2;stroke-dasharray:5 4;vector-effect:non-scaling-stroke;}
.tl-l-from{fill:none;stroke:rgba(255,255,255,0.5);stroke-width:1.5;vector-effect:non-scaling-stroke;}
.tl-l-arrow.is-mine{fill:#5ac8fa;}
.tl-l-arrow.is-opp{fill:#ffb454;}

.tl-snapghost{position:absolute;width:clamp(30px,7cqw,50px);height:clamp(30px,7cqw,50px);transform:translate(-50%,-50%);border-radius:50%;z-index:2;pointer-events:none;display:flex;align-items:center;justify-content:center;border:1.5px dashed rgba(255,255,255,0.4);}
.tl-snapghost.is-mine{border-color:rgba(90,200,250,0.7);}
.tl-snapghost.is-opp{border-color:rgba(255,180,84,0.7);}
.tl-snapghost i{font-style:normal;font-size:clamp(7px,1.4cqw,9px);font-weight:700;color:rgba(255,255,255,0.55);}

.tl-lens-hint{margin:0 0 8px;font-size:12px;line-height:1.5;color:var(--tl-muted);}
.tl-story{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:9px;}
.tl-story li{font-size:12.5px;line-height:1.55;padding-left:12px;border-left:2px solid var(--tl-accent);}
.tl-story.is-cmp li{border-left-color:#ffb454;}
.tl-sum{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px;}
.tl-sum-col{border:1px solid var(--tl-line);border-radius:10px;padding:10px 12px;min-width:0;}
.tl-sum-col.is-mine{border-color:rgba(90,200,250,0.4);}
.tl-sum-col.is-opp{border-color:rgba(255,180,84,0.4);border-style:dashed;}
.tl-sum-col b{display:block;font-size:11px;letter-spacing:0.14em;text-transform:uppercase;margin-bottom:6px;}
.tl-sum-col dl,.tl-rel{margin:0;display:grid;gap:2px 10px;}
.tl-sum-col dt,.tl-rel dt{font-size:10px;font-weight:700;letter-spacing:0.1em;text-transform:uppercase;color:var(--tl-dim);margin-top:6px;}
.tl-sum-col dd,.tl-rel dd{margin:0;font-size:12.5px;font-weight:600;}
.tl-fine{margin:16px 0 0;font-size:11px;line-height:1.5;color:var(--tl-dim);}
.tl-sub-head em{font-style:normal;text-transform:none;letter-spacing:0;font-weight:500;color:var(--tl-dim);margin-left:6px;}

@media (max-width:959px){
  .tl-state{order:1;}
  .tl-lensbar{order:2;padding:8px 14px 0;}
  .tl-pitch-wrap{order:3;}
  .tl-analysis{order:4;background:var(--tl-panel);}
  .tl-settings{order:5;}
  .tl-formation{order:6;}
  .tl-inspector{order:7;}
  .tl-lens-tools .tl-tool{padding:7px 9px;font-size:11px;}
}

/* ==========================================================================
   Phase 4 — tactic workspace: bar, library drawer, dialogs, comparison
   ========================================================================== */
.tl-ws{position:relative;display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap;padding:10px 26px 0;flex:none;}
.tl-ws-cur{display:flex;flex-direction:column;align-items:flex-start;gap:2px;background:none;border:none;padding:0;text-align:left;min-width:0;max-width:340px;}
.tl-ws-cur small{font-size:9.5px;font-weight:800;letter-spacing:0.22em;text-transform:uppercase;color:var(--tl-dim);}
.tl-ws-cur b{font-family:'Outfit',sans-serif;font-size:19px;letter-spacing:0.03em;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.tl-ws-cur:hover b{color:var(--tl-accent);}
.tl-ws-status{font-size:11px;font-weight:700;letter-spacing:0.05em;white-space:nowrap;color:var(--tl-muted);}
.tl-ws-status.is-saved{color:#6fd38f;}
.tl-ws-status.is-dirty{color:#ffb454;}
.tl-ws-actions{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap;}
.tl-tool.is-primary{background:var(--tl-text);border-color:var(--tl-text);color:#0a0d12;}
.tl-tool.is-primary:hover:not(:disabled){background:#fff;color:#0a0d12;}
.tl-tool.is-primary.is-quiet{background:none;border-color:var(--tl-line);color:var(--tl-dim);}
.tl-tool.is-danger{border-color:rgba(255,107,125,0.5);color:var(--tl-danger);}
.tl-tool em{font-style:normal;font-size:10.5px;color:var(--tl-dim);margin-left:3px;}
.tl-ws-more{padding:7px 12px;font-size:16px;line-height:1;}
.tl-menu{position:absolute;right:26px;top:calc(100% + 4px);z-index:60;min-width:230px;background:#10141c;border:1px solid var(--tl-line-2);border-radius:12px;padding:6px;box-shadow:0 20px 50px rgba(0,0,0,0.6);}
.tl-menu hr{border:none;border-top:1px solid var(--tl-line);margin:5px 4px;}
.tl-menu-label{font-size:9.5px;font-weight:800;letter-spacing:0.18em;text-transform:uppercase;color:var(--tl-dim);padding:6px 10px 2px;}
.tl-menu-item{display:block;width:100%;text-align:left;background:none;border:none;border-radius:8px;padding:9px 10px;font-size:13px;font-weight:600;}
.tl-menu-item:hover{background:rgba(255,255,255,0.07);}
.tl-menu-item.is-danger{color:var(--tl-danger);}
.tl-toast{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);z-index:9300;max-width:min(560px,calc(100% - 28px));background:#eef2f7;color:#0a0d12;font-size:13px;font-weight:700;padding:11px 18px;border-radius:999px;box-shadow:0 12px 40px rgba(0,0,0,0.5);text-align:center;pointer-events:none;}

/* backdrop, drawer, dialogs */
.tl-backdrop{position:fixed;inset:0;z-index:9100;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;padding:14px;}
.tl-backdrop.is-drawer{background:rgba(0,0,0,0.35);justify-content:flex-end;align-items:stretch;padding:0;}
.tl-drawer{width:min(470px,100%);background:var(--tl-panel);border-left:1px solid var(--tl-line-2);display:flex;flex-direction:column;min-height:0;box-shadow:-20px 0 60px rgba(0,0,0,0.5);}
.tl-drawer-head,.tl-modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 10px;}
.tl-drawer-head h2,.tl-modal-head h2{font-family:'Outfit',sans-serif;font-size:20px;letter-spacing:0.08em;text-transform:uppercase;}
.tl-x{background:none;border:1px solid var(--tl-line-2);border-radius:50%;width:32px;height:32px;font-size:18px;line-height:1;color:var(--tl-muted);}
.tl-x:hover{color:var(--tl-text);border-color:var(--tl-text);}
.tl-drawer-tabs{display:flex;gap:4px;padding:0 20px;border-bottom:1px solid var(--tl-line);}
.tl-dtab{background:none;border:none;border-bottom:2px solid transparent;padding:10px 12px;font-size:12px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--tl-muted);}
.tl-dtab em{font-style:normal;color:var(--tl-dim);margin-left:3px;}
.tl-dtab.is-active{color:var(--tl-text);border-bottom-color:var(--tl-accent);}
.tl-drawer-body{flex:1;min-height:0;overflow-y:auto;padding:16px 20px 28px;}
.tl-drawer-tools{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;}
.tl-drawer-note{font-size:12px;line-height:1.55;color:var(--tl-muted);margin:0 0 14px;}
.tl-drawer-note b{color:var(--tl-text);}
.tl-filters{display:grid;gap:8px;margin-bottom:14px;}
.tl-input{width:100%;background:rgba(255,255,255,0.05);border:1px solid var(--tl-line-2);border-radius:8px;color:var(--tl-text);font:inherit;font-size:13.5px;padding:10px 12px;}
.tl-input:focus{outline:none;border-color:var(--tl-accent);}
select.tl-input option{background:#10141c;}
textarea.tl-input{resize:vertical;min-height:70px;}
.tl-pill.is-mine{border-color:rgba(90,200,250,0.5);}
.tl-pill.is-add{border-style:dashed;color:var(--tl-muted);}

/* cards */
.tl-card{position:relative;border:1px solid var(--tl-line);border-radius:14px;background:rgba(255,255,255,0.025);margin-bottom:10px;overflow:hidden;}
.tl-card.is-current{border-color:var(--tl-accent);background:rgba(90,200,250,0.05);}
.tl-card.is-nested{margin-left:22px;border-left:3px solid var(--tl-line-2);}
.tl-card.is-flash{animation:tl-flash 1.6s ease-out;}
@keyframes tl-flash{0%{box-shadow:0 0 0 3px rgba(90,200,250,0.8);}100%{box-shadow:0 0 0 0 rgba(90,200,250,0);}}
.tl-card-main{display:flex;gap:14px;width:100%;background:none;border:none;text-align:left;padding:12px 12px 8px;}
.tl-card-main.is-static{cursor:default;}
.tl-card-thumb{flex:none;width:64px;}
.tl-card-thumb .tlv-pitch{width:64px;height:auto;display:block;border-radius:4px;}
.tl-card-text{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1;}
.tl-card-text b{font-family:'Outfit',sans-serif;font-size:17px;letter-spacing:0.03em;}
.tl-card-meta{font-size:11.5px;color:var(--tl-muted);line-height:1.4;}
.tl-card-desc{font-size:12px;color:var(--tl-muted);font-style:italic;line-height:1.4;}
.tl-card-foot{font-size:10.5px;font-weight:700;letter-spacing:0.05em;color:var(--tl-dim);text-transform:uppercase;}
.tl-badge{align-self:flex-start;font-size:9.5px;font-weight:800;letter-spacing:0.1em;text-transform:uppercase;border:1px solid var(--tl-line-2);border-radius:999px;padding:2px 8px;color:var(--tl-muted);}
.tl-badge.is-cur{border-color:var(--tl-accent);color:var(--tl-accent);}
.tl-card-actions{display:flex;gap:2px;padding:0 8px 8px 88px;flex-wrap:wrap;}
.tl-card.is-scen .tl-card-actions{padding-left:12px;}
.tl-card-actions button{background:none;border:none;border-radius:6px;padding:5px 8px;font-size:11.5px;font-weight:700;color:var(--tl-muted);}
.tl-card-actions button:hover{color:var(--tl-text);background:rgba(255,255,255,0.06);}
.tl-card-actions button.is-danger:hover{color:var(--tl-danger);}
.tl-empty{border:1px dashed var(--tl-line-2);border-radius:14px;padding:26px 18px;text-align:center;}
.tl-empty b{font-family:'Outfit',sans-serif;font-size:17px;letter-spacing:0.08em;text-transform:uppercase;}
.tl-empty p{margin:8px 0 14px;font-size:13px;color:var(--tl-muted);line-height:1.5;}
.tl-empty.is-small{padding:16px;margin-bottom:10px;}
.tl-empty.is-small p{margin:6px 0 0;}
.tl-chips.is-custom{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:6px;}

/* dialogs */
.tl-modal{width:min(520px,100%);max-height:calc(100dvh - 28px);overflow-y:auto;background:var(--tl-panel);border:1px solid var(--tl-line-2);border-radius:16px;box-shadow:0 30px 90px rgba(0,0,0,0.7);}
.tl-modal.is-wide{width:min(1120px,100%);}
.tl-modal-body{padding:4px 20px 20px;}
.tl-modal-text{font-size:14px;line-height:1.6;color:var(--tl-muted);margin:6px 0 4px;}
.tl-field{display:flex;flex-direction:column;gap:6px;margin:12px 0;min-width:0;}
.tl-field>span{font-size:11px;font-weight:800;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-muted);}
.tl-field>span em{font-style:normal;font-weight:500;text-transform:none;letter-spacing:0;color:var(--tl-dim);margin-left:4px;}
.tl-field small{font-size:11.5px;color:var(--tl-dim);line-height:1.45;}
.tl-check{display:flex;align-items:center;gap:10px;font-size:13px;margin:10px 0;}
.tl-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;flex-wrap:wrap;}
.tl-modal-actions.is-stack{flex-direction:column;}
.tl-modal-actions.is-stack .tl-tool{padding:12px;}
.tl-grow{flex:1;}
.tl-snaps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;}
.tl-snaps li{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--tl-line);border-radius:10px;padding:8px 10px;}
.tl-snaps li span:first-child{display:flex;flex-direction:column;min-width:0;}
.tl-snaps b{font-size:13px;}
.tl-snaps em{font-style:normal;font-size:11px;color:var(--tl-dim);}
.tl-snap-actions{display:flex;gap:2px;flex:none;}
.tl-snap-actions button{background:none;border:none;font-size:11.5px;font-weight:700;color:var(--tl-muted);padding:4px 7px;border-radius:6px;}
.tl-snap-actions button:hover{background:rgba(255,255,255,0.07);color:var(--tl-text);}
.tl-snap-actions .is-danger:hover{color:var(--tl-danger);}
.tl-import-row{display:flex;gap:8px;margin:6px 0 12px;}
.tl-result{display:flex;flex-direction:column;gap:3px;border-radius:10px;padding:12px 14px;font-size:13px;line-height:1.5;position:relative;}
.tl-result.is-ok{border:1px solid rgba(111,211,143,0.5);background:rgba(111,211,143,0.06);}
.tl-result.is-bad{border:1px solid rgba(255,107,125,0.5);background:rgba(255,107,125,0.06);}
.tl-result b{font-size:12px;letter-spacing:0.1em;text-transform:uppercase;}
.tl-result.is-ok b{color:#6fd38f;}
.tl-result.is-bad b{color:var(--tl-danger);}
.tl-thumb-sm{position:absolute;right:12px;top:10px;width:44px;}
.tl-thumb-sm .tlv-pitch{width:44px;height:auto;display:block;border-radius:3px;}

/* comparison */
.tl-cmp-controls{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:end;}
.tl-cmp-controls .tl-tool{margin-bottom:12px;}
.tl-cmp-toggles{display:flex;gap:10px;flex-wrap:wrap;margin:4px 0 14px;}
.tlv-cmp-two{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.tlv-cmp-one{min-width:0;display:flex;flex-direction:column;align-items:center;}
.tlv-cap{display:flex;gap:8px;flex-wrap:wrap;align-items:baseline;justify-content:center;margin-bottom:8px;font-size:12px;color:var(--tl-muted);}
.tlv-cap b{font-family:'Outfit',sans-serif;font-size:16px;color:var(--tl-text);letter-spacing:0.03em;}
.tlv-cap span{font-size:10.5px;font-weight:800;letter-spacing:0.12em;text-transform:uppercase;color:var(--tl-accent);}
.tlv-cap span.is-ghost{color:#ffb454;}
.tlv-cap i{font-style:normal;}
.tlv-pitch{width:100%;height:auto;display:block;}
.tlv-pitch.is-cmp{max-width:340px;max-height:62dvh;border-radius:4px;box-shadow:0 14px 40px rgba(0,0,0,0.5);}
.tl-cmp-notes{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:20px;}
.tl-diffs{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:7px;}
.tl-diffs li{font-size:12.5px;line-height:1.5;padding-left:12px;border-left:2px solid #ffb454;}

.tlv-grass{fill:#0d1d19;}
.tlv-lines *{fill:none;stroke:rgba(255,255,255,0.32);stroke-width:0.35;}
.tlv-pitch.is-thumb .tlv-lines *{stroke-width:0.7;}
.tlv-faint{opacity:0.32;}
.tlv-ghost{fill:rgba(255,180,84,0.08);stroke:#ffb454;stroke-width:0.5;stroke-dasharray:1.2 1;}
.tlv-role{fill:#fff;opacity:0.75;font-size:2.4px;font-weight:700;font-family:'Manrope',sans-serif;}
.tlv-move{stroke:#5ac8fa;stroke-width:0.4;stroke-dasharray:1 0.8;}

@media (max-width:959px){
  .tl-ws{order:0;padding:10px 14px 0;gap:8px 12px;}
  .tl-ws-cur{max-width:calc(100% - 150px);}
  .tl-ws-status{margin-left:auto;}
  .tl-ws-actions{margin-left:0;width:100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px;}
  .tl-ws-actions::-webkit-scrollbar{display:none;}
  .tl-ws-actions .tl-tool{flex:none;}
  .tl-menu{right:14px;}
  .tl-backdrop.is-drawer{align-items:flex-end;justify-content:center;}
  .tl-drawer{width:100%;height:84dvh;border-left:none;border-top:1px solid var(--tl-line-2);border-radius:18px 18px 0 0;}
  .tl-backdrop{padding:8px;}
  .tl-modal{max-height:calc(100dvh - 16px);}
  .tl-cmp-controls{grid-template-columns:1fr;}
  .tl-cmp-controls .tl-tool{margin:0;justify-self:start;}
  .tlv-cmp-two,.tl-cmp-notes{grid-template-columns:1fr;}
  .tlv-pitch.is-cmp{max-width:300px;}
}

@media (max-width:959px){
  .tl-ws{gap:6px 12px;padding-top:8px;}
  .tl-ws-cur small{display:none;}
  .tl-ws-cur b{font-size:16px;}
  .tl-ws-actions .tl-tool{padding:6px 10px;font-size:11.5px;}
}

.tl-ws-cur{flex:1 1 200px;max-width:none;}
.tl-ws-cur small{display:flex;gap:8px;align-items:baseline;}
.tl-ws-cur small .tl-ws-status{letter-spacing:0;text-transform:none;font-size:11px;}
.tl-ws-actions{margin-left:0;flex:0 1 auto;}
@media (max-width:959px){ .tl-ws-cur small{display:flex;} .tl-ws-cur{max-width:100%;flex-basis:100%;} }
@media (max-width:959px){ .tl-ws-cur{flex-direction:row;align-items:baseline;gap:10px;} .tl-ws-cur b{order:1;min-width:0;} .tl-ws-cur small{order:2;flex:none;} }
.tl-ws-cur{flex:1 1 120px;min-width:0;}
@media (max-width:959px){ .tl-ws-cur{flex-basis:100%;} }

/* ==========================================================================
   Team position — one rigid shift of a whole formation
   ========================================================================== */
.tl-left-dyn{display:contents;}
.tl-tp-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.tl-tp-title h2{font-size:12px;font-weight:700;letter-spacing:0.16em;text-transform:uppercase;}
.tl-tp-rows{display:flex;flex-direction:column;gap:16px;}
.tl-tp-head{display:flex;align-items:baseline;gap:10px;margin-bottom:6px;}
.tl-tp-head b{font-size:10.5px;font-weight:800;letter-spacing:0.16em;text-transform:uppercase;flex:1;}
.tl-tp-row.is-mine .tl-tp-head b{color:#5ac8fa;}
.tl-tp-row.is-opp .tl-tp-head b{color:#ffb454;}
.tl-tp-val{font-family:'Outfit',sans-serif;font-size:15px;letter-spacing:0.05em;white-space:nowrap;}
.tl-tp-reset{background:none;border:1px solid var(--tl-line);border-radius:6px;padding:3px 8px;font-size:10.5px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--tl-muted);}
.tl-tp-reset:hover:not(:disabled){color:var(--tl-text);border-color:var(--tl-line-2);}
.tl-tp-reset:disabled{opacity:0.3;cursor:default;}
.tl-tp{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;}
.tl-tp-end{font-size:9.5px;font-weight:800;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-dim);}
.tl-tp-range{--acc:#5ac8fa;-webkit-appearance:none;appearance:none;width:100%;height:34px;background:transparent;margin:0;cursor:pointer;touch-action:pan-y;}
.tl-tp-row.is-opp .tl-tp-range{--acc:#ffb454;}
.tl-tp-range:focus-visible{outline:2px solid var(--acc);outline-offset:2px;border-radius:6px;}
.tl-tp-range:disabled{opacity:0.35;cursor:not-allowed;}
.tl-tp-range::-webkit-slider-runnable-track{height:8px;border-radius:4px;border:1px solid var(--tl-line-2);
  background:
    linear-gradient(90deg,transparent calc(var(--z) - 1px),rgba(255,255,255,0.7) calc(var(--z) - 1px),rgba(255,255,255,0.7) calc(var(--z) + 1px),transparent calc(var(--z) + 1px)),
    repeating-linear-gradient(90deg,rgba(255,255,255,0.14) 0 1px,transparent 1px 10%),rgba(255,255,255,0.05);}
.tl-tp-range::-moz-range-track{height:8px;border-radius:4px;border:1px solid var(--tl-line-2);
  background:
    linear-gradient(90deg,transparent calc(var(--z) - 1px),rgba(255,255,255,0.7) calc(var(--z) - 1px),rgba(255,255,255,0.7) calc(var(--z) + 1px),transparent calc(var(--z) + 1px)),
    repeating-linear-gradient(90deg,rgba(255,255,255,0.14) 0 1px,transparent 1px 10%),rgba(255,255,255,0.05);}
.tl-tp-range::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:28px;margin-top:-11px;border-radius:5px;background:var(--acc);border:2px solid #06080c;box-shadow:0 2px 8px rgba(0,0,0,0.6);}
.tl-tp-range::-moz-range-thumb{width:12px;height:26px;border-radius:5px;background:var(--acc);border:2px solid #06080c;box-shadow:0 2px 8px rgba(0,0,0,0.6);}
.tl-sep{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin-top:14px;padding-top:12px;border-top:1px solid var(--tl-line);}
.tl-sep span{font-size:10px;font-weight:800;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-dim);}
.tl-sep b{font-family:'Outfit',sans-serif;font-size:15px;letter-spacing:0.06em;text-transform:uppercase;}
.tl-sep em{font-style:normal;font-size:11.5px;color:var(--tl-muted);}
.tl-sep.is-inline{margin-top:12px;}
.tl-tp-note{margin:10px 0 0;font-size:11px;line-height:1.5;color:var(--tl-dim);}
.tl-tier.is-t0{background:rgba(255,255,255,0.12);color:var(--tl-text);}
.tl-l-face{stroke:rgba(255,255,255,0.6);stroke-width:2;stroke-dasharray:2 4;vector-effect:non-scaling-stroke;}

/* drag handle on the pitch: grab the whole block */
.tl-grip{position:absolute;z-index:9;width:22px;height:46px;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;
  border-radius:8px;background:rgba(8,12,16,0.85);border:1.5px solid #5ac8fa;color:#5ac8fa;cursor:ns-resize;touch-action:none;padding:0;opacity:0.55;transition:opacity .15s;}
.tl-grip i{font-style:normal;font-size:15px;line-height:1;}
.tl-grip.is-mine{right:-26px;}
.tl-grip.is-opp{left:-26px;border-color:#ffb454;border-style:dashed;color:#ffb454;}
.tl-grip:hover,.tl-grip.is-dragging,.tl-grip:focus-visible{opacity:1;}
.tl-root.is-preview .tl-grip{display:none;}
.tl-pitch-frame.is-zoom .tl-grip{display:none;}

@media (max-width:959px){
  .tl-block.tl-tpos{order:4;position:sticky;bottom:0;z-index:15;padding:8px 14px 10px;background:rgba(9,12,18,0.97);border-top:1px solid var(--tl-line-2);border-bottom:none;backdrop-filter:blur(6px);}
  .tl-tp-title,.tl-tp-note,.tl-tpos .tl-sep{display:none;}
  .tl-tp-rows{gap:4px;}
  .tl-tp-head{margin-bottom:0;}
  .tl-tp-range{height:44px;}
  .tl-tp-range::-webkit-slider-runnable-track{height:10px;}
  .tl-tp-range::-webkit-slider-thumb{width:22px;height:36px;margin-top:-14px;}
  .tl-tp-range::-moz-range-thumb{width:20px;height:34px;}
  .tl-analysis{order:5;}
  .tl-settings{order:6;}
  .tl-formation{order:7;}
  .tl-inspector{order:8;}
  .tl-grip{width:20px;height:40px;}
  .tl-grip.is-mine{right:2px;}
  .tl-grip.is-opp{left:2px;}
}
@media (max-width:959px){
  .tl-tp-range{height:34px;}
  .tl-tp-range::-webkit-slider-thumb{height:30px;margin-top:-11px;}
  .tl-tp-row{padding:0;}
  .tl-tp-rows{gap:0;}
  .tl-tp-head b{font-size:9.5px;}
}

/* ==========================================================================
   Phase 5 — matchup intelligence
   ========================================================================== */
.tl-tool.is-accent{border-color:var(--tl-accent);color:var(--tl-accent);}
.tl-tool.is-accent:hover:not(:disabled){background:rgba(90,200,250,0.12);color:var(--tl-accent);}
/* Matchup + Simulate are the Lab's two headline systems -- grouped in their own labeled,
   accent-bordered block so they read as a distinct pair, not two more buttons in the row. */
.tl-ws-intel{display:inline-flex;align-items:center;gap:7px;padding:4px 8px 4px 11px;border:1px solid var(--tl-accent);border-radius:11px;background:rgba(90,200,250,0.07);}
.tl-ws-intel-label{font-size:9px;font-weight:800;letter-spacing:0.16em;text-transform:uppercase;color:var(--tl-accent);white-space:nowrap;}
.tl-ws-intel .tl-tool.is-accent{border-color:transparent;background:none;}
.tl-ws-intel .tl-tool.is-accent:hover:not(:disabled){background:rgba(90,200,250,0.18);}
.tl-mu-wrap{position:fixed;inset:0;z-index:9050;background:var(--tl-bg);display:flex;justify-content:center;}
.tl-mu{width:min(1280px,100%);height:100dvh;display:flex;flex-direction:column;min-height:0;}
.tl-mu-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:16px 22px 10px;}
.tl-mu-title small{font-size:10px;font-weight:800;letter-spacing:0.24em;text-transform:uppercase;color:var(--tl-accent);}
.tl-mu-title h2{font-family:'Outfit',sans-serif;font-size:28px;letter-spacing:0.04em;line-height:1.1;margin-top:4px;}
.tl-mu-title h2 i{font-style:normal;color:var(--tl-dim);font-size:0.62em;margin:0 6px;letter-spacing:0.14em;text-transform:uppercase;}
.tl-mu-title p{margin:6px 0 0;font-size:11.5px;color:var(--tl-muted);line-height:1.5;}
.tl-mu-title p i{font-style:normal;color:var(--tl-dim);margin:0 6px;}
.tl-mu-head-actions{display:flex;gap:8px;align-items:center;flex:none;}
.tl-mu-tabs{display:flex;gap:4px;padding:0 22px 6px;overflow-x:auto;scrollbar-width:none;flex:none;}
/* Situation tabs (Overview / My possession / ... ) -- this class lost its rule when the old
   Tactical view tab row was replaced by a dropdown; the Matchup page still uses it separately. */
.tl-lens-btn{background:none;border:1px solid var(--tl-line);border-radius:999px;padding:7px 13px;font-size:12px;font-weight:600;color:var(--tl-muted);white-space:nowrap;flex:none;transition:border-color .15s,color .15s,background .15s;}
.tl-lens-btn:hover{border-color:var(--tl-line-2);color:var(--tl-text);}
.tl-lens-btn.is-active{border-color:var(--tl-accent);background:rgba(90,200,250,0.12);color:var(--tl-accent);}
.tl-mu-tabs::-webkit-scrollbar,.tl-mu-lenses::-webkit-scrollbar{display:none;}
.tl-mu-lenses{display:flex;gap:6px;padding:0 22px 10px;overflow-x:auto;scrollbar-width:none;flex:none;}
.tl-mu-lenses .tl-pill{flex:none;}
.tl-mu-body{flex:1;min-height:0;overflow-y:auto;padding:6px 22px 40px;display:grid;grid-template-columns:minmax(300px,430px) minmax(0,1fr);gap:0 28px;align-content:start;border-top:1px solid var(--tl-line);}
.tl-mu-read,.tl-mu-trial,.tl-mu-find,.tl-mu-sel,.tl-mu-saved-wrap{grid-column:2;min-width:0;}
.tl-mu-map{grid-column:1;grid-row:1 / span 8;position:sticky;top:12px;align-self:start;padding-top:14px;}
.tl-mu-read{padding:20px 0 16px;border-bottom:1px solid var(--tl-line);}
.tl-mu-read small,.tl-mu-trial small{font-size:10px;font-weight:800;letter-spacing:0.2em;text-transform:uppercase;color:var(--tl-dim);}
.tl-mu-read p{margin:8px 0 6px;font-family:'Outfit',sans-serif;font-size:23px;line-height:1.3;letter-spacing:0.01em;}
.tl-mu-read em{font-style:normal;font-size:11.5px;color:var(--tl-dim);}
.tl-mu-find{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:20px 0;}
.tl-mu-col h3,.tl-mu-saved-wrap h3{margin:0 0 10px;font-size:11px;font-weight:800;letter-spacing:0.18em;text-transform:uppercase;color:var(--tl-muted);}
.tl-mu-col.is-wide,.tl-mu-all,.tl-mu-find>.tl-link{grid-column:1 / -1;}
.tl-mu-card{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;background:rgba(255,255,255,0.025);border:1px solid var(--tl-line);border-left:3px solid var(--tl-line-2);border-radius:12px;padding:11px 13px;margin-bottom:8px;}
.tl-mu-card.is-opp{border-left-color:#6fd38f;}
.tl-mu-card.is-con{border-left-color:#ffb454;border-left-style:dashed;}
.tl-mu-card:hover{border-color:var(--tl-line-2);}
.tl-mu-card.is-sel{background:rgba(90,200,250,0.07);border-color:var(--tl-accent);}
.tl-mu-card b{font-family:'Outfit',sans-serif;font-size:16px;letter-spacing:0.02em;}
.tl-mu-card span:last-child{font-size:12px;color:var(--tl-muted);line-height:1.45;}
.tl-mu-type{font-size:9.5px;font-weight:800;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-dim);}
.tl-mu-all{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;}
.tl-mu-adjs{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;}
.tl-mu-adj{display:flex;flex-direction:column;gap:5px;border:1px solid var(--tl-line);border-radius:12px;padding:12px 13px;}
.tl-mu-adj b{font-size:13.5px;}
.tl-mu-for{font-size:11px;color:var(--tl-dim);}
.tl-mu-eff,.tl-mu-trade{font-size:12px;line-height:1.45;color:var(--tl-muted);}
.tl-mu-eff em,.tl-mu-trade em,.tl-mu-why em{font-style:normal;font-size:9.5px;font-weight:800;letter-spacing:0.14em;text-transform:uppercase;color:var(--tl-dim);margin-right:6px;}
.tl-mu-trade em{color:#ffb454;}
.tl-mu-adj .tl-tool{align-self:flex-start;margin-top:4px;}
.tl-mu-sel{padding:0 0 18px;}
.tl-mu-detail{border:1px solid var(--tl-line-2);border-radius:16px;padding:18px 20px;background:rgba(255,255,255,0.02);}
.tl-mu-detail-head{display:flex;gap:10px;align-items:baseline;}
.tl-mu-detail-head em{font-style:normal;font-size:11.5px;color:var(--tl-muted);}
.tl-mu-detail h3{margin:6px 0 12px;font-family:'Outfit',sans-serif;font-size:22px;letter-spacing:0.02em;}
.tl-mu-why{margin:0 0 10px;}
.tl-mu-why p{margin:4px 0 0;font-size:13.5px;line-height:1.6;color:var(--tl-text);}
.tl-mu-term{margin:8px 0 12px;font-size:12.5px;color:var(--tl-muted);}
.tl-mu-term summary{cursor:pointer;color:var(--tl-accent);font-weight:700;font-size:12px;}
.tl-mu-term p{margin:6px 0 0;line-height:1.55;}
.tl-mu-empty{padding:24px;border:1px dashed var(--tl-line-2);border-radius:14px;color:var(--tl-muted);font-size:13px;text-align:center;}
.tl-mu-saved-wrap{padding-top:8px;}
.tl-mu-saved{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;}
.tl-mu-saved li{display:flex;justify-content:space-between;gap:10px;align-items:center;border:1px solid var(--tl-line);border-radius:10px;padding:8px 12px;}
.tl-mu-saved li span:first-child{display:flex;flex-direction:column;min-width:0;}
.tl-mu-saved b{font-size:13px;}
.tl-mu-saved em{font-style:normal;font-size:11px;color:var(--tl-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:520px;}
.tl-mu-trial{margin:16px 0 0;padding:16px 18px;border:1px solid var(--tl-accent);border-radius:16px;background:rgba(90,200,250,0.05);}
.tl-mu-trial-head{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;}
.tl-mu-trial-head b{display:block;font-family:'Outfit',sans-serif;font-size:18px;margin-top:2px;}
.tl-mu-changes{list-style:none;margin:12px 0 4px;padding:0;display:flex;flex-direction:column;gap:6px;}
.tl-mu-changes li{font-size:13px;line-height:1.5;padding-left:12px;border-left:3px solid var(--tl-line-2);}
.tl-mu-changes li.is-good{border-left-color:#6fd38f;}
.tl-mu-changes li.is-bad{border-left-color:#ffb454;border-left-style:dashed;}
.tl-mu-trial-actions{display:flex;gap:8px;margin-top:12px;}
.tl-mu-mapbox{display:flex;flex-direction:column;align-items:center;gap:10px;}
.tlv-pitch.is-mu{width:100%;max-width:420px;max-height:calc(100dvh - 300px);border-radius:4px;box-shadow:0 14px 40px rgba(0,0,0,0.5);}
.tl-mu-legend{display:flex;gap:14px;flex-wrap:wrap;justify-content:center;font-size:11px;color:var(--tl-muted);}
.tl-mu-legend span.is-mine::before,.tl-mu-legend span.is-opp::before{content:'';display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:-1px;}
.tl-mu-legend span.is-mine::before{background:#5ac8fa;}
.tl-mu-legend span.is-opp::before{background:#ffb454;}

.tlv-zone{fill:rgba(255,255,255,0.08);stroke:rgba(255,255,255,0.5);stroke-width:0.35;}
.tlv-zone.is-mine{fill:rgba(90,200,250,0.18);stroke:#5ac8fa;}
.tlv-zone.is-opp{fill:rgba(255,180,84,0.16);stroke:#ffb454;stroke-dasharray:1.4 1;}
.tlv-zone.is-warn{fill:rgba(255,107,125,0.16);stroke:#ff6b7d;stroke-dasharray:0.6 0.8;}
.tlv-ring{fill:none;stroke-width:0.6;}
.tlv-ring.is-mine{stroke:#5ac8fa;}
.tlv-ring.is-opp{stroke:#ffb454;stroke-dasharray:1 0.7;}
.tlv-ring.is-big{stroke-width:0.9;}
.tlv-link{stroke-width:0.5;fill:none;}
.tlv-link.is-open{stroke:#6fd38f;}
.tlv-link.is-blocked{stroke:#ffb454;stroke-dasharray:1 0.8;}
.tlv-link.is-gap{stroke:#ff6b7d;stroke-dasharray:0.5 0.9;stroke-width:0.6;}
.tlv-arrow{stroke:#ff6b7d;stroke-width:0.6;stroke-dasharray:1.2 0.8;}
.tlv-arrowhead{fill:#ff6b7d;}

@media (max-width:959px){
  .tl-mu-head{padding:12px 14px 8px;}
  .tl-mu-title h2{font-size:21px;}
  .tl-mu-tabs,.tl-mu-lenses{padding-left:14px;padding-right:14px;}
  .tl-mu-body{display:flex;flex-direction:column;padding:4px 14px 40px;}
  .tl-mu-read{order:1;}
  .tl-mu-trial{order:2;}
  .tl-mu-find{order:3;grid-template-columns:1fr;gap:6px;}
  .tl-mu-map{order:4;position:static;padding-top:4px;}
  .tl-mu-sel{order:5;}
  .tl-mu-saved-wrap{order:6;}
  .tl-mu-all{grid-template-columns:1fr;}
  .tl-mu-read p{font-size:19px;}
  .tlv-pitch.is-mu{max-width:340px;max-height:none;}
  .tl-mu-head-actions .tl-tool{padding:7px 10px;font-size:11.5px;}
}

.tl-mu-title{min-width:0;flex:1;}
.tl-mu-head-actions{align-self:flex-start;}

/* ==========================================================================
   Phase 6 — pitch view & landscape workspace
   ========================================================================== */
/* view controls */
.tl-viewctl{display:flex;align-items:center;gap:6px;flex:none;}
.tl-viewctl .tl-tool{padding:6px 10px;font-size:11.5px;}
.tl-seg{display:inline-flex;border:1px solid var(--tl-line-2);border-radius:8px;overflow:hidden;}
.tl-seg button{background:none;border:none;padding:6px 9px;color:var(--tl-dim);display:flex;align-items:center;justify-content:center;}
.tl-seg button:hover:not(.is-active){color:var(--tl-text);}
.tl-seg button.is-active{background:var(--tl-text);color:#0a0d12;}
.tl-seg svg{width:20px;height:14px;display:block;}
.tl-zoomctl{display:inline-flex;align-items:center;border:1px solid var(--tl-line);border-radius:8px;overflow:hidden;}
.tl-zoomctl button{background:none;border:none;padding:6px 9px;font-size:13px;font-weight:700;color:var(--tl-muted);min-width:30px;}
.tl-zoomctl button:hover:not(:disabled){color:var(--tl-text);background:rgba(255,255,255,0.06);}
.tl-zoomctl button:disabled{opacity:0.3;cursor:default;}
.tl-lens-tools .tl-viewctl{display:none;}
.tl-root.is-focus .tl-lens-tools .tl-viewctl{display:flex;}
.tl-root.is-focus .tl-head .tl-viewctl{display:none;}

/* the pitch frame: view zoom/pan variables, true landscape proportions */
.tl-pitch-frame{transform:translate(var(--px,0px),var(--py,0px)) scale(var(--zs,1));}
.tl-pitch-frame.is-zoom{transform:translate(var(--px,0px),var(--py,0px)) scale(calc(var(--zs,1) * 1.6));}
.tl-pitch-frame.is-land{aspect-ratio:1050 / 680;width:min(100cqw, calc(100cqh * 1.5441));}
.tl-pitch-frame.is-vz{touch-action:none;cursor:grab;}
.tl-pitch-frame.is-panning{transition:none;cursor:grabbing;}
.tl-pitch-wrap.is-vzoom{overflow:hidden;}
.tl-pitch-frame.is-land .tl-side-tag{transform:none;}
.tl-pitch-frame.is-land .tl-side-tag.is-top{top:2.5%;left:auto;right:1.5%;}
.tl-pitch-frame.is-land .tl-side-tag.is-bottom{bottom:2.5%;left:1.5%;}
.tl-pitch-frame.is-land .tl-grip{width:46px;height:22px;transform:translateX(-50%);}
.tl-pitch-frame.is-land .tl-grip.is-mine{right:auto;top:auto;bottom:-28px;}
.tl-pitch-frame.is-land .tl-grip.is-opp{top:-28px;bottom:auto;}
.tl-pitch-frame.is-land .tl-grip i{display:inline-block;transform:rotate(90deg);}
/* switching orientation: positions do not move, the view just fades through */
.tl-pitch-frame{transition:transform .35s ease,opacity .22s ease;}
.tl-root.tl-switching .tl-pitch-frame{opacity:0;transition:none;}

/* panels: collapsible on every screen size (a closed panel gives its space to the pitch) */
.tl-block-head{cursor:pointer;}
.tl-block-head .tl-chev{display:inline-block;}
.tl-block.is-collapsed .tl-block-body{display:none;}
.tl-block.is-collapsed .tl-chev{transform:rotate(-90deg);}
.tl-block.is-collapsed .tl-block-head{margin-bottom:0;}
@media (min-width:960px){
  .tl-root.no-left .tl-left{display:none;}
  .tl-root.no-right .tl-settings{display:none;}
}
@media (min-width:960px) and (max-width:1279px){
  .tl-root.no-left.no-right .tl-app{grid-template-columns:0 minmax(0,1fr);}
  .tl-root.no-left.no-right .tl-side{display:none;}
}
@media (min-width:1280px){
  .tl-root .tl-app{grid-template-columns:var(--tl-lw,330px) minmax(0,1fr) var(--tl-rw,370px);}
  .tl-root.no-left{--tl-lw:0px;}
  .tl-root.no-right{--tl-rw:0px;}
}

/* landscape workspace: a compact top, so the pitch gets the height */
@media (min-width:960px){
  .tl-root .tl-head{padding:8px 18px;}
  .tl-root .tl-title span{display:none;}
  .tl-root .tl-title h1{font-size:18px;}
  .tl-root .tl-ws{padding:8px 18px 0;}
  .tl-root .tl-ws-cur b{font-size:16px;}
  .tl-root .tl-state{padding:8px 18px 0;}
  .tl-root .tl-mini{display:none;}
  .tl-root .tl-state-tabs{gap:8px;}
  .tl-root .tl-state-tab{padding:6px 12px;border-radius:10px;}
  .tl-root .tl-state-text{flex-direction:row;align-items:baseline;gap:10px;}
  .tl-root .tl-state-text em{font-size:15px;}
  .tl-root .tl-context{display:none;}
  .tl-root .tl-toolbar{padding:6px 0 0;}
  .tl-root .tl-lensbar{padding:6px 18px 0;}
  .tl-root .tl-pitch-wrap{padding:12px 18px 16px;}
}

/* focus mode: the pitch, and only what is essential, floating above it */
@media (min-width:960px){
  .tl-root.is-focus .tl-head,.tl-root.is-focus .tl-ws,.tl-root.is-focus .tl-toolbar,.tl-root.is-focus .tl-context,.tl-root.is-focus .tl-preview-bar{display:none;}
  .tl-root.is-focus .tl-app{grid-template-columns:minmax(0,1fr) !important;grid-template-rows:minmax(0,1fr);grid-template-areas:"stage" !important;}
  .tl-root.is-focus .tl-stage{grid-area:stage;}
  .tl-root.is-focus .tl-state{padding:10px 18px 0;}
  .tl-root.is-focus .tl-lensbar{padding:8px 18px 0;}
  .tl-root.is-focus .tl-side{display:contents;}
  .tl-root.is-focus .tl-left,.tl-root.is-focus .tl-settings{position:fixed;top:0;bottom:0;z-index:40;overflow-y:auto;width:350px;background:var(--tl-panel);box-shadow:0 0 70px rgba(0,0,0,0.7);}
  .tl-root.is-focus .tl-left{left:0;border-right:1px solid var(--tl-line-2);}
  .tl-root.is-focus .tl-settings{right:0;width:380px;border-left:1px solid var(--tl-line-2);}
}
@media (min-width:960px) and (max-width:1279px){
  .tl-root.is-focus .tl-side{display:contents;}
}

/* matchup / comparison pitches follow the landscape preference */
.tl-mu-wrap.is-land .tl-mu-body{grid-template-columns:minmax(0,1.6fr) minmax(320px,1fr);}
.tlv-pitch.is-mu.is-land{max-width:none;max-height:calc(100dvh - 250px);}
.tlv-pitch.is-cmp.is-land{max-width:560px;max-height:none;}

/* small screens: portrait stays the default; landscape and focus mode give the pitch the whole screen */
@media (max-width:959px){
  .tl-viewctl{width:100%;overflow-x:auto;scrollbar-width:none;padding-bottom:2px;}
  .tl-viewctl::-webkit-scrollbar{display:none;}
  .tl-viewctl .tl-tool,.tl-viewctl .tl-seg,.tl-viewctl .tl-zoomctl{flex:none;}
  .tl-root.is-focus{overflow:hidden;}
  .tl-root.is-focus .tl-head,.tl-root.is-focus .tl-ws,.tl-root.is-focus .tl-toolbar,.tl-root.is-focus .tl-context,.tl-root.is-focus .tl-preview-bar,
  .tl-root.is-focus .tl-tpos,.tl-root.is-focus .tl-analysis,.tl-root.is-focus .tl-settings,.tl-root.is-focus .tl-formation,.tl-root.is-focus .tl-inspector{display:none !important;}
  .tl-root.is-focus .tl-state{position:fixed;top:0;left:0;right:0;z-index:20;padding:8px 10px 0;background:linear-gradient(var(--tl-bg) 70%,transparent);}
  .tl-root.is-focus .tl-state-tab{padding:6px 8px;}
  .tl-root.is-focus .tl-mini,.tl-root.is-focus .tl-state-text em{display:none;}
  .tl-root.is-focus .tl-lensbar{position:fixed;top:46px;left:0;right:0;z-index:20;padding:4px 10px 0;flex-wrap:wrap;}
  .tl-root.is-focus .tl-lens-tools{width:100%;}
  .tl-root.is-focus .tl-pitch-wrap{position:fixed;inset:0;padding:112px 8px 8px;display:flex;align-items:center;justify-content:center;container-type:size;}
  .tl-root.is-focus .tl-pitch-frame{width:min(100cqw, calc(100cqh * 0.6476));}
  .tl-root.is-focus .tl-pitch-frame.is-land{width:min(100cqw, calc(100cqh * 1.5441));}
}

.tl-iconbtn{padding:6px 9px !important;display:inline-flex;align-items:center;justify-content:center;}
.tl-iconbtn svg{width:18px;height:14px;display:block;}
.tl-focus-x{font-size:11px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;}
@media (min-width:960px){
  .tl-root .tl-state{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;}
  .tl-root .tl-state-tabs{display:flex;gap:6px;flex:none;}
  .tl-root .tl-toolbar{padding:0;flex:1 1 auto;justify-content:flex-end;gap:8px;}
  .tl-root .tl-poss .tl-lg{display:none;}
  .tl-root .tl-poss .tl-sm{display:inline;}
  .tl-root .tl-preview-bar{flex-basis:100%;}
  .tl-root .tl-ws-actions{margin-left:auto;}
  .tl-root .tl-viewctl{margin-left:4px;}
}

@media (min-width:960px){
  .tl-root .tl-sfx{display:none;}
  .tl-root .tl-ws{flex-wrap:nowrap;gap:8px 10px;}
  .tl-root .tl-ws-cur{flex:1 1 0;min-width:90px;}
  .tl-root .tl-ws-actions{flex-wrap:nowrap;gap:5px;}
  .tl-root .tl-ws-actions .tl-tool,.tl-root .tl-toolbar .tl-tool{padding:6px 9px;font-size:11.5px;}
  .tl-root .tl-modes button,.tl-root .tl-poss button{padding:6px 10px;font-size:11px;}
  .tl-root .tl-tools{gap:5px;}
}
@media (min-width:960px){
  .tl-root .tl-state-tab{padding:5px 9px;}
  .tl-root .tl-state-text{gap:7px;}
  .tl-root .tl-state-text b{font-size:10px;letter-spacing:0.08em;}
  .tl-root .tl-state-text em{font-size:13px;}
  .tl-root .tl-state{gap:6px 10px;}
  .tl-root .tl-toolbar{gap:6px;}
}

.tl-panel-x{position:sticky;top:0;z-index:6;display:flex;align-items:center;margin:0;background:var(--tl-panel);border:none;border-bottom:1px solid var(--tl-line);width:100%;padding:8px 18px;font-size:11px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--tl-dim);}
.tl-panel-x.is-left{justify-content:flex-start;}
.tl-panel-x.is-right{justify-content:flex-end;}
.tl-panel-x:hover{color:var(--tl-text);}
@media (max-width:959px){ .tl-panel-x{display:none;} }
@media (min-width:960px){
  .tl-root.is-focus .tl-left,.tl-root.is-focus .tl-settings{top:104px;}
}

/* ==========================================================================
   Simulate Match screen
   ========================================================================== */
.tl-sim-body{flex:1;min-height:0;overflow-y:auto;padding:8px 22px 48px;border-top:1px solid var(--tl-line);}
.tl-sim-setup,.tl-sim-run,.tl-sim-content{max-width:1000px;margin:0 auto;}
.tl-sim-steps{display:flex;gap:10px;list-style:none;margin:14px 0;padding:0;counter-reset:s;flex-wrap:wrap;}
.tl-sim-steps li{flex:1;min-width:160px;counter-increment:s;background:rgba(255,255,255,0.025);border:1px solid var(--tl-line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;}
.tl-sim-steps li::before{content:counter(s);font-size:11px;font-weight:800;color:var(--tl-accent);}
.tl-sim-steps li span{font-size:12px;color:var(--tl-muted);}
.tl-sim-steps li.is-now{border-color:var(--tl-accent);}
.tl-sim-two{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.tl-sim-card{background:rgba(255,255,255,0.025);border:1px solid var(--tl-line);border-radius:14px;padding:14px 16px;margin:0 0 14px;}
.tl-sim-card>small{display:block;font-size:11px;font-weight:800;letter-spacing:0.08em;text-transform:uppercase;color:var(--tl-muted);margin-bottom:10px;}
.tl-sim-card>small em{font-style:normal;font-weight:600;letter-spacing:0;text-transform:none;color:var(--tl-dim);margin-left:8px;}
.tl-sim-card h3{margin:0 0 8px;font-size:20px;}
.tl-sim-tags{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0 0 8px;padding:0;}
.tl-sim-tags li{font-size:11.5px;padding:4px 9px;border-radius:999px;border:1px solid var(--tl-line-2);color:var(--tl-muted);}
.tl-sim-tags.is-ins li{border-color:rgba(90,200,250,0.5);color:var(--tl-accent);}
.tl-sim-tags li.is-none{border-style:dashed;color:var(--tl-dim);border-color:var(--tl-line);}
.tl-sim-go{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:6px 0 8px;}
.tl-sim-sizes{display:inline-flex;align-items:center;gap:6px;}
.tl-sim-sizes small{font-size:11px;font-weight:700;color:var(--tl-dim);text-transform:uppercase;letter-spacing:0.06em;margin-right:4px;}
.tl-sim-runbtn{padding:11px 22px;font-size:14px;}
.tl-sim-prog{position:relative;height:40px;border-radius:12px;border:1px solid var(--tl-line-2);overflow:hidden;background:rgba(255,255,255,0.03);margin:40px 0 14px;}
.tl-sim-prog i{position:absolute;inset:0 auto 0 0;width:0;background:rgba(90,200,250,0.28);transition:width .15s linear;}
.tl-sim-prog b{position:relative;display:flex;align-items:center;height:100%;padding:0 14px;font-size:13px;}
.tl-sim-tabs{display:flex;align-items:center;gap:8px;max-width:1000px;margin:8px auto 14px;flex-wrap:wrap;}
.tl-sim-tabs-r{margin-left:auto;display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;}
.tl-sim-stale{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:rgba(255,180,84,0.1);border:1px solid rgba(255,180,84,0.5);border-radius:12px;padding:10px 14px;margin-bottom:14px;font-size:13px;}
.tl-sim-stale span{color:var(--tl-muted);flex:1;min-width:180px;}
.tl-sim-tbl{width:100%;border-collapse:collapse;font-size:13px;}
.tl-sim-tbl th{font-size:11px;font-weight:700;color:var(--tl-dim);text-align:left;padding:4px 8px;text-transform:uppercase;letter-spacing:0.05em;}
.tl-sim-tbl td{padding:7px 8px;border-top:1px solid var(--tl-line);font-variant-numeric:tabular-nums;}
.tl-sim-tbl td.is-good,.tl-sim-arrow.is-good{color:#6fd38f;font-weight:700;}
.tl-sim-tbl td.is-bad,.tl-sim-arrow.is-bad{color:var(--tl-danger);font-weight:700;}
.tl-sim-sep td{font-size:11px;font-weight:800;letter-spacing:0.08em;text-transform:uppercase;color:var(--tl-muted);border-top:1px solid var(--tl-line-2);padding-top:12px;}
.tl-sim-verdict{margin:6px 0 10px;font-size:14px;font-weight:600;}
.tl-sim-chg{margin:0 0 6px;padding-left:18px;font-size:12.5px;color:var(--tl-muted);}
.tl-sim-cmp{border-color:rgba(90,200,250,0.5);}
.tl-sim-issue{padding:12px 0;border-top:1px solid var(--tl-line);}
.tl-sim-issue:first-of-type{border-top:none;padding-top:2px;}
.tl-sim-issue p{margin:6px 0 0;font-size:13px;line-height:1.5;}
.tl-sim-issue-h{display:flex;align-items:center;gap:10px;}
.tl-sim-mute{color:var(--tl-muted);}
.tl-sim-mute em{font-style:normal;font-weight:700;color:var(--tl-dim);margin-right:6px;font-size:11px;text-transform:uppercase;letter-spacing:0.05em;}
.tl-sim-note{color:#ffb454;}
.tl-sim-lvl{font-size:10px;font-weight:800;letter-spacing:0.08em;padding:3px 8px;border-radius:999px;flex:none;}
.tl-sim-lvl.is-HIGH{background:rgba(255,107,125,0.16);color:#ff6b7d;}
.tl-sim-lvl.is-MEDIUM{background:rgba(255,180,84,0.16);color:#ffb454;}
.tl-sim-lvl.is-LOW{background:rgba(255,255,255,0.08);color:var(--tl-muted);}
.tl-sim-rec{padding:14px 0;border-top:1px solid var(--tl-line);}
.tl-sim-rec:first-of-type{border-top:none;padding-top:2px;}
.tl-sim-rec-h{display:flex;gap:12px;align-items:center;}
.tl-sim-rec-h em{display:block;font-style:normal;font-size:12px;color:var(--tl-muted);}
.tl-sim-n{width:28px;height:28px;border-radius:50%;background:var(--tl-text);color:#0a0d12;font-weight:800;display:grid;place-items:center;flex:none;}
.tl-sim-rec p{margin:8px 0 0;font-size:13px;line-height:1.5;}
.tl-sim-fx{list-style:none;margin:8px 0 0;padding:0;font-size:12.5px;}
.tl-sim-fx li{padding:2px 0 2px 18px;position:relative;}
.tl-sim-fx li::before{position:absolute;left:0;font-weight:800;}
.tl-sim-fx.is-plus li::before{content:"+";color:#6fd38f;}
.tl-sim-fx.is-minus li::before{content:"\2212";color:var(--tl-danger);}
.tl-sim-rec .tl-tool{margin-top:10px;}
.tl-sim-disc{max-width:1000px;margin:8px auto 0;}
/* events + replay */
.tl-sim-ev{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:22px;max-width:1150px;margin:0 auto;align-items:start;}
.tl-sim-evlist{display:flex;flex-direction:column;gap:8px;}
.tl-sim-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:4px;}
.tl-sim-row{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;background:rgba(255,255,255,0.025);border:1px solid var(--tl-line);border-left:3px solid var(--tl-danger);border-radius:12px;padding:10px 12px;color:var(--tl-text);}
.tl-sim-row.is-good{border-left-color:#6fd38f;}
.tl-sim-row.is-opp{border-left-color:#ffb454;}
.tl-sim-row.is-sel{border-color:var(--tl-accent);background:rgba(90,200,250,0.08);}
.tl-sim-row span b{display:block;font-size:13px;}
.tl-sim-row span em{display:block;font-style:normal;font-size:11.5px;color:var(--tl-muted);margin-top:2px;}
.tl-sim-evview{position:sticky;top:0;}
.tl-sim-evhead{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.tl-sim-evhead h3{margin:0;font-size:18px;}
.tl-sim-map{display:flex;flex-direction:column;align-items:center;}
.tlv-pitch.is-sim{width:auto;max-width:min(100%,430px);max-height:62dvh;}
.tl-sim-ball{fill:#fff;stroke:#000;stroke-width:0.35;}
.tl-sim-ctl{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 4px;}
.tl-sim-dots{display:inline-flex;gap:5px;flex-wrap:wrap;margin-left:6px;}
.tl-sim-dot{width:13px;height:13px;border-radius:50%;border:1px solid var(--tl-line-2);background:none;padding:0;}
.tl-sim-dot.is-on{background:var(--tl-accent);border-color:var(--tl-accent);}
.tl-sim-dot.is-ev{border-color:var(--tl-danger);box-shadow:0 0 0 2px rgba(255,107,125,0.35);}
.tl-sim-cap{margin:6px 0 10px;font-size:13px;min-height:2.6em;}
.tl-sim-hit{font-style:normal;color:var(--tl-danger);font-weight:700;}
.tl-sim-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px 18px;}
.tl-sim-facts em{display:block;font-style:normal;font-size:11px;font-weight:800;letter-spacing:0.07em;text-transform:uppercase;color:var(--tl-dim);}
.tl-sim-facts p{margin:3px 0 0;font-size:13px;line-height:1.5;}
@media (max-width:959px){
  .tl-sim-body{padding:6px 14px 48px;}
  .tl-sim-two{grid-template-columns:1fr;}
  .tl-sim-ev{grid-template-columns:1fr;}
  .tl-sim-evview{position:static;}
  .tl-sim-facts{grid-template-columns:1fr;}
  .tl-sim-tabs-r{margin-left:0;width:100%;justify-content:space-between;}
}

.tl-sim-body{overflow-x:hidden;}
.tl-sim-tbl{table-layout:fixed;}
.tl-sim-tbl td:first-child,.tl-sim-tbl th:first-child{width:50%;}
.tl-sim-tbl td:nth-child(2){width:18%;}
.tl-sim-tbl td{overflow-wrap:anywhere;}
.tl-sim-tbl .tl-sim-arrow{width:8%;text-align:center;}
