/* ============================================================
   TANYA BERITA v2 — Jakarta Broadsheet Design System
   Editorial authority × modern digital speed
   Fonts: Fraunces (display/headlines) + Plus Jakarta Sans (UI)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui:      'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Space palette */
  --bg:        #050714;
  --bg-mid:    #0a0f2e;
  --surface:   rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.07);
  --header-bg: rgba(5,7,20,0.75);

  /* Text */
  --text:   #F0F4FF;
  --text-2: #8B99C2;
  --text-3: #4A5272;

  /* Borders */
  --border:   rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.05);

  /* Accent — electric rose */
  --accent:    #f04474;
  --accent-dk: #c83258;

  /* Glass shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.5),  inset 0 1px 0 rgba(255,255,255,0.06);
  --shadow:    0 8px 32px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.1);

  /* Radius */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; /* clip instead of hidden — doesn't break position:sticky */
}

/* ── Solid base — flat dark, no gradient flash on load ──────── */
html {
  background: #050714;
  min-height: 100%;
}
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(140px);
}
/* Ambient glow — top-right indigo nebula (very subtle) */
body::before {
  width: 500px;
  height: 500px;
  top: -60px;
  right: -60px;
  background: rgba(99,102,241,0.07);
}
/* Ambient glow — bottom-left sky blue (very subtle) */
body::after {
  width: 400px;
  height: 400px;
  bottom: 10%;
  left: -60px;
  background: rgba(14,165,233,0.05);
}

/* Ensure all content layers sit above fixed bg blobs */
.app-shell,
.site-header,
.cat-nav,
.site-main,
.main-content,
.bottom-nav,
#cerita-root {
  position: relative;
  z-index: 1;
}

#cerita-root,
#pp-root {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Custom Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar              { width: 4px; height: 4px; }
::-webkit-scrollbar-track        { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb        { background: rgba(255,255,255,0.18); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(255,255,255,0.30); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ═══════════════════════════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5,7,20,0.75);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ─── Header Back Button ─────────────────────────────────────── */
.header-back-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-1);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 2px;
    border-radius: 8px;
    line-height: 0;
}
.header-back-btn:hover { background: var(--surface-2); }

.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand__dot { color: var(--accent); font-style: normal; }

.search-form {
  flex: 1;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  padding: 7px 14px;
  transition: background 0.2s, border-color 0.2s;
}
.search-form:focus-within {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 3px rgba(240,68,116,0.12);
}
.search-form__icon { color: rgba(255,255,255,0.35); flex-shrink: 0; }
.search-form__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: #fff;
}
.search-form__input::placeholder { color: rgba(255,255,255,0.3); }

/* Mobile search icon button — hidden on desktop */
.search-btn-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}
.search-btn-mobile:hover { background: rgba(255,255,255,0.12); }

/* Search modal */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.65);
  align-items: flex-start;
  padding-top: 0;
}
.search-modal.open { display: flex; }
.search-modal__box {
  width: 100%;
  background: rgba(5,7,20,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-modal__form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  padding: 9px 16px;
}
.search-modal__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #fff;
}
.search-modal__input::placeholder { color: rgba(255,255,255,0.35); }
.search-modal__close {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  padding: 6px 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.header-auth { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.user-email  { font-size: 0.75rem; color: rgba(255,255,255,0.38); }

.btn-login {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  transition: border-color 0.18s, color 0.18s;
}
.btn-login:hover { border-color: rgba(255,255,255,0.45); color: #fff; }

.btn-logout {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.btn-logout:hover { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.28); }

/* ═══════════════════════════════════════════════════════════
   CATEGORY NAV
═══════════════════════════════════════════════════════════ */
.cat-nav {
  position: sticky;
  top: 58px;
  z-index: 99;
  background: rgba(5,7,20,0.65);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }

.cat-nav__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  gap: 4px;
}

.cat-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-3);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid transparent;
  background: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cat-btn:hover { color: var(--text); border-color: var(--border); }
.cat-btn.active {
  color: var(--active-color, var(--accent));
  background: rgba(255,255,255,0.05);
  border-color: var(--active-color, var(--accent));
  box-shadow: 0 0 14px rgba(255,255,255,0.07), inset 0 1px 0 rgba(255,255,255,0.10);
}

/* ═══════════════════════════════════════════════════════════
   MAIN / FEED AREA
═══════════════════════════════════════════════════════════ */
.site-main { padding: 24px 0 64px; }

.feed-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 20px;
  color: var(--text-3);
  font-size: 0.88rem;
}
.loading-ring {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--accent);
  border-right-color: rgba(240,68,116,0.5);
  background: transparent;
  animation: spin 0.72s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
  box-shadow: 0 0 12px rgba(240,68,116,0.4);
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton shimmer loader ────────────────────────────────── */
@keyframes skeleton-wave {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton-shine {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 20%,
    rgba(255,255,255,0.11) 40%,
    rgba(255,255,255,0.04) 60%
  );
  background-size: 1200px 100%;
  animation: skeleton-wave 1.6s ease-in-out infinite;
}
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}
.skeleton-card {
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skeleton-thumb {
  width: 100%;
  height: 156px;
  border-radius: 8px;
}
.skeleton-line {
  height: 13px;
  border-radius: 6px;
  width: 100%;
}
.skeleton-line--title { height: 18px; width: 82%; }
.skeleton-line--short  { width: 52%; }
.skeleton-line--mid    { width: 70%; }
.skeleton-avatar { width: 72px; height: 72px; border-radius: 50%; }
.skeleton-hero   { width: 100%; height: 200px; border-radius: var(--radius); }

.empty-msg {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-3);
  font-size: 0.92rem;
}
.error-msg {
  text-align: center;
  padding: 40px 20px;
  color: #dc2626;
  font-size: 0.88rem;
}

/* ── Auth overlay (full-screen, iOS standalone safe) ──────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── iOS Safari: prevent auto-zoom on input focus ─────────────── */
@media (max-width: 768px) {
  input[type="email"],
  input[type="password"],
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════
   CARDS — Core System
   Glass surface, category color used for meta text and hover glow.
═══════════════════════════════════════════════════════════ */
.card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color 0.22s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.6),
    0 0 24px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.13);
}

/* Image area */
.card__img {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--cat, var(--accent)), #050714);
}
.card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card:hover .card__img img { transform: scale(1.04); }

/* Empty image — textured gradient fill */
.card__img--empty {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.04) 0,
      rgba(255,255,255,0.04) 1px,
      transparent 0,
      transparent 50%
    ),
    linear-gradient(135deg, var(--cat, var(--accent)), #050714);
  background-size: 12px 12px, 100% 100%;
}

/* Card body */
.card__body {
  padding: 15px 17px 17px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Meta row */
.card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.card__cat {
  font-weight: 700;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cat, var(--accent));
}
.card__sep    { opacity: 0.25; }
.card__source { font-weight: 500; }
.card__time   { margin-left: auto; white-space: nowrap; font-size: 0.68rem; }

/* Title — uses editorial serif */
.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  flex: 1;
}
.card__title--hero   { font-size: 1.5rem;  line-height: 1.22; letter-spacing: -0.025em; }
.card__title--medium { font-size: 1.05rem; }

/* Context snippet */
.card__ctx {
  font-size: 0.855rem;
  color: var(--text-2);
  line-height: 1.58;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__ctx--short { -webkit-line-clamp: 2; }

/* Micro tags */
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  padding-top: 9px;
}
.card__tag {
  font-size: 0.67rem;
  font-weight: 500;
  color: var(--text-3);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════
   HERO BENTO GRID (first 3 articles)
═══════════════════════════════════════════════════════════ */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 14px;
  margin-bottom: 14px;
}
.hero-stack { display: flex; flex-direction: column; gap: 14px; }

.card--hero { height: 100%; }
.card--hero .card__img  { height: 330px; }
.card--hero .card__body { padding: 18px 20px 20px; }

.card--medium { flex: 1; min-height: 0; }
.card--medium .card__img  { height: 120px; }
.card--medium .card__body { padding: 12px 14px 14px; }

/* ═══════════════════════════════════════════════════════════
   STANDARD ARTICLE GRID (articles 4+)
═══════════════════════════════════════════════════════════ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card--standard .card__img { height: 185px; }

/* ═══════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════ */
.pagination { margin-top: 44px; }
.pag-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.loading-ring--sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}
.pag-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pag-btn:hover {
  background: rgba(255,255,255,0.09);
  border-color: var(--accent);
  color: var(--accent);
}
.pag-info { font-size: 0.8rem; font-weight: 600; color: var(--text-3); }
.feed-sentinel {
  width: 100%;
  height: 1px;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE DETAIL PAGE
═══════════════════════════════════════════════════════════ */

/* Container: no extra constraints; .container class handles centering */
.article-detail {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* Narrows content to editorial reading width below the hero */
.article-body-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 0 80px;
}

/* ── Full-bleed hero ── */
.article-hero {
  position: relative;
  width: 100%;
  min-height: 55vh;
  overflow: hidden;
  background: #050714;
  display: flex;
  align-items: stretch;
}

/* Real photo — absolutely fills the hero behind the overlay */
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay: gradient keeps top and bottom readable over any image */
.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 32px 32px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.42) 0%,
    rgba(0,0,0,0.0)  28%,
    rgba(0,0,0,0.0)  48%,
    rgba(0,0,0,0.62) 78%,
    rgba(0,0,0,0.82) 100%
  );
}

/* Back pill — top-left corner of hero */
.hero-back {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color 0.15s, background 0.15s;
}
.hero-back:hover {
  color: #fff;
  background: rgba(0,0,0,0.55);
}

/* Bottom area: meta + title stacked */
.hero-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Meta row: badge + source + time */
.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
}
.hero-badge {
  font-size: 0.67rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 4px;
  font-weight: 700;
}
.hero-meta__time { margin-left: auto; font-size: 0.7rem; }

/* Big editorial headline */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.5);
  max-width: 820px;
}

/* Reading progress — fixed top of viewport, above sticky header */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--progress-color, var(--accent));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  pointer-events: none;
}

/* Ringkasan — editorial pull-quote */
.context-box {
  border: none;
  border-left: 4px solid var(--cat, var(--accent));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px 22px;
  margin: 28px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.65;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}
.context-label {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cat, var(--accent));
  margin-bottom: 8px;
  display: block;
}

.actors-label, .section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.actors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 24px;
}
.actor-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 5px 12px 5px 6px;
  border-radius: 20px;
  cursor: default;
}
.actor-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cat, var(--accent));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kilat-section {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#kilat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.kilat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kilat-header__icon { color: var(--accent); flex-shrink: 0; display: block; }

.kilat-card {
  padding: 14px 18px;
  border-right: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  transition: background 0.15s;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.kilat-card:nth-child(2n) { border-right: none; }
.kilat-card:last-child    { border-bottom: none; }
.kilat-card:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.kilat-card:hover { background: rgba(255,255,255,0.05); }

/* Ghost serif ordinal number */
.kilat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--cat, var(--accent));
  opacity: 0.18;
  line-height: 1;
  flex-shrink: 0;
  min-width: 30px;
  text-align: right;
  user-select: none;
}
.kilat-card-body { flex: 1; min-width: 0; }

.kilat-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 5px;
}
.kilat-content {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
}

/* ── Spektrum Fakta + Tingkat Kematangan ───────────────────────────────────── */
.scores-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid var(--border-2);
}
.score-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.score-item--maturity {
  flex: none;
  border-left: 1px solid var(--border-2);
  padding-left: 14px;
}
.score-item__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.spectrum-track {
  display: flex;
  gap: 4px;
  align-items: center;
}
.spectrum-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  flex-shrink: 0;
}
.spectrum-dot--active {
  background: var(--accent, #E94560);
  border-color: var(--accent, #E94560);
}
.maturity-emoji {
  font-size: 0.9rem;
  line-height: 1;
}

.source-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  border: 1.5px solid rgba(255,255,255,0.12);
  padding: 9px 18px;
  border-radius: 24px;
  margin: 20px 0;
  transition: border-color 0.15s, color 0.15s;
}
.source-link-btn:hover {
  border-color: rgba(255,255,255,0.3);
  color: var(--text);
}

.tanya-section {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-sm);
}
.tanya-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tanya-icon { color: var(--accent); font-size: 0.9rem; }
.tanya-header > span { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.75); }

/* Smart question chips — light style */
.tanya-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.tanya-chip {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 5px 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.tanya-chip:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--cat, var(--accent));
  color: var(--cat, var(--accent));
}

.chat-messages {
  max-height: 340px;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0,0,0,0.2);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.10) transparent;
}
.chat-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 88%;
}
.chat-msg.user {
  background: var(--cat, var(--accent));
  color: #fff;
  align-self: flex-end;
  border-radius: 12px 12px 3px 12px;
  font-weight: 500;
}
.chat-msg.assistant {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  align-self: flex-start;
  border-radius: 12px 12px 12px 3px;
  box-shadow: var(--shadow-sm);
}
.token-meter {
  padding: 5px 16px;
  font-size: 0.67rem;
  color: var(--text-3);
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  padding: 9px 16px;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s;
}
.chat-input::placeholder { color: var(--text-3); }
@media (max-width: 768px) {
  .chat-input { font-size: 16px; }
}
.chat-input:focus {
  border-color: var(--cat, var(--accent));
  background: rgba(255,255,255,0.08);
}
.chat-submit {
  background: var(--cat, var(--accent));
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.chat-submit:hover    { opacity: 0.85; }
.chat-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.login-prompt { padding: 28px 20px; text-align: center; background: rgba(0,0,0,0.15); }
.login-prompt p { color: var(--text-2); font-size: 0.88rem; margin-bottom: 16px; }

#related-list { display: flex; flex-direction: column; gap: 9px; }
.related-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.related-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
}
.related-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-3);
  margin-bottom: 5px;
}
.related-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

/* Shared category-badge (used by categoryBadgeHtml() in app.js) */
.category-badge {
  font-weight: 700;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGE
═══════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  position: relative;
  z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo a {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 22px;
}

.form-group { margin-bottom: 15px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.88rem;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
.form-input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(240,68,116,0.12);
}
.form-input::placeholder { color: var(--text-3); }

.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 6px;
  text-decoration: none;
  text-align: center;
  display: block;
}
.btn-primary:hover  { background: var(--accent-dk); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.form-error {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.3);
  color: #f87171;
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-size: 0.83rem;
  margin-bottom: 14px;
}
.form-success {
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.3);
  color: #4ade80;
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-size: 0.83rem;
  margin-bottom: 14px;
}
.form-switch {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-3);
  margin-top: 20px;
}
.form-switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.form-switch a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */

/* Desktop: max-width is 720px so 3-col article grid is too tight — use 2-col */
@media (min-width: 1025px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { flex-direction: row; }
  .card--medium .card__img { height: 155px; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .search-form    { display: none; }
  .search-btn-mobile { display: flex; }
  .user-email  { display: none; }
  .hero-stack  { flex-direction: column; }
  .article-grid { grid-template-columns: 1fr; }
  .card--hero .card__img { height: 220px; }
  .card__title--hero { font-size: 1.25rem; }
  .article-hero  { min-height: 56vw; }
  .hero-overlay  { min-height: 56vw; padding: 14px 18px 22px; }
  #kilat-grid    { grid-template-columns: 1fr; }
  .kilat-card    { border-right: none; }
  .kilat-card:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--border-2); }
  .article-body-inner { padding: 28px 0 60px; }
}
@media (max-width: 480px) {
  .site-header__inner { padding: 0 14px; gap: 10px; }
  .container { padding: 0 14px; }
  .cat-nav__inner { padding: 10px 14px; }
  .card--hero .card__img { height: 190px; }
  .card__title--hero { font-size: 1.1rem; }
  .auth-card { padding: 28px 22px; }
  .hero-overlay { padding: 12px 16px 18px; }
}

/* ── Topbar ────────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(5,7,20,0.78);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ── Bottom Navigation ─────────────────────────────────────────────────────── */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(5,7,20,0.82);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-top: 1px solid rgba(255,255,255,0.09);
  z-index: 1000;
  justify-content: space-around;
  align-items: stretch;
}

/* Desktop: centered pill */
@media (min-width: 769px) {
  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: var(--shadow-lg);
  }
}

body {
  padding-bottom: 70px;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-3);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item.active {
  color: var(--accent);
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
}

/* ── Story Cards ───────────────────────────────────────────────────────────── */
.story-card {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.story-card__img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}

.story-card__body {
  flex: 1;
  min-width: 0;
}

.story-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 6px;
  color: var(--text);
}

.story-card__meta {
  font-size: 0.75rem;
  color: var(--text-3);
  display: flex;
  gap: 10px;
  align-items: center;
}

.story-card__count {
  background: var(--surface-2);
  border-radius: 4px;
  padding: 2px 7px;
  font-weight: 600;
  font-size: 0.7rem;
}

.story-card__summary {
  font-size: 0.82rem;
  color: var(--text-2);
  margin: 6px 0 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Knowledge Cards ───────────────────────────────────────────────────────── */
.knowledge-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.knowledge-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.knowledge-card__count {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 8px;
}

.knowledge-card__summary {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
}

/* ── Follow-up Section ─────────────────────────────────────────────────────── */
#followup-section {
  margin-bottom: 24px;
}

#followup-section h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 12px;
}

.followup-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.followup-scroll::-webkit-scrollbar { display: none; }

.followup-chip {
  flex-shrink: 0;
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  display: block;
}

.followup-chip__badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 5px;
}

.followup-chip__title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ── Daily Digest / Liputan ───────────────────── */
.cerita-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 1rem 0.75rem;
}

.liputan-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 1rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.liputan-card:active { background: var(--surface-2); }
.liputan-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.13);
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.10);
}

.liputan-card-thumb-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}
.liputan-card-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.liputan-thumb-credit {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  text-align: right;
  margin-top: 3px;
  padding-right: 2px;
}

/* ── Thumbnail collage (2×2 grid) ────────────────────────────── */
.liputan-card-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 80px;
  gap: 2px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
/* 2 images: full-height side by side */
.liputan-card-collage.collage-2 { grid-auto-rows: 160px; }
/* 3 images: left spans full height, right two stacked */
.liputan-card-collage.collage-3 .collage-img:first-child { grid-row: span 2; }
.liputan-card-collage .collage-img {
  overflow: hidden;
  background: var(--surface-2);
  min-height: 0;
}
.liputan-card-collage .collage-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.liputan-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-badge.ongoing  { background: rgba(133,100,4,0.22);  color: #f0b42a; }
.status-badge.resolved { background: rgba(22,163,74,0.15);  color: #4ade80; }

.liputan-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.liputan-card-preview {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.liputan-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  gap: 0.5rem;
}
.liputan-card-time {
  font-size: 0.75rem;
  color: var(--text-3);
}

/* PahamPedia list card with cover image */
.pp-card-cover {
  width: 100%; height: 180px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
}
.pp-card-body { padding: 14px 16px 16px; }
.pp-card-date { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; }

/* Tanya Paham panel inside digest detail — flush edges */
.liputan-detail-tanya .tanya-section {
  margin-top: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid var(--border);
}

/* Detail view */
.liputan-detail-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.liputan-detail-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.liputan-detail-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

/* ── Detail content tabs (Rangkuman / Update Terbaru) ── */
.liputan-detail-tabs {
  display: flex;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: 0;
  z-index: 10;
}
.liputan-detail-tab {
  flex: 1;
  padding: 0.7rem 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-3);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s, border-color 0.15s;
}
.liputan-detail-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.liputan-detail-article {
  padding: 1rem 1rem 0.5rem;
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.85;
  background: var(--bg);
}
.liputan-detail-article p {
  margin: 0 0 1.1rem 0;
}
.liputan-detail-article p:last-child {
  margin-bottom: 0.5rem;
}

/* ── Update Terbaru Timeline ─────────────────────────── */
.update-timeline {
  padding: 1rem 1rem 2rem;
  background: var(--bg);
}
.update-entry {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.75rem 0.75rem 1.4rem;
}
.update-entry::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -2rem;
  width: 1.5px;
  background: var(--border);
}
.update-entry:last-child::before { display: none; }
.update-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--accent);
}
.update-entry:first-child .update-dot {
  box-shadow: 0 0 10px rgba(233,69,96,0.55), 0 0 0 1.5px var(--accent);
}
.update-time {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
}
.liputan-update-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-1);
    line-height: 1.3;
}
.update-text {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.85rem;
}
.update-articles-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}
.update-articles-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-left: -1.4rem;
  padding-left: 1.4rem;
}
.update-articles-carousel::-webkit-scrollbar { display: none; }
.update-article-chip {
  flex-shrink: 0;
  width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s, transform 0.12s;
}
.update-article-chip:hover { border-color: var(--text-3); transform: translateY(-1px); }
.update-article-chip__thumb {
  width: 100%;
  height: 86px;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}
.update-article-chip__body { padding: 8px 10px 10px; }
.update-article-chip__title {
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.update-article-chip__src {
  font-size: 0.64rem;
  color: var(--text-3);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.update-no-articles { font-size: 0.78rem; color: var(--text-3); font-style: italic; }

.liputan-related-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem 0.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.liputan-related-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg);
}
.liputan-related-item:active { background: var(--surface-2); }
.liputan-related-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--surface-2);
}
.liputan-related-item-body { flex: 1; min-width: 0; }
.liputan-related-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}
.liputan-related-item-meta { font-size: 0.75rem; color: var(--text-3); }
.liputan-related-empty {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-3);
  background: var(--bg);
}

/* Follow-up cards on index.html */
.followup-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding: 0.75rem 1rem 0.25rem;
}
.liputan-followup-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: var(--surface);
}
.liputan-followup-card:active { background: var(--surface-2); }
.liputan-followup-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--surface-2);
}
.liputan-followup-body { flex: 1; min-width: 0; }
.liputan-followup-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.liputan-followup-preview {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Cerita Tabs (horizontally scrollable for 8 section tabs) ─ */
.cerita-tabs {
  position: sticky;
  top: 58px;
  z-index: 99;
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0 0.25rem;
  margin: 0;
  background: rgba(5,7,20,0.82);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cerita-tabs::-webkit-scrollbar { display: none; }
.cerita-tab {
  flex-shrink: 0;
  padding: 0.65rem 0.9rem;
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.cerita-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Interest Bar ───────────────────────────────────────────── */
.interest-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.interest-bar::-webkit-scrollbar { display: none; }
.interest-chip {
  flex-shrink: 0;
  padding: 0.28rem 0.75rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-ui);
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.interest-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Heat Badge ─────────────────────────────────────────── */
.heat-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  letter-spacing: 0.02em;
  margin-left: 0.3rem;
  vertical-align: middle;
}
.heat-badge.panas  { background: rgba(233,69,96,0.18); color: #ff7089; }
.heat-badge.dingin { background: var(--border-2); color: var(--text-3); }

/* ── Wajib Tahu Badge ───────────────────────────────────── */
.wajib-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(180,83,9,0.2);
  color: #fb923c;
  letter-spacing: 0.03em;
  margin-left: 0.3rem;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ── Followed Pin ───────────────────────────────────────── */
.followed-pin { margin-left: auto; font-size: 0.85rem; line-height: 1; }

/* ── Follow Button ──────────────────────────────────────── */
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}
.follow-btn.active {
  background: rgba(180,83,9,0.15);
  border-color: #fb923c;
  color: #fb923c;
}

/* ── Cerita Sub-tabs (Terkini / Arsip) ───────────────────── */
.cerita-subtabs {
  display: flex;
  border-bottom: 1.5px solid var(--border);
  background: var(--surface);
}
.cerita-subtab {
  flex: 1;
  padding: 0.6rem 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-3);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s, border-color 0.15s;
}
.cerita-subtab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Arsip infinite scroll helpers ─────────────────────── */
.arsip-sentinel { height: 1px; }
.arsip-end-msg {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-3);
  padding: 1.25rem 1rem;
  background: var(--bg);
}

/* ── Profile page ───────────────────────────────────────── */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 24px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.profile-avatar--empty {
  background: var(--surface-2);
}
.profile-email {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.profile-stats {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}
.profile-stat-card {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.profile-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}
.profile-stat-label {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}
.profile-actions {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}
.profile-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.profile-logout-btn:active { background: var(--surface-2); }
.profile-not-logged {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  text-align: center;
}
.profile-not-logged__msg {
  color: var(--text-2);
  margin: 0 0 20px;
}

/* ── Cek Juga ──────────────────────────────────────────────────────────────── */
.cek-juga-section {
  margin-top: 28px;
}
.cek-juga-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Berita search bar (SPA view-berita) ────────────────────────────────────── */
.berita-search-bar {
  padding: 12px 16px 4px;
  max-width: 720px;
  margin: 0 auto;
}
.berita-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.berita-search-trigger:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.liputan-penting {
  margin: 16px 0 14px;
  padding: 14px 16px;
  background: rgba(240,68,116,0.06);
  border: 1px solid rgba(240,68,116,0.18);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.liputan-penting-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 7px;
}
.liputan-penting-label::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.liputan-penting-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
  font-style: italic;
}

/* ── Rekam Jejak badge ───────────────────────────────────────────────── */
.pp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d4920a;
  background: rgba(212, 146, 10, 0.1);
  border: 1px solid rgba(212, 146, 10, 0.25);
  border-radius: 4px;
  padding: 2px 7px;
  margin-bottom: 6px;
}
.pp-badge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4920a;
  flex-shrink: 0;
}

/* ── Rekam Jejak CTA block (on Liputan detail page) ─────────────────── */
.pp-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
  padding: 13px 16px;
  background: rgba(212, 146, 10, 0.07);
  border: 1px solid rgba(212, 146, 10, 0.22);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pp-cta:hover { background: rgba(212, 146, 10, 0.13); }
.pp-cta-icon  { font-size: 1.4rem; flex-shrink: 0; }
.pp-cta-text  { flex: 1; }
.pp-cta-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d4920a;
  margin-bottom: 2px;
}
.pp-cta-title { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.pp-cta-arrow { color: var(--text-muted); font-size: 1rem; }

/* ── Rekam Jejak article page ────────────────────────────────────────── */
.pp-article-header {
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.pp-article-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #d4920a;
  margin-bottom: 8px;
}
.pp-article-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 10px;
}
.pp-article-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  font-style: italic;
  margin-bottom: 10px;
}
.pp-article-meta { font-size: 0.72rem; color: var(--text-muted); }

.pp-significance {
  margin: 18px 0;
  padding: 13px 16px;
  background: rgba(212, 146, 10, 0.06);
  border-left: 3px solid #d4920a;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pp-significance-label {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d4920a;
  margin-bottom: 5px;
}
.pp-significance-text { font-size: 0.88rem; color: var(--text); line-height: 1.55; }

.pp-article-body      { font-size: 0.92rem; line-height: 1.7; color: var(--text); }
.pp-article-body p    { margin: 0 0 14px; }

/* ── Rekam Jejak profile collection card ─────────────────────────────── */
.pp-collection-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.pp-collection-card:last-child { border-bottom: none; }
.pp-collection-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}
.pp-collection-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-collection-body   { flex: 1; min-width: 0; }
.pp-collection-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d4920a;
  margin-bottom: 3px;
}
.pp-collection-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.pp-collection-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
   PahamPedia Timeline — Redesign 2026-03-16d
   ===================================================== */

/* ---- List-view page header ---- */
.pp-hero {
  padding: 20px 16px 8px;
}
.pp-hero-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 4px;
}
.pp-hero-title {
  font-size: 2rem; font-weight: 800; color: var(--text);
  margin: 0 0 8px; line-height: 1.1;
}
.pp-hero-sub {
  font-size: 0.9rem; color: var(--text-muted); margin: 0 0 16px;
}
.pp-list { padding: 0 16px 80px; display: flex; flex-direction: column; gap: 16px; }
.pp-tanya-section { margin: 0 16px 8px; }

/* ---- Detail view event header ---- */
.pp-event-header { padding: 16px 16px 0; }
.pp-hero-cover {
  width: 100%; height: 220px;
  object-fit: cover; display: block;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.pp-timeline-hero-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 6px;
}

/* ---- Timeline nav ---- */
.pp-timeline-nav {
  position: sticky;
  top: 58px;
  z-index: 98;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.pp-timeline-nav.open { max-height: 220px; }
.pp-timeline-nav-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 8px 0;
}
.pp-timeline-nav-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.pp-timeline-nav-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 16px; cursor: pointer;
  transition: background 0.1s;
}
.pp-timeline-nav-item:active { background: var(--surface); }
.pp-timeline-nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  margin-top: 4px;
}
.pp-timeline-nav-item-date {
  font-size: 0.6rem; color: var(--accent);
  font-weight: 700; white-space: nowrap;
  padding-top: 2px;
}
.pp-timeline-nav-item-title {
  font-size: 0.72rem; color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- Milestones container (timeline connector) ---- */
.pp-milestones {
  position: relative;
  padding-top: 4px;
}
.pp-milestones::before {
  content: '';
  position: absolute;
  left: 5px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, rgba(240,68,116,0.15) 100%);
}

/* ---- Milestone chapter ---- */
.pp-milestone {
  padding: 0 0 4px 24px;
  position: relative;
  scroll-margin-top: 116px;
}
.pp-milestone::before {
  content: '';
  position: absolute;
  left: 0; top: 18px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  z-index: 1;
}
.pp-milestone:last-child { padding-bottom: 40px; }

/* ---- Milestone cover image ---- */
.pp-milestone-cover-wrap {
  margin: 0 -16px 0 -24px;
  height: 210px;
  overflow: hidden;
  position: relative;
  display: block;
}
.pp-milestone-cover-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 110px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}
.pp-milestone-cover {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ---- Milestone body ---- */
.pp-milestone-body { padding: 12px 16px 20px 0; }

/* ---- Mood tag ---- */
.pp-mood-tag {
  display: inline-block;
  font-size: 0.58rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px;
  color: #fff; margin-bottom: 8px;
}
.pp-mood-tag--misteri        { background: #6a1b9a; }
.pp-mood-tag--kontroversi    { background: #c2185b; }
.pp-mood-tag--krisis         { background: #b71c1c; }
.pp-mood-tag--tragedi        { background: #4a148c; }
.pp-mood-tag--kepanikan      { background: #bf360c; }
.pp-mood-tag--darurat        { background: #c62828; }
.pp-mood-tag--harapan        { background: #1b5e20; }
.pp-mood-tag--kebingungan    { background: #e65100; }
.pp-mood-tag--titik-balik    { background: #006064; }
.pp-mood-tag--pemulihan      { background: #1565c0; }
.pp-mood-tag--penutupan      { background: #37474f; }
.pp-mood-tag--kejutan        { background: #0d47a1; }
.pp-mood-tag--peringatan     { background: #e65100; }
.pp-mood-tag--perjuangan     { background: #f57f17; }
.pp-mood-tag--kesedihan      { background: #546e7a; }
.pp-mood-tag--kegelisahan    { background: #546e7a; }
.pp-mood-tag--perubahan      { background: #01579b; }

/* ---- Milestone text ---- */
.pp-milestone-date {
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 6px;
}
.pp-milestone-title {
  font-size: 1.15rem; font-weight: 800;
  color: var(--text); margin-bottom: 10px;
  line-height: 1.3;
}
.pp-milestone-context {
  font-size: 0.88rem; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 14px;
  font-style: italic;
}

/* ---- Carousel cards ---- */
.pp-carousel {
  display: flex; gap: 10px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px; padding: 0 16px 4px;
}
.pp-carousel::-webkit-scrollbar { display: none; }
.pp-carousel-card {
  flex-shrink: 0; width: 160px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.pp-carousel-card:active { border-color: var(--accent); }
.pp-carousel-card-thumb {
  width: 100%; height: 100px;
  object-fit: cover; display: block;
  background: var(--surface-2);
}
.pp-carousel-card-thumb--empty {
  width: 100%; height: 100px;
  background: var(--surface-2);
}
.pp-carousel-card-body { padding: 8px 8px 10px; }
.pp-carousel-card-title {
  font-size: 0.78rem; font-weight: 600; color: var(--text);
  line-height: 1.35; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.pp-carousel-card-meta { font-size: 0.63rem; color: var(--text-muted); }

/* ---- Ref modal (bottom sheet) ---- */
.pp-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  display: flex; align-items: flex-end;
  animation: ppFadeIn 0.18s ease;
}
.pp-modal {
  background: #111827;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px 16px 32px;
  width: 100%; max-height: 80vh;
  overflow-y: auto;
  animation: ppSlideUp 0.22s ease;
  position: relative;
}
.pp-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none;
  font-size: 1.3rem; color: var(--text-muted);
  cursor: pointer; line-height: 1; padding: 4px;
}
.pp-modal-thumb {
  width: 100%; height: 160px;
  object-fit: cover; border-radius: var(--radius-sm);
  margin-bottom: 12px; display: block;
}
.pp-modal-meta {
  font-size: 0.65rem; color: var(--accent);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 6px;
}
.pp-modal-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text); line-height: 1.4;
  margin-bottom: 10px;
}
.pp-modal-snippet {
  font-size: 0.83rem; color: var(--text-muted);
  line-height: 1.65; margin-bottom: 16px;
}
.pp-modal-read-btn {
  display: block; width: 100%;
  padding: 12px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff;
  font-size: 0.85rem; font-weight: 700;
  text-align: center; text-decoration: none;
  border: none; cursor: pointer; box-sizing: border-box;
}

/* --- PahamPedia Year Slider Bar --------------------------------- */
.pp-year-bar {
    position: sticky;
    top: 58px;
    z-index: 90;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px 10px;
}

.pp-year-slider-wrap {
    max-width: 720px;
    margin: 0 auto;
    user-select: none;
    -webkit-user-select: none;
}

.pp-year-track {
    position: relative;
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    margin-bottom: 8px;
    cursor: pointer;
}

.pp-year-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    pointer-events: none;
}

.pp-year-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: grab;
    pointer-events: none;
    line-height: 1.4;
}

.pp-year-thumb--semua {
    background: var(--surface-2);
    color: var(--text-2);
}

.pp-year-ticks {
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.pp-year-tick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
}

.pp-year-tick__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--surface-2);
    transition: background 0.15s;
}

.pp-year-tick--active .pp-year-tick__dot {
    background: var(--accent);
}

.pp-year-tick--semua .pp-year-tick__dot {
    background: var(--surface-2);
}

.pp-year-tick__label {
    font-size: 0.6rem;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
    transition: color 0.15s;
}

.pp-year-tick--active .pp-year-tick__label {
    color: var(--accent);
    font-weight: 700;
}

.pp-year-tick--semua.pp-year-tick--active .pp-year-tick__dot {
    background: var(--text-2);
}

.pp-year-tick--semua.pp-year-tick--active .pp-year-tick__label {
    color: var(--text-2);
    font-weight: 700;
}

@keyframes ppSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes ppFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Pull-to-Refresh -------------------------------------------- */
.ptr-indicator {
    position: fixed;
    top: 58px;
    left: 50%;
    transform: translateX(-50%) translateY(-48px);
    z-index: 80;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.ptr-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--surface-2);
    border-top-color: var(--accent);
    border-radius: 50%;
}

.ptr-indicator--spinning .ptr-spinner {
    animation: ptrSpin 0.7s linear infinite;
}

@keyframes ptrSpin {
    to { transform: rotate(360deg); }
}

/* --- PahamPedia Milestone Accordion ------------------------------ */
.pp-ms-compact {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.pp-ms-thumb {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    height: 72px !important;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
    background: var(--surface-2);
    display: block;
}

.pp-ms-thumb--empty {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    background: var(--surface-2);
    flex-shrink: 0;
}

.pp-ms-info {
    flex: 1;
    min-width: 0;
}

.pp-ms-toggle {
    width: 100%;
    margin-top: 10px;
    padding: 8px 0;
    background: none;
    border: none;
    border-top: 1px solid var(--surface-2);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pp-ms-expand {
    display: none;
    margin-top: 12px;
}

.pp-ms-expand .pp-milestone-cover-wrap {
    margin: 0 -16px 12px 0;
    border-radius: var(--radius) 0 0 var(--radius);
}

.pp-milestone--expanded .pp-ms-expand {
    display: block;
}

.pp-milestone {
    padding: 16px 0 16px 24px;
    border-bottom: 1px solid var(--surface-2);
}

.pp-milestone:last-child {
    border-bottom: none;
}

/* ── Paham Pagi ─────────────────────────────────────────────── */

/* Sun icon button in header navbar */
.pagi-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    border-radius: 50%;
    transition: background 0.2s;
}
.pagi-btn:hover { background: var(--surface-2); }
.pagi-btn svg { width: 22px; height: 22px; }
.pagi-btn__dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    border: 2px solid var(--bg);
}

/* Full-screen overlay + animation */
.pagi-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: pagi-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pagi-in {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header section */
.pagi-overlay__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 24px;
    text-align: center;
}
.pagi-overlay__sun {
    width: 52px;
    height: 52px;
    color: #fff;
    margin-bottom: 12px;
    animation: pagi-glow 3s ease-in-out infinite;
}
@keyframes pagi-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.85; transform: scale(1.08); }
}
.pagi-overlay__title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
}
.pagi-overlay__subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

/* Items list + cards */
.pagi-overlay__items {
    padding: 8px 20px 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}
.pagi-item {
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.25);
}
.pagi-item__img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.pagi-item__body {
    padding: 14px 18px 16px;
}
.pagi-item__cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #1e3a5f;
    background: rgba(255,255,255,0.7);
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 8px;
}
.pagi-item__headline {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.4;
}
.pagi-item__context {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin: 0;
    line-height: 1.5;
}

/* Close button + empty state */
.pagi-overlay__close {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #1e3a5f;
    border: none;
    border-radius: 50px;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    z-index: 1001;
}
.pagi-overlay__close:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.pagi-overlay__empty {
    text-align: center;
    padding: 60px 24px;
    color: rgba(255,255,255,0.8);
    font-size: 15px;
}

/* --- Paham Brief — Theme Modifiers ---------------------------------------- */

/* Pagi — bluish dawn */
.pagi-overlay--pagi {
    background: linear-gradient(160deg, #1e3a5f 0%, #1d4ed8 35%, #3b82f6 65%, #93c5fd 88%, #dbeafe 100%);
}
.pagi-overlay--pagi .pagi-item__cat { color: #1e3a5f; }
.pagi-overlay--pagi .pagi-overlay__close { color: #1e3a5f; }

/* Siang — amber/yellow */
.pagi-overlay--siang {
    background: linear-gradient(160deg, #92400e 0%, #b45309 25%, #d97706 55%, #fbbf24 85%, #fde68a 100%);
}
.pagi-overlay--siang .pagi-item__cat { color: #92400e; }
.pagi-overlay--siang .pagi-overlay__close { color: #92400e; }

/* Malam — dark charcoal/navy */
.pagi-overlay--malam {
    background: linear-gradient(160deg, #0f0f0f 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
}
.pagi-overlay--malam .pagi-item {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}
.pagi-overlay--malam .pagi-item__cat {
    color: #0f0f0f;
    background: rgba(255,255,255,0.85);
}
.pagi-overlay--malam .pagi-overlay__close { color: #0f3460; }
.pagi-overlay--malam .pagi-btn__dot { background: #818cf8; }
