/* =========================================================
   Buku Manual
   ========================================================= */

.manual {
  width: min(860px, 100%);
  margin-inline: auto;
}

.manual-cover {
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(124, 108, 246, 0.5), transparent 60%),
    radial-gradient(120% 140% at 85% 100%, rgba(244, 114, 182, 0.4), transparent 60%),
    #1c1746;
  color: #fff;
  padding: 64px 28px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lift);
}

.manual-cover-inner {
  max-width: 560px;
  margin-inline: auto;
}

.manual-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 14px;
  font-weight: 700;
}

.manual-cover h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 1.8rem + 2.4vw, 3.2rem);
  margin: 0 0 12px;
  color: #fff;
}

.manual-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 24px;
}

.manual-meta {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.66);
}

.manual-section {
  margin-bottom: 48px;
  scroll-margin-top: 90px;
}

.manual-section h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--violet-100);
  margin-bottom: 18px;
}

.manual-section h3 {
  font-size: 1.02rem;
  margin: 22px 0 8px;
  color: var(--violet-700);
}

.manual-section p,
.manual-body p {
  color: var(--ink-700);
  font-size: 0.94rem;
}

.manual-body {
  color: var(--ink-700);
  font-size: 0.94rem;
  line-height: 1.75;
  white-space: normal;
}

.manual-body br + br,
.manual-body p {
  margin-bottom: 0.6em;
}

.manual-table {
  margin: 14px 0 20px;
}

.manual-table th,
.manual-table td {
  font-size: 0.88rem;
}

.manual-list {
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--ink-700);
  font-size: 0.92rem;
}

.manual-toc {
  counter-reset: toc;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}

.manual-toc li {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.manual-toc a {
  color: var(--violet-700);
  font-weight: 600;
  font-size: 0.92rem;
}

.manual-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
  counter-reset: step;
}

.manual-steps > li {
  counter-increment: step;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  position: relative;
  padding-left: 64px;
}

.manual-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet-600), var(--blue-500));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.manual-steps h3 {
  margin: 0 0 8px;
}

.manual-steps .manual-body {
  white-space: pre-line;
}

.manual-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0 16px;
}

.manual-colophon {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--ink-500);
  font-size: 0.82rem;
  text-align: center;
}

@media print {
  .public-header,
  .public-footer,
  .manual-actions,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .manual-cover {
    background: #1c1746 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .manual-section {
    break-inside: avoid-page;
  }

  .manual-steps > li {
    break-inside: avoid;
  }

  .aurora-bg {
    display: none;
  }
}

/* Animasi manual */
html.anim-ready .manual-section {
  opacity: 0;
  animation: pn-fade-up 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.anim-ready .manual-section:nth-of-type(1) { animation-delay: 80ms; }
html.anim-ready .manual-section:nth-of-type(2) { animation-delay: 140ms; }
html.anim-ready .manual-section:nth-of-type(3) { animation-delay: 200ms; }
html.anim-ready .manual-section:nth-of-type(n+4) { animation-delay: 260ms; }

@media print {
  .manual-section { opacity: 1 !important; animation: none !important; }
}

/* =========================================================
   Panduan bergambar
   ========================================================= */

.manual-callout {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--violet-600);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--violet-100);
  color: var(--ink-700);
  font-size: 0.9rem;
  line-height: 1.55;
}

.manual-callout strong {
  color: var(--violet-700);
}

.manual-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  margin: 20px 0 8px;
}

.manual-flow-step {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.manual-flow-step span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-600), var(--blue-500));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.manual-flow-step strong {
  font-size: 0.9rem;
}

.manual-flow-step small {
  color: var(--ink-500);
  font-size: 0.76rem;
  line-height: 1.35;
}

.manual-flow-arrow {
  display: none;
}

.manual-figure {
  margin: 18px 0 0;
}

.manual-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.manual-figure figcaption {
  margin-top: 8px;
  color: var(--ink-500);
  font-size: 0.8rem;
  line-height: 1.45;
}

.manual-figure--portrait img {
  width: min(100%, 430px);
  margin: 0 auto;
}

.manual-figure--narrow img {
  width: min(100%, 680px);
  margin: 0 auto;
}

.manual-illustrated .manual-steps > li {
  padding-left: 64px;
}

.manual-illustrated .manual-body {
  white-space: normal;
}

@media (max-width: 640px) {
  .manual-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-illustrated .manual-steps > li {
    padding-left: 52px;
  }
}

@media print {
  .manual-illustrated .manual-section {
    break-before: page;
    break-inside: auto;
  }

  .manual-illustrated .manual-section:first-of-type {
    break-before: auto;
  }

  .manual-figure,
  .manual-callout,
  .manual-flow {
    break-inside: avoid;
  }

  .manual-figure img {
    box-shadow: none;
  }

  .manual-figure--portrait img {
    width: 78mm;
  }

  .manual-figure--narrow img {
    width: 120mm;
  }

  .manual-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
