/* =========================================================
   EDUTHALASEMIA — Stylesheet utama (publik + admin)
   Warna diambil dari poster "Edu Thalassemia":
   teal tua, hijau lime, mint, dan koral (warna sel darah).
   Ubah variabel di :root untuk mengganti tema seluruh situs.
   ========================================================= */

@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url("../fonts/poppins-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Warna merek */
  --teal-950: #032f30;
  --teal-900: #043e40;
  --teal-800: #054b4b;
  --teal-700: #086c68;
  --teal-600: #0b7c76;
  --teal-500: #129089;
  --mint-300: #a8f0dc;
  --mint-200: #c9f5e8;
  --mint-100: #e6f7f2;
  --lime-400: #d3db3b;
  --lime-300: #e3e86e;
  --lime-100: #f6f8d4;
  --coral-500: #e8685a;
  --coral-600: #b03e33;
  --coral-100: #fde8e5;
  --amber-600: #8a5200;
  --amber-100: #fdf0d9;

  /* Netral */
  --ink: #0f2a2a;
  --ink-2: #44605d;
  --ink-3: #5c7471;
  --line: #d6e6e1;
  --bg: #f4f9f7;
  --surface: #ffffff;

  /* Tipografi */
  --font-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Bentuk */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(4, 62, 64, .06), 0 1px 3px rgba(4, 62, 64, .08);
  --shadow: 0 6px 24px -8px rgba(4, 62, 64, .22);
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
svg.ic { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
img { height: auto; }
a { color: var(--teal-600); text-underline-offset: 3px; }
a:hover { color: var(--teal-800); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.22; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--ink-2); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--lime-400); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lime-400); color: var(--teal-950); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* ---------- Bilah admin (hanya saat admin login) ---------- */
.admin-bar { background: var(--lime-400); color: var(--teal-950); font-size: .86rem; font-weight: 600; padding: 6px 0; }
.admin-bar .flex { gap: 6px 16px; }
.admin-bar a { color: var(--teal-950); text-decoration: none; display: inline-flex; gap: 5px; align-items: center; }
.admin-bar a:hover { text-decoration: underline; color: var(--teal-950); }
.page-banner img { max-height: 380px; object-fit: cover; }

/* ---------- Header & navigasi ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(4, 62, 64, .97);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid rgba(168, 240, 220, .12);
}
.nav-wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { display: inline-flex; }
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.32rem; letter-spacing: -.01em; color: #fff; }
.brand-edu { color: var(--lime-400); }
.brand-lg .brand-text { font-size: 1.6rem; color: var(--teal-900); }
.brand-lg .brand-edu { color: var(--teal-600); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: #d9efea; text-decoration: none; font-weight: 600; font-size: .95rem;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.main-nav a.active { color: var(--teal-950); background: var(--lime-400); }
.nav-toggle {
  display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.25);
  color: #fff; border-radius: 10px; width: 44px; height: 40px; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--teal-900); display: none; border-bottom: 1px solid rgba(168,240,220,.15); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 10px 16px 16px; }
  .main-nav a { border-radius: 10px; padding: 12px 14px; }
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem; line-height: 1.2;
  padding: 11px 20px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .12s ease, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--teal-600); color: #fff; }
.btn-primary:hover { background: var(--teal-700); color: #fff; }
.btn-lime { background: var(--lime-400); color: var(--teal-950); }
.btn-lime:hover { background: var(--lime-300); color: var(--teal-950); }
.btn-outline-light { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-ghost { background: var(--mint-100); color: var(--teal-800); }
.btn-ghost:hover { background: var(--mint-200); color: var(--teal-900); }
.btn-outline { border-color: var(--line); color: var(--teal-800); background: #fff; }
.btn-outline:hover { border-color: var(--teal-600); color: var(--teal-700); }
.btn-danger { background: var(--coral-600); color: #fff; }
.btn-danger:hover { background: #943328; color: #fff; }
.btn-sm { padding: 7px 13px; font-size: .86rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Hero (gaya poster) ---------- */
.hero {
  position: relative; overflow: hidden; color: #e6f5f1;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(18,144,137,.55), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(3,47,48,.9), transparent 60%),
    linear-gradient(160deg, var(--teal-600) 0%, var(--teal-800) 55%, var(--teal-950) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image: linear-gradient(rgba(168,240,220,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(168,240,220,.5) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero-word { display: block; font-family: var(--font-head); font-weight: 800; line-height: .95; letter-spacing: .01em; }
.hero-word.outline { color: transparent; -webkit-text-stroke: 2px var(--lime-400); font-size: clamp(3rem, 8vw, 5.6rem); }
.hero-word.solid { color: #fff; font-size: clamp(2.2rem, 6.2vw, 4.4rem); background: linear-gradient(90deg, #fff 0%, var(--mint-300) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--mint-300); font-weight: 600; font-size: .92rem; letter-spacing: .02em; margin-bottom: 18px; }
.hero-eyebrow::before { content: ""; width: 34px; height: 3px; border-radius: 3px; background: var(--lime-400); }
.hero-sub { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.45rem); color: #fff; margin: 22px 0 10px; }
.hero p.lead { color: #cfe9e3; font-size: 1.06rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-art { position: relative; justify-self: center; width: min(440px, 100%); }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-top: 32px; padding-bottom: 56px; gap: 24px; }
  .hero-art { width: min(320px, 82%); order: -1; }
}

.page-hero { background: linear-gradient(160deg, var(--teal-700), var(--teal-900)); color: #d8efe9; padding: 44px 0 40px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 2px dashed rgba(211,219,59,.35); }
.page-hero h1 { color: #fff; margin-bottom: .25em; }
.page-hero p { max-width: 720px; margin: 0; color: #cde7e1; }
.crumbs { font-size: .88rem; margin-bottom: 10px; color: var(--mint-300); }
.crumbs a { color: var(--mint-300); }

/* ---------- Bagian & grid ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-dark { background: var(--teal-900); color: #d5ece6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-mint { background: var(--mint-100); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { margin: 0; max-width: 640px; }
.kicker { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-600); margin-bottom: 8px; }
.section-dark .kicker { color: var(--lime-400); }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .section { padding: 44px 0; } .container { padding: 0 16px; } .hero-actions .btn { flex: 1 1 auto; } .q-card { padding: 20px 16px; } .result-value { font-size: 2.8rem; } }

/* ---------- Kartu ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: .35em; }
.card-flat { box-shadow: none; }
.feature-card { position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--mint-300); color: var(--ink); }
.feature-card p { color: var(--ink-2); margin: 0; font-size: .96rem; }
.feature-card .go { margin-top: auto; font-family: var(--font-head); font-weight: 600; color: var(--teal-600); font-size: .92rem; }
.icon-badge { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--mint-100); color: var(--teal-700); }
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge.coral { background: var(--coral-100); color: var(--coral-600); }
.icon-badge.lime { background: var(--lime-100); color: #6b7000; }
.icon-badge.teal { background: var(--teal-700); color: var(--lime-400); }

/* Statistik ringkas */
.stat-band { margin-top: -38px; position: relative; z-index: 2; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.stat-tile { padding: 22px 22px 20px; border-right: 1px solid var(--line); }
.stat-tile:last-child { border-right: 0; }
.stat-tile .num { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--teal-700); line-height: 1.1; }
.stat-tile .num.coral { color: var(--coral-600); }
.stat-tile .lbl { color: var(--ink-2); font-size: .9rem; margin-top: 4px; line-height: 1.4; }
.stat-tile .src { color: var(--ink-3); font-size: .76rem; margin-top: 6px; }
@media (max-width: 860px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0,1fr)); } .stat-tile:nth-child(2) { border-right: 0; } .stat-tile:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 420px) { .stat-tiles { grid-template-columns: 1fr; } .stat-tile { border-right: 0; border-bottom: 1px solid var(--line); } }

.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.kpi .v { font-family: var(--font-head); font-size: 1.85rem; font-weight: 700; color: var(--teal-800); line-height: 1.1; }
.kpi .v small { font-size: .95rem; color: var(--ink-2); font-weight: 600; }
.kpi .l { color: var(--ink-2); font-size: .88rem; margin-top: 4px; }
.kpi.accent { background: var(--teal-800); border-color: var(--teal-800); }
.kpi.accent .v { color: var(--lime-400); }
.kpi.accent .l { color: #cfe7e1; }
.kpi.warn .v { color: var(--coral-600); }

/* ---------- Kartu media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.media-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.media-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.media-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--teal-800); overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .4s; }
.media-card:hover .media-thumb img { transform: scale(1.04); }
.media-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.media-thumb .play span { width: 58px; height: 58px; border-radius: 50%; background: rgba(3,47,48,.75); display: grid; place-items: center; border: 2px solid var(--lime-400); }
.media-thumb .play svg { width: 22px; height: 22px; color: var(--lime-400); margin-left: 3px; }
.media-thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mint-300); }
.media-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.media-body h3 { font-size: 1.06rem; margin: 0; }
.media-body p { color: var(--ink-2); font-size: .92rem; margin: 0; }
.media-meta { margin-top: auto; display: flex; gap: 14px; color: var(--ink-3); font-size: .82rem; align-items: center; flex-wrap: wrap; }
.media-meta span { display: inline-flex; gap: 5px; align-items: center; }
.media-meta svg { width: 15px; height: 15px; }

/* Badge & chip */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; background: var(--mint-100); color: var(--teal-800); width: fit-content; }
.badge.artikel { background: var(--mint-100); color: var(--teal-800); }
.badge.infografis { background: var(--lime-100); color: #5d6200; }
.badge.video { background: var(--coral-100); color: var(--coral-600); }
.badge.dokumen { background: #e8eef9; color: #2c4a86; }
.badge.draft { background: #eee; color: #555; }
.badge.ok { background: var(--mint-100); color: var(--teal-800); }
.badge.warn { background: var(--amber-100); color: var(--amber-600); }
.badge.bad { background: var(--coral-100); color: var(--coral-600); }
.media-thumb .badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.chip:hover { border-color: var(--teal-600); color: var(--teal-700); }
.chip.active { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }

/* ---------- Artikel ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
@media (max-width: 980px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .sidebar-box { position: static; } }
.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose img { border-radius: 10px; }
.prose figure { margin: 1.6em 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; }
.prose figcaption { font-size: .88rem; color: var(--ink-2); margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; background: #fff; border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; }
.prose table caption { caption-side: top; text-align: left; font-weight: 600; padding: 0 0 8px; color: var(--ink-2); }
.prose th { background: var(--teal-700); color: #fff; text-align: left; font-weight: 600; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: #f7fbfa; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--mint-100); color: var(--teal-900); }
.prose .callout, .callout { background: var(--lime-100); border: 1px solid #e3e8a6; border-radius: var(--radius); padding: 14px 18px; margin: 1.4em 0; }
.prose iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: var(--radius); }
.article-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 26px; background: var(--teal-800); }
.article-cover img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin-bottom: 24px; }
.video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-frame { width: 100%; height: 75vh; min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--mint-300); font-size: .92rem; margin-top: 12px; }
.sidebar-box { position: sticky; top: 88px; display: grid; gap: 18px; }

/* Bagikan & suka */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .86rem; text-decoration: none; cursor: pointer; font-family: var(--font-body); }
.share-btn:hover { border-color: var(--teal-600); color: var(--teal-700); }
.share-btn svg { width: 16px; height: 16px; }
.share-btn.wa { color: #0e7a40; } .share-btn.fb { color: #1d4fb8; } .share-btn.tg { color: #156a99; } .share-btn.x { color: #111; }
.like-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--coral-500); background: #fff; color: var(--coral-600); font-weight: 700; cursor: pointer; font-family: var(--font-head); }
.like-btn svg { width: 20px; height: 20px; }
.like-btn.liked { background: var(--coral-600); border-color: var(--coral-600); color: #fff; }
.like-btn.liked svg path { fill: currentColor; }

/* ---------- Formulir ---------- */
label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: #fff;
  border: 1.5px solid #c9dcd7; border-radius: 10px; padding: 10px 12px; min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(11,124,118,.18); }
input[type=file] { font: inherit; font-size: .9rem; width: 100%; max-width: 100%; min-width: 0; }
.hint { font-weight: 400; color: var(--ink-3); font-size: .82rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal-600); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.input-unit { position: relative; }
.input-unit input { padding-right: 70px; }
.input-unit .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: .85rem; font-weight: 500; pointer-events: none; }
.segmented { display: inline-flex; background: var(--mint-100); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.segmented label { display: block; position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--teal-800); }
.segmented input:checked + span { background: var(--teal-700); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--lime-400); }

/* ---------- Alert ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; border: 1px solid; }
.alert-success { background: var(--mint-100); border-color: #a6dccd; color: var(--teal-900); }
.alert-error { background: var(--coral-100); border-color: #f2b5ad; color: #8a2a20; }
.alert-warning { background: var(--amber-100); border-color: #efd29d; color: #6b4300; }

/* ---------- Pewarisan (Punnett) ---------- */
.inherit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
@media (max-width: 860px) { .inherit { grid-template-columns: minmax(0, 1fr); } }
.parent-pick { display: grid; gap: 18px; }
.parent-pick .who { font-family: var(--font-head); font-weight: 600; color: #fff; margin-bottom: 6px; }
.section-dark .segmented { background: rgba(255,255,255,.08); }
.section-dark .segmented span { color: #d7efe9; }
.section-dark .segmented input:checked + span { background: var(--lime-400); color: var(--teal-950); }
.punnett { display: grid; grid-template-columns: 58px repeat(2, minmax(0, 1fr)); gap: 8px; }
.punnett .h { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-family: var(--font-head); font-weight: 700; color: var(--lime-400); font-size: 1.5rem; line-height: 1.1; padding: 4px 0; }
.punnett .h small { font-family: var(--font-body); font-weight: 600; font-size: .72rem; color: var(--mint-300); letter-spacing: .02em; }
.punnett .cell { aspect-ratio: 1.9; border-radius: 14px; display: grid; place-items: center; text-align: center; padding: 8px; font-size: .82rem; line-height: 1.25; transition: background .25s; }
.punnett .cell b { display: block; font-family: var(--font-head); font-size: 1.35rem; }
.cell.AA { background: #fff; color: var(--teal-900); }
.cell.Aa { background: var(--lime-400); color: var(--teal-950); }
.cell.aa { background: var(--coral-600); color: #fff; }
.odds { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.odds div { flex: 1 1 120px; border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.07); }
.odds b { font-family: var(--font-head); font-size: 1.4rem; color: #fff; display: block; }
.odds span { font-size: .85rem; color: #cfe7e1; }

/* ---------- Kuis ---------- */
.quiz-shell { max-width: 820px; margin: 0 auto; }
#quizBody { scroll-margin-top: 84px; }
.quiz-steps { scroll-margin-top: 150px; }
.progress { height: 10px; background: var(--mint-100); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal-600), var(--lime-400)); transition: width .3s ease; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 600; color: var(--ink-2); font-size: .92rem; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.q-num { font-family: var(--font-head); font-weight: 700; color: var(--teal-600); font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.q-text { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin: 8px 0 20px; line-height: 1.35; }
.q-opts { display: grid; gap: 10px; }
.q-opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s; background: #fff; }
.q-opt:hover { border-color: var(--mint-300); background: #fbfefd; }
.q-opt input { position: absolute; opacity: 0; }
.q-opt .lab { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid #b7cfc9; font-family: var(--font-head); font-weight: 700; color: var(--teal-800); }
.q-opt input:checked ~ .lab { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.q-opt:has(input:checked) { border-color: var(--teal-600); background: var(--mint-100); }
.q-opt input:focus-visible ~ .lab { outline: 3px solid var(--lime-400); outline-offset: 2px; }
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.js .quiz-steps .q-card { display: none; }
.js .quiz-steps .q-card.current { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.score-ring { --p: 0; width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: conic-gradient(var(--lime-400) calc(var(--p) * 1%), rgba(255,255,255,.12) 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--teal-800); }
.score-ring div { position: relative; z-index: 1; text-align: center; color: #fff; }
.score-ring b { font-family: var(--font-head); font-size: 2.8rem; display: block; line-height: 1; }
.review-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; margin-bottom: 12px; }
.review-item.right { border-left: 0; box-shadow: inset 4px 0 0 var(--teal-500); }
.review-item.wrong { box-shadow: inset 4px 0 0 var(--coral-500); }
.review-item .ans { font-size: .92rem; margin: 6px 0; }
.review-item .exp { font-size: .92rem; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 8px 0 0; }

/* ---------- Kalkulator ---------- */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .calc-layout { grid-template-columns: minmax(0, 1fr); } }
.formula { font-family: var(--font-head); font-weight: 600; display: inline-flex; align-items: center; gap: 12px; background: var(--teal-800); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 1.05rem; }
.formula .frac { display: inline-grid; text-align: center; line-height: 1.2; }
.formula .frac span:first-child { border-bottom: 2px solid var(--lime-400); padding: 0 6px 2px; }
.formula .frac span:last-child { padding-top: 2px; }
.result-card { background: var(--teal-900); color: #d8efe9; border-radius: var(--radius-lg); padding: 26px; position: relative; overflow: hidden; }
.result-card h3 { color: #fff; }
.result-value { font-family: var(--font-head); font-weight: 800; font-size: 3.4rem; color: var(--lime-400); line-height: 1; }
.result-value.adb { color: var(--mint-300); }
.result-value.thal { color: var(--coral-500); }
.result-tag { display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; background: rgba(255,255,255,.1); color: #fff; }
.result-tag.thal { background: var(--coral-600); }
.result-tag.adb { background: var(--mint-300); color: var(--teal-950); }
.result-tag.borderline { background: var(--lime-400); color: var(--teal-950); }
.gauge { position: relative; height: 16px; border-radius: 99px; margin: 26px 0 30px; background: linear-gradient(90deg, var(--coral-500) 0%, var(--coral-500) 31%, var(--lime-400) 31%, var(--lime-400) 33%, var(--mint-300) 33%, var(--mint-300) 100%); }
.gauge .needle { position: absolute; top: -8px; width: 4px; height: 32px; background: #fff; border-radius: 4px; transform: translateX(-2px); transition: left .35s ease; box-shadow: 0 0 0 3px rgba(3,47,48,.6); }
.gauge .ticks { position: absolute; top: 22px; left: 0; right: 0; font-size: .76rem; color: #b9d8d1; }
.gauge .ticks span { position: absolute; transform: translateX(-50%); }
.mini-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mini-table th, .mini-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.12); }
.mini-table th { color: var(--mint-300); font-weight: 600; font-size: .82rem; }
.ok-dot, .no-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.ok-dot { background: var(--coral-500); } .no-dot { background: var(--mint-300); }

/* ---------- Tabel data ---------- */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { background: #eef6f4; color: var(--teal-900); text-align: left; font-weight: 700; font-size: .82rem; letter-spacing: .02em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid #e8f1ee; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #f8fcfb; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .actions { white-space: nowrap; text-align: right; }

/* ---------- Grafik ---------- */
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.chart-card details { overflow-x: auto; position: relative; }
.chart-card h3 { font-size: 1.02rem; margin-bottom: 2px; }
.chart-card .sub { color: var(--ink-3); font-size: .84rem; margin-bottom: 12px; }
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 340px; }
.narrative { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; }
.narrative ol { margin: 0; padding-left: 1.2em; }
.narrative li { margin-bottom: .6em; }
.acc-table td, .acc-table th { text-align: center; }
.cm { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px; font-size: .88rem; max-width: 380px; }
.cm div { padding: 10px; border-radius: 10px; text-align: center; background: var(--bg); }
.cm .hd { background: transparent; font-weight: 700; color: var(--ink-2); font-size: .8rem; }
.cm .tp, .cm .tn { background: var(--mint-100); color: var(--teal-900); font-weight: 700; }
.cm .fp, .cm .fn { background: var(--coral-100); color: var(--coral-600); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-family: var(--font-head); font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--teal-600); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); margin: 0 0 16px; }

/* ---------- CTA ---------- */
.cta { border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--teal-700), var(--teal-900)); color: #d5ece6; padding: 36px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; }
.cta::after { content: ""; position: absolute; right: -40px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%; border: 18px solid rgba(211,219,59,.12); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; padding: 26px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-950); color: #b8d6cf; padding: 52px 0 26px; margin-top: 40px; font-size: .94rem; }
.site-footer a { color: #d8efe9; text-decoration: none; }
.site-footer a:hover { color: var(--lime-400); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.07); }
.socials a:hover { background: var(--lime-400); color: var(--teal-950); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .84rem; color: #8fb3ab; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Paginasi ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; padding: 0 10px; }
.pagination .cur { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }

.empty { text-align: center; padding: 50px 20px; color: var(--ink-2); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.search-box { display: flex; gap: 8px; min-width: min(360px, 100%); }
.search-box input { border-radius: 999px; padding-left: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--teal-950); color: #fff; padding: 12px 20px; border-radius: 999px; opacity: 0; transition: .25s; z-index: 200; font-weight: 600; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Instalasi ---------- */
.install-body { background: linear-gradient(160deg, var(--teal-600), var(--teal-950)); min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.install-card { background: #fff; border-radius: var(--radius-lg); padding: 34px; width: min(680px, 100%); box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); }
.checklist { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.checklist li { padding: 10px 14px; border-radius: 10px; background: var(--bg); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.checklist li small { color: var(--ink-3); flex-basis: 100%; padding-left: 26px; }
.checklist .ok span { color: var(--teal-600); font-weight: 800; }
.checklist .bad { background: var(--coral-100); }
.checklist .bad span { color: var(--coral-600); font-weight: 800; }
.install-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =========================================================
   PANEL ADMIN
   ========================================================= */
.admin-body { background: #eef5f3; }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-main .panel, .admin-main .chart-card { min-width: 0; }
.admin-side { background: var(--teal-950); color: #b9d6cf; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { padding: 6px 8px 18px; }
.admin-side .brand-text { font-size: 1.15rem; }
.admin-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.admin-nav .grp { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #8fb3ab; padding: 16px 12px 6px; font-weight: 700; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: #cfe5df; text-decoration: none; font-weight: 600; font-size: .92rem; }
.admin-nav a svg { width: 18px; height: 18px; opacity: .85; }
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.active { background: var(--lime-400); color: var(--teal-950); }
.admin-main { padding: 0 28px 40px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.admin-top h1 { font-size: 1.5rem; margin: 0; }
.admin-user { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); }
.admin-toggle { display: none; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 22px; }
.panel > h2, .panel > h3 { font-size: 1.1rem; margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.1rem; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.page-slug { margin-top: 4px; font-size: .78rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-slug code { font-size: .78rem; word-break: break-all; }
.link-btn { border: 0; background: none; padding: 0; color: var(--teal-600); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 3px; align-items: center; }
.link-btn:hover { text-decoration: underline; }
table.data td.actions { white-space: nowrap; }
/* Tabel menjadi kartu di layar kecil (dipakai daftar halaman) */
@media (max-width: 700px) {
  table.data.cards thead { display: none; }
  table.data.cards, table.data.cards tbody, table.data.cards tr, table.data.cards td { display: block; width: 100%; }
  table.data.cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; }
  table.data.cards td { border: 0; padding: 4px 0 4px 34px; }
  table.data.cards td:first-child { position: absolute; left: 12px; top: 14px; padding: 0; width: auto; }
  table.data.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-3); font-size: .8rem; font-weight: 600; }
  table.data.cards td.actions { text-align: left; white-space: normal; padding-top: 8px; }
  table.data.cards td.actions .btn { margin: 2px 4px 2px 0; }
}
.thumb-sm { width: 64px; height: 48px; object-fit: cover; object-position: top; border-radius: 8px; background: var(--teal-800); display: block; }
.inline-form { display: inline; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filters label { min-width: 150px; }
.map-table td { vertical-align: middle; }
.map-table select { min-width: 220px; }
.pill-count { display: inline-block; min-width: 26px; padding: 1px 8px; border-radius: 99px; background: var(--mint-100); color: var(--teal-800); font-weight: 700; font-size: .8rem; text-align: center; }
.bar { height: 10px; background: var(--mint-100); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar span { display: block; height: 100%; background: var(--teal-600); }
.bar.low span { background: var(--coral-500); }
.bar.mid span { background: var(--lime-400); }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.open { transform: none; }
  .admin-toggle { display: inline-flex; }
  .admin-main { padding: 0 16px 30px; }
}

/* Editor teks kaya (WYSIWYG ringan) */
.rte { border: 1.5px solid #c9dcd7; border-radius: 12px; background: #fff; overflow: hidden; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: #f2f8f6; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.rte-bar button { border: 0; background: transparent; min-width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-weight: 700; color: var(--teal-900); font-family: var(--font-body); font-size: .88rem; padding: 0 8px; }
.rte-bar button:hover { background: var(--mint-200); }
.rte-bar .sep { width: 1px; background: var(--line); margin: 4px 4px; }
.rte-area { min-height: 320px; max-height: 70vh; overflow-y: auto; padding: 16px 18px; outline: none; }
.rte-area:focus { box-shadow: inset 0 0 0 2px rgba(11,124,118,.25); }
.rte-src { display: none; width: 100%; min-height: 320px; border: 0; border-radius: 0; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.rte.source .rte-area { display: none; }
.rte.source .rte-src { display: block; }

/* Utilitas */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.hide { display: none !important; }
@media print {
  .site-header, .site-footer, .no-print, .share-row, .admin-side, .admin-top .btn { display: none !important; }
  body { background: #fff; }
  .chart-box { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
