/*
 * Ariv Academy public theme — the single runtime color and legal-footer reference.
 * Change data-ariv-theme on <html> to "dark" to switch the semantic palette.
 * Application-specific files retain layout only and map their legacy tokens here.
 */
:root,
:root[data-ariv-theme="light"] {
  color-scheme: light;
  --ariv-page: #f4f8ff;
  --ariv-surface: #ffffff;
  --ariv-surface-muted: #eef4ff;
  --ariv-text: #1a1a2e;
  --ariv-heading: #1a2c6b;
  --ariv-text-muted: #5a6385;
  --ariv-border: #cfdcf3;
  --ariv-primary: #1e4fd8;
  --ariv-deep: #0d1e52;
  --ariv-accent: #f5a623;
  --ariv-accent-strong: #c66b16;
  --ariv-success: #176b38;
  --ariv-success-bg: #e9f8ef;
  --ariv-danger: #9b1c1c;
  --ariv-danger-bg: #fff0f0;
  --ariv-on-dark: #f7f9ff;
  --ariv-on-dark-muted: #cdd8f3;
  --ariv-input-bg: #ffffff;
  --ariv-input-text: #1a1a2e;
  --ariv-placeholder: #687694;
}

:root[data-ariv-theme="dark"] {
  color-scheme: dark;
  --ariv-page: #07142f;
  --ariv-surface: #10234b;
  --ariv-surface-muted: #18325f;
  --ariv-text: #f5f7ff;
  --ariv-heading: #ffffff;
  --ariv-text-muted: #c6d2e8;
  --ariv-border: #52698f;
  --ariv-primary: #8eb7ff;
  --ariv-deep: #050f25;
  --ariv-accent: #ffc04d;
  --ariv-accent-strong: #ffc96b;
  --ariv-success: #77e29a;
  --ariv-success-bg: #153c29;
  --ariv-danger: #ffaaa3;
  --ariv-danger-bg: #451d24;
  --ariv-on-dark: #ffffff;
  --ariv-on-dark-muted: #d3def2;
  --ariv-input-bg: #ffffff;
  --ariv-input-text: #171b2c;
  --ariv-placeholder: #66738f;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--ariv-accent);
  outline-offset: 3px;
}

:where(input, select, textarea) {
  background-color: var(--ariv-input-bg);
  color: var(--ariv-input-text);
  border-color: var(--ariv-border);
}
:where(input, textarea)::placeholder { color: var(--ariv-placeholder); opacity: 1; }
:where(input, select, textarea):disabled {
  background: var(--ariv-surface-muted);
  color: var(--ariv-text-muted);
  opacity: 1;
  cursor: not-allowed;
}
:where(button, .btn):disabled { opacity: .7; cursor: not-allowed; }

.ariv-legal-footer {
  margin-top: 0;
  padding: 2rem max(5%, 1rem);
  background: var(--ariv-deep);
  color: var(--ariv-on-dark-muted);
  font: 600 .86rem/1.55 'Nunito', system-ui, sans-serif;
}
.ariv-legal-footer__inner { width: min(1180px, 100%); margin: auto; }
.ariv-legal-footer__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(190px, 1fr));
  gap: 1.5rem 3rem;
}
.ariv-legal-footer h2,
.ariv-legal-footer h3 { margin: 0 0 .55rem; color: var(--ariv-on-dark); font-size: .92rem; }
.ariv-legal-footer p { margin: .25rem 0; color: var(--ariv-on-dark-muted); }
.ariv-legal-footer strong { color: var(--ariv-accent); }
.ariv-legal-footer__links { display: flex; flex-wrap: wrap; gap: .45rem 1rem; }
.ariv-legal-footer a { color: var(--ariv-on-dark); text-decoration: underline; text-underline-offset: 3px; }
.ariv-legal-footer a:hover { color: var(--ariv-accent); }
.ariv-legal-footer__bottom {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.22);
  color: var(--ariv-on-dark-muted);
}
@media (max-width: 760px) {
  .ariv-legal-footer__grid { grid-template-columns: 1fr; }
}
