/* Shared web controls, sized independently of the subject theme. */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
}

:where(a[href], button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #17649a;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #fff;
}

:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="hidden"]), select, textarea) {
  font: inherit;
}

.btn, .course, .chip, .icon-btn, .material-close,
.materials-search :is(input, button), .materials-more, .materials-side button {
  min-block-size: 44px;
}

.icon-btn, .material-close {
  min-inline-size: 44px;
}

html[data-study-theme="geography"] { --study-action: #2e674e; }
html[data-study-theme="english"] { --study-action: #963d4b; }
html[data-study-theme="classics"] { --study-action: #405d8a; }

html[data-study-theme] .btn-primary {
  background: var(--study-action);
  color: #fff;
  box-shadow: none;
}

html[data-study-theme] .btn-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--study-action), #000 12%);
}

html[data-study-theme] :is(.btn-primary, .answer, .course, .chip):disabled {
  cursor: default;
}

html[data-study-theme] .answer { font-size: 1rem; }
html[data-study-theme] .answer.correct { color: #235b42; }
html[data-study-theme] .answer.correct::before { background: #235b42; }
html[data-study-theme] .answer.wrong { color: #96343a; }
html[data-study-theme] .answer.wrong::before { background: #96343a; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :is(a, button, .hero-graphic, .hero-graphic *) {
    animation: none !important;
    transition: none !important;
  }
}
