@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #086AD8;
  --primary-dark: #0555a8;
  --primary-light: #e8f1fd;
  --accent: #05dbcf;
  --accent-dark: #04b8a9;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --transition: .25s ease;
  --max-width: 820px;
  --nav-h: 64px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
  min-height: 100vh;
}

/* ===== Top Navigation ===== */
.top-nav {
  position: fixed; top: 0; right: 0; left: 0;
  height: var(--nav-h);
  background: #0a1628;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.top-nav .nav-brand {
  display: flex; align-items: center; gap: 12px;
}
.top-nav .logo {
  text-decoration: none; display: flex; align-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
.top-nav .logo img { height: 28px; width: auto; }
.top-nav .nav-brand .logo-sep { width: 1px; height: 24px; background: rgba(255,255,255,.2); }
.top-nav .course-label-link {
  text-decoration: none; display: flex; align-items: center;
}
.top-nav .course-label-link .course-label { font-size: 14px; color: rgba(255,255,255,.7); font-weight: 500; transition: color .2s; }
.top-nav .course-label-link:hover .course-label { color: rgba(255,255,255,1); }
.top-nav .nav-controls { display: flex; align-items: center; gap: 10px; }
.toc-toggle {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; font-size: 14px; color: rgba(255,255,255,.85);
  font-weight: 600; transition: var(--transition); display: flex; align-items: center; gap: 6px;
}
.toc-toggle:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Progress Bar ===== */
.progress-wrap {
  position: fixed; top: var(--nav-h); right: 0; left: 0;
  height: 3px; background: rgba(0,0,0,.1); z-index: 999;
}
.progress-bar {
  height: 100%; background: linear-gradient(90deg, #05dbcf, #086AD8);
  width: 0%; transition: width .4s ease; border-radius: 0 0 2px 2px;
}

/* ===== TOC Sidebar ===== */
.toc-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 1100; opacity: 0; visibility: hidden; transition: var(--transition);
}
.toc-overlay.open { opacity: 1; visibility: visible; }
.toc-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 340px; max-width: 85vw;
  background: var(--surface); z-index: 1101;
  transform: translateX(100%); transition: transform .3s ease;
  overflow-y: auto; padding: 20px;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
}
.toc-overlay.open .toc-sidebar { transform: translateX(0); }
.toc-sidebar h2 {
  font-size: 20px; margin-bottom: 16px; color: var(--primary-dark);
  display: flex; align-items: center; justify-content: space-between;
}
.toc-close {
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--text-secondary); padding: 4px;
}
.toc-close:hover { color: var(--text); }
.toc-module-title {
  font-size: 12px; font-weight: 700; color: var(--accent-dark);
  text-transform: uppercase; letter-spacing: .5px;
  margin: 18px 0 6px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.toc-module-title:first-of-type { border-top: none; margin-top: 0; }
.toc-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  text-decoration: none; color: var(--text); font-size: 14px;
  transition: var(--transition); line-height: 1.4;
}
.toc-link:hover { background: var(--primary-light); }
.toc-link.active { background: var(--primary); color: #fff; font-weight: 600; }
.toc-link .page-num {
  min-width: 24px; height: 24px; border-radius: 50%;
  background: var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-secondary); flex-shrink: 0;
}
.toc-link.active .page-num { background: rgba(255,255,255,.25); color: #fff; }
.toc-link.visited .page-num { background: var(--accent); color: #fff; }

/* ===== Main Content ===== */
main {
  margin-top: calc(var(--nav-h) + 4px);
  padding: 32px 20px 120px;
  max-width: var(--max-width);
  margin-left: auto; margin-right: auto;
}
.page { animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Typography ===== */
.page h1 {
  font-size: 2em; font-weight: 800; margin-bottom: 12px;
  color: var(--primary-dark); line-height: 1.3;
}
.page h2 {
  font-size: 1.5em; font-weight: 700; margin: 32px 0 12px;
  color: var(--text); border-right: 4px solid var(--primary);
  padding-right: 14px;
}
.page h3 {
  font-size: 1.2em; font-weight: 700; margin: 24px 0 8px; color: var(--text);
}
.page p { margin-bottom: 16px; }
.page ul, .page ol { margin: 0 24px 16px 0; }
.page li { margin-bottom: 8px; }
.page strong { color: var(--text); }
.page a { color: var(--primary); text-decoration: underline; }
.page a:hover { color: var(--primary-dark); }
.page .syllabus-link,
.page .nav-btn,
.page .cta-btn { text-decoration: none; }
.page .share-link { text-decoration: none; color: #fff; }
.page .share-link:hover { color: #fff; }
.page .share-link.copy-link { color: #fff; }

/* ===== Special Blocks ===== */
.info-box {
  background: var(--primary-light); border-right: 4px solid var(--primary);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0; font-size: 15px;
}
.info-box .box-title {
  font-weight: 700; color: var(--primary-dark); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.tip-box {
  background: #ecfdf5; border-right: 4px solid var(--accent);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0; font-size: 15px;
}
.tip-box .box-title {
  font-weight: 700; color: var(--accent-dark); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.warn-box {
  background: #fef3c7; border-right: 4px solid #f59e0b;
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0; font-size: 15px;
}
.warn-box .box-title {
  font-weight: 700; color: #92400e; margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.example-box {
  background: #f0f9ff; border-right: 4px solid #0ea5e9;
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0; font-size: 15px;
}
.example-box .box-title {
  font-weight: 700; color: #0369a1; margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.key-term {
  display: inline-block; background: var(--primary-light); color: var(--primary-dark);
  padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 15px;
}
.checklist { list-style: none; margin: 0 0 16px; }
.checklist li { padding: 6px 0; padding-right: 28px; position: relative; }
.checklist li::before {
  content: '☐'; position: absolute; right: 0; color: var(--primary);
  font-size: 18px;
}
.flow-diagram {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin: 24px 0; padding: 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.flow-step {
  background: var(--primary); color: #fff; padding: 10px 18px;
  border-radius: 8px; font-weight: 600; font-size: 14px; text-align: center;
}
.flow-arrow { font-size: 20px; color: var(--text-secondary); }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px; margin: 24px 0;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.stat-card .stat-num {
  font-size: 2em; font-weight: 800;
  background: linear-gradient(90deg, #05dbcf, #086AD8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat-card .stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.module-header {
  background: linear-gradient(135deg, #086AD8, #0555a8);
  color: #fff; padding: 24px 28px; border-radius: var(--radius);
  margin-bottom: 28px;
}
.module-header .module-num { font-size: 14px; opacity: .8; font-weight: 600; letter-spacing: 1px; }
.module-header h1 { color: #fff; margin: 4px 0 0; font-size: 1.8em; }
.milestone-header {
  background: linear-gradient(135deg, #05dbcf, #04b8a9);
  color: #fff; padding: 24px 28px; border-radius: var(--radius);
  margin-bottom: 28px;
}
.milestone-header .module-num { font-size: 14px; opacity: .8; font-weight: 600; letter-spacing: 1px; }
.milestone-header h1 { color: #fff; margin: 4px 0 0; font-size: 1.8em; }
table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  font-size: 15px;
}
th, td {
  padding: 10px 14px; border: 1px solid var(--border);
  text-align: right;
}
th { background: var(--primary-light); font-weight: 700; color: var(--primary-dark); }
tr:nth-child(even) { background: #f8fafc; }

/* ===== Cover Page ===== */
.cover {
  text-align: center; padding: 60px 20px;
}
.cover .cover-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-light); color: var(--primary-dark);
  padding: 8px 20px; border-radius: 50px; font-size: 13px;
  font-weight: 600; margin-bottom: 24px; letter-spacing: .3px;
}
.cover .cover-badge .badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.cover h1 {
  font-size: 2.6em; color: var(--text); margin-bottom: 12px; font-weight: 800;
}
.cover h1 span {
  background: linear-gradient(90deg, #05dbcf, #086AD8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cover .subtitle {
  font-size: 1.15em; color: var(--text-secondary); margin-bottom: 32px;
  max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.8;
}
.cover .cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  padding: 14px 36px; border-radius: 50px; font-size: 17px;
  font-weight: 700; text-decoration: none; transition: var(--transition);
  box-shadow: 0 4px 14px rgba(8,106,216,.35);
}
.cover .cta-btn:hover {
  background: var(--primary-dark); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8,106,216,.45); color: #fff;
}
.cover .cta-btn svg { transition: transform .2s ease; }
.cover .cta-btn:hover svg { transform: translateX(-3px); }
.cover .course-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 24px;
  margin-top: 40px; font-size: 14px; color: var(--text-secondary);
}
.cover .course-meta div { display: flex; align-items: center; gap: 6px; }

/* ===== Bottom Navigation ===== */
.page-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.nav-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 12px 20px; border-radius: var(--radius);
  cursor: pointer; font-size: 15px; font-weight: 600;
  color: var(--text); transition: var(--transition);
  text-decoration: none; max-width: 45%;
}
.nav-btn:hover {
  border-color: var(--primary); color: var(--primary);
  box-shadow: var(--shadow);
}
.nav-btn.primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.nav-btn.primary:hover {
  background: var(--primary-dark); border-color: var(--primary-dark); color: #fff;
}
.nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.nav-btn .nav-arrow { font-size: 18px; line-height: 1; flex-shrink: 0; }
.page-indicator {
  font-size: 13px; color: var(--text-secondary); font-weight: 600;
}

/* ===== Course Footer ===== */
.course-footer {
  background: #0a1628; margin-top: 60px;
  padding: 28px 20px; text-align: center;
}
.course-footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.course-footer .footer-course-link {
  color: #05dbcf; text-decoration: none; font-weight: 600; font-size: 15px;
  transition: opacity .2s;
}
.course-footer .footer-course-link:hover { opacity: .8; }
.course-footer .footer-text {
  color: rgba(255,255,255,.5); font-size: 14px;
}
.course-footer .footer-brand-link {
  display: inline-flex; align-items: center; transition: opacity .2s;
}
.course-footer .footer-brand-link:hover { opacity: .8; }
.course-footer .footer-logo { height: 22px; width: auto; }
.course-footer .footer-copyright {
  font-size: 11px; color: rgba(255,255,255,.3); text-align: center;
  margin: 14px 20px 0; line-height: 1.6;
}

/* ===== Social Share Bar ===== */
.share-bar {
  display: flex; align-items: center; gap: 10px;
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-bar-label {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-inline-end: 4px;
}
.share-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  color: #fff; font-size: 15px;
  transition: var(--transition); text-decoration: none;
  position: relative;
}
.share-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #fff; }
.share-link.whatsapp { background: #25D366; }
.share-link.telegram { background: #0088cc; }
.share-link.facebook { background: #1877F2; }
.share-link.twitter, .share-link.x { background: #0f1419; }
.share-link.linkedin { background: #0A66C2; }
.share-link.copy-link { background: var(--text-secondary); cursor: pointer; }
.share-link.copy-link.copied { background: var(--accent); }
.share-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.share-tooltip.show { opacity: 1; }
[data-theme="dark"] .share-link.twitter, [data-theme="dark"] .share-link.x { background: #536471; }
[data-theme="dark"] .share-link.copy-link { background: #475569; }

/* ===== Syllabus / Content TOC (index page) ===== */
.syllabus { margin-top: 24px; }
.syllabus-module {
  font-size: 1.05em; font-weight: 700; color: var(--text);
  margin: 28px 0 12px; padding: 10px 16px;
  background: var(--primary-light); border-radius: 8px;
  border-right: 4px solid var(--primary);
  display: flex; align-items: center; gap: 8px;
}
.syllabus-module.action-plan {
  background: #e6faf8; border-right-color: var(--accent);
}
.syllabus-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; text-decoration: none;
  color: var(--text); font-size: 15px; font-weight: 500;
  border-radius: 8px; transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.syllabus-link:last-child { border-bottom: none; }
.syllabus-link:hover {
  background: var(--primary-light); color: var(--primary-dark); transform: translateX(-4px);
}
.syllabus-link .ch-num {
  min-width: 30px; height: 30px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--primary); flex-shrink: 0;
}
.syllabus-link:hover .ch-num {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cover h1 { font-size: 1.8em; }
  .cover .cover-icon { font-size: 56px; }
  .page h1 { font-size: 1.6em; }
  .page h2 { font-size: 1.25em; }
  .module-header, .milestone-header { padding: 18px 20px; }
  .module-header h1, .milestone-header h1 { font-size: 1.4em; }
  .toc-sidebar { width: 300px; }
  .nav-btn { padding: 10px 14px; font-size: 14px; }
  main { padding: 24px 16px 100px; }
  .flow-diagram { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --primary: #4da6ff; --primary-dark: #2b8de8; --primary-light: #0d2847;
  --accent: #05dbcf; --accent-dark: #04b8a9;
  --bg: #0f172a; --surface: #1e293b;
  --text: #f1f5f9; --text-secondary: #94a3b8; --border: #334155;
}
[data-theme="dark"] tr:nth-child(even) { background: #1a2740; }
[data-theme="dark"] th { background: #0d2847; }
[data-theme="dark"] .warn-box { background: #451a03; }
[data-theme="dark"] .tip-box { background: #064e3b; }
[data-theme="dark"] .example-box { background: #0c2340; }
[data-theme="dark"] .nav-btn { background: var(--surface); }
[data-theme="dark"] .flow-diagram { background: var(--surface); }
[data-theme="dark"] .syllabus-module { background: #0d2847; color: #e8f1fd; }
[data-theme="dark"] .syllabus-module.action-plan { background: #0a2d2b; color: #b8f0eb; }
[data-theme="dark"] .syllabus-link .ch-num { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .course-footer { background: #070e1a; }
[data-theme="dark"] .stat-card { background: var(--surface); border-color: var(--border); }

/* ===== FONT SIZE ===== */
body.text-sm { font-size: 15px; }
body.text-lg { font-size: 19px; }
body.text-xl { font-size: 21px; }

/* ===== NAV ICON BUTTONS ===== */
.nav-icon-btn {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; color: rgba(255,255,255,.65);
  transition: var(--transition); flex-shrink: 0;
}
.nav-icon-btn:hover { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.25); }
.reading-time {
  font-size: 12px; color: rgba(255,255,255,.5); font-weight: 500;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
@media (max-width: 600px) {
  .reading-time, .nav-icon-btn { display: none; }
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1200;
  opacity: 0; visibility: hidden; transition: var(--transition);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 80px;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-box {
  background: var(--surface); border-radius: var(--radius);
  width: 100%; max-width: 560px; margin: 0 16px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.search-input-wrap input {
  flex: 1; border: none; outline: none; font-size: 17px;
  background: transparent; color: var(--text); font-family: inherit; text-align: right;
}
.search-input-wrap input::placeholder { color: var(--text-secondary); }
.search-close-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-secondary); padding: 4px; }
#searchResults { max-height: 360px; overflow-y: auto; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primary-light); }
.search-result-num {
  min-width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.search-result-title { font-size: 14px; font-weight: 600; }
.search-result-module { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.search-no-results { padding: 32px; text-align: center; color: var(--text-secondary); }

/* ===== GLOSSARY OVERLAY ===== */
.glossary-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1200;
  opacity: 0; visibility: hidden; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.glossary-overlay.open { opacity: 1; visibility: visible; }
.glossary-box {
  background: var(--surface); border-radius: var(--radius);
  width: 100%; max-width: 640px; max-height: 82vh;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.glossary-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.glossary-header h3 { font-size: 17px; color: var(--primary-dark); margin: 0; }
.glossary-content { overflow-y: auto; padding: 8px 20px 20px; }
.glossary-term {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); align-items: start;
}
.glossary-term:last-child { border-bottom: none; }
.glossary-term .term-name { font-weight: 700; color: var(--primary-dark); font-size: 14px; }
.glossary-term .term-def { font-size: 14px; line-height: 1.6; color: var(--text); }

/* ===== CROSS-REFERENCE BOX ===== */
.xref-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-right: 3px solid var(--primary); border-radius: 0 8px 8px 0;
  padding: 9px 14px; margin: 16px 0;
  font-size: 14px; cursor: pointer; transition: var(--transition);
}
.xref-box:hover { background: var(--primary-light); }
.xref-box strong { color: var(--primary-dark); }
.xref-box span { color: var(--text-secondary); font-size: 13px; }

/* ===== COMPLETION CERTIFICATE ===== */
.cert-trigger {
  display: none; text-align: center; padding: 32px 20px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: var(--radius); border: 2px solid #f59e0b; margin-top: 40px;
}
.cert-trigger.visible { display: block; }
.cert-trigger h2 { color: #92400e; font-size: 1.5em; margin-bottom: 10px; }
.cert-trigger p { color: #78350f; margin-bottom: 14px; }
.cert-name-input {
  border: 2px solid #f59e0b; border-radius: 8px; padding: 10px 16px;
  font-size: 16px; font-family: inherit; text-align: center;
  background: #fff; color: #1e293b; width: 100%; max-width: 300px;
  margin-bottom: 16px; display: block; margin-inline: auto;
}
.cert-print-btn {
  background: #f59e0b; color: #fff; border: none; border-radius: 8px;
  padding: 10px 28px; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: var(--transition);
}
.cert-print-btn:hover { background: #d97706; }

/* ===== PRINT ===== */
@media print {
  .top-nav, .progress-wrap, .toc-overlay, .search-overlay, .glossary-overlay,
  .page-nav, .nav-controls, .cert-trigger, .share-bar, .course-footer { display: none !important; }
  .page { display: block !important; page-break-after: always; }
  main { margin-top: 0; padding: 20px; max-width: 100%; }
  body { font-size: 12pt; background: #fff; }
  .module-header, .milestone-header,
  .info-box, .tip-box, .warn-box, .example-box {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}
