/* Biosistematika — tema terang terkunci. Tidak ada dark mode. */
:root {
  color-scheme: light;
  --bg: #f4f7f3;
  --surface: #ffffff;
  --ink: #17301f;
  --muted: #4c6a55;
  --line: #d8e2d8;
  --green: #1d6a3f;
  --green-dark: #14532d;
  --green-soft: #3d5a46;
  --pale: #eaf4ec;
  --pale2: #e2efe4;
  --pale3: #f2f7f2;
  --amber: #a85b12;
  --cream: #f7ecdc;
  --danger: #9b2c2c;
  --radius: 12px;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Spectral", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
body.no-scroll { overflow: hidden; }
a { color: var(--green); }
a:visited { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.45rem; color: var(--green-dark); }
p { margin: 0 0 .75rem; }
.mono { font-family: var(--font-mono); }

/* ---------- header / footer ---------- */
.site-header {
  background: var(--green-dark);
  color: #fff;
  padding: .8rem 1rem;
}
.site-header .inner { max-width: 960px; margin: 0 auto; display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.site-header .brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: #fff; text-decoration: none; }
.site-header .brand-sub { color: var(--pale2); font-size: .9rem; }
.site-header nav { margin-left: auto; }
.site-header nav a { color: #fff; text-decoration: none; font-size: .92rem; }
.site-header nav a:hover { text-decoration: underline; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem 3rem; }
.site-footer { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1rem; color: var(--muted); font-size: .85rem; }
.site-footer .credit { margin-top: .35rem; }

/* ---------- hero ---------- */
.hero { padding: 1.6rem 0 .6rem; }
.hero .kicker { color: var(--amber); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { font-size: 1.9rem; margin: .25rem 0 .5rem; }
.hero .meta { color: var(--muted); font-size: .95rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .meta b { color: var(--ink); }
.hero-photo { margin: 1rem 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.hero-photo img { display: block; width: 100%; height: auto; }
.hero-photo figcaption { background: var(--surface); color: var(--muted); font-size: .8rem; padding: .45rem .7rem; }

/* ---------- sections ---------- */
section.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-top: 1rem; }
section.block > h2 { margin-bottom: .8rem; }
.section-sub { color: var(--muted); font-size: .92rem; margin: -.4rem 0 .8rem; }

/* ---------- player ---------- */
.player-card { background: #101613; border-radius: var(--radius); overflow: hidden; margin-top: 1rem; border: 1px solid var(--line); }
.video-wrap { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-wrap video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.spinner {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px;
  margin: -22px 0 0 -22px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: spin 1s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.big-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%; border: none;
  background: rgba(29, 106, 63, .92); color: #fff; font-size: 26px; cursor: pointer;
}
.big-play[hidden] { display: none; }
.err-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .6rem;
  background: rgba(0,0,0,.72); color: #fff; text-align: center; padding: 1rem;
}
.err-overlay[hidden] { display: none; }
.controls {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .6rem .7rem calc(.6rem + env(safe-area-inset-bottom, 0px));
  background: #101613; color: #eaf4ec;
}
.controls button {
  border: 1px solid #3d5a46; background: #1d6a3f; color: #fff;
  border-radius: 8px; padding: .42rem .8rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.controls button[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); }
.controls input[type="range"] { flex: 1 1 160px; accent-color: #7fb98f; min-width: 120px; }
.controls .time { font-family: var(--font-mono); font-size: .85rem; white-space: nowrap; }
.player-card.stage { position: fixed; inset: 0; z-index: 100; border-radius: 0; margin: 0; display: flex; flex-direction: column; }
.player-card.stage .video-wrap { flex: 1; aspect-ratio: auto; min-height: 0; }
.player-card.stage .controls { flex: none; }

/* ---------- chapter list ---------- */
.chapter-list { list-style: none; margin: 0; padding: 0; }
.chapter-list li { border-top: 1px solid var(--line); }
.chapter-list li:first-child { border-top: none; }
.chapter-list button {
  display: flex; gap: .7rem; width: 100%; text-align: left; background: none;
  border: none; padding: .65rem .2rem; font: inherit; cursor: pointer; align-items: flex-start;
}
.chapter-list button:hover .ch-title { color: var(--green); text-decoration: underline; }
.chapter-list .ch-num { font-family: var(--font-mono); color: var(--muted); min-width: 2ch; padding-top: .1rem; }
.chapter-list .ch-time { font-family: var(--font-mono); font-size: .82rem; color: var(--green-dark); background: var(--pale); border-radius: 6px; padding: .1rem .45rem; white-space: nowrap; margin-top: .1rem; }
.chapter-list .ch-body { flex: 1; min-width: 0; }
.chapter-list .ch-title { font-weight: 700; }
.chapter-list .ch-desc { color: var(--muted); font-size: .92rem; }
.chapter-list li.active { background: var(--pale3); }
.chapter-list li.active .ch-title { color: var(--green-dark); }
.chapter-list .ch-done { color: var(--green); font-weight: 700; }

/* ---------- summary / lists ---------- */
.tick-list { margin: 0; padding-left: 1.2rem; }
.tick-list li { margin-bottom: .55rem; }
.tick-list li::marker { color: var(--green); }

/* ---------- quiz ---------- */
.q-list { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.q-list > li { border-top: 1px solid var(--line); padding: .7rem 0; }
.q-list > li:first-child { border-top: none; }
.q-text { font-weight: 600; }
.q-answer { background: var(--pale); border-left: 3px solid var(--green); border-radius: 0 8px 8px 0; padding: .55rem .7rem; margin-top: .5rem; }
.q-answer[hidden] { display: none; }
.btn {
  border: 1px solid var(--green); background: var(--surface); color: var(--green-dark);
  border-radius: 8px; padding: .35rem .7rem; font: inherit; font-size: .88rem; cursor: pointer; margin-top: .45rem;
}
.btn:hover { background: var(--pale); }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- flashcards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.flashcard {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--pale3);
  padding: .9rem; min-height: 110px; cursor: pointer; text-align: left; font: inherit; width: 100%;
}
.flashcard:hover { border-color: var(--green); }
.flashcard .fc-label { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--amber); }
.flashcard .fc-text { margin-top: .35rem; font-weight: 600; }
.flashcard .fc-hint { margin-top: .5rem; font-size: .8rem; color: var(--muted); }

/* ---------- diagrams ---------- */
.fig { margin: 0 0 1rem; }
.fig svg { max-width: 100%; height: auto; display: block; }
.fig-cap { color: var(--muted); font-size: .88rem; margin-top: .35rem; }
.upgma-step { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; margin-bottom: .6rem; background: var(--pale3); }
.photo-item { margin: 0 0 1rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.photo-item img { display: block; width: 100%; height: auto; }
.photo-item figcaption { background: var(--surface); color: var(--muted); font-size: .8rem; padding: .45rem .7rem; }

/* ---------- index page ---------- */
.meeting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .9rem; margin-top: 1rem; }
.meeting-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); }
.meeting-card:hover { border-color: var(--green); }
.meeting-card .m-num { font-family: var(--font-mono); font-size: .8rem; color: var(--amber); font-weight: 700; }
.meeting-card h3 { font-size: 1.12rem; margin: .2rem 0 .3rem; color: var(--ink); }
.meeting-card .m-meta { color: var(--muted); font-size: .88rem; }
.progress-line { height: 8px; background: var(--pale2); border-radius: 4px; overflow: hidden; margin-top: 1rem; }
.progress-line > span { display: block; height: 100%; background: var(--green); }
