/* ==========================================================================
       1. PRINSIP DESAIN & CSS VARIABLES (DARK NEON GLASSMORPHISM)
       ========================================================================== */
    :root {
      --bg-main: #0b0f19;
      --bg-elevated: #111827;
      --panel-bg: rgba(18, 26, 43, 0.75);
      --panel-bg-hover: rgba(26, 37, 61, 0.88);
      --border-color: rgba(255, 255, 255, 0.1);
      --border-highlight: rgba(255, 255, 255, 0.22);

      /* Accent Colors */
      --accent-amber: #f59e0b;
      --accent-amber-glow: rgba(245, 158, 11, 0.22);
      --accent-cyan: #06b6d4;
      --accent-cyan-glow: rgba(6, 182, 212, 0.22);
      --accent-emerald: #10b981;
      --accent-emerald-glow: rgba(16, 185, 129, 0.22);
      --accent-rose: #f43f5e;
      --accent-rose-glow: rgba(244, 63, 94, 0.22);
      --accent-purple: #a855f7;
      --accent-purple-glow: rgba(168, 85, 247, 0.22);

      /* Typography Colors */
      --text-primary: #f8fafc;
      --text-secondary: #94a3b8;
      --text-muted: #64748b;

      /* Layout & Effects */
      --radius-sm: 8px;
      --radius-md: 14px;
      --radius-lg: 20px;
      --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
      --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
      --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-mono: 'JetBrains Mono', monospace;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
      background-color: var(--bg-main);
      color: var(--text-primary);
      font-family: var(--font-sans);
      line-height: 1.6;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      min-height: 100vh;
      background-color: var(--bg-main);
      background-image:
        radial-gradient(circle at 12% 15%, rgba(6, 182, 212, 0.10) 0%, transparent 38%),
        radial-gradient(circle at 88% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 35%),
        radial-gradient(circle at 50% 85%, rgba(244, 63, 94, 0.08) 0%, transparent 40%);
      background-attachment: fixed;
      overflow-x: hidden;
      padding-bottom: 84px; /* Space for mobile bottom nav */
    }

    /* Custom Scrollbar */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    ::-webkit-scrollbar-track {
      background: #080b12;
    }
    ::-webkit-scrollbar-thumb {
      background: #1e293b;
      border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--accent-cyan);
    }

    /* ==========================================================================
       2. MOBILE-FIRST LAYOUT & CONTAINER SYSTEM
       ========================================================================== */
    .app-wrapper {
      width: 100%;
      max-width: 100%;
      margin: 0;
      padding: 16px 28px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      box-sizing: border-box;
    }

    /* Reusable Glass Panel */
    .glass-panel {
      background: var(--panel-bg);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-glass);
      transition: border-color var(--transition-fast), transform var(--transition-fast);
    }

    /* ==========================================================================
       3. HEADER UTAMA (BLOOM TAXONOMY C1-C6 & RETENTION XP SYSTEM)
       ========================================================================== */
    .top-header {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      position: relative;
      overflow: hidden;
    }

    .top-header::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--accent-amber), var(--accent-cyan), var(--accent-emerald), var(--accent-rose));
    }

    .brand-row {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .brand-title-group {
      display: flex;
      align-items: flex-start;
      gap: 12px;
    }

    .brand-logo {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(245, 158, 11, 0.25));
      border: 1px solid rgba(6, 182, 212, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.4rem;
      flex-shrink: 0;
      box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
    }

    .brand-title h1 {
      font-size: 1.15rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      background: linear-gradient(90deg, #ffffff, #cbd5e1);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      line-height: 1.25;
    }

    .brand-title p {
      font-size: 0.78rem;
      color: var(--text-secondary);
      margin-top: 2px;
    }

    /* Retention Points & Status Pill */
    .stats-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      background: rgba(11, 15, 25, 0.65);
      padding: 10px 12px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-color);
    }

    .xp-badge-group {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .xp-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 999px;
      font-family: var(--font-mono);
      font-size: 0.78rem;
      font-weight: 600;
      background: var(--accent-amber-glow);
      color: var(--accent-amber);
      border: 1px solid rgba(245, 158, 11, 0.4);
    }

    .rank-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 600;
      background: var(--accent-cyan-glow);
      color: var(--accent-cyan);
      border: 1px solid rgba(6, 182, 212, 0.4);
    }

    .btn-reset-progress {
      background: rgba(244, 63, 94, 0.12);
      color: var(--accent-rose);
      border: 1px solid rgba(244, 63, 94, 0.35);
      padding: 5px 10px;
      border-radius: 6px;
      font-size: 0.72rem;
      font-weight: 600;
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .btn-reset-progress:hover {
      background: rgba(244, 63, 94, 0.25);
    }

    /* Bloom Taxonomy Mastery Grid (C1 - C6) */
    .bloom-mastery-box {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .bloom-header-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.76rem;
      color: var(--text-secondary);
    }

    .bloom-overall-bar {
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      overflow: hidden;
    }

    .bloom-overall-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--accent-amber), var(--accent-cyan), var(--accent-emerald), var(--accent-rose));
      transition: width 0.4s ease;
    }

    .bloom-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
    }

    .bloom-chip {
      background: rgba(15, 23, 42, 0.75);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 6px 8px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .bloom-chip:hover {
      border-color: var(--accent-cyan);
      transform: translateY(-1px);
    }

    .bloom-chip-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.7rem;
      font-weight: 700;
    }

    .bloom-code {
      font-family: var(--font-mono);
      padding: 1px 5px;
      border-radius: 4px;
      font-size: 0.66rem;
    }

    .bloom-c1 .bloom-code { background: rgba(245, 158, 11, 0.2); color: var(--accent-amber); }
    .bloom-c2 .bloom-code { background: rgba(6, 182, 212, 0.2); color: var(--accent-cyan); }
    .bloom-c3 .bloom-code { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); }
    .bloom-c4 .bloom-code { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
    .bloom-c5 .bloom-code { background: rgba(168, 85, 247, 0.2); color: var(--accent-purple); }
    .bloom-c6 .bloom-code { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); }

    .bloom-mini-bar {
      width: 100%;
      height: 4px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 99px;
      overflow: hidden;
    }

    .bloom-mini-fill {
      height: 100%;
      width: 0%;
      transition: width 0.35s ease;
    }

    .bloom-c1 .bloom-mini-fill { background: var(--accent-amber); }
    .bloom-c2 .bloom-mini-fill { background: var(--accent-cyan); }
    .bloom-c3 .bloom-mini-fill { background: var(--accent-emerald); }
    .bloom-c4 .bloom-mini-fill { background: #60a5fa; }
    .bloom-c5 .bloom-mini-fill { background: var(--accent-purple); }
    .bloom-c6 .bloom-mini-fill { background: var(--accent-rose); }

    /* ==========================================================================
       4. WORKSPACE LAYOUT (MOBILE BOTTOM BAR -> DESKTOP LEFT SIDEBAR)
       ========================================================================== */
    .workspace-layout {
      display: flex;
      flex-direction: column;
      gap: 16px;
      width: 100%;
    }

    /* Navigation Bar: Fixed Bottom on Mobile */
    .nav-container {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 90;
      background: rgba(11, 15, 25, 0.92);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-top: 1px solid var(--border-color);
      padding: 6px 8px;
      display: flex;
      justify-content: space-around;
      align-items: center;
      gap: 4px;
      overflow-x: auto;
    }

    .nav-btn {
      flex: 1;
      min-width: 54px;
      background: transparent;
      border: 1px solid transparent;
      color: var(--text-secondary);
      padding: 6px 4px;
      border-radius: var(--radius-sm);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      cursor: pointer;
      font-family: var(--font-sans);
      transition: all var(--transition-fast);
      text-align: center;
    }

    .nav-btn .nav-icon {
      font-size: 1.15rem;
      line-height: 1;
    }

    .nav-btn .nav-label {
      font-size: 0.63rem;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 68px;
    }

    .nav-btn .nav-sub {
      display: none;
    }

    .nav-btn:hover {
      color: var(--text-primary);
      background: rgba(255, 255, 255, 0.04);
    }

    .nav-btn.active {
      color: var(--text-primary);
      background: rgba(6, 182, 212, 0.14);
      border-color: rgba(6, 182, 212, 0.45);
      box-shadow: 0 0 15px rgba(6, 182, 212, 0.18);
    }

    /* Main Content Area */
    .main-stage {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .tab-pane {
      display: none;
      flex-direction: column;
      gap: 16px;
      animation: fadeSlideIn 0.28s ease forwards;
    }

    .tab-pane.active {
      display: flex;
    }

    @keyframes fadeSlideIn {
      from {
        opacity: 0;
        transform: translateY(6px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ==========================================================================
       5. KOMPONEN UI UMUM (CARDS, BADGES, CONTROLS, TABLES)
       ========================================================================== */
    .section-banner {
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      border-left: 4px solid var(--accent-cyan);
    }

    .section-banner.amber { border-left-color: var(--accent-amber); }
    .section-banner.emerald { border-left-color: var(--accent-emerald); }
    .section-banner.rose { border-left-color: var(--accent-rose); }

    .section-eyebrow {
      font-family: var(--font-mono);
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--accent-cyan);
      font-weight: 600;
    }

    .section-banner.amber .section-eyebrow { color: var(--accent-amber); }
    .section-banner.emerald .section-eyebrow { color: var(--accent-emerald); }
    .section-banner.rose .section-eyebrow { color: var(--accent-rose); }

    .section-title {
      font-size: 1.25rem;
      font-weight: 800;
      color: var(--text-primary);
    }

    .section-desc {
      font-size: 0.86rem;
      color: var(--text-secondary);
    }

    .card-grid-2, .card-grid-3 {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .content-card {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .card-header-line {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
    }

    .card-title {
      font-size: 1rem;
      font-weight: 700;
      color: var(--text-primary);
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 999px;
      font-size: 0.7rem;
      font-weight: 600;
      font-family: var(--font-mono);
      white-space: nowrap;
    }

    .badge-amber { background: var(--accent-amber-glow); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.35); }
    .badge-cyan { background: var(--accent-cyan-glow); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.35); }
    .badge-emerald { background: var(--accent-emerald-glow); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.35); }
    .badge-rose { background: var(--accent-rose-glow); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.35); }
    .badge-purple { background: var(--accent-purple-glow); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.35); }

    /* Buttons & Inputs */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 9px 14px;
      border-radius: var(--radius-sm);
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      border: 1px solid var(--border-color);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-primary);
      transition: all var(--transition-fast);
      font-family: var(--font-sans);
    }

    .btn:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: var(--border-highlight);
    }

    .btn-cyan {
      background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(6, 182, 212, 0.1));
      border-color: rgba(6, 182, 212, 0.5);
      color: #67e8f9;
    }
    .btn-cyan:hover {
      background: rgba(6, 182, 212, 0.35);
      box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
    }

    .btn-amber {
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1));
      border-color: rgba(245, 158, 11, 0.5);
      color: #fcd34d;
    }

    .btn-emerald {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
      border-color: rgba(16, 185, 129, 0.5);
      color: #6ee7b7;
    }

    .btn-rose {
      background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(244, 63, 94, 0.1));
      border-color: rgba(244, 63, 94, 0.5);
      color: #fda4af;
    }

    .input-field, .select-field, .textarea-field {
      width: 100%;
      background: rgba(11, 15, 25, 0.8);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      color: var(--text-primary);
      font-family: var(--font-sans);
      font-size: 0.86rem;
      outline: none;
      transition: border-color var(--transition-fast);
    }

    .input-field:focus, .select-field:focus, .textarea-field:focus {
      border-color: var(--accent-cyan);
      box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
    }

    .textarea-field {
      min-height: 76px;
      resize: vertical;
    }

    /* ==========================================================================
       6. TAB 1: DASHBOARD & VISUAL KNOWLEDGE GRAPH (14 TOKOH)
       ========================================================================== */
    .graph-workspace {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .graph-canvas-box {
      position: relative;
      width: 100%;
      background: radial-gradient(circle at center, rgba(18, 28, 48, 0.9) 0%, rgba(9, 13, 22, 0.95) 100%);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      overflow: hidden;
      min-height: 360px;
      display: flex;
      flex-direction: column;
    }

    .graph-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 10px 12px;
      background: rgba(11, 15, 25, 0.75);
      border-bottom: 1px solid var(--border-color);
      align-items: center;
      justify-content: space-between;
    }

    .graph-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      font-size: 0.72rem;
      color: var(--text-secondary);
    }

    .legend-dot {
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      display: inline-block;
    }

    #epistemicSvgGraph {
      width: 100%;
      height: 410px;
      display: block;
      cursor: grab;
      user-select: none;
    }

    .graph-node {
      cursor: pointer;
      transition: transform 0.2s ease;
    }

    .graph-node circle {
      transition: all 0.25s ease;
    }

    .graph-node:hover circle, .graph-node.selected circle {
      stroke-width: 4px;
      filter: drop-shadow(0 0 10px currentColor);
    }

    .graph-edge {
      stroke: rgba(148, 163, 184, 0.22);
      stroke-width: 1.6;
      transition: all 0.25s ease;
    }

    .graph-edge.highlighted {
      stroke: var(--accent-cyan);
      stroke-width: 2.8;
      stroke-dasharray: 5, 3;
    }

    .thinker-inspector {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      border-top: 3px solid var(--accent-amber);
    }

    .meta-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      font-size: 0.84rem;
    }

    .meta-item {
      background: rgba(11, 15, 25, 0.55);
      padding: 9px 12px;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .meta-item strong {
      color: var(--text-primary);
      display: block;
      font-size: 0.74rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--accent-cyan);
      margin-bottom: 2px;
    }

    /* ==========================================================================
       7. TAB 2: KAMUS & ENSIKLOPEDIA INTERAKTIF
       ========================================================================== */
    .dict-controls {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .search-row {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .search-input-wrap {
      position: relative;
      flex: 1;
    }

    .search-input-wrap span {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-secondary);
    }

    .search-input-wrap input {
      padding-left: 36px;
    }

    .filter-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .filter-tag {
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 600;
      background: rgba(15, 23, 42, 0.8);
      border: 1px solid var(--border-color);
      color: var(--text-secondary);
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .filter-tag:hover {
      color: var(--text-primary);
      border-color: var(--border-highlight);
    }

    .filter-tag.active {
      background: var(--accent-cyan-glow);
      color: var(--accent-cyan);
      border-color: var(--accent-cyan);
    }

    .dict-grid {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .dict-card {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      position: relative;
      border-left: 3px solid var(--accent-cyan);
    }

    .dict-card.cat-logika { border-left-color: var(--accent-amber); }
    .dict-card.cat-sains { border-left-color: var(--accent-emerald); }
    .dict-card.cat-argumen { border-left-color: var(--accent-rose); }
    .dict-card.cat-riset { border-left-color: var(--accent-cyan); }

    .dict-term-title {
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--text-primary);
    }

    .dict-meta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      font-size: 0.76rem;
      color: var(--text-secondary);
    }

    .dict-definition {
      font-size: 0.86rem;
      color: #e2e8f0;
      line-height: 1.65;
    }

    .dict-example-box {
      background: rgba(11, 15, 25, 0.7);
      border: 1px dashed rgba(255, 255, 255, 0.14);
      padding: 10px 12px;
      border-radius: 8px;
      font-size: 0.8rem;
      color: var(--text-secondary);
    }

    .dict-example-box strong {
      color: var(--accent-amber);
      display: block;
      margin-bottom: 3px;
      font-size: 0.74rem;
      text-transform: uppercase;
    }

    .dict-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 8px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      margin-top: auto;
    }

    .btn-mastery {
      padding: 6px 12px;
      border-radius: 8px;
      font-size: 0.75rem;
      font-weight: 700;
      cursor: pointer;
      border: 1px solid var(--border-color);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-secondary);
      transition: all var(--transition-fast);
    }

    .btn-mastery.mastered {
      background: var(--accent-emerald-glow);
      color: var(--accent-emerald);
      border-color: var(--accent-emerald);
    }

    /* ==========================================================================
       8. INTERACTIVE SIMULATORS IN MODULES 1 - 4
       ========================================================================== */
    .sim-output {
      background: rgba(8, 12, 20, 0.88);
      border: 1px solid var(--border-highlight);
      border-radius: var(--radius-sm);
      padding: 14px;
      font-size: 0.85rem;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .step-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .step-pill {
      padding: 7px 11px;
      border-radius: 8px;
      font-size: 0.76rem;
      font-weight: 600;
      background: rgba(15, 23, 42, 0.8);
      border: 1px solid var(--border-color);
      color: var(--text-secondary);
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .step-pill.active {
      background: var(--accent-amber-glow);
      border-color: var(--accent-amber);
      color: var(--accent-amber);
    }

    .toulmin-diagram {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      background: rgba(11, 15, 25, 0.75);
      padding: 14px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-color);
    }

    .toulmin-node {
      padding: 10px 12px;
      border-radius: 8px;
      background: rgba(24, 34, 56, 0.75);
      border-left: 3px solid var(--accent-rose);
      font-size: 0.82rem;
    }

    .toulmin-node span {
      font-family: var(--font-mono);
      font-size: 0.7rem;
      text-transform: uppercase;
      color: var(--accent-rose);
      font-weight: 700;
      display: block;
      margin-bottom: 3px;
    }

    /* ==========================================================================
       8B. MODUL 2 EXTENDED STYLES: KUHN TIMELINE, POPPER SANDBOX, HINTIKKA & QUIZ
       ========================================================================== */
    .kuhn-stepper-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
      margin-top: 6px;
    }

    .kuhn-step-btn {
      position: relative;
      background: rgba(11, 15, 25, 0.85);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      text-align: left;
      cursor: pointer;
      color: var(--text-secondary);
      transition: all var(--transition-fast);
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-family: var(--font-sans);
    }

    .kuhn-step-btn:hover {
      border-color: var(--accent-emerald);
      color: var(--text-primary);
      transform: translateY(-2px);
    }

    .kuhn-step-btn.active {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.14));
      border-color: var(--accent-emerald);
      color: var(--text-primary);
      box-shadow: 0 0 18px rgba(16, 185, 129, 0.22);
    }

    .kuhn-step-btn.crisis-mode.active {
      background: linear-gradient(135deg, rgba(244, 63, 94, 0.24), rgba(245, 158, 11, 0.15));
      border-color: var(--accent-rose);
      box-shadow: 0 0 18px rgba(244, 63, 94, 0.28);
    }

    .kuhn-step-num {
      font-family: var(--font-mono);
      font-size: 0.68rem;
      font-weight: 700;
      color: var(--accent-emerald);
      text-transform: uppercase;
    }

    .kuhn-step-btn.crisis-mode .kuhn-step-num {
      color: var(--accent-rose);
    }

    .kuhn-step-name {
      font-size: 0.82rem;
      font-weight: 700;
      line-height: 1.25;
    }

    .kuhn-metrics-row {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      background: rgba(11, 15, 25, 0.65);
      padding: 12px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-color);
    }

    .metric-gauge-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .metric-gauge-label {
      display: flex;
      justify-content: space-between;
      font-size: 0.74rem;
      font-family: var(--font-mono);
      color: var(--text-secondary);
    }

    .metric-gauge-track {
      height: 7px;
      width: 100%;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      overflow: hidden;
    }

    .metric-gauge-fill {
      height: 100%;
      border-radius: 999px;
      transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .incommensurability-alert {
      background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(245, 158, 11, 0.12));
      border: 1px solid rgba(244, 63, 94, 0.55);
      border-left: 4px solid var(--accent-rose);
      border-radius: var(--radius-sm);
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      animation: pulseNeonBorder 2.2s infinite ease-in-out;
    }

    @keyframes pulseNeonBorder {
      0%, 100% { box-shadow: 0 0 10px rgba(244, 63, 94, 0.15); }
      50% { box-shadow: 0 0 22px rgba(244, 63, 94, 0.38); }
    }

    .corroboration-meter-wrap {
      background: rgba(11, 15, 25, 0.85);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .corroboration-bar-outer {
      width: 100%;
      height: 12px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .corroboration-bar-inner {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--accent-amber), var(--accent-cyan), var(--accent-emerald));
      transition: width 0.5s ease;
    }

    .hintikka-board {
      background: rgba(8, 12, 22, 0.9);
      border: 1px solid rgba(6, 182, 212, 0.35);
      border-radius: var(--radius-sm);
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .hintikka-move-btn {
      width: 100%;
      text-align: left;
      padding: 10px 12px;
      border-radius: 8px;
      background: rgba(18, 26, 43, 0.9);
      border: 1px solid var(--border-color);
      color: var(--text-primary);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-family: var(--font-sans);
      font-size: 0.81rem;
      transition: all var(--transition-fast);
    }

    .hintikka-move-btn:hover {
      border-color: var(--accent-cyan);
      background: rgba(6, 182, 212, 0.12);
    }

    .quiz-option-label {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 8px;
      background: rgba(11, 15, 25, 0.72);
      border: 1px solid var(--border-color);
      cursor: pointer;
      font-size: 0.83rem;
      color: var(--text-primary);
      transition: all var(--transition-fast);
    }

    .quiz-option-label:hover {
      border-color: var(--accent-cyan);
      background: rgba(6, 182, 212, 0.08);
    }

    .quiz-option-label input[type="radio"] {
      margin-top: 4px;
      accent-color: var(--accent-emerald);
      flex-shrink: 0;
    }

    .quiz-feedback-box {
      padding: 12px;
      border-radius: 8px;
      font-size: 0.82rem;
      line-height: 1.55;
      display: none;
    }

    .quiz-feedback-box.show {
      display: block;
    }

    .quiz-feedback-box.correct {
      background: rgba(16, 185, 129, 0.14);
      border: 1px solid var(--accent-emerald);
      color: #d1fae5;
    }

    .quiz-feedback-box.incorrect {
      background: rgba(244, 63, 94, 0.14);
      border: 1px solid var(--accent-rose);
      color: #ffe4e6;
    }

    /* Toast Notification */
    .toast-box {
      position: fixed;
      bottom: 88px;
      right: 16px;
      z-index: 200;
      background: rgba(15, 23, 42, 0.95);
      border: 1px solid var(--accent-cyan);
      color: var(--text-primary);
      padding: 10px 16px;
      border-radius: 10px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
      font-size: 0.8rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;
      opacity: 0;
      pointer-events: none;
      transform: translateY(12px);
      transition: all 0.25s ease;
    }

    .toast-box.show {
      opacity: 1;
      transform: translateY(0);
    }

    /* ==========================================================================
       9. MEDIA QUERIES (TABLET >= 768px & DESKTOP >= 1024px)
       ========================================================================== */
    @media (min-width: 768px) {
      .app-wrapper {
      width: 100%;
      max-width: 100%;
      margin: 0;
      padding: 16px 28px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      box-sizing: border-box;
    }

      .brand-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
      }

      .brand-title h1 {
        font-size: 1.4rem;
      }

      .bloom-grid {
        grid-template-columns: repeat(6, 1fr);
      }

      .search-row {
        flex-direction: row;
        align-items: center;
      }

      .card-grid-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
      }

      .dict-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
      }

      .toulmin-diagram {
        grid-template-columns: repeat(2, 1fr);
      }

      .kuhn-stepper-grid {
        grid-template-columns: repeat(3, 1fr);
      }

      .kuhn-metrics-row {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    @media (min-width: 1024px) {
      body {
        padding-bottom: 32px; /* Remove mobile bottom nav space */
      }

      .workspace-layout {
        display: grid;
        grid-template-columns: 270px 1fr;
        align-items: start;
        gap: 20px;
      }

      /* Transform Bottom Nav into Sticky Left Sidebar */
      .nav-container {
        position: sticky;
        top: 20px;
        bottom: auto;
        left: auto;
        right: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        background: var(--panel-bg);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-glass);
        gap: 8px;
      }

      .nav-btn {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 11px 12px;
        gap: 12px;
      }

      .nav-btn .nav-icon {
        font-size: 1.25rem;
        width: 26px;
        text-align: center;
      }

      .nav-btn .nav-text-wrap {
        display: flex;
        flex-direction: column;
      }

      .nav-btn .nav-label {
        font-size: 0.84rem;
        max-width: none;
        white-space: normal;
      }

      .nav-btn .nav-sub {
        display: block;
        font-size: 0.68rem;
        color: var(--text-muted);
        font-weight: 400;
      }

      .nav-btn.active .nav-sub {
        color: #a5f3fc;
      }

      .graph-workspace {
        display: grid;
        grid-template-columns: 1.55fr 1fr;
        align-items: start;
      }

      .card-grid-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
      }

      .kuhn-stepper-grid {
        grid-template-columns: repeat(6, 1fr);
      }

      .toast-box {
        bottom: 24px;
      }
    }

/* Full-Width responsive enhancements */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.workspace-layout {
  width: 100%;
  max-width: 100%;
}

.tab-pane {
  width: 100%;
  max-width: 100%;
}

.main-content {
  width: 100%;
  max-width: 100%;
}
