/* Panduan Analisis Teknikal — stylesheet seri
   Dipakai: /edukasi/panduan-teknikal.php + bab1-bab6 + glosarium
   Kombinasi dengan /css/artikel.css (hero, body, nav-card, toc). */

/* ── Hero (override gradasi bawaan artikel.css) ─────────────────────────── */
.artikel-hero.pt-hero {
  background: linear-gradient(135deg, #0f172a 0%, #0e7490 55%, #134e4a 100%);
}

.artikel-hero.pt-hero::after {
  background:
    radial-gradient(ellipse 55% 70% at 85% 15%, rgba(198, 163, 106, 0.18) 0%, transparent 60%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 55%);
}

.artikel-hero.pt-hero .artikel-eyebrow {
  background: rgba(198, 163, 106, 0.22);
  border-color: rgba(198, 163, 106, 0.45);
  color: #f0dfc0;
}

/* ── Bar chips antar-bab ────────────────────────────────────────────────── */
.pt-series-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1.5rem;
}

.pt-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: #fff;
  padding: 0.32rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s ease;
}

.pt-chip:hover {
  border-color: #0e7490;
  color: #0e7490;
  background: #ecfeff;
}

.pt-chip--active {
  background: #0e7490;
  border-color: #0e7490;
  color: #fff;
}

.pt-chip--active:hover {
  background: #155e75;
  border-color: #155e75;
  color: #fff;
}

/* ── Kartu bab (landing) ────────────────────────────────────────────────── */
.pt-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.pt-chapter-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 1rem;
  background: #fff;
  padding: 1.35rem 1.3rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pt-chapter-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 116, 144, 0.4);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
  color: inherit;
}

.pt-chapter-card__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0e7490, #134e4a);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

.pt-chapter-card__no--gloss {
  background: linear-gradient(135deg, #a16207, #713f12);
}

.pt-chapter-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
}

.pt-chapter-card p {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
}

.pt-chapter-card__cta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0e7490;
}

/* ── Callout di dalam artikel-body ──────────────────────────────────────── */
.artikel-body .pt-note {
  border-left: 4px solid #0e7490;
  background: #ecfeff;
  border-radius: 0.5rem;
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
  font-size: 0.94rem;
}

.artikel-body .pt-note--warn {
  border-left-color: #b45309;
  background: #fffbeb;
}

.artikel-body .pt-note strong:first-child {
  display: block;
  margin-bottom: 0.25rem;
}

/* ── Glosarium ──────────────────────────────────────────────────────────── */
.pt-gloss-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  background: #0f172a;
  color: #f0dfc0;
  font-weight: 800;
  font-size: 1.15rem;
  margin: 1.6rem 0 0.6rem;
}

.pt-gloss-letter:first-of-type {
  margin-top: 0.5rem;
}

.pt-gloss-list {
  margin: 0 0 1.5rem;
}

.pt-gloss-item {
  border-bottom: 1px dashed rgba(15, 23, 42, 0.12);
  padding: 0.7rem 0;
}

.pt-gloss-item:last-child {
  border-bottom: none;
}

.pt-gloss-item dt {
  font-weight: 800;
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.4;
}

.pt-gloss-item dd {
  margin: 0.2rem 0 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.6;
}

.pt-gloss-see {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0e7490;
}

/* Filter & indeks huruf glosarium */
.pt-gloss-filter {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.pt-gloss-filter-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 0.88rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.pt-gloss-filter-input {
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 0.75rem;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  width: 100%;
}

.pt-gloss-filter-input:focus {
  border-color: #0e7490;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.pt-gloss-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.pt-gloss-index-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.pt-gloss-index-link:hover,
.pt-gloss-index-link:focus {
  background: #0e7490;
  color: #fff;
}

.pt-gloss-total {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

/* ── FAQ (details/summary) ──────────────────────────────────────────────── */
.artikel-body .pt-faq {
  border-bottom: 1px solid rgba(15, 23, 42, 0.09);
}

.artikel-body .pt-faq:last-of-type {
  border-bottom: none;
}

.artikel-body .pt-faq summary {
  cursor: pointer;
  padding: 0.75rem 0.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  list-style: none;
}

.artikel-body .pt-faq summary::-webkit-details-marker {
  display: none;
}

.artikel-body .pt-faq summary::before {
  content: '+';
  display: inline-block;
  width: 1.2rem;
  color: #0e7490;
  font-weight: 800;
}

.artikel-body .pt-faq[open] summary::before {
  content: '\2212';
}

.artikel-body .pt-faq p {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #475569;
}

/* ── Nav prev/next antar bab (pakai struktur artikel-nav-card) ──────────── */
.pt-nav-prevnext {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

/* ── Keterbacaan umum (file ini hanya dimuat di halaman seri → override aman) ── */
.artikel-body h2[id],
.artikel-body h3[id] {
  scroll-margin-top: 5.5rem;
}

.pt-gloss-letter[id] {
  scroll-margin-top: 5.5rem;
}

.pt-chip:focus-visible,
.pt-gloss-index-link:focus-visible,
.pt-chapter-card:focus-visible {
  outline: 2px solid #0e7490;
  outline-offset: 2px;
}

/* ── Mobile: prioritas keterbacaan ─────────────────────────────────────── */
@media (max-width: 767.98px) {
  /* Teks tubuh: 16px + line-height lega — standar bacaan nyaman di HP */
  .artikel-body p,
  .artikel-body li {
    font-size: 1rem;
    line-height: 1.75;
  }

  .artikel-body .pt-note {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  /* TOC jadi chip: perbesar tap target */
  .artikel-toc-list a {
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    min-height: 2.35rem;
  }
}

@media (max-width: 575.98px) {
  /* Kartu bab: satu kolom */
  .pt-chapter-grid {
    grid-template-columns: 1fr;
  }

  /* Chips antar-bab: tap target >= 40px */
  .pt-chip {
    padding: 0.5rem 0.95rem;
    font-size: 0.84rem;
    min-height: 2.5rem;
  }

  /* Tabel perbandingan: izinkan wrap, bukan nowrap paksa (hemat scroll) */
  .artikel-body table td,
  .artikel-body table th {
    white-space: normal;
    font-size: 0.85rem;
  }

  /* Glosarium */
  .pt-gloss-filter {
    padding: 0.85rem 0.9rem;
  }

  .pt-gloss-filter-input {
    font-size: 16px; /* cegah auto-zoom iOS saat fokus */
    padding: 0.7rem 0.9rem;
  }

  .pt-gloss-index-link {
    min-width: 2.4rem;
    height: 2.4rem;
    font-size: 0.9rem;
  }

  .pt-gloss-item dt {
    font-size: 1rem;
  }

  .pt-gloss-item dd {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  /* Kartu bab landing */
  .pt-chapter-card {
    padding: 1.15rem 1.1rem;
  }

  .pt-chapter-card h3 {
    font-size: 1.08rem;
  }

  .pt-chapter-card p {
    font-size: 0.92rem;
  }

  /* Kartu prev/next */
  .pt-nav-prevnext .artikel-nav-card {
    padding: 1.15rem;
  }
}
