/* =============================================================================
   ILS Activity CSS — Shared reusable styles for interactive learning activities
   Companion to ils-activity.js | v1.0
   Prefix: act-

   Replaces duplicated per-activity CSS (ms-, ra-, tc-, qd- prefixed classes)
   with a single set of reusable, themeable component styles.

   Sections:
     1.  Step Cards (sub-level navigation pills)
     2.  Info Box (contextual instruction banners)
     3.  Task Cards (per-task progress indicators)
     4.  Counter Row (score/correct/streak stat boxes)
     5.  Example Cards (illustrative example grid)
     6.  Level Complete Panel (celebration on finishing a level)
     7.  Badge Grid (earned achievement badges)
     8.  Compare Table (summary comparison tables)
     9.  Readout Strip (live measurement readouts)
    10.  Classification Banner (shape/type classification display)
    11.  Board Instruction (instruction banner above/below boards)
    12.  Notation Strip (notation reference row)
    13.  Type Chips (colored category labels — generic)
    14.  Stick Bank & Triangle Controls (construction-specific)
    15.  Snap Feedback (drag-and-snap confirmation)
    16.  Segment Chips (colored segment indicators)
    17.  Pair Cards (pair selection pills)
    18.  Direction Chips (compass direction pills)
    19.  Responsive overrides
   ============================================================================= */

/* ==========================================================================
   1. STEP CARDS — Sub-level navigation pills (e.g. "By Sides", "By Angles")
   ========================================================================== */

.act-step-cards {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
}

.act-step-card {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  background: #f1f5f9;
  color: #94a3b8;
  border: 2px solid #e2e8f0;
  transition: all 0.25s ease;
  cursor: default;
  user-select: none;
}

.act-step-card.step-active {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4338ca;
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18);
}

.act-step-card.step-done {
  background: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
}

.dark .act-step-card {
  background: #1e293b;
  color: #64748b;
  border-color: #334155;
}

.dark .act-step-card.step-active {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  color: #a5b4fc;
  border-color: #6366f1;
}

.dark .act-step-card.step-done {
  background: #052e16;
  color: #4ade80;
  border-color: #22c55e;
}

/* ==========================================================================
   2. INFO BOX — Contextual instruction / information banners
   ========================================================================== */

.act-info-box {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 2px solid #7dd3fc;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #0c4a6e;
  margin: 12px 0;
  line-height: 1.6;
}

.dark .act-info-box {
  background: linear-gradient(135deg, #0c4a6e, #082f49);
  border-color: #0284c7;
  color: #bae6fd;
}

.act-info-box strong {
  color: #0369a1;
}

.dark .act-info-box strong {
  color: #38bdf8;
}

/* Variant: centered (for question prompts inside info box) */
.act-info-box.act-info-center {
  text-align: center;
}

/* Variant: warm tone */
.act-info-box.act-info-warm {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fcd34d;
  color: #78350f;
}

.dark .act-info-box.act-info-warm {
  background: linear-gradient(135deg, #78350f, #451a03);
  border-color: #f59e0b;
  color: #fde68a;
}

.act-info-box.act-info-warm strong {
  color: #92400e;
}

.dark .act-info-box.act-info-warm strong {
  color: #fbbf24;
}

/* Variant: success tone */
.act-info-box.act-info-success {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
  color: #166534;
}

.dark .act-info-box.act-info-success {
  background: linear-gradient(135deg, #052e16, #14532d);
  border-color: #4ade80;
  color: #86efac;
}

.act-info-box.act-info-success strong {
  color: #15803d;
}

.dark .act-info-box.act-info-success strong {
  color: #4ade80;
}

/* Variant: error / danger tone */
.act-info-box.act-info-error {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-color: #fca5a5;
  color: #991b1b;
}

.dark .act-info-box.act-info-error {
  background: linear-gradient(135deg, #450a0a, #7f1d1d);
  border-color: #ef4444;
  color: #fca5a5;
}

.act-info-box.act-info-error strong {
  color: #b91c1c;
}

.dark .act-info-box.act-info-error strong {
  color: #f87171;
}

/* Variant: purple/indigo tone */
.act-info-box.act-info-purple {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #c7d2fe;
  color: #3730a3;
}

.dark .act-info-box.act-info-purple {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  border-color: #6366f1;
  color: #c7d2fe;
}

.act-info-box.act-info-purple strong {
  color: #4338ca;
}

.dark .act-info-box.act-info-purple strong {
  color: #a5b4fc;
}

/* ==========================================================================
   3. TASK CARDS — Per-task progress indicators within a step
   ========================================================================== */

.act-task-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
}

.act-task-card {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  background: #f8fafc;
  color: #64748b;
  border: 2px solid #e2e8f0;
  transition: all 0.25s ease;
  cursor: default;
  user-select: none;
}

.act-task-card.act-task-active {
  background: #eef2ff;
  color: #4338ca;
  border-color: #6366f1;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

.act-task-card.act-task-done {
  background: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
}

.dark .act-task-card {
  background: #1e293b;
  color: #64748b;
  border-color: #334155;
}

.dark .act-task-card.act-task-active {
  background: #312e81;
  color: #a5b4fc;
  border-color: #6366f1;
}

.dark .act-task-card.act-task-done {
  background: #052e16;
  color: #4ade80;
  border-color: #22c55e;
}

/* ==========================================================================
   4. COUNTER ROW — Score / correct / streak stat boxes
   ========================================================================== */

.act-counter-row {
  display: flex;
  gap: 12px;
  margin: 12px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.act-counter {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  min-width: 100px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.act-counter:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.act-counter .counter-num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #6366f1;
  margin-bottom: 2px;
  line-height: 1.2;
}

.dark .act-counter {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.dark .act-counter .counter-num {
  color: #818cf8;
}

/* Variant: success counter */
.act-counter.act-counter-success .counter-num {
  color: #16a34a;
}

.dark .act-counter.act-counter-success .counter-num {
  color: #4ade80;
}

/* Variant: warning counter */
.act-counter.act-counter-warn .counter-num {
  color: #d97706;
}

.dark .act-counter.act-counter-warn .counter-num {
  color: #fbbf24;
}

/* ==========================================================================
   5. EXAMPLE CARDS — Illustrative example items in a flex row
   ========================================================================== */

.act-examples-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0;
}

.act-example-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  min-width: 140px;
  transition: transform 0.2s ease;
}

.act-example-card:hover {
  transform: translateY(-1px);
}

.act-example-card .act-ex-icon {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

.dark .act-example-card {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

/* ==========================================================================
   6. LEVEL COMPLETE — Celebration panel when finishing a level
   ========================================================================== */

.act-level-complete {
  text-align: center;
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}

.act-level-complete::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 4px;
  background: linear-gradient(
    90deg,
    #22c55e,
    #16a34a,
    #15803d,
    #16a34a,
    #22c55e
  );
  border-radius: 16px 16px 0 0;
}

.act-level-complete h3 {
  font-size: 22px;
  font-weight: 800;
  color: #16a34a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.act-level-complete p {
  font-size: 15px;
  font-weight: 600;
  color: #166534;
  line-height: 1.5;
  margin: 4px 0;
}

.dark .act-level-complete {
  background: linear-gradient(135deg, #052e16, #14532d);
  border-color: #4ade80;
}

.dark .act-level-complete h3 {
  color: #4ade80;
}

.dark .act-level-complete p {
  color: #86efac;
}

/* Variant: final / gold celebration */
.act-level-complete.act-level-final {
  background: linear-gradient(135deg, #fffbeb, #fef3c7, #fde68a);
  border-color: #f59e0b;
}

.act-level-complete.act-level-final::before {
  background: linear-gradient(
    90deg,
    #f59e0b,
    #d97706,
    #b45309,
    #d97706,
    #f59e0b
  );
}

.act-level-complete.act-level-final h3 {
  color: #92400e;
}

.act-level-complete.act-level-final p {
  color: #78350f;
}

.dark .act-level-complete.act-level-final {
  background: linear-gradient(135deg, #451a03, #78350f);
  border-color: #f59e0b;
}

.dark .act-level-complete.act-level-final h3 {
  color: #fbbf24;
}

.dark .act-level-complete.act-level-final p {
  color: #fde68a;
}

/* ==========================================================================
   7. BADGE GRID — Earned achievement badges
   ========================================================================== */

.act-badge-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
}

.act-badge {
  padding: 8px 14px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  min-width: 90px;
  transition: all 0.3s ease;
}

.act-badge.act-badge-earned {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
  color: #92400e;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  transform: scale(1);
  animation: act-badge-pop 0.4s ease-out;
}

@keyframes act-badge-pop {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.act-badge small {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  opacity: 0.8;
}

.dark .act-badge {
  background: #1e293b;
  border-color: #334155;
  color: #64748b;
}

.dark .act-badge.act-badge-earned {
  background: linear-gradient(135deg, #78350f, #92400e);
  border-color: #f59e0b;
  color: #fde68a;
}

/* ==========================================================================
   8. COMPARE TABLE — Summary comparison tables
   ========================================================================== */

.act-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0;
  font-size: 14px;
}

.act-compare-table th {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.act-compare-table td {
  padding: 10px 12px;
  text-align: center;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.act-compare-table tr:nth-child(even) td {
  background: #f8fafc;
}

.act-compare-table .act-highlight-row td {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 700;
}

.dark .act-compare-table th {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.dark .act-compare-table td {
  color: #cbd5e1;
  border-color: #334155;
}

.dark .act-compare-table tr:nth-child(even) td {
  background: #1e293b;
}

.dark .act-compare-table .act-highlight-row td {
  background: #312e81;
  color: #a5b4fc;
}

/* ==========================================================================
   9. READOUT STRIP — Live measurement readouts (sides, angles, etc.)
   ========================================================================== */

.act-readout-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px 0;
}

.act-readout-item {
  padding: 6px 14px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  text-align: center;
  min-width: 80px;
  transition: all 0.2s ease;
}

.act-readout-item .act-readout-val {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #6366f1;
  line-height: 1.3;
}

.dark .act-readout-item {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.dark .act-readout-item .act-readout-val {
  color: #818cf8;
}

/* Readout when matched / highlighted */
.act-readout-item.act-readout-match {
  background: #dcfce7;
  border-color: #86efac;
}

.act-readout-item.act-readout-match .act-readout-val {
  color: #16a34a;
}

.dark .act-readout-item.act-readout-match {
  background: #052e16;
  border-color: #22c55e;
}

.dark .act-readout-item.act-readout-match .act-readout-val {
  color: #4ade80;
}

/* ==========================================================================
   10. CLASSIFICATION BANNER — Shape/type classification display
   ========================================================================== */

.act-classify-banner {
  text-align: center;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  margin: 10px 0;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 2px solid #c7d2fe;
  color: #4338ca;
  transition: all 0.3s ease;
}

.dark .act-classify-banner {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  border-color: #6366f1;
  color: #a5b4fc;
}

.act-classify-banner.act-match {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-color: #4ade80;
  color: #15803d;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.2);
}

.dark .act-classify-banner.act-match {
  background: linear-gradient(135deg, #052e16, #14532d);
  border-color: #4ade80;
  color: #86efac;
}

/* ==========================================================================
   11. BOARD INSTRUCTION — Instruction banner near interactive boards
   ========================================================================== */

.act-board-instruction {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #4338ca;
  margin: 8px 0;
  padding: 8px 14px;
  background: #eef2ff;
  border-radius: 10px;
  border: 1.5px solid #c7d2fe;
  line-height: 1.5;
}

.dark .act-board-instruction {
  background: #1e1b4b;
  color: #a5b4fc;
  border-color: #4f46e5;
}

/* ==========================================================================
   12. NOTATION STRIP — Notation reference row
   ========================================================================== */

.act-notation-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px 0;
}

.act-notation-item {
  padding: 6px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.dark .act-notation-item {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

/* ==========================================================================
   13. TYPE CHIPS — Colored category labels (generic + shape-specific)
   ========================================================================== */

.act-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  margin: 2px 4px;
  transition: transform 0.15s ease;
}

.act-type-chip:hover {
  transform: scale(1.03);
}

/* ── Triangle side chips ── */
.act-chip-equilateral {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
}
.act-chip-isosceles {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.act-chip-scalene {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.dark .act-chip-equilateral {
  background: #052e16;
  color: #4ade80;
  border-color: #22c55e;
}
.dark .act-chip-isosceles {
  background: #1e3a5f;
  color: #93c5fd;
  border-color: #3b82f6;
}
.dark .act-chip-scalene {
  background: #451a03;
  color: #fcd34d;
  border-color: #f59e0b;
}

/* ── Triangle angle chips ── */
.act-chip-acute {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.act-chip-right {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}
.act-chip-obtuse {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.dark .act-chip-acute {
  background: #022c22;
  color: #6ee7b7;
  border-color: #10b981;
}
.dark .act-chip-right {
  background: #2e1065;
  color: #c4b5fd;
  border-color: #8b5cf6;
}
.dark .act-chip-obtuse {
  background: #450a0a;
  color: #fca5a5;
  border-color: #ef4444;
}

/* ── Quadrilateral chips ── */
.act-chip-square {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
}
.act-chip-rectangle {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.act-chip-rhombus {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}
.act-chip-parallelogram {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.act-chip-trapezium {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.act-chip-kite {
  background: #fce7f3;
  color: #9d174d;
  border: 1px solid #f9a8d4;
}

.dark .act-chip-square {
  background: #052e16;
  color: #4ade80;
  border-color: #22c55e;
}
.dark .act-chip-rectangle {
  background: #1e3a5f;
  color: #93c5fd;
  border-color: #3b82f6;
}
.dark .act-chip-rhombus {
  background: #2e1065;
  color: #c4b5fd;
  border-color: #8b5cf6;
}
.dark .act-chip-parallelogram {
  background: #451a03;
  color: #fcd34d;
  border-color: #f59e0b;
}
.dark .act-chip-trapezium {
  background: #450a0a;
  color: #fca5a5;
  border-color: #ef4444;
}
.dark .act-chip-kite {
  background: #500724;
  color: #f9a8d4;
  border-color: #ec4899;
}

/* ── Compass / angle direction chips ── */
.act-chip-angle-right {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}
.act-chip-angle-straight {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.act-chip-angle-full {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.dark .act-chip-angle-right {
  background: #2e1065;
  color: #c4b5fd;
  border-color: #8b5cf6;
}
.dark .act-chip-angle-straight {
  background: #451a03;
  color: #fcd34d;
  border-color: #f59e0b;
}
.dark .act-chip-angle-full {
  background: #450a0a;
  color: #fca5a5;
  border-color: #ef4444;
}

/* ==========================================================================
   14. STICK BANK & TRIANGLE CONTROLS — Construction-specific UI
   ========================================================================== */

/* Stick bank (for quadrilateral construction) */
.act-stick-bank {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
  padding: 10px;
}

.act-stick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  padding: 6px 10px;
}

.act-stick-bar {
  height: 6px;
  border-radius: 3px;
  min-width: 40px;
}

.act-stick-a {
  color: #2563eb;
}
.act-stick-a .act-stick-bar {
  background: #3b82f6;
}
.act-stick-b {
  color: #dc2626;
}
.act-stick-b .act-stick-bar {
  background: #ef4444;
}

.dark .act-stick-a {
  color: #93c5fd;
}
.dark .act-stick-a .act-stick-bar {
  background: #60a5fa;
}
.dark .act-stick-b {
  color: #fca5a5;
}
.dark .act-stick-b .act-stick-bar {
  background: #f87171;
}

/* Triangle controls (rotate/flip buttons) */
.act-tri-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px 0;
}

.act-tri-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.act-tri-btn:hover {
  border-color: #6366f1;
  color: #4338ca;
  background: #eef2ff;
}

.dark .act-tri-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.dark .act-tri-btn:hover {
  border-color: #6366f1;
  color: #a5b4fc;
  background: #312e81;
}

/* ==========================================================================
   15. SNAP FEEDBACK — Drag-and-snap confirmation overlay
   ========================================================================== */

.act-snap-feedback {
  text-align: center;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  margin: 8px 0;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  color: #15803d;
  transition: all 0.3s ease;
}

.dark .act-snap-feedback {
  background: linear-gradient(135deg, #052e16, #14532d);
  border-color: #22c55e;
  color: #86efac;
}

.act-snap-feedback.act-snap-pending {
  background: linear-gradient(135deg, #fefce8, #fef9c3);
  border-color: #facc15;
  color: #854d0e;
}

.dark .act-snap-feedback.act-snap-pending {
  background: linear-gradient(135deg, #422006, #713f12);
  border-color: #eab308;
  color: #fef08a;
}

/* ==========================================================================
   16. SEGMENT CHIPS — Colored segment indicators (for line segment activities)
   ========================================================================== */

.act-seg-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  margin: 2px 4px;
}

.act-seg-chip-a {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.act-seg-chip-b {
  background: #fce7f3;
  color: #be185d;
  border: 1px solid #f9a8d4;
}

.act-seg-chip-c {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #6ee7b7;
}

.dark .act-seg-chip-a {
  background: #1e3a5f;
  color: #93c5fd;
  border-color: #3b82f6;
}
.dark .act-seg-chip-b {
  background: #500724;
  color: #f9a8d4;
  border-color: #ec4899;
}
.dark .act-seg-chip-c {
  background: #022c22;
  color: #6ee7b7;
  border-color: #10b981;
}

/* ==========================================================================
   17. PAIR CARDS — Pair selection pills (for comparing segments)
   ========================================================================== */

.act-pair-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
}

.act-pair-card {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  background: #f8fafc;
  color: #475569;
  border: 2px solid #e2e8f0;
  cursor: default;
  transition: all 0.25s ease;
}

.act-pair-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.act-pair-card.act-pair-active {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4338ca;
  border-color: #6366f1;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

.dark .act-pair-card {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.dark .act-pair-card:hover {
  background: #334155;
  border-color: #475569;
}

.dark .act-pair-card.act-pair-active {
  background: #312e81;
  color: #a5b4fc;
  border-color: #6366f1;
}

/* ==========================================================================
   18. DIRECTION CHIPS — Compass direction pills
   ========================================================================== */

.act-dir-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  margin: 2px 4px;
  background: #f0f9ff;
  color: #0c4a6e;
  border: 1.5px solid #7dd3fc;
}

.dark .act-dir-chip {
  background: #0c4a6e;
  color: #bae6fd;
  border-color: #0284c7;
}

/* ==========================================================================
   19. RESPONSIVE OVERRIDES
   ========================================================================== */

@media (max-width: 480px) {
  .act-step-cards {
    gap: 4px;
  }

  .act-step-card {
    padding: 6px 10px;
    font-size: 11px;
  }

  .act-counter {
    padding: 8px 12px;
    min-width: 80px;
  }

  .act-counter .counter-num {
    font-size: 20px;
  }

  .act-badge {
    padding: 6px 10px;
    font-size: 11px;
    min-width: 70px;
  }

  .act-compare-table {
    font-size: 12px;
  }

  .act-compare-table th,
  .act-compare-table td {
    padding: 7px 6px;
    font-size: 12px;
  }

  .act-board-instruction {
    font-size: 13px;
    padding: 6px 10px;
  }

  .act-task-cards {
    gap: 4px;
  }

  .act-task-card {
    padding: 6px 10px;
    font-size: 11px;
  }

  .act-info-box {
    padding: 10px 14px;
    font-size: 13px;
  }

  .act-readout-strip {
    gap: 4px;
  }

  .act-readout-item {
    padding: 4px 8px;
    min-width: 60px;
    font-size: 11px;
  }

  .act-readout-item .act-readout-val {
    font-size: 15px;
  }

  .act-type-chip {
    padding: 3px 8px;
    font-size: 12px;
  }

  .act-level-complete h3 {
    font-size: 18px;
  }

  .act-level-complete p {
    font-size: 13px;
  }

  .act-examples-row {
    gap: 6px;
  }

  .act-example-card {
    padding: 8px 10px;
    font-size: 12px;
    min-width: 110px;
  }

  .act-pair-cards {
    gap: 4px;
  }

  .act-pair-card {
    padding: 6px 10px;
    font-size: 11px;
  }

  .act-classify-banner {
    font-size: 13px;
    padding: 8px 12px;
  }

  .act-seg-chip {
    padding: 3px 6px;
    font-size: 11px;
  }

  .act-dir-chip {
    padding: 3px 8px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .act-counter-row {
    gap: 6px;
  }

  .act-counter {
    padding: 6px 8px;
    min-width: 60px;
    font-size: 11px;
  }

  .act-counter .counter-num {
    font-size: 18px;
  }

  .act-badge-grid {
    gap: 4px;
  }

  .act-badge {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 60px;
  }

  .act-step-card {
    padding: 4px 8px;
    font-size: 10px;
  }
}
