/* Shared kid-friendly overrides for interactive tools */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap");

html,
body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.sidebar {
  background: #1a2332 !important;
}

.sidebar-header h1 {
  font-size: 1.35rem !important;
  line-height: 1.35;
}

.sidebar-header .subtitle,
.tool-learning {
  font-size: 1rem !important;
  line-height: 1.5;
}

.tool-learning {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(47, 121, 217, 0.15);
  border: 1px solid rgba(47, 121, 217, 0.35);
  color: #c8daf5;
}

.tool-learning strong {
  color: #eaf2ff;
}

.control-label,
.section-title,
.math-section h2,
.math-section h3 {
  font-size: 1rem !important;
}

.ctrl-btn,
button,
select,
input[type="text"],
input[type="number"] {
  font-size: 1rem !important;
  min-height: 2.4rem;
}

.control-slider {
  min-height: 1.5rem;
}

.hud,
.hud-overlay,
#hud-overlay {
  font-size: 1rem !important;
  line-height: 1.45;
}

.math-panel,
.math-section,
.info-panel {
  font-size: 0.95rem !important;
}

.tool-nav a {
  font-size: 1rem;
}

/* Kid Word Helper in tool sidebars */
.kid-word-help {
  display: inline;
  margin: 0;
  padding: 0 0.1em;
  border: none;
  border-radius: 0.2em;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  min-height: auto !important;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  cursor: help;
}

.kid-word-help:hover,
.kid-word-help:focus-visible {
  background: rgba(47, 121, 217, 0.25);
  outline: 2px solid #ffbf47;
}

.kid-word-popup {
  border-color: #2f79d9;
  background: #f5f9ff;
  color: #233548;
}

.kid-word-popup-title {
  color: #062a63;
}

.kid-word-popup-definition {
  color: #233548;
}

.kid-word-popup-close {
  background: #e2ecff;
  color: #3d556f;
}
