.hero {
  margin-block: 1.5rem;
}

.learning-objectives,
.prerequisites,
.key-idea,
.common-mistake,
.formula-box,
.practice-box,
.lesson-summary {
  border-left: 4px solid #1a73e8;
  margin: 1rem 0;
  padding: 0.8rem 1rem;
}

.learning-objectives {
  background: #eef4ff;
}

.prerequisites {
  background: #f6f8fa;
  border-left-color: #5f6368;
}

.key-idea {
  background: #eef7f0;
  border-left-color: #137333;
}

.common-mistake {
  background: #fff4f1;
  border-left-color: #d93025;
}

.formula-box {
  background: #f8f9fa;
  border-left-color: #5f6368;
  font-weight: 700;
}

.practice-box {
  background: #fff8e1;
  border-left-color: #f9ab00;
}

.lesson-summary {
  background: #eef7f0;
  border-left-color: #137333;
}

.solution-reveal,
.hint-reveal {
  background: #ffffff;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  margin: 0.75rem 0;
  padding: 0.65rem 0.85rem;
}

.solution-reveal summary,
.hint-reveal summary {
  color: #1558b0;
  cursor: pointer;
  font-weight: 700;
}

.solution-reveal summary:focus-visible,
.hint-reveal summary:focus-visible {
  outline: 3px solid rgba(26, 115, 232, 0.35);
  outline-offset: 2px;
}

.solution-reveal[open],
.hint-reveal[open] {
  box-shadow: 0 1px 4px rgba(31, 35, 40, 0.08);
}

.solution-reveal > :last-child,
.hint-reveal > :last-child {
  margin-bottom: 0;
}

.topic-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 1rem 0;
}

.topic-card {
  border: 1px solid #d8dee4;
  border-radius: 8px;
  padding: 1rem;
}

.quiz-score {
  font-weight: 700;
  margin: 0.75rem 0;
}

.quiz-shell {
  margin: 1rem 0;
  max-width: 760px;
}

.quiz-topic {
  color: #57606a;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.quiz-start {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quiz-start label {
  display: grid;
  gap: 0.25rem;
  font-weight: 700;
}

.quiz-count {
  border: 1px solid #d8dee4;
  border-radius: 6px;
  font: inherit;
  padding: 0.45rem 0.6rem;
  width: 9rem;
}

.quiz-progress {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-weight: 700;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  margin: 0.75rem 0;
  max-width: 720px;
}

.quiz-prompt {
  font-weight: 700;
  margin: 0.9rem 0 0.35rem;
}

.quiz-stimulus {
  background: #f6f8fa;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  margin: 0.85rem 0;
  max-width: 720px;
  padding: 0.85rem;
}

.quiz-stimulus .quiz-graph {
  border: 0;
}

.quiz-math {
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Consolas,
    "Liberation Mono", Menlo, monospace;
  font-size: 1.05rem;
  line-height: 1.6;
}

.quiz-system {
  display: grid;
  gap: 0.25rem;
}

.observablehq button,
.observablehq input[type="button"],
.observablehq input[type="submit"],
.quiz-shell button {
  appearance: none;
  background: #1a73e8;
  border: 1px solid #1558b0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.5rem 0.8rem;
}

.observablehq button:hover,
.observablehq input[type="button"]:hover,
.observablehq input[type="submit"]:hover,
.quiz-shell button:hover {
  background: #1558b0;
  border-color: #124a94;
  color: #ffffff;
}

.observablehq button:focus-visible,
.observablehq input[type="button"]:focus-visible,
.observablehq input[type="submit"]:focus-visible,
.quiz-shell button:focus-visible {
  outline: 3px solid rgba(26, 115, 232, 0.35);
  outline-offset: 2px;
}

.observablehq button:disabled,
.quiz-shell button:disabled {
  background: #9aa0a6;
  border-color: #80868b;
  color: #ffffff;
  cursor: not-allowed;
  opacity: 1;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.75rem 0;
}

.quiz-option {
  align-items: center;
  display: flex;
  gap: 0.45rem;
  margin: 0;
}

.quiz-option input[type="radio"] {
  margin-right: 0.45rem;
}

.quiz-graph {
  width: 100%;
  max-width: 720px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #ffffff;
}

.quiz-grid line {
  stroke: #d8dee4;
  stroke-opacity: 0.8;
}

.quiz-grid-line {
  stroke: #d8dee4;
  stroke-opacity: 0.8;
}

.quiz-grid-line-vertical {
  stroke-opacity: 0.55;
}

.quiz-grid path {
  display: none;
}

.quiz-axis {
  stroke: #24292f;
  stroke-width: 1.2;
}

.quiz-axis-label {
  fill: #24292f;
  font-size: 12px;
}

.quiz-feedback {
  font-weight: 600;
}

.quiz-feedback.correct {
  color: #137333;
}

.quiz-feedback.wrong {
  color: #b3261e;
}

.trig-explorer {
  margin: 1rem 0;
  max-width: 640px;
}

.trig-controls {
  align-items: end;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(220px, 1fr) 8rem;
  margin-bottom: 1rem;
}

.trig-controls label {
  display: grid;
  font-weight: 700;
  gap: 0.3rem;
}

.trig-angle-slider {
  width: 100%;
}

.trig-angle-input {
  border: 1px solid #d8dee4;
  border-radius: 6px;
  font: inherit;
  padding: 0.45rem 0.6rem;
  width: 100%;
}

.trig-values {
  display: flex;
  flex-wrap: wrap;
  font-weight: 700;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;
}

.trig-unit-circle {
  background: #ffffff;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
}

.trig-axis {
  stroke: #202124;
  stroke-width: 1.4;
}

.trig-radius {
  stroke: #202124;
  stroke-width: 3;
}

.trig-cosine {
  stroke: #d93025;
  stroke-width: 4;
}

.trig-sine {
  stroke: #1a73e8;
  stroke-width: 4;
}

.trig-point {
  fill: #202124;
}

.trig-label {
  font-size: 18px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.radius-label {
  fill: #202124;
}

.cosine-label {
  fill: #d93025;
}

.sine-label {
  fill: #1a73e8;
}

@media (max-width: 560px) {
  .trig-controls {
    grid-template-columns: 1fr;
  }
}
