:root {
  color-scheme: light;
  --paper: #f6f7f1;
  --surface: #fff;
  --ink: #192a24;
  --muted: #57655e;
  --edge: #dce4da;
  --accent: #155743;
  --accent-strong: #0c3f30;
  --tint: #e9f2eb;
  --serif: Georgia, 'Times New Roman', serif;
  font: 16px/1.5 'DM Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #2e8066; outline-offset: 3px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--edge); }
.header-inner, .shell { width: min(100% - 40px, 1250px); margin-inline: auto; }
.header-inner { min-height: 70px; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 9px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand > span:first-child { display: grid; place-items: center; width: 32px; height: 32px; background: var(--accent); color: white; border-radius: 9px; font-weight: 700; }
.brand-suffix { color: var(--muted); border-left: 1px solid var(--edge); padding-left: 10px; }
.shell { padding-block: 30px 64px; }
.stack { display: grid; gap: 16px; min-width: 0; align-content: start; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.spread { justify-content: space-between; }
.caption { color: var(--muted); font-size: .88rem; }
.kicker { color: var(--accent); font-weight: 680; text-transform: uppercase; letter-spacing: .105em; font-size: .74rem; }
h1 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3.65rem); line-height: 1.05; letter-spacing: -.046em; font-weight: 500; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; letter-spacing: -.018em; }
h3 { font-size: 1rem; }
.panel, .auth { background: var(--surface); border: 1px solid var(--edge); border-radius: 16px; padding: 21px; min-width: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid var(--edge); border-radius: 9px; padding: 8px 14px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 650; }
.button:hover { border-color: var(--accent); }
.button.primary { background: var(--accent); color: white; border-color: var(--accent); }
.button.primary:hover { background: var(--accent-strong); }
.button.quiet { background: transparent; border-color: transparent; padding-inline: 8px; }
.button[aria-current="page"] { background: var(--tint); color: var(--accent); }
.back { width: fit-content; }
.notice { min-height: 1.5em; font-size: .88rem; color: #8b332a; }
.notice[data-ok] { color: var(--accent); }
.hint { color: var(--muted); }
.auth { width: min(100%, 450px); margin: clamp(14px, 8vh, 96px) auto 0; padding: clamp(20px, 5vw, 39px); }
.auth h1 { font-size: clamp(2rem, 4vw, 3rem); }
label.field { display: grid; gap: 5px; font-weight: 600; }
.field input, .share-link { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid #c6d3c8; background: #fcfdfb; color: var(--ink); }
.check { display: flex; align-items: start; gap: 10px; min-height: 32px; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 3px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 375px)); gap: 16px; }
.course-card { display: grid; text-align: left; color: var(--ink); border: 1px solid var(--edge); border-radius: 15px; overflow: hidden; text-decoration: none; background: var(--surface); }
.course-card:hover { border-color: var(--accent); }
.course-cover, .video-placeholder { position: relative; isolation: isolate; overflow: hidden; color: white; background: linear-gradient(130deg, #28624f, #142d26); }
.course-cover { min-height: 180px; align-content: end; padding: 22px; }
.course-cover::before, .course-cover::after, .video-placeholder::before { content: ''; position: absolute; z-index: -1; right: -34px; top: -110px; width: 370px; height: 370px; border: 1px solid #ffffff42; border-radius: 46% 54% 53% 47%; transform: rotate(34deg); }
.course-cover::after { right: 38px; top: -56px; width: 278px; height: 278px; border: 20px solid #ffffff13; }
.course-cover strong { display: block; font: 500 2.45rem/.98 var(--serif); letter-spacing: -.045em; max-width: 10ch; }
.course-meta { display: grid; gap: 5px; padding: 16px; }
.classroom { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(290px, 1fr); gap: 24px; align-items: start; }
.lesson-heading { min-width: 0; display: grid; gap: 7px; }
.lesson-heading h1 { font-size: clamp(1.8rem, 4vw, 3.25rem); }
.player { width: 100%; aspect-ratio: 16/9; background: #142d26; border-radius: 13px; overflow: hidden; position: relative; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-placeholder { height: 100%; display: grid; place-items: center; text-align: center; padding: 16px; align-content: center; gap: 10px; }
.video-placeholder p { max-width: 32ch; }
.progress { width: 100%; height: 6px; border: 0; border-radius: 10px; overflow: hidden; background: var(--edge); }
.progress::-webkit-progress-bar { background: var(--edge); }
.progress::-webkit-progress-value { background: var(--accent); }
.progress::-moz-progress-bar { background: var(--accent); }
.outline { padding: 15px; }
.outline-heading { padding: 1px 4px 6px; display: grid; gap: 7px; }
.outline details { border-top: 1px solid var(--edge); padding-block: 5px; }
.outline summary { cursor: pointer; min-height: 42px; align-content: center; padding: 7px 4px; }
.outline summary::marker { color: var(--accent); }
.module-label { font-weight: 700; }
.lesson-button { display: grid; grid-template-columns: 20px minmax(0,1fr) max-content; gap: 9px; align-items: center; width: 100%; text-align: left; padding: 8px 7px; min-height: 42px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); }
.lesson-button:hover, .lesson-button[aria-current] { background: var(--tint); }
.lesson-button[aria-current] { border-color: #aac4b6; color: var(--accent-strong); font-weight: 650; }
.lesson-button > span:first-child { color: var(--accent); font-variant-numeric: tabular-nums; font-size: .79rem; }
.lesson-button small { color: var(--muted); font-size: .73rem; font-variant-numeric: tabular-nums; }
.admin-grid { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(280px, 1.25fr); gap: 18px; align-items: start; }
.people { display: grid; gap: 7px; }
.person { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: 8px; text-align: left; min-height: 50px; padding: 8px 10px; background: var(--surface); color: var(--ink); border: 1px solid var(--edge); border-radius: 8px; overflow-wrap: anywhere; }
.person[aria-current] { background: var(--tint); border-color: #aac4b6; }
.person .caption { display: block; }
.invite-share { background: var(--tint); padding: 12px; border-radius: 8px; gap: 8px; }
@media(max-width:850px) {
  .classroom { grid-template-columns: 1fr; }
  .outline { order: 2; }
}
@media(max-width:640px) {
  .header-inner, .shell { width: calc(100% - 24px); }
  .header-inner { min-height: 60px; }
  .header-inner nav .button { padding-inline: 7px; }
  .shell { padding-block: 20px 44px; }
  .admin-grid { grid-template-columns: 1fr; }
  .panel { padding: 14px; }
  .brand-suffix { display: none; }
}
