    /* ── Group Testing specific styles ─────────────────────────── */
    .gt-intro {
      background: linear-gradient(135deg, rgba(26,43,74,0.04), rgba(200,168,75,0.06));
      border: 1px solid rgba(26,43,74,0.08);
      border-radius: var(--radius-lg);
      padding: 1.75rem 2rem;
      margin-bottom: 2rem;
    }
    .gt-intro p, .gt-section p {
      color: var(--text-light);
      font-size: 0.95rem;
      line-height: 1.8;
      margin-bottom: 0.75rem;
    }
    .gt-section {
      margin-bottom: 2.5rem;
    }
    .gt-section h3 {
      font-family: 'Playfair Display', Georgia, serif;
      font-size: 1.15rem;
      color: var(--navy);
      margin: 1.5rem 0 0.75rem;
    }
    .gt-definition {
      background: var(--white);
      border-left: 3px solid var(--gold);
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: 1.25rem 1.5rem;
      margin: 1rem 0;
      box-shadow: var(--shadow-sm);
    }
    .gt-definition .def-label {
      font-weight: 700;
      color: var(--navy);
      font-size: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 0.4rem;
    }
    .gt-theorem {
      background: rgba(26,43,74,0.03);
      border-left: 3px solid var(--navy);
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: 1.25rem 1.5rem;
      margin: 1rem 0;
      box-shadow: var(--shadow-sm);
    }
    .gt-theorem .thm-label {
      font-weight: 700;
      color: var(--navy);
      font-size: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 0.4rem;
    }
    .gt-example {
      background: rgba(200,168,75,0.06);
      border: 1px solid rgba(200,168,75,0.15);
      border-radius: var(--radius);
      padding: 1.25rem 1.5rem;
      margin: 1rem 0;
    }

    /* ── Simulation panel styles ───────────────────────────────── */
    .sim-divider {
      border: none;
      border-top: 2px solid var(--gold);
      margin: 1.75rem 0 1.5rem;
    }
    .sim-step {
      margin-bottom: 1.5rem;
    }
    .sim-step-label {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.09em;
      color: var(--muted);
      margin-bottom: 0.5rem;
    }
    .sim-sublabel {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--navy);
      margin: 0.45rem 0 0.3rem;
    }
    .sim-cell {
      display: inline-block;
      width: 26px;
      height: 26px;
      line-height: 26px;
      text-align: center;
      border: 1.5px solid var(--mid);
      border-radius: 4px;
      font-family: 'Courier New', monospace;
      font-size: 0.82rem;
      font-weight: 700;
      margin: 2px 1px;
      user-select: none;
      transition: background 0.12s, border-color 0.12s;
    }
    .sim-cell.toggle { cursor: pointer; }
    .sim-cell.toggle:hover { border-color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); }
    .sim-cell.zero  { background: var(--white); color: #bbb; }
    .sim-cell.one   { background: var(--navy);  color: var(--white); border-color: var(--navy); }
    .sim-cell.err   { background: #c0392b;       color: var(--white); border-color: #922b21; }
    .sim-cell.flip  { background: #e74c3c;       color: var(--white); border-color: #c0392b; }
    .sim-cell.ok    { background: #2d8a4e;       color: var(--white); border-color: #1e6035; }
    .sim-cell.wrong { background: #e67e22;       color: var(--white); border-color: #ca6f1e; }
    .sim-result-box {
      padding: 1rem 1.25rem;
      border-radius: 6px;
      margin-top: 0.75rem;
      font-size: 0.88rem;
    }
    .sim-result-box.success { background: #f0faf4; border: 1.5px solid #2d8a4e; }
    .sim-result-box.failure { background: #fdf0f0; border: 1.5px solid #c0392b; }
    .sim-result-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 0.75rem;
    }
    .sim-result-row {
      margin-bottom: 0.45rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: wrap;
    }
    .sim-result-row strong {
      display: inline-block;
      min-width: 7em;
      color: var(--navy);
    }
    .sim-footer {
      margin-top: 0.6rem;
      padding-top: 0.6rem;
      border-top: 1px solid rgba(0,0,0,0.1);
      font-size: 0.8rem;
      color: var(--text-light);
    }

    /* ── Playground styles ─────────────────────────────────────── */
    .playground {
      background: var(--white);
      border: 2px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 2rem;
      box-shadow: var(--shadow-md);
    }
    .playground-controls {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: flex-end;
      margin-bottom: 1.5rem;
    }
    .control-group {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
    }
    .control-group label {
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--muted);
    }
    .control-group select, .control-group input {
      padding: 0.5rem 0.75rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      font-size: 0.9rem;
      font-family: 'Inter', sans-serif;
      color: var(--text);
      background: var(--cream);
    }
    .control-group select:focus, .control-group input:focus {
      outline: none;
      border-color: var(--gold);
      box-shadow: 0 0 0 3px rgba(200,168,75,0.15);
    }
    .btn {
      padding: 0.55rem 1.25rem;
      border: none;
      border-radius: 6px;
      font-size: 0.88rem;
      font-weight: 600;
      cursor: pointer;
      transition: all var(--transition);
      font-family: 'Inter', sans-serif;
    }
    .btn-primary {
      background: var(--navy);
      color: var(--white);
    }
    .btn-primary:hover { background: var(--navy-mid); transform: translateY(-1px); }
    .btn-secondary {
      background: var(--cream);
      color: var(--navy);
      border: 1px solid var(--border);
    }
    .btn-secondary:hover { background: var(--white); border-color: var(--gold); }
    .btn-gold {
      background: var(--gold);
      color: var(--white);
    }
    .btn-gold:hover { background: var(--gold-light); color: var(--navy); }

    /* Matrix display */
    .matrix-wrapper {
      overflow-x: auto;
      margin: 1rem 0;
      padding: 0.5rem;
    }
    table.matrix {
      border-collapse: collapse;
      font-family: 'Courier New', monospace;
      font-size: 0.82rem;
    }
    table.matrix th {
      padding: 0.2rem 0.4rem;
      font-size: 0.7rem;
      color: var(--muted);
      font-weight: 600;
      text-align: center;
    }
    table.matrix td {
      width: 28px;
      height: 28px;
      text-align: center;
      border: 1px solid var(--border);
      cursor: pointer;
      transition: all 0.15s;
      user-select: none;
    }
    table.matrix.matrix-ro td {
      width: 18px;
      height: 18px;
      font-size: 0.72rem;
      cursor: default;
      border-color: var(--mid);
    }
    table.matrix.matrix-ro td:hover {
      border-color: var(--mid);
      box-shadow: none;
    }
    table.matrix.matrix-ro th {
      font-size: 0.62rem;
      padding: 0.1rem 0.2rem;
    }
    table.matrix.matrix-ro td.row-label {
      font-size: 0.62rem;
    }
    table.matrix td.one {
      background: var(--navy);
      color: var(--white);
      font-weight: 700;
    }
    table.matrix td.zero {
      background: var(--white);
      color: #ccc;
    }
    table.matrix td.err {
      background: #c0392b;
      color: var(--white);
      font-weight: 700;
    }
    table.matrix td.ok {
      background: #2d8a4e;
      color: var(--white);
      font-weight: 700;
    }
    table.matrix td.wrong {
      background: #e67e22;
      color: var(--white);
      font-weight: 700;
    }
    table.matrix td:hover {
      border-color: var(--gold);
      box-shadow: inset 0 0 0 2px var(--gold);
    }
    table.matrix td.row-label {
      background: none;
      border: none;
      color: var(--muted);
      font-size: 0.7rem;
      font-weight: 600;
      cursor: default;
      width: auto;
      padding-right: 0.5rem;
      text-align: right;
    }
    table.matrix td.row-label:hover {
      border-color: transparent;
      box-shadow: none;
    }

    /* Results panel */
    .results-panel {
      margin-top: 1.5rem;
      padding: 1.5rem;
      background: var(--cream);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }
    .results-panel h3 {
      font-family: 'Playfair Display', Georgia, serif;
      font-size: 1.1rem;
      color: var(--navy);
      margin-bottom: 1rem;
    }
    .result-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.6rem 0;
      border-bottom: 1px solid var(--border);
      font-size: 0.9rem;
    }
    .result-row:last-child { border-bottom: none; }
    .result-label { color: var(--text-light); font-weight: 500; }
    .result-value { font-weight: 700; color: var(--navy); font-family: 'Courier New', monospace; }
    .result-value.good { color: #2d8a4e; }
    .result-value.warn { color: #c07a00; }
    .result-value.bad { color: #c0392b; }

    .gt-disclaimer {
      border-left: 3px solid var(--gold);
      background: rgba(200,168,75,0.07);
      padding: 0.6rem 1rem;
      font-size: 0.82rem;
      color: var(--text-light);
      line-height: 1.55;
      margin-bottom: 1.5rem;
    }
    .gt-disclaimer strong { color: var(--navy); }

    .dist-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 0.75rem;
      font-size: 0.85rem;
    }
    .dist-table th, .dist-table td {
      padding: 0.5rem 0.75rem;
      border: 1px solid var(--border);
      text-align: center;
    }
    .dist-table th {
      background: var(--navy);
      color: var(--white);
      font-weight: 600;
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .dist-table td { background: var(--white); }
    .dist-table tr.selectable { cursor: pointer; }
    .dist-table tr.cs-selected td { background: rgba(200,168,75,0.18); }
    .dist-table tr.cs-selected:hover td { background: rgba(200,168,75,0.26); }

    .spinner {
      display: inline-block;
      width: 16px; height: 16px;
      border: 2px solid var(--border);
      border-top-color: var(--gold);
      border-radius: 50%;
      animation: spin 0.6s linear infinite;
      margin-right: 0.5rem;
      vertical-align: middle;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .ref-list {
      list-style: none;
      margin-top: 0.75rem;
    }
    .ref-list li {
      padding: 0.4rem 0;
      font-size: 0.88rem;
      color: var(--text-light);
      line-height: 1.6;
    }
    .ref-list li strong { color: var(--navy); }

    .matrix-textarea {
      width: 100%;
      min-height: 120px;
      font-family: 'Courier New', monospace;
      font-size: 0.85rem;
      padding: 0.75rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--white);
      color: var(--text);
      resize: vertical;
    }
    .matrix-textarea:focus {
      outline: none;
      border-color: var(--gold);
      box-shadow: 0 0 0 3px rgba(200,168,75,0.15);
    }

    .tab-bar {
      display: flex;
      gap: 0.25rem;
      margin-bottom: 1.5rem;
      border-bottom: 2px solid var(--border);
      padding-bottom: 0;
    }
    .tab-btn {
      padding: 0.6rem 1.2rem;
      border: none;
      background: none;
      font-size: 0.88rem;
      font-weight: 500;
      color: var(--muted);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      margin-bottom: -2px;
      transition: all var(--transition);
      font-family: 'Inter', sans-serif;
    }
    .tab-btn:hover { color: var(--navy); }
    .tab-btn.active {
      color: var(--navy);
      border-bottom-color: var(--gold);
      font-weight: 600;
    }
    .tab-content { display: none; }
    .tab-content.active { display: block; }
