*,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    :root {
      --navy: #0B1929;
      --navy2: #112236;
      --navy3: #162D44;
      --orange: #E8752A;
      --orange2: #FF9050;
      --green: #2ECC71;
      --amber: #F39C12;
      --red: #E74C3C;
      --dkred: #922B21;
      --white: #EDF2F7;
      --dim: #6B8CAE;
      --muted: #3A5068;
      --surf: #091521;
      --surf2: #0D1E2E;
      --surf3: #112438;
      --border: rgba(110, 160, 210, .12);
      --border2: rgba(232, 117, 42, .25);
      --fn-disp: 'Syne', sans-serif;
      --fn-body: 'DM Mono', monospace;
      --fn-mono: 'Syne Mono', monospace;
    }

    html,
    body {
      height: 100%;
      background: var(--surf);
      color: var(--white);
      font-family: var(--fn-body);
      overflow: hidden;
      font-size: 14px
    }

    .app {
      display: grid;
      grid-template-rows: 48px 1fr;
      height: 100vh
    }

    /* TOPBAR */
    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px;
      background: var(--navy);
      border-bottom: 1px solid var(--border);
      position: relative;
      z-index: 100
    }

    .topbar::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--orange), transparent)
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px
    }

    .logo-box {
      width: 28px;
      height: 28px;
      background: var(--orange);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--fn-disp);
      font-weight: 800;
      font-size: 16px;
      color: var(--navy)
    }

    .logo-text {
      font-family: var(--fn-disp);
      font-weight: 700;
      font-size: 14px;
      letter-spacing: 3px
    }

    .logo-sub {
      font-size: 13px;
      color: var(--orange);
      letter-spacing: 3px;
      margin-top: 1px
    }

    .nav {
      display: flex;
      gap: 1px
    }

    .nav-btn {
      padding: 5px 18px;
      background: none;
      border: none;
      font-family: var(--fn-disp);
      font-weight: 600;
      font-size: 16px;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--dim);
      cursor: pointer;
      transition: color .2s;
      border-bottom: 2px solid transparent
    }

    .nav-btn:hover {
      color: var(--white)
    }

    .nav-btn.active {
      color: var(--orange);
      border-bottom-color: var(--orange)
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 14px
    }

    .live-pill {
      display: flex;
      align-items: center;
      gap: 5px;
      font-family: var(--fn-mono);
      font-size: 14px;
      color: var(--green)
    }

    .live-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--green);
      animation: blink 1.4s ease-in-out infinite
    }

    @keyframes blink {

      0%,
      100% {
        opacity: 1
      }

      50% {
        opacity: .3
      }
    }

    .clock {
      font-family: var(--fn-mono);
      font-size: 13px;
      font-weight: 500;
      color: var(--orange)
    }

    .user-tag {
      font-size: 13px;
      color: var(--muted);
      letter-spacing: 1px
    }

    /* SCREENS */
    .screen {
      display: none !important;
      height: 100%;
      overflow-y: auto;
      padding: 12px 14px
    }

    .screen.active {
      display: grid !important
    }

    ::-webkit-scrollbar {
      width: 3px
    }

    ::-webkit-scrollbar-thumb {
      background: var(--muted);
      border-radius: 2px
    }

    /* SHARED */
    .card {
      background: var(--surf2);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: 11px
    }

    .lbl {
      font-family: var(--fn-disp);
      font-weight: 600;
      font-size: 13px;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--dim);
      margin-bottom: 9px;
      font-size: 11px;
      display: flex;
      align-items: center;
      gap: 5px
    }

    .lbl::before {
      content: '';
      display: block;
      width: 2px;
      height: 10px;
      background: var(--orange)
    }

    .pill {
      display: inline-block;
      padding: 2px 7px;
      border-radius: 2px;
      font-family: var(--fn-mono);
      font-size: 13px
    }

    .pg {
      background: rgba(46, 204, 113, .15);
      color: var(--green)
    }

    .pa {
      background: rgba(243, 156, 18, .15);
      color: var(--amber)
    }

    .po {
      background: rgba(232, 117, 42, .18);
      color: var(--orange)
    }

    .pr {
      background: rgba(231, 76, 60, .18);
      color: var(--red)
    }

    .pdr {
      background: rgba(146, 43, 33, .25);
      color: #FF7070
    }

    .pd {
      background: rgba(110, 160, 210, .1);
      color: var(--dim)
    }

    .trk {
      height: 6px;
      background: var(--surf3);
      border-radius: 3px;
      overflow: hidden;
      margin: 3px 0
    }

    .fill {
      height: 100%;
      border-radius: 3px;
      transition: width .7s ease
    }

    .fg {
      background: linear-gradient(90deg, var(--green), #52E090)
    }

    .fa {
      background: linear-gradient(90deg, var(--amber), #FFC04A)
    }

    .fo {
      background: linear-gradient(90deg, var(--orange), var(--orange2))
    }

    .fr {
      background: linear-gradient(90deg, var(--dkred), var(--red))
    }

    .posm-trk {
      height: 9px;
      background: var(--surf3);
      border-radius: 5px;
      position: relative;
      overflow: hidden
    }

    .posm-n {
      height: 100%;
      border-radius: 5px;
      background: linear-gradient(90deg, var(--dkred), var(--red));
      position: absolute;
      right: 50%;
      transition: width .8s ease
    }

    .posm-p {
      height: 100%;
      border-radius: 5px;
      background: linear-gradient(90deg, var(--green), #52E090);
      position: absolute;
      left: 50%;
      transition: width .8s ease
    }

    .posm-c {
      position: absolute;
      left: 50%;
      top: -2px;
      width: 1px;
      height: 13px;
      background: var(--dim)
    }

    .iv {
      display: flex;
      align-items: center;
      gap: 5px;
      margin: 3px 0;
      font-size: 14px
    }

    .iv-l {
      width: 12px;
      font-family: var(--fn-mono);
      font-weight: 500;
      color: var(--orange);
      font-size: 14px
    }

    .iv-n {
      width: 58px;
      color: var(--dim);
      font-size: 13px
    }

    .iv-t {
      flex: 1;
      height: 5px;
      background: var(--surf3);
      border-radius: 3px;
      overflow: hidden
    }

    .iv-f {
      height: 100%;
      border-radius: 3px;
      background: var(--orange);
      transition: width .6s
    }

    .iv-v {
      width: 38px;
      text-align: right;
      font-size: 14px;
      font-family: var(--fn-mono)
    }

    .dec {
      border-radius: 3px;
      padding: 13px;
      margin: 6px 0;
      border-left: 3px solid
    }

    .dec-m {
      border-color: var(--green);
      background: rgba(46, 204, 113, .05)
    }

    .dec-a {
      border-color: var(--amber);
      background: rgba(243, 156, 18, .05)
    }

    .dec-n {
      border-color: var(--orange);
      background: rgba(232, 117, 42, .07)
    }

    .dec-e {
      border-color: var(--red);
      background: rgba(231, 76, 60, .09);
      animation: up 1.8s ease-in-out infinite
    }

    @keyframes up {

      0%,
      100% {
        opacity: 1
      }

      50% {
        opacity: .82
      }
    }

    .scen {
      padding: 8px 10px;
      border-radius: 3px;
      border: 1px solid var(--border);
      margin: 3px 0
    }

    .scen.best {
      border-color: rgba(46, 204, 113, .3)
    }

    .lr {
      display: grid;
      grid-template-columns: 32px 1fr auto auto;
      align-items: center;
      gap: 7px;
      padding: 5px 0;
      border-bottom: 1px solid var(--border);
      font-size: 14px
    }

    .lr:last-child {
      border-bottom: none
    }

    .strength-r,
    .fail-r {
      display: flex;
      gap: 6px;
      padding: 4px 0;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
      line-height: 1.5
    }

    .strength-r:last-child,
    .fail-r:last-child {
      border-bottom: none
    }

    .strength-r::before {
      content: '✓';
      color: var(--green);
      flex-shrink: 0
    }

    .fail-r::before {
      content: '⚠';
      color: var(--red);
      flex-shrink: 0
    }

    .kbi {
      padding: 8px 10px;
      border: 1px solid var(--border);
      border-radius: 3px;
      cursor: pointer;
      transition: border-color .2s;
      border-left: 3px solid transparent;
      margin-bottom: 3px
    }

    .kbi:hover {
      border-color: var(--border2)
    }

    .kbi.active {
      border-left-color: var(--orange);
      background: var(--surf3)
    }

    .kbi .pill {
      margin-top: 6px;
      font-size: 10px
    }

    .kbn {
      font-family: var(--fn-disp);
      font-weight: 700;
      font-size: 16px
    }

    .kbm {
      font-size: 13px;
      color: var(--dim);
      font-family: var(--fn-mono);
      margin-top: 1px
    }

    .full {
      grid-column: 1/-1
    }

    .screen.active {
      animation: fi .22s ease
    }

    @keyframes fi {
      from {
        opacity: 0;
        transform: translateY(3px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    /* SCREEN 1 */
    #screen-live {
      grid-template-columns: 28% 44% 28%;
      grid-template-rows: auto auto 1fr;
      gap: 9px;
      align-content: start
    }

    .mhdr {
      grid-column: 1/-1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--navy2);
      border: 1px solid var(--border);
      padding: 9px 15px;
      border-radius: 3px;
      border-left: 3px solid var(--orange)
    }

    .upcoming {
      grid-column: 1/-1;
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 6px
    }

    .game-slot {
      border: 1px solid var(--border);
      border-radius: 3px;
      background: var(--surf2);
      padding: 7px;
      display: flex;
      flex-direction: column;
      gap: 5px;
      min-width: 0
    }

    .game-slot.active {
      border-color: var(--border2);
      background: var(--surf3)
    }

    .slot-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 5px;
      font-family: var(--fn-mono);
      font-size: 12px;
      color: var(--dim)
    }

    .slot-num {
      color: var(--orange);
      font-weight: 700
    }

    .slot-role {
      font-family: var(--fn-disp);
      font-weight: 700;
      font-size: 12px;
      color: var(--white);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .slot-fixture {
      font-family: var(--fn-disp);
      font-size: 13px;
      font-weight: 700;
      color: var(--white);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .slot-meta {
      font-size: 11px;
      color: var(--dim);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .slot-select {
      width: 100%;
      min-width: 0;
      background: var(--surf);
      border: 1px solid var(--border);
      border-radius: 3px;
      color: var(--white);
      font-family: var(--fn-mono);
      font-size: 11px;
      padding: 4px
    }

    .slot-select:disabled {
      color: var(--muted);
      opacity: .75
    }

    input {
      background: var(--surf);
      border: 1px solid var(--border);
      border-radius: 3px;
      color: var(--white);
      font-family: var(--fn-mono);
      font-size: 12px;
      padding: 7px;
      outline: none
    }

    input:focus {
      border-color: var(--border2)
    }

    input[readonly] {
      color: var(--dim)
    }

    .slot-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px
    }

    .slot-btn {
      background: var(--surf);
      border: 1px solid var(--border);
      border-radius: 3px;
      color: var(--dim);
      font-family: var(--fn-disp);
      font-weight: 700;
      font-size: 10px;
      letter-spacing: .6px;
      padding: 4px;
      cursor: pointer;
      text-transform: uppercase
    }

    .slot-btn:hover {
      border-color: var(--border2);
      color: var(--white)
    }

    .slot-btn.primary {
      color: var(--orange);
      border-color: var(--border2)
    }

    .slot-btn.active {
      background: rgba(243, 108, 42, .18);
      border-color: var(--orange);
      color: var(--white)
    }

    .slot-btn:disabled {
      cursor: not-allowed;
      opacity: .45
    }

    #slot02-expanded {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 180px 180px 220px 1fr 1fr 1fr;
      gap: 12px;
      align-items: start;
    }

    .mini-title {
      margin-top: 14px;
      font-size: 11px;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--dim);
    }

    .muted {
      color: var(--text);
      font-size: 13px;
      line-height: 1.55;
    }

    .metric-row {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      padding: 8px 0;
      border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .cl {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .cc {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .cr {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    /* SCREEN 2 */
    #screen-opponent {
      grid-template-columns: 28% 44% 28%;
      grid-template-rows: auto 1fr;
      gap: 9px;
      align-content: start
    }

    /* SCREEN 3 */
    #screen-kb {
      grid-template-columns: 210px 1fr;
      grid-template-rows: auto 1fr;
      gap: 9px;
      align-content: start
    }

    .kblist {
      display: flex;
      flex-direction: column
    }

    .kbdet {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .kb-toolbar {
      display: flex;
      align-items: center;
      gap: 8px
    }

    .kb-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px
    }

    .kb-profile-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px
    }

    .kb-mini-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 7px
    }

    .kb-metric {
      display: grid;
      grid-template-columns: 92px 1fr 44px;
      gap: 8px;
      align-items: center;
      padding: 5px 0;
      border-bottom: 1px solid var(--border);
      font-size: 12px
    }

    .kb-metric:last-child {
      border-bottom: none
    }

    .kb-signal {
      display: grid;
      grid-template-columns: 1fr 54px;
      gap: 8px;
      align-items: center;
      padding: 6px 0;
      border-bottom: 1px solid var(--border);
      font-size: 13px
    }

    .kb-signal:last-child {
      border-bottom: none
    }

    .kb-zone-map {
      display: grid;
      grid-template-columns: 60px repeat(3, minmax(0, 1fr));
      gap: 6px;
      align-items: center;
      font-size: 12px
    }

    .kb-zone-cell {
      background: var(--surf);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: 7px;
      text-align: center
    }

    .kb-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-top: 7px
    }

    .nav-btn.core {
      font-size: 14px;
      font-weight: 600;
    }

    .nav-btn.sub {
      font-size: 11px;
      opacity: 0.55;
    }

    .nav-sep {
      width: 24px;
    }

    #screen-sm {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto 1fr;
      gap: 9px;
      align-content: start;
    }

    #screen-sm .upcoming,
    #screen-sm #slot02-expanded {
      grid-column: 1 / -1;
    }

    #screen-apis {
      grid-template-columns: minmax(360px, 620px) 1fr;
      grid-template-rows: auto 1fr;
      gap: 9px;
      align-content: start;
    }

    .api-card {
      min-width: 0
    }

    .vision-card {
      border-left: 3px solid #6ec1ff;
    }

    .vision-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
      margin-bottom: 10px;
    }

    .vision-title {
      font-family: var(--fn-disp);
      font-size: 16px;
      font-weight: 800;
      margin-top: 2px;
    }

    .vision-connection-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 9px;
    }

    .vision-connection-slot {
      border: 1px solid var(--border);
      background: rgba(9, 21, 33, .55);
      border-radius: 3px;
      padding: 10px;
      min-width: 0;
    }

    .vision-connection-slot span {
      display: inline-block;
      color: #6ec1ff;
      font-family: var(--fn-mono);
      font-size: 11px;
      margin-bottom: 6px;
    }

    .vision-connection-slot strong {
      display: block;
      color: var(--white);
      font-family: var(--fn-disp);
      font-size: 15px;
      margin-bottom: 5px;
    }

    .vision-connection-slot p {
      color: var(--dim);
      font-size: 12px;
      line-height: 1.45;
      margin-bottom: 8px;
    }

    .vision-source-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
      margin-top: 8px;
    }

    .vision-source-fields label {
      display: grid;
      gap: 4px;
      color: var(--dim);
      font-family: var(--fn-mono);
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: .5px;
      min-width: 0;
    }

    .vision-source-fields input {
      width: 100%;
      min-width: 0;
      height: 29px;
      font-size: 12px;
    }

    .vision-source-actions {
      grid-template-columns: repeat(4, 1fr);
      margin-top: 8px;
    }

    .vision-source-status {
      min-height: 18px;
      margin-top: 7px;
      color: var(--dim);
      font-family: var(--fn-mono);
      font-size: 11px;
      line-height: 1.35;
    }

    .vision-connection-slot.active {
      border-color: rgba(110, 193, 255, .55);
      box-shadow: inset 0 0 0 1px rgba(110, 193, 255, .12);
    }

    .vision-connection-status {
      border-top: 1px solid var(--border);
      padding-top: 8px;
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 8px;
      align-items: baseline;
      color: var(--dim);
      font-family: var(--fn-mono);
      font-size: 12px;
    }

    .vision-connection-status strong {
      color: var(--white);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }

    .vision-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 9px;
    }

    .vision-metric {
      border: 1px solid var(--border);
      background: rgba(9, 21, 33, .55);
      border-radius: 3px;
      padding: 8px;
      min-width: 0;
    }

    .vision-metric span {
      display: block;
      font-family: var(--fn-mono);
      font-size: 11px;
      color: var(--dim);
      margin-bottom: 3px;
      text-transform: uppercase;
    }

    .vision-metric strong {
      display: block;
      font-family: var(--fn-disp);
      font-size: 15px;
      color: var(--white);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .vision-actions {
      grid-template-columns: repeat(4, 1fr);
      margin-bottom: 8px;
    }

    .vision-evidence {
      min-height: 34px;
      border-top: 1px solid var(--border);
      padding-top: 8px;
      color: var(--dim);
      font-size: 13px;
      line-height: 1.55;
    }

    #screen-vision {
      grid-template-columns: 1fr;
      grid-auto-rows: max-content;
      gap: 9px;
      align-content: start;
    }

    .nav-btn.vision-nav {
      color: #6ec1ff;
      border-color: rgba(110, 193, 255, .28);
    }

    .nav-btn.vision-nav.active,
    .nav-btn.vision-nav:hover {
      background: rgba(110, 193, 255, .10);
      color: #bfe8ff;
      border-color: rgba(110, 193, 255, .48);
    }

    .vision-screen-head {
      border-left: 3px solid #6ec1ff;
      background: linear-gradient(90deg, rgba(110, 193, 255, .08), rgba(13, 30, 46, .88));
      border: 1px solid var(--border);
      border-left-color: #6ec1ff;
      padding: 12px 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
    }

    .vision-screen-head h1,
    .vision-stage-copy h2 {
      font-family: var(--fn-disp);
      font-size: 22px;
      line-height: 1.05;
      letter-spacing: 0;
      margin: 2px 0;
    }

    .vision-screen-head p,
    .vision-stage-copy p {
      color: var(--dim);
      font-family: var(--fn-mono);
      font-size: 13px;
      line-height: 1.45;
    }

    .vision-head-meta {
      display: grid;
      grid-template-columns: auto auto;
      gap: 4px 10px;
      align-items: center;
      justify-items: end;
      min-width: 220px;
      font-family: var(--fn-mono);
      font-size: 12px;
      color: var(--dim);
    }

    .vision-head-meta span:last-child {
      grid-column: 1 / -1;
      max-width: 320px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .vision-modebar {
      display: flex;
      gap: 7px;
      flex-wrap: wrap;
      align-items: center;
    }

    .vision-view-btn {
      min-height: 32px;
      border: 1px solid rgba(110, 193, 255, .24);
      background: rgba(9, 21, 33, .72);
      color: #7db7df;
      border-radius: 3px;
      padding: 0 13px;
      font-family: var(--fn-disp);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .8px;
      cursor: pointer;
      text-transform: uppercase;
    }

    .vision-view-btn.active,
    .vision-view-btn:hover {
      background: rgba(110, 193, 255, .13);
      border-color: rgba(110, 193, 255, .6);
      color: #d7f0ff;
    }

    .vision-view {
      display: none;
    }

    .vision-view.active {
      display: block;
    }

    .vision-stage {
      display: grid;
      grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
      gap: 10px;
      min-height: 560px;
    }

    .vision-stage.compact {
      grid-template-columns: minmax(260px, .85fr) minmax(300px, 1.15fr);
      min-height: 360px;
    }

    .vision-stage-copy,
    .vision-field-wrap,
    .vision-posm-panel,
    .vision-debug-panel,
    .vision-copilot-card,
    .vision-wall-pane {
      background: var(--surf2);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: 12px;
      min-width: 0;
    }

    .vision-stage-copy {
      display: flex;
      flex-direction: column;
      gap: 10px;
      justify-content: space-between;
    }

    .vision-mini-metrics {
      display: grid;
      gap: 7px;
    }

    .vision-mini-metrics div,
    .vision-debug-panel div {
      border: 1px solid rgba(110, 160, 210, .10);
      background: rgba(9, 21, 33, .55);
      padding: 8px;
    }

    .vision-mini-metrics span,
    .vision-debug-panel span {
      display: block;
      color: var(--dim);
      font-family: var(--fn-mono);
      font-size: 11px;
      text-transform: uppercase;
      margin-bottom: 4px;
    }

    .vision-mini-metrics strong,
    .vision-debug-panel strong {
      font-family: var(--fn-disp);
      font-size: 20px;
      color: var(--white);
    }

    .vision-field-wrap {
      display: grid;
      place-items: center;
      background: #06120d;
      overflow: hidden;
    }

    .vision-field-svg {
      width: min(100%, 980px);
      height: auto;
      display: block;
    }

    .field-base {
      fill: #0d3f22;
    }

    .field-zone,
    .field-third {
      fill: rgba(110, 193, 255, .05);
      stroke: rgba(255, 255, 255, .14);
      stroke-width: 1;
    }

    .field-third {
      stroke-dasharray: 5 4;
    }

    .field-line {
      stroke: rgba(255, 255, 255, .2);
      stroke-width: 1;
      stroke-dasharray: 6 4;
    }

    .field-line.muted,
    .field-mark {
      stroke: rgba(255, 255, 255, .12);
      fill: none;
    }

    .field-label,
    .field-third-label,
    .field-value,
    .field-small-value {
      font-family: var(--fn-mono);
      text-anchor: middle;
      pointer-events: none;
    }

    .field-label,
    .field-third-label {
      font-size: 10px;
      fill: rgba(255, 255, 255, .44);
    }

    .field-value {
      font-size: 28px;
      font-weight: 800;
      fill: #d7f0ff;
    }

    .field-small-value {
      font-size: 18px;
      font-weight: 800;
      fill: rgba(255, 255, 255, .78);
    }

    .vision-posm-panel {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 12px;
      min-height: 280px;
    }

    #vision-posm-value {
      font-family: var(--fn-disp);
      font-size: clamp(44px, 8vw, 88px);
      line-height: .95;
      font-weight: 800;
      color: #d7f0ff;
      text-align: center;
    }

    .vision-posm-track {
      min-height: 26px;
    }

    .vision-scale {
      display: flex;
      justify-content: space-between;
      color: var(--dim);
      font-family: var(--fn-mono);
      font-size: 12px;
    }

    .vision-copilot-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-auto-rows: minmax(220px, auto);
      gap: 9px;
    }

    .vision-copilot-card p,
    .vision-wall-pane p {
      margin-top: 10px;
      font-size: 16px;
      line-height: 1.55;
      color: var(--white);
    }

    .vision-copilot-card.squad {
      background: rgba(237, 242, 247, .94);
      color: #0b1929;
    }

    .vision-copilot-card.squad .lbl,
    .vision-copilot-card.squad p {
      color: #0b1929;
    }

    .vision-copilot-card.opponent {
      border-color: rgba(231, 76, 60, .22);
      background: rgba(231, 76, 60, .06);
    }

    .vision-copilot-time {
      grid-column: 1 / -1;
      color: var(--dim);
      font-family: var(--fn-mono);
      font-size: 12px;
    }

    .vision-signal-list {
      display: grid;
      gap: 7px;
      max-height: 430px;
      overflow: auto;
      color: var(--dim);
      font-family: var(--fn-mono);
      font-size: 13px;
      line-height: 1.45;
    }

    .vision-signal-item {
      border: 1px solid rgba(110, 160, 210, .12);
      background: rgba(9, 21, 33, .55);
      padding: 8px;
    }

    .vision-signal-item strong {
      color: var(--white);
      font-family: var(--fn-disp);
      letter-spacing: .7px;
      text-transform: uppercase;
    }

    .vision-debug-panel {
      display: grid;
      align-content: start;
      gap: 8px;
    }

    .vision-wall {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-auto-rows: minmax(280px, 1fr);
      gap: 9px;
      min-height: calc(100vh - 150px);
    }

    .vision-wall-pane {
      overflow: hidden;
    }

    .vision-wall-pane strong {
      display: block;
      margin-top: 20px;
      font-family: var(--fn-disp);
      font-size: clamp(38px, 6vw, 72px);
      line-height: 1;
      color: #d7f0ff;
    }

    .vision-wall-map {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(2, 1fr);
      gap: 4px;
      height: calc(100% - 28px);
      min-height: 220px;
      margin-top: 10px;
    }

    .vision-wall-zone {
      border: 1px solid rgba(255, 255, 255, .13);
      display: grid;
      place-items: center;
      color: var(--white);
      font-family: var(--fn-disp);
      font-weight: 800;
      font-size: 18px;
    }

    .api-connectors {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
      align-content: start;
      min-width: 0
    }

    .api-connector-card {
      background: var(--surf2);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: 11px;
      min-width: 0
    }

    .api-provider-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
      margin-bottom: 8px
    }

    .api-provider-name {
      font-family: var(--fn-disp);
      font-size: 15px;
      font-weight: 800
    }

    .api-provider-meta {
      font-family: var(--fn-mono);
      font-size: 11px;
      color: var(--dim);
      margin-top: 2px
    }

    .api-fields {
      display: grid;
      grid-template-columns: 1fr;
      gap: 6px
    }

    .api-field-row {
      display: grid;
      grid-template-columns: 120px 1fr;
      gap: 7px;
      align-items: center
    }

    .api-field-row label {
      font-family: var(--fn-mono);
      font-size: 11px;
      color: var(--dim);
      text-transform: uppercase
    }

    .api-field-row input {
      width: 100%
    }

    .api-status-line {
      margin-top: 8px;
      font-family: var(--fn-mono);
      font-size: 12px;
      color: var(--dim)
    }

    .api-connector-card .slot-actions {
      grid-template-columns: repeat(4, 1fr);
      margin-top: 8px
    }

    .copilot {
      margin-top: 10px;
      width: 100%;
      min-height: 210px;
      background: linear-gradient(180deg, rgba(12, 19, 35, 0.96), rgba(8, 14, 28, 0.96));
      border: 1px solid rgba(255, 106, 0, 0.45);
      border-radius: 8px;
      padding: 12px;
      box-sizing: border-box;
    }

    .copilot-header {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin-bottom: 8px;
      min-height: 14px;
    }

    .copilot-modebar {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
      flex-wrap: wrap;
    }

    .copilot-mode-btn {
      border: 1px solid rgba(255, 255, 255, .14);
      background: rgba(255, 255, 255, .04);
      color: var(--dim);
      min-height: 28px;
      padding: 0 10px;
      border-radius: 4px;
      font-family: var(--fn-disp);
      font-size: 11px;
      letter-spacing: 1px;
      cursor: pointer;
    }

    .copilot-mode-btn.active {
      border-color: rgba(255, 106, 0, .75);
      background: rgba(255, 106, 0, .16);
      color: var(--orange);
    }

    .copilot-source-tag {
      font-family: var(--fn-mono);
      font-size: 11px;
      color: var(--muted);
      letter-spacing: 1px;
    }

    .copilot-window {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .copilot-row {
      display: flex;
      width: 100%;
    }

    .copilot-row.squad {
      justify-content: flex-start;
    }

    .copilot-row.opp {
      justify-content: flex-start;
      padding-left: 18%;
    }

    .copilot-bubble {
      max-width: 74%;
      border-radius: 10px;
      padding: 10px 12px;
      line-height: 1.45;
      font-size: 13px;
      font-family: var(--fn-mono);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    .copilot-bubble.squad {
      background: rgba(245, 245, 245, 0.96);
      color: #111827;
      border-top-left-radius: 3px;
    }

    .copilot-bubble.opp {
      background: rgba(52, 152, 219, 0.2);
      color: #d7ecff;
      border: 1px solid rgba(52, 152, 219, 0.45);
      border-top-right-radius: 3px;
    }

    .copilot-author {
      display: block;
      margin-bottom: 5px;
      font-family: var(--fn-disp);
      font-size: 12px;
      letter-spacing: 1px;
      text-transform: uppercase;
    }

    .copilot-bubble.squad .copilot-author {
      color: #6b7280;
    }

    .copilot-bubble.opp .copilot-author {
      color: #6ec1ff;
    }

    .copilot-meta {
      font-size: 11px;
      color: var(--muted);
      font-family: var(--fn-mono);
      letter-spacing: 1px;
      margin-top: 2px;
      display: none;
    }

    .hidden {
      display: none;
    }

    @media (max-width: 900px) {
      #screen-apis {
        grid-template-columns: 1fr
      }

      .api-connectors {
        grid-template-columns: 1fr
      }

      .vision-grid,
      .vision-connection-grid,
      .vision-source-fields,
      .vision-actions {
        grid-template-columns: repeat(2, 1fr)
      }

      .vision-screen-head,
      .vision-stage,
      .vision-stage.compact,
      .vision-copilot-grid,
      .vision-wall {
        grid-template-columns: 1fr
      }

      .vision-screen-head {
        align-items: flex-start;
      }

      .vision-head-meta {
        justify-items: start;
        min-width: 0;
      }

      .vision-stage {
        min-height: auto;
      }

      .vision-wall {
        grid-auto-rows: minmax(240px, auto);
        min-height: auto;
      }

      .api-connector-card .slot-actions {
        grid-template-columns: repeat(2, 1fr)
      }
    }
