:root {
  font-family: system-ui, sans-serif;
  color: #242622;
  background: #f6f5ee;
  --paper: #f6f5ee;
  --desk: #fcfbf6;
  --ink: #242622;
  --quiet: #575b52;
  --rule: #d8d8cd;
  --green: #254c3c;
  --leaf: #e3ece3;
}
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh }
a { color: var(--green); text-underline-offset: .2em }
button, input { font: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid #337659; outline-offset: 3px }
.masthead { min-height: 74px; padding: 12px clamp(18px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rule) }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-weight: 720; text-decoration: none; color: var(--ink); white-space: nowrap }
.symbol { display: grid; place-content: center; inline-size: 33px; block-size: 33px; background: var(--green); color: #fff; font: 700 18px Georgia, serif }
#account { display: flex; gap: 14px; align-items: center; color: var(--quiet); font-size: .875rem }
.plain { background: transparent; color: var(--green); padding: .35rem .25rem; border: 0; text-decoration: underline; text-underline-offset: .2em }
.gate { max-width: 51rem; min-height: 66vh; margin: auto; display: grid; align-content: center; padding: 32px clamp(24px, 6vw, 70px) }
h1 { font-weight: 400; font-family: Georgia, "Times New Roman", serif; line-height: 1.06; letter-spacing: -.04em; font-size: clamp(2.65rem, 5.5vw, 5.2rem); margin: 0 0 20px }
.gate p { color: var(--quiet); max-width: 39ch; font-size: 1.08rem; line-height: 1.65; margin: 0 0 24px }
.action { justify-self: start; width: fit-content; display: inline-flex; align-items: center; gap: .65em; border: 1px solid var(--green); border-radius: 4px; padding: .75em 1em; color: white; text-decoration: none; background: var(--green); font-weight: 650 }
.action:hover { background: #17362a }
.notice { color: #813923!important }
.loading { padding: 25px clamp(18px, 4vw, 48px); color: var(--quiet) }
.workspace { display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); min-height: calc(100vh - 74px) }
.shelf { padding: 23px 20px; border-right: 1px solid var(--rule); max-height: calc(100vh - 74px); overflow: auto; position: sticky; top: 0 }
.shelf-heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 12px }
.shelf h2, .shelf p { margin: 0 }
.shelf h2 { font-size: 1rem }
.progress-total { color: var(--quiet); font-size: .8rem; white-space: nowrap }
progress { width: 100%; height: 5px; accent-color: var(--green); display: block; margin-bottom: 18px }
.shelf input { width: 100%; padding: .62rem .75rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--desk); color: var(--ink) }
.group { margin-top: 14px; padding-top: 9px; border-top: 1px solid var(--rule) }
.group summary { cursor: pointer; font-size: .85rem; line-height: 1.4; font-weight: 650; padding: 4px 3px }
.group ul { list-style: none; padding: 5px 0 0; margin: 0 }
.group a { display: flex; justify-content: space-between; gap: 7px; padding: 7px 8px; line-height: 1.35; font-size: .86rem; text-decoration: none; color: var(--ink); border-radius: 3px }
.group a:hover, .group a[aria-current] { background: var(--leaf) }
.mark { color: var(--green); font-weight: 750 }
.lesson { background: var(--desk); padding: clamp(35px, 6vw, 85px) clamp(20px, 6vw, 100px); min-width: 0 }
.lesson header, .lesson-body, .lesson-footer { max-width: 820px; margin-inline: auto }
.lesson h1 { font-size: clamp(2.1rem, 4.3vw, 4.1rem) }
.chapter { color: var(--quiet); margin: 0 0 12px; font-size: .87rem; line-height: 1.5 }
.description { color: var(--quiet); margin: 0 0 20px; line-height: 1.7 }
.lesson-body { display: grid; gap: 18px; line-height: 1.65; overflow-wrap: anywhere }
.lesson-body img { height: auto; max-width: 100% }
.lesson-body pre { padding: 14px; overflow: auto; background: var(--leaf); border-radius: 4px; white-space: pre }
.lesson-body table { max-width: 100%; display: block; overflow: auto }
.lesson-body iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--rule); border-radius: 4px; background: #eee }
.materials { margin: 6px 0; padding-left: 22px }
.film { background: var(--leaf); min-height: 84px; display: grid; align-content: center; justify-items: start; padding: 18px }
.film:has(iframe) { display: block; padding: 0; background: transparent }
.lesson-footer { display: flex; gap: 13px; align-items: center; border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 36px }
.empty { margin-top: 14px!important; font-size: .87rem; color: var(--quiet) }
@media (max-width: 700px) {
  .workspace { display: flex; flex-direction: column }
  .shelf { position: static; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px 18px }
  .lesson { min-height: 58vh }
  #account .name { display: none }
}
