:root {
  color-scheme: light;
  --ink: #172b25;
  --muted: #4f655b;
  --ground: #f4f7f2;
  --line: #dce6dd;
  --paper: #fff;
  --accent: #17624b;
  --tint: #deefe5;
  --display: Georgia, "Times New Roman", serif;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; color: var(--ink); background: var(--ground); line-height: 1.55; }
.theme-8 { --accent: #994526; --tint: #fce8d7; --ground: #fff8f1; --line: #eeded2; }
.theme-11 { --accent: #5c4290; --tint: #eee6fd; --ground: #f9f6fd; --line: #e8e0f1; }
.theme-14 { --accent: #195477; --tint: #dceef9; --ground: #f3f8fc; --line: #dce6ef; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid #9b5521; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font: 500 clamp(2.55rem, 6vw, 4.7rem)/1.03 var(--display); letter-spacing: -.05em; overflow-wrap: anywhere; }
h2 { font-size: 1.28rem; line-height: 1.25; }
h3 { font-size: 1.1rem; line-height: 1.3; }
p, label { overflow-wrap: anywhere; }
.wrap { width: min(100% - 3rem, 1080px); margin: 0 auto; }
main.wrap { padding: 2.5rem 0 4rem; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.navbar { display: flex; align-items: center; gap: 1.2rem; justify-content: space-between; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); text-decoration: none; font: 700 1.43rem var(--display); white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: white; font: 1.2rem system-ui; }
.brand-dot { color: var(--accent); }
.brand .brand-dot { margin-left: -.4rem; }
nav { display: flex; align-items: center; gap: .3rem; }
nav a { padding: .55rem .8rem; border-radius: 10px; color: var(--muted); font-weight: 650; text-decoration: none; }
nav a:hover, nav a[aria-current] { background: var(--tint); color: var(--accent); }
.intro { display: flex; position: relative; align-items: center; justify-content: space-between; gap: 1.4rem; border: 1px solid var(--line); border-radius: 25px; padding: clamp(1.45rem, 5vw, 3.7rem); overflow: hidden; }
.cover { background: #e5efe4; min-height: 310px; }
.intro > div:first-child { position: relative; z-index: 1; }
.eyebrow { margin-bottom: .72rem; color: var(--accent); font-size: .875rem; font-weight: 750; letter-spacing: .045em; }
.intro h1 + p, .page-head h1 + p, .login h1 + p { margin-top: 1rem; color: var(--muted); max-width: 58ch; }
.notebooks { flex: 0 0 235px; height: 190px; position: relative; }
.notebooks span { position: absolute; width: 126px; height: 162px; left: 48px; top: 12px; border-radius: 10px 17px 17px 10px; border: 1px solid #27342b30; box-shadow: 5px 8px 0 #27342b1a; transform-origin: 50% 85%; }
.notebooks span:first-child { background: #f3bd81; transform: rotate(-26deg) translateX(-17px); }
.notebooks span:nth-child(2) { background: #b8a6d7; transform: rotate(24deg) translateX(19px); }
.notebooks span:last-child { display: grid; place-items: center; background: #24634e; color: #fee0a2; font-size: 4rem; transform: rotate(-6deg); border-left: 12px solid #173f33; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem; margin-bottom: .85rem; }
.landing .section-head { margin-top: 2rem; }
.profile-grid, .summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.profile-card, .summary, .task-card { display: flex; align-items: center; gap: .9rem; min-width: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 17px; padding: 1.2rem; text-decoration: none; }
a.profile-card:hover, .task-card:hover { border-color: var(--accent); }
.profile-card p, .summary p, .muted { color: var(--muted); }
.profile-card .profile-state { margin-top: .25rem; font-size: .875rem; }
.profile-icon { display: grid; place-items: center; width: 45px; height: 45px; flex: 0 0 45px; border-radius: 13px; background: var(--tint); color: var(--accent); font-size: 1.45rem; line-height: 1; }
.parent-link { display: flex; justify-content: flex-end; margin-top: 1.4rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 45px; border: 1px solid transparent; border-radius: 10px; padding: .59rem 1rem; color: var(--accent); background: var(--paper); text-decoration: none; font-weight: 700; cursor: pointer; text-align: center; }
.button:hover { box-shadow: inset 0 0 0 100vmax #172b250c; }
.button.primary { color: white; background: var(--accent); }
.button.secondary { border-color: var(--line); }
.button.quiet { background: transparent; }
.button.small { min-height: 41px; font-size: .875rem; padding: .43rem .58rem; }
.button:disabled { opacity: .6; cursor: default; }
.dashboard-cover { background: var(--tint); }
.dashboard-cover .actions { flex: 0 1 auto; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.summary-grid { margin-top: 1rem; }
.summary h2 { font-size: 1rem; }
.list-section { margin-top: 2rem; }
.task-card { justify-content: space-between; padding: 1rem 1.2rem; margin-bottom: .6rem; }
.task-card > div { min-width: 0; }
.task-card h3 { overflow-wrap: anywhere; }
.task-subject { font-size: .875rem; font-weight: 750; color: var(--accent); margin-bottom: .15rem; }
.task-card .muted { font-size: .875rem; margin-top: .18rem; }
.status { display: inline-block; flex-shrink: 0; background: var(--tint); color: var(--accent); border-radius: 999px; padding: .22rem .72rem; font-size: .875rem; font-weight: 700; }
.status.complete { background: #dff1e4; color: #225d3f; }
.status.pending { background: #faf0d3; color: #75521b; }
.empty { border: 1px dashed #9fb3a7; padding: 1.5rem; border-radius: 15px; }
.empty p { color: var(--muted); margin-top: .35rem; }
.hero-glyph { color: var(--accent); font-size: clamp(3.5rem, 12vw, 8rem); line-height: 1; flex-shrink: 0; opacity: .78; }
progress { display: block; width: min(100%, 240px); height: 13px; margin-top: .85rem; accent-color: var(--accent); }
.theme-8 .answer-panel h2 { font-size: 1.45rem; }
.theme-8 .choice { min-height: 51px; }
.theme-14 .child-cover h1 { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 750; }
.form-width { max-width: 790px; }
.narrow { max-width: 510px; }
.back { display: inline-block; margin-bottom: 1rem; font-weight: 650; }
.page-head { margin-bottom: 1.55rem; }
.page-head h1, .panel.login h1 { font-size: clamp(2.25rem, 5vw, 3.65rem); }
.panel { margin: 0; min-width: 0; padding: clamp(1rem, 3vw, 1.55rem); background: var(--paper); border: 1px solid var(--line); border-radius: 17px; }
.panel.login { padding: clamp(1.25rem, 4vw, 2.4rem); }
.login form, .panel > p + .button { margin-top: 1.25rem; }
.stack { display: grid; gap: .9rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
label { display: grid; gap: .35rem; font-weight: 650; }
label .muted { font-size: .875rem; font-weight: 500; }
input:not([type="radio"]), textarea, select { width: 100%; min-width: 0; padding: .62rem .69rem; color: var(--ink); border: 1px solid #a9b9af; border-radius: 8px; background: #fff; }
input:not([type="radio"]), select { min-height: 44px; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 2rem; background: linear-gradient(45deg, transparent 50%, #496351 50%) calc(100% - 16px) 50%/5px 5px no-repeat, linear-gradient(135deg, #496351 50%, transparent 50%) calc(100% - 11px) 50%/5px 5px no-repeat, white; }
.upload { background: var(--ground); border: 1px dashed #a9b9af; border-radius: 10px; padding: .8rem; }
.notice { color: #285542; background: #e4f1e8; border: 1px solid #c8ded0; padding: .7rem .9rem; border-radius: 10px; margin-bottom: 1rem; }
.notice.error { color: #792f21; background: #fdf0e9; border-color: #edccbc; }
.exercise-questions { gap: 1.2rem; }
.answer-panel { display: grid; gap: .9rem; }
.question-tag { padding: .18rem .58rem; border-radius: 8px; background: var(--tint); color: var(--accent); font-size: .875rem; font-weight: 750; margin-inline-start: -.15rem; }
.answer-panel .status { justify-self: start; }
.choices { display: grid; gap: .55rem; }
.choice { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; }
.choice:has(:checked) { border-color: var(--accent); background: var(--tint); }
.choice input { width: 1.15rem; height: 1.15rem; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.comparison > div, .feedback { background: var(--tint); border-radius: 10px; padding: .7rem; }
.comparison p, .feedback p { margin-top: .35rem; }
.feedback { margin-bottom: 1rem; padding: 1.1rem; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 2rem); }
  main.wrap { padding-top: 1.4rem; }
  .notebooks { display: none; }
  .cover { min-height: 230px; }
  .dashboard-cover:not(.child-cover) { align-items: flex-start; flex-direction: column; }
  .profile-grid, .summary-grid { grid-template-columns: 1fr; }
  .navbar { flex-wrap: wrap; gap: .25rem .55rem; padding: .65rem 0; }
  nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 470px) {
  .fields { grid-template-columns: 1fr; }
  .task-card { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .child-cover { gap: .4rem; }
  .hero-glyph { font-size: 2.8rem; }
  .form-actions .button { width: 100%; }
}
