/*
Theme Name: Ilmu Hitung Plus
Theme URI: https://ilmuhitung.com
Author: Ilmu Hitung
Description: Tema WordPress edukasi matematika profesional berbahasa Indonesia untuk SD hingga universitas. Estetis, SEO-friendly, responsif, dilengkapi game action, worksheet, dan simulasi TKA.
Version: 5.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: ilmuhitung
*/

/* ===== Design System ===== */
:root {
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #3b82f6;
  --sky: #eff6ff;
  --sky-2: #dbeafe;
  --yellow: #fbbf24;
  --yellow-soft: #fef3c7;
  --coral: #f87171;
  --mint: #d1fae5;
  --mint-dark: #059669;
  --lilac: #ede9fe;
  --paper: #fafbfc;
  --white: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 10px 20px -5px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 20px 40px -10px rgba(15, 23, 42, 0.12);
  --shadow-btn: 0 4px 0 #1d4ed8;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
  --container: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--blue-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.2; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
button, input, select, textarea { font: inherit; }
.container { width: min(var(--container), calc(100% - 2.5rem)); margin-inline: auto; }

/* ===== Header ===== */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--yellow), #f59e0b);
  font-size: 1.35rem;
  color: #1e293b;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.35);
}
.main-nav ul {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover {
  background: var(--sky);
  color: var(--blue);
  text-decoration: none;
}
.menu-toggle {
  display: none;
  border: 0;
  background: var(--sky);
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--ink);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--blue);
  color: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s var(--ease), box-shadow 0.15s, background 0.15s;
  text-decoration: none;
  line-height: 1.3;
}
.btn:hover {
  background: var(--blue-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--blue-dark);
}
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--blue-dark); }
.btn-light {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--line-strong);
}
.btn-light:hover {
  background: var(--sky);
  color: var(--ink);
  box-shadow: 0 6px 0 var(--line-strong);
}
.btn-small { padding: 0.5rem 0.95rem; font-size: 0.875rem; border-radius: 10px; }
.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  box-shadow: none;
}
.btn-outline:hover { background: var(--sky); color: var(--blue-dark); box-shadow: none; transform: none; }
.btn-coral { background: var(--coral); box-shadow: 0 4px 0 #e11d48; }
.btn-coral:hover { background: #e11d48; box-shadow: 0 6px 0 #e11d48; }

/* ===== Hero ===== */
.hero {
  padding: 4.5rem 0 4rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(251, 191, 36, 0.18) 0%, transparent 28%),
    radial-gradient(circle at 5% 90%, rgba(37, 99, 235, 0.08) 0%, transparent 30%),
    linear-gradient(160deg, #f0f7ff 0%, var(--paper) 55%);
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 1rem 0 1rem;
}
.hero h1 span { color: var(--blue); }
.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}
.hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.math-art {
  min-height: 300px;
  display: grid;
  place-items: center;
  position: relative;
}
.math-board {
  width: min(340px, 100%);
  aspect-ratio: 1.12;
  border: 8px solid var(--white);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 900;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  line-height: 1.3;
  text-align: center;
  padding: 1.5rem;
}
.math-board small {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.4rem;
}
.float {
  position: absolute;
  border-radius: 14px;
  padding: 0.65rem 1.1rem;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  background: var(--yellow);
  color: var(--ink);
}
.float.one { top: 12px; left: 0; transform: rotate(-8deg); }
.float.two { right: 0; bottom: 24px; background: var(--mint); transform: rotate(7deg); }
.float.three { left: 10px; bottom: 28px; background: var(--lilac); transform: rotate(-4deg); }

/* ===== Sections ===== */
.section { padding: 4.5rem 0; }
.section-soft { background: linear-gradient(180deg, #f1f5f9 0%, var(--paper) 100%); }
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 0.65rem;
}
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

/* ===== Cards & Grids ===== */
.topic-grid, .level-grid, .post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.level-grid { grid-template-columns: repeat(4, 1fr); }
.topic-card, .content-card, .level-card, .post-card, .ih-tka-grade-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.topic-card:hover, .content-card:hover, .level-card:hover, .post-card:hover, .ih-tka-grade-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.topic-icon, .level-emoji {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--sky);
}
.topic-card:nth-child(3n+2) .topic-icon { background: var(--yellow-soft); }
.topic-card:nth-child(3n) .topic-icon { background: var(--mint); }
.topic-card h3, .content-card h2, .level-card h3, .post-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.topic-card p, .content-card p, .level-card p, .post-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}
.topic-card a, .post-card a { font-weight: 700; font-size: 0.9rem; }
.level-emoji { font-size: 1.75rem; background: transparent; width: auto; height: auto; margin-bottom: 0.75rem; }

/* Feature band */
.feature-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, var(--blue) 0%, #1e40af 100%);
  color: #fff;
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.feature-band h2 { color: #fff; margin-bottom: 0.35rem; }
.feature-band p { color: rgba(255,255,255,0.85); margin: 0; }
.feature-band .btn { background: #fff; color: var(--blue); box-shadow: 0 4px 0 #bfdbfe; }
.feature-band .btn:hover { background: var(--sky); }

/* ===== Page content ===== */
.page-content { padding: 2.5rem 0 4rem; }
.page-layout { max-width: 780px; }
.entry-content { font-size: 1.05rem; }
.entry-content h2 { margin-top: 1.75rem; }
.tag-pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--sky);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}
.post-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }
.post-card img { border-radius: var(--radius-sm) var(--radius-sm) 0 0; width: 100%; aspect-ratio: 16/10; object-fit: cover; margin: -1.5rem -1.5rem 1rem; width: calc(100% + 3rem); max-width: none; }
.pagination { margin-top: 2rem; text-align: center; }

/* ===== Tools ===== */
.tool-card, .mc-tool {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.tool-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.tool-row input {
  flex: 1;
  min-width: 120px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.tool-result, .quiz-feedback {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--sky);
  border-radius: 10px;
  font-weight: 600;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.quiz-option {
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.quiz-option:hover { border-color: var(--blue); background: var(--sky); }
.quiz-option.correct { border-color: var(--mint-dark); background: var(--mint); }
.quiz-option.wrong { border-color: var(--coral); background: #fef2f2; }
.mc-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.mc-controls label { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.mc-3d-canvas, .mc-graph-canvas {
  width: 100%;
  max-width: 850px;
  height: auto;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.mc-note { color: var(--muted); font-size: 0.95rem; }

/* ===== Games Arcade ===== */
.ih-games-hub { margin: 1.5rem 0; }
.ih-games-intro { text-align: center; margin-bottom: 1.75rem; }
.ih-games-intro h2 { font-size: 1.85rem; }
.ih-arcade-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ih-arcade-toolbar label { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.9rem; }
.ih-arcade-toolbar select {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 600;
}
.ih-arcade-best { font-weight: 700; color: var(--blue); margin-left: auto; }
.ih-game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  justify-content: center;
}
.ih-game-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--ink-soft);
}
.ih-game-tab:hover { border-color: var(--blue); background: var(--sky); }
.ih-game-tab.is-active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.ih-arcade-stage {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  margin: 0 auto;
}
.ih-game-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ih-game-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.ih-current-title { font-size: 1.4rem; margin: 0.2rem 0 0.15rem; }
.ih-current-desc { color: var(--muted); font-size: 0.9rem; margin: 0; }
.ih-game-level-pill {
  background: linear-gradient(135deg, var(--yellow), #f59e0b);
  color: #1e293b;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}
.ih-game-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}
.ih-game-stats b { color: var(--ink); font-weight: 800; }
.ih-game-progress {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.ih-game-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  border-radius: 999px;
  transition: width 0.3s var(--ease);
}
.ih-game-question {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--sky);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  min-height: 5rem;
  display: grid;
  place-items: center;
}
.ih-game-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.ih-game-answers button {
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s;
}
.ih-game-answers button:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--sky);
  transform: scale(1.02);
}
.ih-game-answers button.correct { border-color: var(--mint-dark); background: var(--mint); }
.ih-game-answers button.wrong { border-color: var(--coral); background: #fef2f2; }
.ih-game-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.ih-combo {
  text-align: center;
  font-weight: 800;
  color: var(--coral);
  font-size: 0.95rem;
  min-height: 1.4em;
  margin-bottom: 0.5rem;
}
.ih-feedback-flash {
  text-align: center;
  font-weight: 700;
  margin: 0.5rem 0;
  min-height: 1.4em;
}

/* ===== Worksheet ===== */
.ih-worksheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}
.ih-worksheet-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: end;
}
.ih-worksheet-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.85rem;
}
.ih-worksheet-controls select,
.ih-worksheet-controls input {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-weight: 600;
}
.ih-worksheet-output {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-height: 200px;
  background: #fafbfc;
}
.ih-worksheet-placeholder {
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}
.ih-worksheet-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}
.ih-worksheet-header h2 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.ih-worksheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.ih-worksheet-student {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}
.ih-worksheet-student span {
  border-bottom: 1px solid var(--ink);
  min-height: 1.6em;
  display: block;
}
.ih-worksheet-list { padding-left: 1.5rem; }
.ih-worksheet-list li {
  margin-bottom: 1.35rem;
  page-break-inside: avoid;
}
.ih-worksheet-list li > div:first-child { font-weight: 600; margin-bottom: 0.4rem; }
.ih-answer-line {
  border-bottom: 1px solid var(--line-strong);
  height: 1.6em;
  margin-top: 0.35rem;
}
.ih-answer-line-extra { margin-top: 0.5rem; }
.ih-worksheet-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.ih-worksheet-key {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--line-strong);
  page-break-before: always;
}
.ih-worksheet-key h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.ih-w-history {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--sky);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.ih-w-history ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }

/* ===== Curriculum / Materi ===== */
.ih-curriculum { margin: 1.5rem 0; }
.ih-curr-level {
  margin-bottom: 2.5rem;
}
.ih-curr-level > h2 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--line);
}
.ih-curr-grade {
  margin-bottom: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.ih-curr-grade h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 0.85rem;
}
.ih-curr-topics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.ih-curr-topics li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--paper);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.ih-curr-topics li:hover {
  border-color: var(--sky-2);
  background: var(--sky);
}
.ih-curr-topics li::before {
  content: "▸";
  color: var(--blue);
  font-weight: 800;
  flex-shrink: 0;
}
.ih-topic-illust {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sky);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Learning paths */
.ih-learning-paths { display: grid; gap: 1.5rem; }
.ih-track {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.ih-track-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ih-track-heading span { font-size: 2rem; }
.ih-track-heading h3 { margin: 0 0 0.2rem; }
.ih-track-heading p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.ih-topic-sequence {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  counter-reset: topic;
}
.ih-topic-sequence li {
  counter-increment: topic;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.ih-topic-sequence li::before {
  content: counter(topic) ". ";
  color: var(--blue);
  font-weight: 800;
}
.ih-topic-sequence a { color: inherit; }
.ih-topic-sequence a:hover { color: var(--blue); }

/* ===== TKA Page (elegant) ===== */
.ih-tka-hub { margin: 0; }
.ih-tka-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.ih-tka-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.2) 0%, transparent 35%);
  pointer-events: none;
}
.ih-tka-hero .container { position: relative; z-index: 1; }
.ih-tka-hero .eyebrow {
  background: rgba(255,255,255,0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.ih-tka-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 1rem 0 0.75rem;
  max-width: 18ch;
}
.ih-tka-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  max-width: 36rem;
  margin-bottom: 1.5rem;
}
.ih-tka-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.ih-tka-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  min-width: 120px;
}
.ih-tka-stat b {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fbbf24;
}
.ih-tka-stat span { font-size: 0.85rem; color: rgba(255,255,255,0.7); }
.ih-tka-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.ih-tka-grade-card {
  text-align: center;
  padding: 1.75rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.ih-tka-grade-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}
.ih-tka-grade-card:nth-child(2)::before { background: linear-gradient(90deg, #059669, #34d399); }
.ih-tka-grade-card:nth-child(3)::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.ih-tka-grade-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.ih-tka-grade-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.ih-tka-grade-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.25rem; }
.ih-tka-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  background: var(--sky);
}
.ih-tka-grade-card:nth-child(2) .ih-tka-icon { background: var(--mint); }
.ih-tka-grade-card:nth-child(3) .ih-tka-icon { background: var(--yellow-soft); }
.ih-tka-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0 2.5rem;
}
.ih-tka-step {
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.ih-tka-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
  font-size: 0.95rem;
}
.ih-tka-step h4 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.ih-tka-step p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.ih-tka-plugin-registration {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.ih-tka-plugin-registration h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.ih-tka-note {
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.ih-tka-note strong { display: block; margin-bottom: 0.25rem; }
.ih-tka-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}
.ih-tka-benefit {
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.ih-tka-benefit-icon {
  font-size: 1.75rem;
  margin-bottom: 0.65rem;
}
.ih-tka-benefit h4 { font-size: 1rem; margin-bottom: 0.35rem; }
.ih-tka-benefit p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ===== Bank Soal ===== */
.ih-bank {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}
.ih-bank h2 { margin-bottom: 0.35rem; }
.ih-bank > p { color: var(--muted); margin-bottom: 1.25rem; }
.ih-bank-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}
.ih-bank-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.85rem;
}
.ih-bank-controls select {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  min-width: 140px;
}
.ih-quiz-top {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.ih-question {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--sky);
  border-radius: 12px;
}
.ih-options { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.ih-options button {
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.ih-options button:hover:not(:disabled) { border-color: var(--blue); background: var(--sky); }
.ih-options button.correct { border-color: var(--mint-dark); background: var(--mint); }
.ih-options button.wrong { border-color: var(--coral); background: #fef2f2; }
.ih-feedback { min-height: 1.5em; font-weight: 600; margin-bottom: 0.75rem; }
.ih-quiz-buttons { display: flex; gap: 0.75rem; }
.ih-result {
  text-align: center;
  padding: 2rem;
  background: var(--sky);
  border-radius: var(--radius);
}
.ih-result h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
}
.site-footer p { font-size: 0.95rem; line-height: 1.7; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: #fff; }
.copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ===== 404 ===== */
.error-404 {
  text-align: center;
  padding: 5rem 1rem;
}
.error-404 h1 { font-size: 4rem; color: var(--blue); margin-bottom: 0.5rem; }
.error-404 p { color: var(--muted); margin-bottom: 1.5rem; }

/* ===== Print styles (Worksheet) ===== */
@media print {
  .site-header, .site-footer, .menu-toggle, .ih-worksheet-controls,
  .ih-worksheet-actions, .ih-w-history, .hero, .section:not(.ih-print-area),
  .ih-arcade-toolbar, .ih-game-tabs, .main-nav { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .ih-worksheet, .ih-worksheet-output {
    border: none;
    box-shadow: none;
    padding: 0;
    background: #fff;
  }
  .ih-worksheet-key { page-break-before: always; }
  .ih-answer-line { border-bottom: 1px solid #999; }
  a { color: inherit; text-decoration: none; }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .math-art { order: -1; min-height: 240px; }
  .topic-grid, .level-grid, .ih-tka-grid, .ih-tka-benefits, .ih-tka-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-band { flex-direction: column; text-align: center; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .main-nav a { display: block; padding: 0.75rem 1rem; }
  .topic-grid, .level-grid, .post-grid, .ih-tka-grid, .ih-tka-benefits, .ih-tka-steps {
    grid-template-columns: 1fr;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .ih-game-answers { grid-template-columns: 1fr; }
  .ih-worksheet-student { grid-template-columns: 1fr; }
  .ih-arcade-best { margin-left: 0; }
  .hero { padding: 3rem 0; }
  .section { padding: 3rem 0; }
  .ih-tka-hero { padding: 2.5rem 0 2rem; }
}

/* Accessibility focus */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.btn:focus-visible, .ih-game-tab:focus-visible, .quiz-option:focus-visible {
  outline-offset: 3px;
}
