/* ===================================================================
   Handbook Human Resource, Tempat Belajar
   Design system: palet hijau (#043e0a / #066e0a), font Manrope
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --primary-dark: #043e0a;
  --primary-green: #066e0a;
  --tint-light: #e8f3e6;
  --tint-mid: #b9d9b4;
  --paper: #faf8f3;
  --paper-alt: #f2efe6;
  --text-body: #1c2b1c;
  --text-muted: #4b5c4b;
  --border-soft: #d9e6d6;
  --code-bg: #0d2410;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --sidebar-width: 300px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--text-body);
  line-height: 1.7;
}

a {
  color: var(--primary-green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Layout shell ---------- */
.app {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--primary-dark);
  color: var(--paper);
  padding: 24px 0 60px;
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  display: block;
  padding: 0 24px 20px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 12px;
}

.sidebar-brand span {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--tint-mid);
  margin-top: 2px;
}

.sidebar-brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.nav-section {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-section-title {
  cursor: pointer;
  list-style: none;
  padding: 12px 24px;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tint-mid);
  opacity: 0.85;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-section-title::-webkit-details-marker {
  display: none;
}

.nav-section-title::after {
  content: '›';
  transform: rotate(90deg);
  transition: transform 0.15s ease;
  font-size: 0.95rem;
  opacity: 0.8;
}

.nav-section[open]>.nav-section-title::after {
  transform: rotate(270deg);
}

.nav-section-title:hover {
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
}

.nav-section-standalone {
  padding-top: 4px;
  margin-top: 4px;
}

.sidebar nav a.bab-link {
  display: block;
  padding: 8px 24px;
  font-size: 0.86rem;
  color: var(--tint-mid);
  border-left: 3px solid transparent;
}

.sidebar nav a.bab-link.active {
  color: #fff;
  background: var(--primary-green);
  border-left-color: #fff;
  font-weight: 700;
}

.nav-section-standalone a.bab-link {
  font-weight: 700;
  color: #eafbe8;
  padding: 12px 24px;
}

.nav-section-standalone a.bab-link.active {
  color: #fff;
}

.sidebar nav a.bab-link:hover {
  color: #fff;
  text-decoration: none;
}

.sidebar-toggle {
  display: none;
}

/* ---------- Main content ---------- */
.main {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 40px 100px;
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

h1 {
  font-weight: 800;
  font-size: 2.1rem;
  color: var(--primary-dark);
  margin: 0 0 28px;
  line-height: 1.25;
}

h2 {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin: 44px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tint-light);
}

h3 {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin: 30px 0 12px;
}

p {
  margin: 0 0 16px;
}

strong {
  color: var(--primary-dark);
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  vertical-align: top;
}

th {
  background: var(--tint-light);
  color: var(--primary-dark);
  font-weight: 700;
}

tr:nth-child(even) td {
  background: rgba(232, 243, 230, 0.35);
}

/* Mobile: stacked card tables */
@media (max-width: 640px) {

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  table {
    border: none;
    margin: 16px 0;
  }

  tr {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 8px 0;
    background: #fff;
  }

  td {
    border: none;
    padding: 6px 14px;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
  }
}

/* ---------- Callout boxes ---------- */
.box {
  border-radius: 12px;
  padding: 18px 22px;
  margin: 22px 0;
  border-left: 4px solid var(--primary-green);
  background: var(--tint-light);
}

.box-title {
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
  display: block;
}

.box.tahukah {
  border-left-color: var(--primary-green);
}

.box.tips {
  border-left-color: #b8860b;
  background: #faf3e2;
}

.box.tips .box-title {
  color: #8a6607;
}

.box.studycase {
  border-left-color: var(--primary-dark);
  background: #eef4ec;
}

.box.insight {
  background: var(--primary-dark);
  color: var(--paper);
  border-left: none;
  border-radius: 14px;
}

.box.insight .box-title {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.box-title svg {
  flex-shrink: 0;
}

/* ---------- Skills / Competency Cards ---------- */
.skills-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 28px 0;
}

.skill-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.skill-card-header {
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.skill-card.hard-skills .skill-card-header {
  background: var(--tint-light);
  color: var(--primary-dark);
  border: 1px solid var(--tint-mid);
}

.skill-card.soft-skills .skill-card-header {
  background: #b8860b;
  color: #fff;
}

.skill-card.solid-green .skill-card-header {
  background: var(--primary-green);
  color: #fff;
}

.skill-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-card-list li {
  padding: 9px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  font-size: 0.88rem;
  color: var(--text-body);
  font-weight: 600;
  display: flex;
  align-items: center;
}

.skill-card-list li:last-child {
  margin-bottom: 0;
}

@media (max-width: 680px) {
  .skills-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ---------- Visual / diagram frame ---------- */
.visual {
  margin: 28px 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  text-align: center;
}

.visual svg {
  max-width: 100%;
  height: auto;
}

.visual svg .th {
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  fill: currentColor;
}

.visual svg .ts {
  font-family: var(--font);
  font-weight: 500;
  font-size: 11.5px;
  fill: currentColor;
}

/* palette-mapped node classes used inside diagrams */
.visual svg .c-green rect,
.visual svg .c-green polygon {
  fill: var(--primary-green);
  stroke: var(--primary-dark);
  color: #fff;
}

.visual svg .c-teal rect,
.visual svg .c-teal polygon {
  fill: var(--tint-light);
  stroke: var(--primary-green);
  color: var(--primary-dark);
}

.visual svg .c-coral rect,
.visual svg .c-coral polygon {
  fill: #b8860b;
  stroke: #8a6607;
  color: #fff;
}

.visual svg .c-gray rect,
.visual svg .c-gray polygon {
  fill: #eee;
  stroke: #999;
  color: #333;
}

.visual svg .box rect {
  fill: #fff;
  stroke: var(--border-soft);
  color: var(--text-body);
}

.visual svg line,
.visual svg path.arr {
  stroke: var(--primary-green);
}

/* ---------- Code ---------- */
pre {
  background: var(--code-bg);
  color: #d9f2d6;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  margin: 20px 0;
}

code {
  font-family: 'Fira Code', monospace;
  background: var(--tint-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

pre code {
  background: none;
  padding: 0;
}

/* ---------- Learning objectives ---------- */
.objectives {
  background: var(--paper-alt);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 0 0 32px;
  border: 1px solid var(--border-soft);
}

.objectives h3 {
  margin-top: 0;
}

/* ---------- Footer nav within page (none per spec) ---------- */
.emoji {
  font-size: 1.1em;
}

/* ---------- Hamburger for mobile ---------- */
.mobile-topbar {
  display: none;
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 40;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-brand {
    padding-left: 68px;
  }

  .mobile-topbar {
    display: block;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 50;
    background: transparent;
    padding: 0;
    pointer-events: none;
  }

  .mobile-topbar strong {
    display: none;
  }

  .hamburger {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary-dark);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  }

  .hamburger:hover {
    background: var(--primary-green);
  }

  .hamburger:active {
    transform: scale(0.94);
  }

  .hamburger.is-open {
    background: var(--primary-dark);
    border-color: rgba(255, 255, 255, 0.25);
  }

  .main {
    padding: 72px 20px 80px;
  }

  h1 {
    font-size: 1.6rem;
  }
}
/* ===================== PASSWORD GATE ===================== */
html.hb-locked, html.hb-locked body{ overflow:hidden; height:100%; }
html.hb-locked .app, html.hb-locked .mobile-topbar{
  filter: blur(10px) saturate(0.9);
  pointer-events: none;
  user-select: none;
  transition: filter .2s ease;
}
#hb-auth-overlay{
  position:fixed; inset:0; z-index:9999;
  display:none;
  align-items:center; justify-content:center;
  background: rgba(4,62,10,0.6);
  backdrop-filter: blur(3px);
  padding: 20px;
}
html.hb-locked #hb-auth-overlay{ display:flex; }
#hb-auth-card{
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 34px 30px 28px;
  width: min(360px, 100%);
  box-shadow: 0 20px 60px rgba(4,62,10,0.35);
  text-align: center;
  font-family: var(--font);
  animation: hb-pop .18s ease;
}
@keyframes hb-pop{ from{ opacity:0; transform:translateY(6px) scale(.98); } to{ opacity:1; transform:translateY(0) scale(1); } }
#hb-auth-mark{
  width:44px; height:44px; border-radius:12px; margin:0 auto 16px;
  background:linear-gradient(135deg, #043e0a, #066e0a);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-family: var(--font); font-weight:800; font-size:18px;
  box-shadow: 0 4px 12px rgba(4,62,10,0.25);
}
#hb-auth-card h2{
  font-family: var(--font); font-weight:700; font-size:18px;
  color: var(--text-body); margin: 0 0 6px;
}
#hb-auth-card p{
  font-size: 13.5px; color: var(--text-muted); margin: 0 0 20px; line-height:1.5;
}
#hb-auth-form{ display:flex; flex-direction:column; gap:10px; }
#hb-auth-input{
  width:100%; padding:11px 14px; border-radius:9px;
  border:1.5px solid var(--border-soft); background:var(--paper-alt);
  font-family: var(--font); font-size:14.5px; color:var(--text-body);
  outline:none; text-align:center; letter-spacing:.03em;
  transition: border-color .15s ease;
}
#hb-auth-input:focus{ border-color: var(--primary-green); }
#hb-auth-submit{
  width:100%; padding:11px 14px; border-radius:9px; border:none; cursor:pointer;
  background: var(--primary-green); color:#fff;
  font-family: var(--font); font-weight:700; font-size:14px;
  transition: background .15s ease, transform .1s ease;
}
#hb-auth-submit:hover{ background: var(--primary-dark); }
#hb-auth-submit:active{ transform: scale(.98); }
#hb-auth-error{
  font-size:12.5px; color:#B91C1C; min-height:16px; margin-top:2px;
  font-family: var(--font); font-weight:600;
}
