/* ============================================================
   Ruang Tumbuh — Panduan Stimulasi Anak 1–5 Tahun
   Stylesheet utama
   ============================================================ */

/* ---------- 1. Token & reset ---------- */
:root {
  --cream: #fbf6ec;
  --paper: #fffdf8;
  --ink: #2b2a26;
  --ink-soft: #5f5b51;
  --ink-faint: #6f675b;
  --line: #e7ddcc;
  --line-strong: #d8cbb5;

  --sage: #6e8b6a;
  --sage-soft: #e8efe3;
  --sage-ink: #3f573c;

  --terracotta: #bd6449;
  --terracotta-soft: #f7e3da;
  --terracotta-ink: #7c3c29;

  --mustard: #d19a35;
  --mustard-soft: #f9edd2;
  --mustard-ink: #7a5716;

  --sky: #6d92a7;
  --sky-soft: #e4eef3;
  --sky-ink: #385868;

  --blush: #e9c8bb;

  --accent: var(--terracotta);
  --accent-soft: var(--terracotta-soft);
  --accent-ink: var(--terracotta-ink);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(74, 58, 36, 0.05);
  --shadow: 0 14px 40px rgba(74, 58, 36, 0.08);
  --shadow-lg: 0 30px 70px rgba(74, 58, 36, 0.12);

  --max: 1140px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -100px, rgba(233, 200, 187, 0.35), transparent 70%),
    radial-gradient(700px 420px at -10% 30%, rgba(110, 139, 106, 0.1), transparent 70%),
    var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.age-1-2 {
  --accent: var(--terracotta);
  --accent-soft: var(--terracotta-soft);
  --accent-ink: var(--terracotta-ink);
}

body.age-2-3 {
  --accent: var(--mustard);
  --accent-soft: var(--mustard-soft);
  --accent-ink: var(--mustard-ink);
}

body.age-3-4 {
  --accent: var(--sage);
  --accent-soft: var(--sage-soft);
  --accent-ink: var(--sage-ink);
}

body.age-4-5 {
  --accent: var(--sky);
  --accent-soft: var(--sky-soft);
  --accent-ink: var(--sky-ink);
}

img,
svg {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.35em;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

small {
  font-size: 0.82rem;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.wrap {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- 2. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(231, 221, 204, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand span small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.2;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
}

.nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--cream);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* ---------- 3. Buttons & pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: var(--paper);
}

.btn--small {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.btn--block {
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.pill--neutral {
  background: #f1ece2;
  color: var(--ink-soft);
}

.pill--outline {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- 4. Hero ---------- */
.age-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 52px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.hero-copy h1 {
  margin-bottom: 18px;
}

.hero-copy h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 56ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.orbit {
  position: absolute;
  inset: 6%;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.orbit--inner {
  inset: 21%;
  border-style: dashed;
  opacity: 0.8;
}

.orbit--dotted {
  inset: 37%;
  border-style: dotted;
  opacity: 0.7;
}

.hero-sun {
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff8e8 0%, var(--accent-soft) 45%, var(--accent) 100%);
  box-shadow: 0 24px 60px rgba(189, 100, 73, 0.22);
  position: relative;
}

.hero-sun::after {
  content: "";
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.hero-age {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--accent-ink);
  z-index: 1;
}

.hero-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 172px;
}

.hero-chip small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.hero-chip .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.hero-chip--a {
  top: 7%;
  left: 0;
  transform: rotate(-3deg);
}

.hero-chip--b {
  bottom: 13%;
  right: 0;
  transform: rotate(3deg);
}

.hero-chip--c {
  bottom: 2%;
  left: 9%;
  transform: rotate(-1deg);
}

.hero-chip--d {
  top: 16%;
  right: 2%;
  transform: rotate(2deg);
}

/* ---------- 5. Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--accent-ink);
  letter-spacing: -0.02em;
}

.stat-value span {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  margin-left: 2px;
}

.stat-label {
  display: block;
  margin-top: 7px;
  font-size: 0.8rem;
  font-weight: 700;
}

.stat-note {
  display: block;
  margin-top: 2px;
  font-size: 0.73rem;
  color: var(--ink-faint);
  line-height: 1.4;
}

/* ---------- 6. Page TOC ---------- */
.page-toc {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.55);
}

.toc-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: thin;
}

.toc-scroll a {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.toc-scroll a:hover {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}

/* ---------- 7. Sections ---------- */
.section {
  padding: 66px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 84px;
}

.section:last-of-type {
  border-bottom: 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin-bottom: 0;
}

.section-head--wide {
  max-width: 840px;
}

.lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ---------- 8. Cards & grids ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: start;
}

.card--tint {
  background: linear-gradient(165deg, var(--accent-soft), var(--paper) 78%);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}

.card--ink {
  background: var(--ink);
  color: #f3ecdf;
  border-color: var(--ink);
}

.card--ink h3,
.card--ink h4 {
  color: #fff8ec;
}

.card--ink p,
.card--ink li {
  color: #ded5c6;
}

.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.icon-badge svg {
  width: 22px;
  height: 22px;
}

/* ---------- 9. Domain chips / mini cards ---------- */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.domain {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
}

.domain h4 {
  margin: 10px 0 6px;
  font-size: 0.88rem;
}

.domain p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.domain-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 1rem;
}

/* ---------- 10. Milestones ---------- */
.ms-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 18px;
}

.ms-progress-wrap {
  flex: 1 1 260px;
  min-width: 220px;
}

.ms-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ms-progress-top span:last-child {
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 10px;
  background: #efe8db;
  border-radius: 999px;
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--mustard)));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-group {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px 10px;
  margin-bottom: 12px;
}

.ms-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.ms-group-head h3 {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
}

.ms-count {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.ms-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.ms-item {
  margin: 0;
}

.ms-item label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ms-item label:hover {
  background: #faf5ea;
}

.ms-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ms-box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.6px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  display: grid;
  place-items: center;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.ms-box::after {
  content: "";
  width: 5px;
  height: 10px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg) translate(-1px, -1px) scale(0);
  transition: transform 0.18s ease;
}

.ms-item input:checked + .ms-box {
  background: var(--accent);
  border-color: var(--accent);
}

.ms-item input:checked + .ms-box::after {
  transform: rotate(45deg) translate(-1px, -1px) scale(1);
}

.ms-item input:focus-visible + .ms-box {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.ms-text {
  font-size: 0.92rem;
  line-height: 1.55;
  transition: color 0.18s ease;
}

.ms-item input:checked ~ .ms-text {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.ms-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ---------- 11. Activities ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.filter-spacer {
  flex: 1;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.activity-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.activity-card.is-picked {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
  animation: picked 1.4s ease;
}

@keyframes picked {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-4px); }
}

.activity-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.activity-card h3 {
  font-size: 1.28rem;
  margin-bottom: 8px;
}

.activity-goal {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.meta {
  background: #f8f2e7;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.76rem;
  line-height: 1.4;
}

.meta b {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1px;
}

.steps {
  margin: 0 0 14px;
  padding-left: 1.15em;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.steps li {
  margin-bottom: 0.3em;
}

.activity-tip {
  margin-top: auto;
  border-top: 1px dashed var(--line-strong);
  padding-top: 12px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  gap: 8px;
}

.activity-tip b {
  color: var(--accent-ink);
  white-space: nowrap;
}

.activity-count {
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-weight: 600;
}

/* ---------- 12. Timeline ---------- */
.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 26px;
}

.timeline-controls .field {
  max-width: 190px;
}

.timeline {
  position: relative;
  padding: 4px 0;
}

.tl-row {
  display: grid;
  grid-template-columns: 74px 26px minmax(0, 1fr);
  gap: 14px;
  padding: 7px 0;
}

.tl-time {
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  padding-top: 3px;
  text-align: right;
}

.tl-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.tl-marker::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: -18px;
  width: 2px;
  background: var(--line);
}

.tl-row:last-child .tl-marker::before {
  display: none;
}

.tl-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.tl-row[data-kind="sleep"] .tl-dot {
  background: var(--sky);
  box-shadow: 0 0 0 4px var(--sky-soft);
}

.tl-row[data-kind="meal"] .tl-dot {
  background: var(--mustard);
  box-shadow: 0 0 0 4px var(--mustard-soft);
}

.tl-row[data-kind="care"] .tl-dot {
  background: var(--sage);
  box-shadow: 0 0 0 4px var(--sage-soft);
}

.tl-content {
  padding-bottom: 8px;
}

.tl-content h3,
.tl-content h4 {
  margin: 0 0 2px;
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tl-content p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.tl-row[data-kind="sleep"] .tl-content h3,
.tl-row[data-kind="sleep"] .tl-content h4 {
  color: var(--sky-ink);
}

/* ---------- 13. Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 14px 18px 0;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

th {
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) td {
  background: #fdf9f1;
}

td strong {
  color: var(--ink);
}

td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- 14. Callouts ---------- */
.callout {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 0 14px 14px 0;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  margin: 18px 0;
  font-size: 0.9rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout b {
  color: var(--accent-ink);
}

.callout--warn {
  border-left-color: #b4543f;
  background: #f9e5df;
}

.callout--warn b {
  color: #7c2f1f;
}

.callout--info {
  border-left-color: var(--sky);
  background: var(--sky-soft);
}

.callout--info b {
  color: var(--sky-ink);
}

.callout--tip {
  border-left-color: var(--sage);
  background: var(--sage-soft);
}

.callout--tip b {
  color: var(--sage-ink);
}

.callout-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent-ink);
}

/* ---------- 15. Calculator ---------- */
.calc {
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(255, 255, 255, 0.7), transparent 70%),
    linear-gradient(160deg, var(--accent-soft), var(--paper));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
}

.field input[type="time"] {
  font-variant-numeric: tabular-nums;
}

.field .hint {
  display: block;
  margin-top: 5px;
  font-size: 0.7rem;
  color: var(--ink-faint);
  line-height: 1.4;
}

.calc-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 16px 18px;
}

.calc-total {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.calc-total small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #eee8dc;
  color: var(--ink-soft);
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status.is-ok {
  background: var(--sage-soft);
  color: var(--sage-ink);
}

.status.is-low {
  background: #f9e5df;
  color: #8a3a26;
}

.status.is-high {
  background: var(--mustard-soft);
  color: var(--mustard-ink);
}

.calc-note {
  margin: 12px 0 0;
  font-size: 0.76rem;
  color: var(--ink-faint);
}

/* ---------- 16. FAQ ---------- */
.faq-list {
  display: grid;
  gap: 10px;
}

details.faq {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

details.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 700;
  list-style: none;
}

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

details.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

details.faq[open] summary::after {
  content: "–";
}

details.faq[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq-body {
  padding: 16px 20px 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.faq-body p:last-child,
.faq-body ul:last-child {
  margin-bottom: 0;
}

/* ---------- 17. Sources & footnotes ---------- */
.ref {
  display: inline-block;
  font-size: 0.66em;
  font-weight: 800;
  line-height: 1;
  vertical-align: super;
  padding: 2px 4px;
  margin-left: 1px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-decoration: none;
}

.ref:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.source-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.source-list li {
  padding-left: 18px;
  position: relative;
  margin: 0;
}

.source-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- 18. Index: age picker ---------- */
.home-hero {
  padding: 72px 0 54px;
  position: relative;
  overflow: hidden;
}

.home-hero .hero-grid {
  grid-template-columns: 1.08fr 0.92fr;
}

.home-title {
  font-size: clamp(2.8rem, 7vw, 5.1rem);
}

.home-title em {
  font-style: italic;
  color: var(--terracotta);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.age-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.age-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.age-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--card-accent, var(--accent));
}

.age-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
  text-decoration: none;
}

.age-card .age-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--card-accent, var(--accent));
  margin-bottom: 6px;
}

.age-card h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.age-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.age-card .age-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.age-card .age-stats span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: #f7f1e6;
  border-radius: 999px;
  padding: 4px 9px;
}

.age-card .go {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--card-accent, var(--accent));
  transition: background 0.2s ease, color 0.2s ease;
}

.age-card:hover .go {
  background: var(--card-accent, var(--accent));
  color: #fff;
}

.principles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.principle {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 18px;
}

.principle .num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--terracotta);
  display: block;
  margin-bottom: 10px;
}

.principle h3 {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.principle p {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

.idea-box {
  background: var(--ink);
  color: #f6efe2;
  border-radius: var(--radius-lg);
  padding: 38px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.idea-box::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  right: -80px;
  top: -100px;
}

.idea-box h2 {
  color: #fff8ec;
  margin-bottom: 8px;
}

.idea-box p {
  color: #d8cfc0;
  margin-bottom: 0;
  max-width: 58ch;
}

.idea-box .btn {
  background: var(--mustard);
  color: #33260d;
  position: relative;
  z-index: 1;
}

#idea-text {
  min-height: 3.2em;
}

.idea-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mustard);
}

/* ---------- 19. References page ---------- */
.ref-group {
  margin-bottom: 34px;
}

.ref-group h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.ref-group > p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.ref-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 10px;
  scroll-margin-top: 96px;
}

.ref-item:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ref-item h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.ref-item .citation {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.ref-item .ref-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.ref-tags span {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #f4eee2;
  color: var(--ink-faint);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- 20. Footer ---------- */
.site-footer {
  background: #262520;
  color: #cfc6b7;
  padding: 52px 0 28px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.site-footer .brand {
  color: #fbf6ec;
  margin-bottom: 12px;
}

.site-footer .brand small {
  color: #9d9587;
}

.site-footer p {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #b3aa9b;
  max-width: 42ch;
}

.site-footer h3,
.site-footer h4 {
  color: #fbf6ec;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
}

.footer-links a {
  color: #c5bcad;
  text-decoration: none;
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  color: #9a9182;
}

.disclaimer-box {
  background: #f4eee2;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.disclaimer-box strong {
  color: var(--ink);
}

/* ---------- 21. Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 22. Print ---------- */
.print-only {
  display: none;
}

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: #fff;
    font-size: 10.5pt;
    color: #000;
  }

  .site-header,
  .site-footer,
  .page-toc,
  .filter-bar,
  .timeline-controls,
  .no-print,
  .hero-art,
  .home-actions,
  .idea-box .btn,
  .calc button {
    display: none !important;
  }

  body.print-checklist .age-hero,
  body.print-schedule .age-hero,
  body.print-checklist main > section:not(#milestone),
  body.print-schedule main > section:not(#jadwal) {
    display: none !important;
  }

  body.print-checklist #milestone,
  body.print-schedule #jadwal {
    background: #fff;
    border: 0;
  }

  .print-only {
    display: block;
  }

  .wrap {
    width: 100%;
  }

  .age-hero {
    padding: 0 0 18px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 14px;
  }

  .stat,
  .card,
  .activity-card,
  .ms-group,
  .ref-item {
    box-shadow: none !important;
    border-color: #ccc;
    break-inside: avoid;
  }

  .section {
    padding: 20px 0;
    border-color: #ddd;
  }

  .activity-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .domain-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .ref {
    background: none;
    color: #000;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- 23. Responsive ---------- */
@media (max-width: 1040px) {
  .hero-grid,
  .home-hero .hero-grid {
    gap: 32px;
  }

  .domain-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 11px 14px;
    border-radius: 10px;
  }

  .hero-grid,
  .home-hero .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
    min-height: 300px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .idea-box {
    grid-template-columns: 1fr;
    padding: 30px;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 50px 0;
  }

  .activity-grid,
  .grid-2,
  .grid-3,
  .age-grid {
    grid-template-columns: 1fr;
  }

  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }

  .tl-row {
    grid-template-columns: 62px 22px minmax(0, 1fr);
    gap: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .age-hero {
    padding: 38px 0 30px;
  }

  .hero-chip--c {
    display: none;
  }
}

/* ---------- 24. Utilitas ---------- */
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.day-mark {
  font-size: 0.6rem;
  font-weight: 800;
  vertical-align: super;
  margin-left: 1px;
  color: var(--ink-faint);
}

.section--tint {
  background: rgba(255, 253, 248, 0.45);
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 18px; }
.mt-3 { margin-top: 28px; }
.mb-2 { margin-bottom: 18px; }

.mini-note {
  font-size: 0.78rem;
  color: var(--ink-faint);
  line-height: 1.55;
}

.two-col-check {
  columns: 2;
  column-gap: 28px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.two-col-check li {
  break-inside: avoid;
}

@media (max-width: 600px) {
  .two-col-check { columns: 1; }
}

@media (max-width: 480px) {
  .wrap {
    width: min(100% - 28px, var(--max));
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat {
    padding: 15px;
  }

  .stat-value {
    font-size: 1.45rem;
  }

  .card,
  .activity-card {
    padding: 20px;
  }

  .domain-grid,
  .principles {
    grid-template-columns: 1fr;
  }

  .meta-row {
    grid-template-columns: 1fr;
  }

  .calc {
    padding: 20px;
  }

  .brand span small {
    display: none;
  }

  .hero-art {
    min-height: 260px;
  }

  .hero-chip {
    font-size: 0.7rem;
    padding: 8px 10px;
    max-width: 145px;
  }
}
