:root {
  font-family: "Segoe UI", sans-serif;
  color: #192c2a;
  background: #f4f4eb;
  line-height: 1.55;
  --ink: #192c2a;
  --green: #285745;
  --edge: #d6ded2;
  --soft: #e9f0e5;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--edge); background: #fbfcf7;
  padding: .8rem max(1.25rem, calc((100vw - 70rem) / 2));
}
.brand { font-family: Georgia, serif; font-size: 1.45rem; text-decoration: none; font-weight: bold; }
.brand span { font-weight: normal; }
main { width: min(70rem, calc(100% - 2.5rem)); margin: 2rem auto 4rem; }
h1, h2, h3 { line-height: 1.15; }
h1, h2 { font-family: Georgia, serif; font-weight: normal; margin: 0 0 .65rem; }
h1 { font-size: clamp(2.25rem, 6vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: 1.75rem; }
h3 { margin: 0; font-size: 1rem; }
p { margin: .4rem 0 .85rem; }
a { color: var(--green); text-underline-offset: .2em; }
button, input { font: inherit; }
button {
  padding: .53rem .85rem; border: 1px solid var(--green); border-radius: .45rem;
  color: white; background: var(--green); cursor: pointer;
}
button:hover { background: #1d4233; }
button:disabled { opacity: .6; cursor: wait; }
.secondary { background: transparent; color: var(--green); }
.secondary:hover { background: var(--soft); }
:focus-visible { outline: 3px solid #a35323; outline-offset: 3px; }
.hero, .panel { border-radius: .75rem; padding: clamp(1rem, 3vw, 1.8rem); }
.hero { background: #dce9da; margin-bottom: 1.2rem; }
.spec, .muted { color: #425b52; }
.spec { font-size: .88rem; font-weight: 650; }
.panel { background: #fffefa; border: 1px solid var(--edge); min-width: 0; }
.dashboard { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.stack { display: grid; gap: 1rem; }
.week, .plain { padding: 0; margin: .6rem 0 1.1rem; list-style: none; }
.week li, .plain li { display: flex; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--edge); }
.week .day { flex: 0 0 6rem; color: var(--green); }
.week p, .plain p { margin: .15rem 0; }
.plain li { justify-content: space-between; }
.subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .8rem; }
.subjects article { background: var(--soft); padding: .95rem; border-radius: .45rem; }
.activity, .login { max-width: 52rem; margin-top: 1rem; }
.login { max-width: 26rem; margin-inline: auto; }
label { display: block; margin-bottom: 1rem; }
input { display: block; width: min(100%, 22rem); padding: .55rem; color: var(--ink); border: 1px solid #64766a; border-radius: .35rem; }
input[readonly] { background: #f3f5ef; }
fieldset { min-width: 0; padding: .9rem; border: 1px solid var(--edge); border-radius: .45rem; margin: 0 0 1rem; }
legend, .prompt { font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.timer { position: sticky; top: 0; z-index: 1; background: #dce9da; padding: .5rem; font-variant-numeric: tabular-nums; }
.feedback { background: var(--soft); padding: .8rem; }
#notice:not(:empty) { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; background: #fceacb; padding: .65rem 1rem; z-index: 2; }
@media (max-width: 45rem) { .dashboard { grid-template-columns: 1fr; } }
.tutor-topics .actions { align-items: center; margin: .4rem 0; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; }
.lesson-layout .activity { margin-top: 0; }
.whiteboard { position: sticky; top: 1rem; background: #fffefa; min-width: 0; }
.board-scroll { max-height: 60vh; overflow-y: auto; }
[data-board] { list-style: none; margin: 0; padding: 0; }
[data-board] li { border-bottom: 1px solid var(--edge); padding: .7rem .65rem; overflow-wrap: anywhere; }
[data-board] li[aria-current="step"] { background: var(--soft); border-radius: .35rem; }
.board-expression { font: 1.35rem/1.45 Georgia, serif; margin: 0; white-space: pre-wrap; }
.board-reason { margin: .28rem 0 0; color: #425b52; }
@media (max-width: 52rem) {
  .lesson-layout { grid-template-columns: 1fr; }
  .whiteboard { position: static; }
}
main:has(.lesson-layout) { width: min(91rem, calc(100% - 2.5rem)); }
.lesson-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); }
.whiteboard {
  border: .45rem solid #abb4ae;
  border-bottom-width: .65rem;
  padding: 1rem clamp(.9rem, 2.5vw, 1.9rem);
  background: #fcfffd;
}
.whiteboard h2 { font-size: 1.35rem; }
.board-scroll { min-height: min(48vh, 25rem); max-height: 71vh; }
[data-board] li { padding: 1rem .75rem; }
[data-board] li[aria-current="step"] { background: #fcfffd; border-left: 3px solid #8eb5a6; }
.board-expression, .board-sketch text {
  color: #1c4d44;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-weight: 600;
}
.board-expression { font-size: clamp(1.35rem, 2.6vw, 2.2rem); }
.board-sketch, .board-equation {
  display: block; width: min(100%, 36rem); height: auto;
  margin-block: .15rem; overflow: visible;
}
.board-sketch > path, .board-sketch > circle, .board-equation > path {
  fill: none; stroke: #24625a; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
}
.board-equation > path { stroke-width: 2.5; }
.board-equation text, .board-sketch text {
  fill: #1c4d44; font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; font-size: 23px;
}
.board-sketch text { font-size: 29px; }
.board-marker-hand { pointer-events: none; }
@media (max-width: 52rem) {
  .lesson-layout { grid-template-columns: 1fr; }
  .board-scroll { min-height: min(35vh, 18rem); max-height: 65vh; }
}

#bio-quiz label { display:flex; align-items:baseline; gap:.5rem; padding:.2rem 0; }
#bio-quiz input[type=radio] { display:inline-block; width:auto; }

.board-drawing-row { position: relative; }
.review-marker { display: block; position: absolute; z-index: 3; top: 0; left: 0; width: clamp(48px, 12vw, 86px); height: auto; max-width: none; pointer-events: none; filter: drop-shadow(1px 2px 2px #20473455); will-change: transform; }
