/* Base: layout & tema dari repo SDLC asli (biru + cream) + tambahan dokumen/glossary */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

:root {
  --blue-900: #0f172a;
  --blue-800: #1e3a5f;
  --blue-700: #1e40af;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --cream: #fef9ef;
  --cream-dark: #f5e6c8;
  --cream-light: #fffdf8;
  --text: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --success: #059669;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(30, 58, 95, 0.08);
  --shadow-lg: 0 10px 40px rgba(30, 58, 95, 0.12);
  --transition: 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--blue-800);
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Navbar — sama pola asli */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--blue-800);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nav-container {
  max-width: 1100px; margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--cream); text-decoration: none;
  font-weight: 700; font-size: 1.1rem; font-family: 'Poppins', sans-serif;
}
.nav-logo small { font-weight: 500; opacity: 0.8; font-size: 0.75rem; margin-left: 0.35rem; }
.nav-menu {
  display: flex; list-style: none; gap: 0.2rem; flex-wrap: nowrap;
  align-items: center; margin-left: auto;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: min(100%, 72vw);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox: hide bar */
  height: 40px;
}
.nav-menu::-webkit-scrollbar { display: none; height: 0; width: 0; }
.nav-menu li { flex-shrink: 0; display: flex; align-items: center; }
.nav-link {
  color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 0.5rem 0.85rem; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500; transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.15); color: var(--cream);
}
.nav-link.home-link {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
}
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 2.5px; background: var(--cream); border-radius: 2px;
}

.section { padding: 2.5rem 0; }
.section-alt { background: var(--cream-light); }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.85rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); max-width: 620px; margin: 0 auto; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-700) 50%, #1e3a8a 100%);
  color: var(--cream); padding: 4.5rem 0 3.5rem;
}
.hero h1 { color: var(--cream); font-size: 2.35rem; margin-bottom: 1rem; }
.hero .highlight { color: #93c5fd; }
.hero-subtitle { font-size: 1.08rem; opacity: 0.92; max-width: 580px; margin-bottom: 1.75rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2.75rem; }
.hero-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-card {
  background: rgba(255,255,255,0.1); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius);
  padding: 1.25rem; text-align: center;
}
.stat-number { font-size: 1.75rem; font-weight: 700; font-family: 'Poppins', sans-serif; color: #93c5fd; }
.stat-label { font-size: 0.85rem; opacity: 0.85; margin-top: 0.25rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.65rem 1.35rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  border: none; cursor: pointer; text-decoration: none; transition: var(--transition);
  font-family: inherit;
}
.btn-primary { background: var(--blue-600); color: white; }
.btn-primary:hover { background: var(--blue-500); transform: translateY(-1px); }
.btn-secondary { background: var(--cream); color: var(--blue-800); }
.btn-secondary:hover { background: var(--cream-dark); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

/* Timeline tahapan */
.timeline {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 2rem;
}
.timeline-item {
  background: var(--white); border: 2px solid var(--blue-100); border-radius: var(--radius);
  padding: 1rem 1.25rem; cursor: pointer; transition: var(--transition);
  text-align: center; min-width: 128px; box-shadow: var(--shadow);
}
.timeline-item:hover, .timeline-item.active {
  border-color: var(--blue-600); background: var(--blue-50);
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
}
.timeline-item .num {
  display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  background: var(--blue-600); color: white; border-radius: 50%;
  font-size: 0.8rem; font-weight: 700; margin-bottom: 0.4rem;
}
.timeline-item .title { font-weight: 600; font-size: 0.9rem; color: var(--blue-800); }

.stage-detail {
  background: var(--white); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow); border-left: 4px solid var(--blue-600);
}
.stage-detail h3 { margin-bottom: 0.75rem; color: var(--blue-700); }
.stage-detail .placeholder { color: var(--text-muted); text-align: center; padding: 1.5rem; }
.stage-detail ul { margin: 0.75rem 0 0 1.25rem; }
.stage-detail li { margin-bottom: 0.4rem; }
.mind-box {
  background: var(--blue-50); border-left: 3px solid var(--blue-600);
  padding: 0.85rem 1rem; margin: 1rem 0; border-radius: 0 8px 8px 0; font-size: 0.95rem;
}
.tag {
  display: inline-block; background: var(--blue-100); color: var(--blue-700);
  padding: 0.15rem 0.55rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; margin-right: 0.35rem;
}

/* Roles */
.roles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem;
}
.role-card {
  background: var(--white); border: 2px solid var(--blue-100); border-radius: var(--radius);
  padding: 1.25rem; cursor: pointer; transition: var(--transition); box-shadow: var(--shadow); text-align: center;
}
.role-card:hover, .role-card.active {
  border-color: var(--blue-600); background: var(--blue-50); transform: translateY(-2px);
}
.role-card .role-icon { font-size: 1.75rem; margin-bottom: 0.4rem; }
.role-card h3 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.role-card p { font-size: 0.8rem; color: var(--text-muted); }
.role-detail {
  background: var(--white); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow); border-left: 4px solid var(--blue-600); display: none;
}
.role-detail h3 { margin-bottom: 0.5rem; }
.interview-q {
  background: var(--cream-light); border-radius: 8px; padding: 0.9rem 1rem; margin-bottom: 0.65rem;
  border: 1px solid var(--cream-dark);
}
.interview-q .q { font-weight: 600; margin-bottom: 0.35rem; color: var(--blue-800); }
.interview-q .a { font-size: 0.92rem; color: var(--text); }

/* Tasks checklist style */
.task-stage {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 1rem; overflow: hidden;
}
.task-stage-header {
  background: var(--blue-50); padding: 0.85rem 1.25rem; font-weight: 600; color: var(--blue-800);
  border-bottom: 1px solid var(--blue-100);
}
.task-list { list-style: none; padding: 0.75rem 1.25rem 1rem; }
.task-list li {
  padding: 0.45rem 0 0.45rem 1.6rem; position: relative;
  border-bottom: 1px solid var(--cream-dark); font-size: 0.92rem;
}
.task-list li:last-child { border-bottom: none; }
.task-list li::before {
  content: "☐"; position: absolute; left: 0; color: var(--blue-600);
}

/* Doc library */
.doc-library {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.85rem;
}
.doc-card {
  background: var(--white); border-radius: var(--radius); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow); border: 1px solid var(--blue-100); transition: var(--transition);
}
.doc-card:hover { border-color: var(--blue-500); box-shadow: var(--shadow-lg); }
.doc-card .stage-tag {
  display: inline-block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--blue-600); font-weight: 700; margin-bottom: 0.35rem;
}
.doc-card a {
  color: var(--blue-700); font-weight: 600; text-decoration: none; font-size: 0.95rem;
}
.doc-card a:hover { text-decoration: underline; }
.doc-card .desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.35rem; }

/* Quiz */
.quiz-box {
  background: var(--white); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow); max-width: 640px; margin: 0 auto;
}
.quiz-progress { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.quiz-question { font-weight: 600; font-size: 1.05rem; margin-bottom: 1rem; color: var(--blue-800); }
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-opt {
  text-align: left; padding: 0.85rem 1rem; border-radius: 8px;
  border: 2px solid var(--blue-100); background: var(--white); cursor: pointer;
  font-family: inherit; font-size: 0.95rem; transition: var(--transition); color: var(--text);
}
.quiz-opt:hover:not(:disabled) { border-color: var(--blue-400); background: var(--blue-50); }
.quiz-opt.correct { border-color: var(--success); background: #ecfdf5; }
.quiz-opt.wrong { border-color: var(--danger); background: #fef2f2; }
.quiz-feedback {
  margin-top: 1rem; padding: 0.85rem; border-radius: 8px; font-weight: 500;
}
.quiz-feedback.ok { background: #ecfdf5; color: var(--success); }
.quiz-feedback.bad { background: #fef2f2; color: var(--danger); }
.quiz-result { text-align: center; padding: 1rem 0; }
.score-circle {
  width: 120px; height: 120px; border-radius: 50%; background: var(--blue-50);
  border: 6px solid var(--blue-600); display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: var(--blue-700); margin: 1rem auto;
  font-family: 'Poppins', sans-serif;
}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--white); border-radius: var(--radius); margin-bottom: 0.75rem;
  box-shadow: var(--shadow); overflow: hidden;
}
.faq-question {
  width: 100%; text-align: left; padding: 1.1rem 1.25rem; background: none; border: none;
  font-family: inherit; font-size: 1rem; font-weight: 600; color: var(--blue-800);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-question:hover { background: var(--blue-50); }
.faq-question .icon { transition: transform 0.25s; color: var(--blue-600); }
.faq-item.open .faq-question .icon { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner {
  padding: 0 1.25rem 1.25rem; color: var(--text);
  border-top: 1px solid var(--cream-dark); padding-top: 1rem;
}

/* Glossary grid */
.glossary-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem;
}
.glossary-chip {
  text-align: left; padding: 0.55rem 0.85rem; border-radius: 8px;
  border: 1px solid var(--blue-100); background: var(--white); color: var(--blue-800);
  cursor: pointer; font-size: 0.85rem; font-family: inherit; font-weight: 500;
  box-shadow: var(--shadow); transition: var(--transition);
}
.glossary-chip:hover { border-color: var(--blue-600); background: var(--blue-50); }

/* Callout howto */
.callout {
  background: var(--white); border-radius: var(--radius); padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow); border-left: 4px solid var(--blue-600); margin-bottom: 0;
}
.callout h3 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.callout ol { margin-left: 1.2rem; }
.callout li { margin-bottom: 0.4rem; }

/* Term links */
a.term-link, .stage-detail a[data-doc] {
  color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px;
  font-weight: 500; cursor: pointer;
}
a.term-link:hover, .stage-detail a[data-doc]:hover { color: var(--blue-800); }

/* Modal */
.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-content {
  background: var(--white); border-radius: var(--radius); width: 100%; max-width: 480px;
  max-height: 85vh; overflow: auto; padding: 1.5rem; position: relative; box-shadow: var(--shadow-lg);
}
.modal-content.wide { max-width: 760px; }
.modal-close {
  position: absolute; top: 0.6rem; right: 0.85rem; background: none; border: none;
  font-size: 1.4rem; cursor: pointer; color: var(--text-muted);
}
.modal-title { margin: 0 1.5rem 0.75rem 0; color: var(--blue-800); }
.modal-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.modal-header-row .modal-title { margin: 0; }
.doc-preview {
  font-family: ui-monospace, monospace; font-size: 0.8rem; white-space: pre-wrap;
  background: var(--cream-light); padding: 1rem; border-radius: 8px;
  max-height: 55vh; overflow: auto; border: 1px solid var(--cream-dark);
}

.site-footer {
  background: var(--blue-800); color: rgba(255,255,255,0.85);
  text-align: center; padding: 1.5rem; font-size: 0.9rem;
}
.site-footer a { color: #93c5fd; }

@media (max-width: 768px) {
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--blue-800); flex-direction: column; padding: 0.75rem;
  }
  .nav-menu.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-cards { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.75rem; }
}

/* ===== Pratinjau dokumen (Markdown → HTML) ===== */
.doc-preview-rich {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: normal;
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 40%);
  border: 1px solid var(--cream-dark);
  color: var(--text);
  padding: 1.25rem 1.35rem;
  max-height: 60vh;
  overflow: auto;
  border-radius: 10px;
}
.doc-preview-rich .md-h {
  color: var(--blue-800);
  margin: 1.1rem 0 0.5rem;
  line-height: 1.3;
  font-family: 'Poppins', sans-serif;
}
.doc-preview-rich h1.md-h { font-size: 1.35rem; border-bottom: 2px solid var(--blue-100); padding-bottom: 0.4rem; }
.doc-preview-rich h2.md-h { font-size: 1.15rem; color: var(--blue-700); }
.doc-preview-rich h3.md-h { font-size: 1.02rem; }
.doc-preview-rich .md-p { margin: 0.5rem 0 0.65rem; }
.doc-preview-rich .md-ul,
.doc-preview-rich .md-ol { margin: 0.4rem 0 0.8rem 1.25rem; }
.doc-preview-rich .md-ul li,
.doc-preview-rich .md-ol li { margin-bottom: 0.3rem; }
.doc-preview-rich .md-hr {
  border: none; border-top: 1px solid var(--cream-dark); margin: 1.1rem 0;
}
.doc-preview-rich .md-table {
  width: 100%; border-collapse: collapse; margin: 0.75rem 0 1rem;
  font-size: 0.85rem; background: var(--white);
  box-shadow: var(--shadow); border-radius: 8px; overflow: hidden;
}
.doc-preview-rich .md-table th {
  background: var(--blue-50); color: var(--blue-800);
  text-align: left; padding: 0.55rem 0.7rem; font-weight: 600;
  border-bottom: 2px solid var(--blue-100);
}
.doc-preview-rich .md-table td {
  padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--cream-dark);
  vertical-align: top;
}
.doc-preview-rich .md-table tr:last-child td { border-bottom: none; }
.doc-preview-rich .md-code {
  background: #0f172a; color: #e2e8f0; padding: 0.85rem 1rem;
  border-radius: 8px; overflow-x: auto; font-size: 0.8rem; margin: 0.75rem 0;
}
.doc-preview-rich .md-inline-code {
  background: var(--blue-50); color: var(--blue-700);
  padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85em;
  font-family: ui-monospace, monospace;
}
.doc-preview-rich strong { color: var(--blue-900); }
.doc-preview-rich a { color: var(--blue-600); }

/* Modal dokumen sedikit lebih lega */
#docModal .modal-content.wide {
  max-width: 820px;
}


/* ===== Izinkan salin teks pelajaran (override anti-select visual) ===== */
main.allow-copy,
.allow-copy,
.doc-preview-rich,
.guide-narrow,
.stage-detail,
.article-body,
.article-card .full,
pre, code, .code-block {
  -webkit-user-select: text !important;
  user-select: text !important;
}
