
    #guide-content {
      --bg-page: #f4f7f6;
      --bg-card: #ffffff;
      --primary-dark: #0f172a;
      --primary-slate: #1e293b;
      --accent-green: #059669;
      --accent-green-light: #ecfdf5;
      --accent-green-border: #10b981;
      --accent-red: #dc2626;
      --accent-red-light: #fef2f2;
      --accent-red-border: #ef4444;
      --accent-blue: #0284c7;
      --accent-amber: #d97706;
      --accent-amber-bg: #fffbeb;
      --text-main: #1e293b;
      --text-muted: #475569;
      --border-soft: #e2e8f0;
      --shadow-card: 0 4px 12px rgba(15, 23, 42, 0.06);
    }

    #guide-content * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    #guide-content {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background-color: var(--bg-page);
      color: var(--text-main);
      line-height: 1.65;
      padding-bottom: 3rem;
    }

    #guide-content .urdu-text {
      font-family: 'Jameel Noori Nastaliq', 'Noto Nastaliq Urdu', serif;
      direction: rtl;
      text-align: right;
      line-height: 2.25;
      font-size: 1.08rem;
    }

    #guide-content .top-navbar {
      background: var(--primary-dark);
      color: #ffffff;
      padding: 0.85rem 1.25rem;
      position: sticky;
      top: 0;
      z-index: 50;
      box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    }

    #guide-content .top-navbar-inner {
      max-width: 1140px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    #guide-content .brand-logo {
      font-weight: 800;
      font-size: 1.25rem;
      color: #38bdf8;
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    #guide-content .brand-badge {
      background: rgba(56, 189, 248, 0.16);
      color: #7dd3fc;
      font-size: 0.75rem;
      padding: 0.2rem 0.6rem;
      border-radius: 999px;
      font-weight: 600;
      border: 1px solid rgba(56, 189, 248, 0.3);
    }

    #guide-content .nav-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    #guide-content .nav-btn {
      background: #1e293b;
      color: #f8fafc;
      border: 1px solid #334155;
      padding: 0.42rem 0.85rem;
      border-radius: 0.5rem;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      transition: all 0.18s ease;
    }

    #guide-content .nav-btn:hover {
      background: #334155;
      border-color: #475569;
    }

    #guide-content .nav-btn.primary {
      background: var(--accent-green);
      border-color: var(--accent-green);
    }

    #guide-content .nav-btn.primary:hover {
      background: #047857;
    }

    #guide-content .page-container {
      max-width: 1140px;
      margin: 1.5rem auto;
      padding: 0 1rem;
    }

    /* Header & Banner */
    #guide-content .guide-header {
      background: var(--bg-card);
      border-radius: 1rem;
      overflow: hidden;
      box-shadow: var(--shadow-card);
      border: 1px solid var(--border-soft);
      margin-bottom: 1.5rem;
    }

    #guide-content .banner-image {
      position: relative;
      width: 100%;
      max-height: 340px;
      overflow: hidden;
      background: #0f172a;
    }

    #guide-content .banner-image img {
      width: 100%;
      height: 320px;
      object-fit: cover;
      display: block;
      opacity: 0.92;
    }

    #guide-content .banner-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.35) 60%, rgba(15, 23, 42, 0.15) 100%);
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 1.5rem;
      color: #ffffff;
    }

    #guide-content .banner-title-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      flex-wrap: wrap;
      gap: 1rem;
    }

    #guide-content .banner-title-en h1 {
      font-size: 1.85rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #ffffff;
    }

    #guide-content .banner-title-en p {
      color: #cbd5e1;
      font-size: 0.95rem;
      margin-top: 0.25rem;
    }

    #guide-content .banner-title-ur {
      font-family: 'Jameel Noori Nastaliq', 'Noto Nastaliq Urdu', serif;
      font-size: 1.65rem;
      font-weight: 700;
      color: #fde047;
      direction: rtl;
    }

    #guide-content .header-meta-bar {
      padding: 1rem 1.5rem;
      background: #f8fafc;
      border-top: 1px solid var(--border-soft);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    #guide-content .breadcrumb-container {
      font-size: 0.88rem;
      color: var(--text-muted);
    }

    #guide-content .breadcrumb-container a {
      color: var(--accent-blue);
      text-decoration: none;
      font-weight: 600;
    }

    #guide-content .breadcrumb-container a:hover {
      text-decoration: underline;
    }

    #guide-content .breadcrumb-current {
      font-weight: 700;
      color: var(--primary-dark);
    }

    #guide-content .chapter-meta-pill {
      background: #e0f2fe;
      color: #0369a1;
      padding: 0.3rem 0.75rem;
      border-radius: 999px;
      font-size: 0.8rem;
      font-weight: 700;
    }

    /* TOC & Search Bar */
    #guide-content .top-tools-grid {
      display: grid;
      grid-template-columns: 1.35fr 1fr;
      gap: 1.25rem;
      margin-bottom: 1.5rem;
    }

    @media (max-width: 860px) {
      #guide-content .top-tools-grid {
        grid-template-columns: 1fr;
      }
    }

    #guide-content .toc-card, #guide-content .search-card {
      background: var(--bg-card);
      border-radius: 0.85rem;
      padding: 1.25rem 1.4rem;
      box-shadow: var(--shadow-card);
      border: 1px solid var(--border-soft);
    }

    #guide-content .toc-card h3, #guide-content .search-card h3 {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--primary-dark);
      margin-bottom: 0.85rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    #guide-content .toc-list {
      list-style: none;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 0.5rem;
    }

    #guide-content .toc-list li a {
      display: flex;
      align-items: center;
      justify-content: space-between;
      text-decoration: none;
      color: var(--primary-slate);
      background: #f8fafc;
      border: 1px solid var(--border-soft);
      padding: 0.48rem 0.75rem;
      border-radius: 0.5rem;
      font-size: 0.86rem;
      font-weight: 600;
      transition: all 0.15s ease;
    }

    #guide-content .toc-list li a:hover {
      background: var(--accent-green-light);
      border-color: var(--accent-green-border);
      color: var(--accent-green);
    }

    #guide-content .chapter-search-box {
      display: flex;
      gap: 0.5rem;
      margin-bottom: 0.85rem;
    }

    #guide-content .chapter-search-box input {
      flex: 1;
      padding: 0.6rem 0.85rem;
      border: 1px solid #cbd5e1;
      border-radius: 0.5rem;
      font-size: 0.9rem;
      outline: none;
    }

    #guide-content .chapter-search-box input:focus {
      border-color: var(--accent-green);
      box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
    }

    #guide-content .btn-search {
      background: var(--accent-green);
      color: #ffffff;
      border: none;
      padding: 0.6rem 1rem;
      border-radius: 0.5rem;
      font-weight: 600;
      cursor: pointer;
      font-size: 0.86rem;
    }

    #guide-content .btn-clear {
      background: #e2e8f0;
      color: var(--primary-slate);
      border: none;
      padding: 0.6rem 0.85rem;
      border-radius: 0.5rem;
      font-weight: 600;
      cursor: pointer;
      font-size: 0.86rem;
    }

    #guide-content .quick-filter-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-top: 0.5rem;
    }

    #guide-content .filter-pill {
      background: #f1f5f9;
      color: #334155;
      border: 1px solid #cbd5e1;
      border-radius: 999px;
      padding: 0.25rem 0.65rem;
      font-size: 0.76rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    #guide-content .filter-pill:hover {
      background: #e0f2fe;
      color: #0369a1;
      border-color: #7dd3fc;
    }

    #guide-content .search-status {
      font-size: 0.82rem;
      color: var(--accent-green);
      font-weight: 600;
      margin-top: 0.5rem;
      min-height: 1.2rem;
    }

    /* Topic Sections */
    #guide-content .topic-section {
      background: var(--bg-card);
      border-radius: 1rem;
      padding: 1.5rem;
      margin-bottom: 1.5rem;
      box-shadow: var(--shadow-card);
      border: 1px solid var(--border-soft);
    }

    #guide-content .topic-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.75rem;
      padding-bottom: 0.85rem;
      margin-bottom: 0.85rem;
      border-bottom: 2px solid #f1f5f9;
    }

    #guide-content .english-heading {
      font-size: 1.32rem;
      font-weight: 800;
      color: var(--primary-dark);
    }

    #guide-content .urdu-heading {
      font-family: 'Jameel Noori Nastaliq', 'Noto Nastaliq Urdu', serif;
      font-size: 1.38rem;
      font-weight: 700;
      color: var(--accent-red);
      direction: rtl;
    }

    #guide-content .topic-tags {
      font-size: 0.82rem;
      color: var(--text-muted);
      background: #f8fafc;
      padding: 0.45rem 0.85rem;
      border-radius: 0.5rem;
      margin-bottom: 1.1rem;
      border-left: 3px solid var(--accent-blue);
    }

    #guide-content .bilingual-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.15rem;
      margin-bottom: 1.1rem;
    }

    @media (max-width: 820px) {
      #guide-content .bilingual-grid {
        grid-template-columns: 1fr;
      }
    }

    #guide-content .lang-card {
      border-radius: 0.75rem;
      padding: 1.15rem 1.25rem;
      position: relative;
      background: #ffffff;
    }

    #guide-content .english-card {
      border: 2px solid var(--accent-green-border);
      background: linear-gradient(180deg, rgba(236, 253, 245, 0.45) 0%, #ffffff 100%);
    }

    #guide-content .urdu-card {
      border: 2px solid var(--accent-red-border);
      background: linear-gradient(180deg, rgba(254, 242, 242, 0.45) 0%, #ffffff 100%);
    }

    #guide-content .lang-badge {
      display: inline-block;
      font-size: 0.72rem;
      font-weight: 800;
      padding: 0.2rem 0.65rem;
      border-radius: 999px;
      letter-spacing: 0.04em;
      margin-bottom: 0.65rem;
    }

    #guide-content .green-badge {
      background: var(--accent-green);
      color: #ffffff;
    }

    #guide-content .red-badge {
      background: var(--accent-red);
      color: #ffffff;
      font-family: 'Inter', sans-serif;
    }

    #guide-content .card-content p {
      margin-bottom: 0.65rem;
      font-size: 0.95rem;
    }

    #guide-content .card-content ul {
      padding-left: 1.2rem;
      margin-bottom: 0.65rem;
      font-size: 0.93rem;
    }

    #guide-content .urdu-card .card-content ul {
      padding-left: 0;
      padding-right: 1.35rem;
    }

    #guide-content .card-content li {
      margin-bottom: 0.35rem;
    }

    #guide-content .roman-urdu-note {
      background: var(--accent-amber-bg);
      border: 1px solid #fde68a;
      border-left: 4px solid var(--accent-amber);
      padding: 0.85rem 1.1rem;
      border-radius: 0.65rem;
      font-size: 0.92rem;
      color: #78350f;
      margin-bottom: 1.1rem;
    }

    /* Diagram Box */
    #guide-content .diagram-box {
      background: #f8fafc;
      border: 1px solid var(--border-soft);
      border-radius: 0.85rem;
      padding: 1.15rem;
      text-align: center;
      margin-top: 0.9rem;
    }

    #guide-content .diagram-grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
      align-items: center;
    }

    @media (max-width: 780px) {
      #guide-content .diagram-grid-2 {
        grid-template-columns: 1fr;
      }
    }

    #guide-content .diagram-image-wrapper img {
      max-width: 100%;
      height: auto;
      max-height: 280px;
      border-radius: 0.65rem;
      border: 1px solid #cbd5e1;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    #guide-content .diagram-caption {
      margin-top: 0.75rem;
      font-size: 0.88rem;
      color: #334155;
      background: #ffffff;
      padding: 0.6rem 0.95rem;
      border-radius: 0.5rem;
      border: 1px dashed #cbd5e1;
      text-align: left;
    }

    /* Truth Tables */
    #guide-content .gates-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
      gap: 1rem;
      margin: 1rem 0;
    }

    #guide-content .gate-card {
      background: #f8fafc;
      border: 1px solid var(--border-soft);
      border-radius: 0.75rem;
      padding: 1rem;
    }

    #guide-content .gate-card h4 {
      font-size: 1rem;
      color: var(--primary-dark);
      margin-bottom: 0.35rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    #guide-content .formula-pill {
      background: #e0f2fe;
      color: #0369a1;
      padding: 0.15rem 0.55rem;
      border-radius: 0.35rem;
      font-family: monospace;
      font-size: 0.88rem;
      font-weight: 700;
    }

    #guide-content .truth-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 0.6rem;
      font-size: 0.85rem;
      background: #ffffff;
      border-radius: 0.4rem;
      overflow: hidden;
    }

    #guide-content .truth-table th, #guide-content .truth-table td {
      border: 1px solid #cbd5e1;
      padding: 0.38rem 0.5rem;
      text-align: center;
    }

    #guide-content .truth-table th {
      background: var(--primary-slate);
      color: #ffffff;
      font-weight: 600;
    }

    #guide-content .truth-table tr:nth-child(even) {
      background: #f1f5f9;
    }

    /* QA Sections */
    #guide-content .qa-section {
      background: var(--bg-card);
      border-radius: 1rem;
      padding: 1.5rem;
      margin-bottom: 1.5rem;
      box-shadow: var(--shadow-card);
      border: 1px solid var(--border-soft);
    }

    #guide-content .section-title-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.75rem;
      padding-bottom: 0.85rem;
      margin-bottom: 1.15rem;
      border-bottom: 2px solid var(--primary-slate);
    }

    #guide-content .section-title {
      font-size: 1.3rem;
      font-weight: 800;
      color: var(--primary-dark);
    }

    #guide-content .urdu-title {
      font-family: 'Jameel Noori Nastaliq', 'Noto Nastaliq Urdu', serif;
      font-size: 1.35rem;
      color: var(--accent-red);
      margin-left: 0.75rem;
    }

    #guide-content .mcq-card {
      background: #f8fafc;
      border: 1px solid var(--border-soft);
      border-radius: 0.75rem;
      padding: 1.1rem 1.25rem;
      margin-bottom: 0.9rem;
    }

    #guide-content .question-text {
      font-size: 0.98rem;
      color: var(--primary-dark);
      margin-bottom: 0.4rem;
    }

    #guide-content .question-text-ur {
      font-family: 'Jameel Noori Nastaliq', 'Noto Nastaliq Urdu', serif;
      direction: rtl;
      text-align: right;
      color: #334155;
      font-size: 1.05rem;
      margin-bottom: 0.65rem;
    }

    #guide-content .mcq-options-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 0.55rem;
      margin-bottom: 0.75rem;
    }

    @media (max-width: 640px) {
      #guide-content .mcq-options-grid {
        grid-template-columns: 1fr;
      }
    }

    #guide-content .option-item {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      padding: 0.5rem 0.8rem;
      border-radius: 0.5rem;
      font-size: 0.9rem;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    #guide-content .option-item:hover {
      border-color: var(--accent-blue);
      background: #f0f9ff;
    }

    #guide-content .option-item.correct-selected {
      background: var(--accent-green-light);
      border-color: var(--accent-green);
      color: #065f46;
      font-weight: 700;
    }

    #guide-content .option-item.wrong-selected {
      background: var(--accent-red-light);
      border-color: var(--accent-red);
      color: #991b1b;
    }

    #guide-content .answer-toggle, #guide-content .question-accordion {
      border: 1px solid #cbd5e1;
      border-radius: 0.6rem;
      background: #ffffff;
      margin-bottom: 0.75rem;
      overflow: hidden;
    }

    #guide-content .toggle-btn, #guide-content .accordion-header {
      padding: 0.75rem 1rem;
      font-weight: 700;
      font-size: 0.93rem;
      color: var(--primary-dark);
      cursor: pointer;
      background: #f8fafc;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.75rem;
      list-style: none;
    }

    #guide-content .toggle-btn:hover, #guide-content .accordion-header:hover {
      background: #f1f5f9;
    }

    #guide-content .answer-box, #guide-content .accordion-body {
      padding: 1rem 1.15rem;
      background: var(--accent-green-light);
      border-top: 1px solid #a7f3d0;
      font-size: 0.94rem;
    }

    #guide-content .answer-box p, #guide-content .accordion-body p {
      margin-bottom: 0.55rem;
    }

    /* Footer */
    #guide-content .chapter-footer {
      margin-top: 2rem;
    }

    #guide-content .summary-card {
      background: var(--bg-card);
      border-radius: 1rem;
      padding: 1.5rem;
      box-shadow: var(--shadow-card);
      border: 1px solid var(--border-soft);
      margin-bottom: 1.25rem;
    }

    #guide-content .summary-title {
      font-size: 1.2rem;
      font-weight: 800;
      margin-bottom: 1rem;
      color: var(--primary-dark);
    }

    #guide-content .cta-banner {
      background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
      color: #ffffff;
      padding: 1.65rem;
      border-radius: 1rem;
      text-align: center;
      margin-bottom: 1.25rem;
    }

    #guide-content .cta-banner h3 {
      font-size: 1.3rem;
      margin-bottom: 0.4rem;
    }

    #guide-content .cta-banner p {
      color: #cbd5e1;
      margin-bottom: 1rem;
      font-size: 0.95rem;
    }

    #guide-content .btn-primary {
      display: inline-block;
      background: var(--accent-green);
      color: #ffffff;
      text-decoration: none;
      padding: 0.65rem 1.35rem;
      border-radius: 0.55rem;
      font-weight: 700;
      font-size: 0.92rem;
    }

    #guide-content .chapter-nav-buttons {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }

    #guide-content .btn-nav {
      background: var(--bg-card);
      color: var(--primary-dark);
      border: 1px solid var(--border-soft);
      padding: 0.75rem 1.25rem;
      border-radius: 0.65rem;
      text-decoration: none;
      font-weight: 700;
      font-size: 0.9rem;
      box-shadow: var(--shadow-card);
    }

    #guide-content .btn-nav:hover {
      border-color: var(--accent-green);
      color: var(--accent-green);
    }

    #guide-content .hidden-by-search {
      display: none !important;
    }
  