/* ========================================
   eight by (selfstudy)[www.selfstudy.xyz]
   Universal Lecture Styles + Dark Mode
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@400;500;600;700&family=Hind+Siliguri:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'July';
  src: url('fonts/July-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'July';
  src: url('fonts/July-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'July';
  src: url('fonts/July-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'July';
  src: url('fonts/July-Bold-Italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ── Light Theme (default) ── */
:root {
  --bg-body: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-surface-2: #eef1f6;

  --text-primary: #1a2235;
  --text-secondary: #5a6a85;

  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #e8f0fe;

  --accent-color: #0ea472;
  --accent-hover: #047857;

  --danger-color: #dc2626;
  --warning-color: #d97706;
  --success-color: #16a34a;

  --border-color: #dde3ed;
  --border-focus: #93b4fd;

  --shadow-sm: 0 1px 3px rgba(30, 50, 100, 0.07);
  --shadow-md: 0 4px 12px rgba(30, 50, 100, 0.09), 0 2px 4px rgba(30, 50, 100, 0.05);
  --shadow-lg: 0 12px 28px rgba(30, 50, 100, 0.12), 0 4px 8px rgba(30, 50, 100, 0.06);

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 14px;

  --nav-height: 62px;
  --transition: all 0.2s ease-in-out;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg-body: #1c1f26;
  --bg-surface: #252930;
  --bg-surface-2: #2f333d;

  --text-primary: #e8ecf4;
  --text-secondary: #9aa3b8;

  --primary-color: #5b9cf6;
  --primary-hover: #7db3f8;
  --primary-light: rgba(91, 156, 246, 0.14);

  --accent-color: #34d399;
  --accent-hover: #6ee7b7;

  --danger-color: #f87171;
  --warning-color: #fbbf24;
  --success-color: #4ade80;

  --border-color: #3a3f4c;
  --border-focus: #5b9cf6;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.38);
}

/* ── Global Resets ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'July', 'Hind Siliguri', 'Noto Serif Bengali', 'Inter', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.9;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ── Navbar ── */
.navbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar {
  background: rgba(37,41,48,0.90);
  border-bottom-color: rgba(58,63,76,0.8);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
}

.nav-brand {
  display: flex;
  flex-direction: column;
}

.nav-brand .brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary-color), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.nav-brand .brand-tag {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Theme Toggle ── */
.theme-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  background: var(--bg-surface-2);
  color: var(--primary-color);
}

/* ── Home Button ── */
.home-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.home-btn:hover {
  background: var(--bg-surface-2);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ── Header ── */
.lecture-header {
  background: linear-gradient(135deg, #eef3ff 0%, #e0eaff 50%, #d0e0ff 100%);
  color: var(--text-primary);
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .lecture-header {
  background: linear-gradient(135deg, #0f1219 0%, #1a1f2e 50%, #1e2a47 100%);
  color: #fff;
}

.lecture-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(37,99,235,0.05)" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
}

.lecture-header h1 {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 2.2em;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.lecture-header .subtitle {
  font-size: 1.1em;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* ── Container ── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* ── Table of Contents ── */
.toc {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.toc h2 {
  font-family: 'Noto Serif Bengali', serif;
  color: var(--text-primary);
  font-size: 1.5em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
}

.toc ul, .toc ol { list-style: none; padding-left: 0; }

.toc ul li, .toc ol li {
  padding: 10px 15px;
  margin: 5px 0;
  background: var(--bg-body);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.toc ul li:hover, .toc ol li:hover {
  background: var(--primary-light);
  transform: translateX(5px);
}

.toc ul li a, .toc ol li a {
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  font-weight: 500;
}

/* ── Sections ── */
.section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 35px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.section:hover {
  box-shadow: var(--shadow-md);
}

.section h2 {
  font-family: 'Noto Serif Bengali', serif;
  color: var(--text-primary);
  font-size: 1.6em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
}

.section h3 {
  font-family: 'Noto Serif Bengali', serif;
  color: var(--text-primary);
  font-size: 1.2em;
  margin: 25px 0 15px;
}

.section h4 {
  font-family: 'Noto Serif Bengali', serif;
  color: var(--primary-color);
  font-size: 1.05em;
  margin: 20px 0 10px;
}

.section p {
  margin-bottom: 16px;
  text-align: justify;
  font-size: 1.05em;
}

.section ul, .section ol {
  padding-left: 25px;
  margin-bottom: 16px;
}

.section ul li, .section ol li {
  margin-bottom: 8px;
}

/* ── Highlight Box ── */
.highlight-box {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-left: 5px solid #ff6f00;
  padding: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
}

[data-theme="dark"] .highlight-box {
  background: linear-gradient(135deg, rgba(255,111,0,0.12), rgba(255,111,0,0.06));
  border-left-color: #ff8f00;
}

.highlight-box strong { color: #bf360c; }
[data-theme="dark"] .highlight-box strong { color: #ffb74d; }

/* ── Key Points ── */
.key-points {
  background: #e8f5e9;
  border-left: 5px solid #2e7d32;
  padding: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
}

[data-theme="dark"] .key-points {
  background: rgba(46,125,50,0.12);
  border-left-color: #66bb6a;
}

.key-points h4 {
  color: #1b5e20;
  margin-top: 0;
}

[data-theme="dark"] .key-points h4 { color: #81c784; }

.key-points ul { padding-left: 20px; margin-bottom: 0; }
.key-points ul li { margin-bottom: 8px; }

/* ── Timeline ── */
.timeline {
  position: relative;
  padding: 20px 0;
  margin: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 25px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 4px solid var(--bg-surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.timeline-item .year {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1em;
}

.timeline-item .content {
  background: var(--bg-body);
  padding: 15px;
  border-radius: var(--radius-md);
  margin-top: 5px;
  border: 1px solid var(--border-color);
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.card {
  background: var(--bg-body);
  padding: 20px;
  border-radius: var(--radius-md);
  border-top: 4px solid var(--primary-color);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  border-top-width: 4px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card h4 {
  color: var(--text-primary);
  margin-bottom: 10px;
}

.card p { margin-bottom: 8px; }

/* ── Figure Box ── */
.figure-box {
  background: #f3e5f5;
  border: 2px dashed #9c27b0;
  padding: 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  text-align: center;
}

[data-theme="dark"] .figure-box {
  background: rgba(156,39,176,0.1);
  border-color: #ce93d8;
}

.figure-box .name {
  font-size: 1.2em;
  font-weight: 700;
  color: #6a1b9a;
}

[data-theme="dark"] .figure-box .name { color: #ce93d8; }

.figure-box .detail {
  font-size: 0.95em;
  color: #4a148c;
}

[data-theme="dark"] .figure-box .detail { color: #e1bee7; }

/* ── Question Box ── */
.question-box {
  background: #e3f2fd;
  border-left: 5px solid #1565c0;
  padding: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
}

[data-theme="dark"] .question-box {
  background: rgba(21,101,192,0.1);
  border-left-color: #42a5f5;
}

.question-box.creative {
  background: #faf5ff;
  border-left-color: #7c3aed;
}
[data-theme="dark"] .question-box.creative {
  background: rgba(124,58,237,0.12);
  border-left-color: #a78bfa;
}

.question-box.descriptive {
  background: #e8f5e9;
  border-left-color: #2e7d32;
}
[data-theme="dark"] .question-box.descriptive {
  background: rgba(46,125,50,0.12);
  border-left-color: #66bb6a;
}

.question-box .stimulus {
  font-style: italic;
  background: var(--bg-surface);
  padding: 15px;
  border-radius: 8px;
  border: 1px dashed var(--border-color);
  margin: 15px 0;
}

.question-box h4 {
  color: #0d47a1;
  margin-top: 0;
}

[data-theme="dark"] .question-box h4 { color: #64b5f6; }

.question-box ul { padding-left: 20px; margin-bottom: 0; }
.question-box ul li { margin-bottom: 12px; line-height: 1.6; }
.question-box .q-label { font-weight: 600; color: #1565c0; }
[data-theme="dark"] .question-box .q-label { color: #64b5f6; }

/* ── Vocab Badge ── */
.vocab {
  display: inline-block;
  background: #fff3e0;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: #e65100;
}

[data-theme="dark"] .vocab {
  background: rgba(230,81,0,0.2);
  color: #ff8a65;
}

/* ── Back to Top ── */
.back-to-top {
  display: inline-block;
  background: var(--bg-surface);
  color: var(--primary-color);
  padding: 8px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  margin: 10px 0;
}
.back-to-top:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ── Badge ── */
.badge {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  margin-right: 5px;
}

/* ── Footer ── */
.lecture-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  text-align: center;
  padding: 30px;
  margin-top: 40px;
}

.lecture-footer .footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary-color), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
}

.lecture-footer p {
  opacity: 0.7;
  font-size: 0.9em;
  color: var(--text-secondary);
}
.lecture-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.lecture-footer .footer-bottom a {
  color: var(--text-secondary);
}
.lecture-footer .footer-bottom a:hover {
  color: var(--primary-color);
}

/* ── Comparison Table ── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95em;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
  background: var(--bg-surface-2);
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table tr:hover td {
  background: var(--bg-body);
}

/* ── Progress Bar ── */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.progress-bar-label {
  min-width: 120px;
  font-weight: 500;
  color: var(--text-primary);
}

.progress-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-surface-2);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 5px;
  transition: width 0.5s ease;
}

.progress-bar-value {
  min-width: 50px;
  text-align: right;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-surface-2); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ── Selection ── */
::selection { background: var(--primary-light); color: var(--primary-color); }

/* ── Responsive ── */
/* ── Tab Bar (Question Pages) ── */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: inherit;
  white-space: nowrap;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.tab-btn:hover {
  color: var(--primary-color);
  background: var(--primary-light);
}
.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Collapsible ── */
.collapsible {
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  padding: 14px 42px 14px 18px;
  width: 100%;
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  position: relative;
}
.collapsible:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
}
.collapsible::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-secondary);
  position: absolute;
  right: 16px;
  top: 14px;
  line-height: 1;
}
.collapsible.open::after {
  content: '−';
  color: var(--primary-color);
}
.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 0 18px;
  margin-top: -4px;
  margin-bottom: 8px;
}
.collapsible-content.open {
  max-height: 5000px;
  padding: 14px 18px;
}
.collapsible-content p { margin-bottom: 8px; line-height: 1.8; }

/* ── CQ Card ── */
.cq-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.cq-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.cq-uddipak {
  background: var(--bg-surface-2);
  border-left: 4px solid var(--primary-color);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 14px;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-primary);
}
.cq-uddipak strong { color: var(--primary-color); }
.cq-section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

/* ── Question item (Knowledge & Explanatory) ── */
.q-item { margin-bottom: 4px; }
.q-item .collapsible { margin-bottom: 0; border-radius: var(--radius-md); }
.q-item .collapsible.open + .collapsible-content { margin-bottom: 10px; }

/* ── Q&A Section Title ── */
.qa-section-title {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-color);
}

/* ── Section Cards (Index Page) ── */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.section-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}
.section-card:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.section-card-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.section-card-text {
  display: flex;
  flex-direction: column;
}
.section-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}
.section-card-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.3;
}
.section-card.lecture { border-left: 3px solid var(--primary-color); }
.section-card.knowledge { border-left: 3px solid var(--accent-color); }
.section-card.explanatory { border-left: 3px solid var(--warning-color); }
.section-card.creative { border-left: 3px solid var(--danger-color); }

/* ── Back Button ── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 20px;
}
.btn-back:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ── Board Badge ── */
.board-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  padding: 1px 8px;
  border-radius: 4px;
  margin-left: 8px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .lecture-header h1 { font-size: 1.5em; }
  .lecture-header { padding: 40px 15px; }
  .section { padding: 20px; }
  .container { padding: 15px; }
  .card-grid { grid-template-columns: 1fr; }
  .toc { padding: 20px; }
  .nav-inner { padding: 0 1rem; }
  .nav-brand .brand-name { font-size: 0.95rem; }
  .tab-btn { padding: 8px 12px; font-size: 0.85rem; }
  .cq-card { padding: 16px; }
}

@media (min-width: 769px) {
  .tab-panel.active {
    display: grid;
  }
  #tab-knowledge.active,
  #tab-explanatory.active {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: start;
  }
  #tab-creative.active {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
  }
  .tab-panel .qa-section-title {
    grid-column: 1 / -1;
  }
}
