/* ============================================================
   THREAT MODELING GUIDE — MAIN STYLES
   Modern web design system with Dark/Light mode support,
   Glassmorphism topbar, Search Modal (Ctrl+K), and fluid typography.
   ============================================================ */

:root {
  /* Light Palette Defaults */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #7c3aed;
  --accent-light: #f5f3ff;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-topbar: rgba(255, 255, 255, 0.85);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-heading: #0f172a;

  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --sidebar-width: 280px;
  --header-height: 60px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.05);
  --shadow: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.08);

  --transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Dark Theme Overrides ── */
[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-dark: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.15);
  --accent: #a855f7;
  --accent-light: rgba(168, 85, 247, 0.15);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);

  --bg-main: #0b0f19;
  --bg-card: #151c2c;
  --bg-sidebar: #0f172a;
  --bg-topbar: rgba(15, 23, 42, 0.85);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-heading: #f8fafc;

  --border-color: #1e293b;
  --border-subtle: #1e293b;

  --gray-50: #0b0f19;
  --gray-100: #151c2c;
  --gray-200: #1e293b;
  --gray-300: #334155;
  --gray-400: #64748b;
  --gray-500: #94a3b8;
  --gray-600: #cbd5e1;
  --gray-700: #e2e8f0;
  --gray-800: #f1f5f9;
  --gray-900: #f8fafc;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow: 0 4px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, background-color .3s ease;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.sidebar-logo span { font-weight: 700; font-size: 14px; color: var(--text-heading); line-height: 1.3; }
.sidebar-logo small { display: block; font-weight: 400; color: var(--text-muted); font-size: 11px; }

.progress-bar-wrap { padding: 12px 20px; border-bottom: 1px solid var(--border-color); }
.progress-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.progress-bar { height: 4px; background: var(--gray-200); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px; transition: width .4s ease; }

.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section { margin-bottom: 4px; }
.nav-section-title {
  padding: 6px 20px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gray-400);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}
.nav-item .nav-icon { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 10px;
  background: var(--gray-100); color: var(--text-muted);
}
.nav-item.active .nav-badge { background: var(--primary); color: white; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 12px; color: var(--text-muted);
}

/* ── Main Layout ── */
.main-wrap {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.top-bar {
  position: sticky; top: 0; z-index: 90;
  height: var(--header-height);
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center;
  padding: 0 32px;
  gap: 12px;
  transition: background-color .3s ease;
}
.top-bar-title { font-size: 15px; font-weight: 600; color: var(--text-heading); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-bar-actions { display: flex; gap: 8px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; font-family: var(--font-sans);
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-color); }
.btn-ghost:hover { background: var(--gray-100); color: var(--text-heading); }
.btn-present {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: white; font-weight: 600;
}
.btn-present:hover { opacity: .9; transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: pointer; transition: var(--transition);
  font-size: 16px;
}
.btn-icon:hover { background: var(--gray-100); color: var(--text-heading); }

/* ── Search Bar Trigger Button ── */
.search-trigger-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--gray-100); color: var(--text-muted);
  border: 1px solid var(--border-color); font-size: 12.5px;
  cursor: pointer; transition: var(--transition);
}
.search-trigger-btn:hover { background: var(--border-color); color: var(--text-heading); }
.search-trigger-btn kbd {
  background: var(--bg-card); border: 1px solid var(--gray-300);
  border-radius: 4px; padding: 1px 5px; font-size: 10px; font-family: var(--font-mono);
}

/* ── Content Area ── */
.content { padding: 40px 48px; max-width: 900px; flex: 1; }

/* ── Page Header ── */
.page-header { margin-bottom: 40px; }
.module-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
  margin-bottom: 12px;
}
.module-tag.blue { background: var(--primary-light); color: var(--primary); }
.module-tag.purple { background: var(--accent-light); color: var(--accent); }
.module-tag.green { background: var(--success-light); color: var(--success); }
.module-tag.orange { background: var(--warning-light); color: var(--warning); }
.module-tag.red { background: var(--danger-light); color: var(--danger); }

.page-title {
  font-size: 36px; font-weight: 800; color: var(--text-heading);
  line-height: 1.2; margin-bottom: 12px;
  letter-spacing: -.02em;
}
.page-subtitle { font-size: 17px; color: var(--text-muted); line-height: 1.6; max-width: 680px; }

/* ── Learning Objectives ── */
.objectives-card {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 36px;
}
.objectives-card h3 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.objectives-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.objectives-card li {
  font-size: 14px; color: var(--text-heading);
  display: flex; align-items: flex-start; gap: 10px;
}
.objectives-card li::before { content: '→'; font-weight: 700; flex-shrink: 0; color: var(--primary); margin-top: 1px; }

/* ── Section Headers ── */
.section { margin-bottom: 48px; }
h2.section-title {
  font-size: 24px; font-weight: 700; color: var(--text-heading);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  letter-spacing: -.01em;
}
h2.section-title .section-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--primary); color: white;
  font-size: 13px; font-weight: 700; margin-right: 10px;
}
h3.subsection { font-size: 18px; font-weight: 700; color: var(--text-heading); margin: 28px 0 12px; }
p { margin-bottom: 14px; color: var(--text-main); font-size: 15px; }

/* ── Callout Boxes ── */
.callout {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
  display: flex; gap: 14px;
}
.callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.callout-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.callout-text { font-size: 14px; line-height: 1.6; }
.callout.info { background: var(--primary-light); border: 1px solid var(--primary); }
.callout.info .callout-title { color: var(--primary); }
.callout.info .callout-text { color: var(--text-heading); }
.callout.success { background: var(--success-light); border: 1px solid var(--success); }
.callout.success .callout-title { color: var(--success); }
.callout.success .callout-text { color: var(--text-heading); }
.callout.warning { background: var(--warning-light); border: 1px solid var(--warning); }
.callout.warning .callout-title { color: var(--warning); }
.callout.warning .callout-text { color: var(--text-heading); }
.callout.danger { background: var(--danger-light); border: 1px solid var(--danger); }
.callout.danger .callout-title { color: var(--danger); }
.callout.danger .callout-text { color: var(--text-heading); }
.callout.tip { background: var(--accent-light); border: 1px solid var(--accent); }
.callout.tip .callout-title { color: var(--accent); }
.callout.tip .callout-text { color: var(--text-heading); }

/* ── Cards & Grids ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }
.card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 22px;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-icon { font-size: 28px; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.card.primary { border-top: 3px solid var(--primary); }
.card.accent { border-top: 3px solid var(--accent); }
.card.success { border-top: 3px solid var(--success); }
.card.warning { border-top: 3px solid var(--warning); }
.card.danger { border-top: 3px solid var(--danger); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: var(--radius-lg); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
thead tr { background: var(--gray-800); color: white; }
[data-theme="dark"] thead tr { background: var(--gray-200); color: var(--gray-900); }
th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 13px 16px; font-size: 14px; color: var(--text-main); border-bottom: 1px solid var(--border-color); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--primary-light); }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 600;
}
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-orange { background: var(--warning-light); color: var(--warning); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-purple { background: var(--accent-light); color: var(--accent); }

/* ── Diagrams ── */
.diagram-wrap {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px; margin: 28px 0;
  text-align: center;
  position: relative; overflow: hidden;
}
.diagram-wrap::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.diagram-caption {
  font-size: 12px; color: var(--text-muted); margin-top: 16px;
  font-style: italic; text-align: center;
}
.diagram-title {
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 24px;
}

/* ── Code Blocks ── */
.code-container { position: relative; margin: 20px 0; }
pre {
  background: #0f172a; color: #e2e8f0;
  border-radius: var(--radius); padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.65;
}
code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--gray-100); color: var(--accent);
  padding: 2px 6px; border-radius: 4px;
}
pre code { background: none; color: inherit; padding: 0; border-radius: 0; }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: white; border-radius: 4px; padding: 4px 8px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.copy-btn:hover { background: rgba(255,255,255,.25); }

/* ── Steps ── */
.steps { display: flex; flex-direction: column; gap: 0; margin: 24px 0; }
.step { display: flex; gap: 0; position: relative; }
.step:not(:last-child)::before {
  content: '';
  position: absolute; left: 19px; top: 48px;
  width: 2px; height: calc(100% - 24px);
  background: var(--border-color);
}
.step-num {
  width: 40px; height: 40px;
  background: var(--primary); color: white;
  border-radius: 50%; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 1;
}
.step-body { padding: 8px 0 28px 20px; flex: 1; }
.step-title { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.step-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Quiz / Exercise ── */
.exercise-card {
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg); padding: 28px;
  margin: 32px 0;
}
.exercise-label {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.exercise-title { font-size: 17px; font-weight: 700; color: var(--text-heading); margin-bottom: 12px; }
.exercise-text { font-size: 14px; color: var(--text-main); margin-bottom: 20px; line-height: 1.6; }
.exercise-options { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 2px solid var(--border-color);
  border-radius: var(--radius); padding: 13px 16px;
  cursor: pointer; transition: var(--transition); text-align: left;
  font-size: 14px; font-family: var(--font-sans); color: var(--text-main);
}
.option-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.option-btn.correct { border-color: var(--success); background: var(--success-light); }
.option-btn.wrong { border-color: var(--danger); background: var(--danger-light); }
.option-btn .opt-letter {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gray-100); color: var(--text-muted);
  font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.option-btn.correct .opt-letter { background: var(--success); color: white; }
.option-btn.wrong .opt-letter { background: var(--danger); color: white; }
.exercise-feedback { margin-top: 16px; display: none; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 500; }
.exercise-feedback.show { display: block; }
.exercise-feedback.correct { background: var(--success-light); color: var(--success); border: 1px solid var(--success); }
.exercise-feedback.wrong { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger); }

/* ── STRIDE Grid ── */
.stride-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
.stride-card { border-radius: var(--radius); padding: 18px 20px; border: 1px solid; }
.stride-letter { font-size: 32px; font-weight: 900; line-height: 1; margin-bottom: 4px; }
.stride-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.stride-def { font-size: 12px; line-height: 1.5; }
.stride-example { font-size: 11px; margin-top: 8px; padding: 6px 8px; border-radius: 4px; font-style: italic; }
.stride-S { background: var(--danger-light); border-color: var(--danger); }
.stride-S .stride-letter { color: var(--danger); }
.stride-T { background: var(--warning-light); border-color: var(--warning); }
.stride-T .stride-letter { color: var(--warning); }
.stride-R { background: var(--warning-light); border-color: var(--warning); }
.stride-R .stride-letter { color: var(--warning); }
.stride-I { background: var(--success-light); border-color: var(--success); }
.stride-I .stride-letter { color: var(--success); }
.stride-D { background: var(--primary-light); border-color: var(--primary); }
.stride-D .stride-letter { color: var(--primary); }
.stride-E { background: var(--accent-light); border-color: var(--accent); }
.stride-E .stride-letter { color: var(--accent); }

/* ── Tabs ── */
.tabs { margin: 28px 0; }
.tab-list { display: flex; gap: 2px; border-bottom: 2px solid var(--border-color); margin-bottom: 0; }
.tab-btn {
  padding: 10px 18px; border: none; background: none;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: var(--transition);
}
.tab-btn:hover { color: var(--text-heading); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; padding: 24px 0; }
.tab-panel.active { display: block; }

/* ── Page Navigation ── */
.page-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 48px;
}
.page-nav-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-muted);
  font-size: 14px; font-weight: 500; padding: 12px 18px;
  border: 1px solid var(--border-color); border-radius: var(--radius);
  transition: var(--transition); background: var(--bg-card);
}
.page-nav-link:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); }
.page-nav-link .nav-dir { font-size: 11px; color: var(--text-muted); display: block; font-weight: 400; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .05em; }

/* ── Search Modal (Ctrl + K) ── */
.search-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  opacity: 0; transition: opacity .2s ease;
}
.search-modal-overlay.open { display: flex; opacity: 1; }
.search-modal {
  width: 90%; max-width: 620px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.search-input-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-color);
}
.search-input-header span { font-size: 18px; color: var(--text-muted); }
.search-input-header input {
  flex: 1; border: none; background: none;
  font-size: 16px; font-family: var(--font-sans);
  color: var(--text-heading); outline: none;
}
.search-results-list { max-height: 380px; overflow-y: auto; padding: 12px; }
.search-result-item {
  display: block; padding: 12px 16px; border-radius: var(--radius);
  text-decoration: none; color: inherit; transition: var(--transition);
  margin-bottom: 4px;
}
.search-result-item:hover, .search-result-item.selected {
  background: var(--primary-light);
}
.search-result-item .res-module { font-size: 10px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; }
.search-result-item .res-title { font-size: 14.5px; font-weight: 700; color: var(--text-heading); }
.search-result-item .res-snippet { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ── Presentation Mode ── */
body.present-mode .sidebar { transform: translateX(-100%); }
body.present-mode .main-wrap { margin-left: 0; }
body.present-mode .content { max-width: 100%; padding: 60px 80px; }
body.present-mode .page-title { font-size: 48px; }
body.present-mode p, body.present-mode li, body.present-mode .callout-text { font-size: 17px; }
body.present-mode .section-title { font-size: 30px; }

.present-toolbar {
  display: none;
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #0f172a; border: 1px solid #1e293b; border-radius: 40px;
  padding: 10px 24px; gap: 16px; align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 1000;
}
body.present-mode .present-toolbar { display: flex; }
.present-toolbar button {
  background: none; border: none; color: white;
  font-size: 18px; cursor: pointer; padding: 4px 10px;
  border-radius: 6px; transition: var(--transition);
}
.present-toolbar button:hover { background: rgba(255,255,255,.15); }
.present-toolbar .divider { width: 1px; height: 20px; background: rgba(255,255,255,.2); }
.slide-counter { color: rgba(255,255,255,.8); font-size: 13px; font-family: var(--font-mono); }

/* ── Mobile hamburger ── */
.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px; color: var(--text-heading); font-size: 20px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --sidebar-width: 260px; }
  .content { padding: 32px 36px; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .content { padding: 24px 20px; }
  .page-title { font-size: 26px; }
  .hamburger { display: flex; }
  .stride-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .search-trigger-btn kbd { display: none; }
}

/* ── Print Stylesheet ── */
@media print {
  .sidebar, .top-bar, .page-nav, .present-toolbar, .exercise-card, .search-modal-overlay { display: none !important; }
  .main-wrap { margin-left: 0; }
  .content { padding: 20px; max-width: 100%; }
}
