:root {
  color-scheme: light;
  --forest: #142b22;
  --forest-deep: #10251c;
  --forest-light: #234234;
  --paper: #f5f5ee;
  --surface: #fffef9;
  --ink: #1b2b23;
  --muted: #526358;
  --line: #dce3d8;
  --lime: #d8f46c;
  --lime-dark: #c3e451;
  --green-wash: #e7f0e2;
  --amber: #80500f;
  --amber-wash: #fbedcf;
  --red: #943b30;
  --red-wash: #fbeae7;
  --radius: 17px;
  --shadow: 0 3px 14px #17291c0d;
  --sidebar: 242px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: #295644; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #718c2f; outline-offset: 3px; }
main:focus, h1:focus, h2:focus, .form-error:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2rem, 3.8vw, 3.55rem); font-weight: 750; letter-spacing: -.05em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); font-weight: 730; letter-spacing: -.03em; }
h3 { font-size: 1.12rem; font-weight: 730; }
p, a, h1, h2, h3, th, td, label, small { overflow-wrap: anywhere; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 20; background: var(--lime); padding: 8px 18px; border-radius: 6px; }
.muted { color: var(--muted); }
.smaller { font-size: .88rem; }
.small-type { font-size: .81rem; }
.mono { font-family: Consolas, monospace; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.zero { margin: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 16px; }
.stack-tight { display: grid; gap: 8px; }
.section { margin-top: 26px; }
.boot { min-height: 100vh; display: grid; gap: 14px; align-content: center; justify-items: center; color: var(--muted); }
.boot-symbol { display: flex; align-items: center; justify-content: center; gap: 3px; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; background: var(--lime); }
.boot-symbol i { display: block; width: 4px; background: var(--forest); transform: skewX(-22deg); border-radius: 1px; }
.boot-symbol i:nth-child(1) { height: 10px; }
.boot-symbol i:nth-child(2) { height: 16px; }
.boot-symbol i:nth-child(3) { height: 22px; }
.boot-symbol { animation: pulse 1.7s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .48; } }
.brand { display: inline-grid; gap: 8px; justify-items: start; text-decoration: none; color: inherit; }
.brand-image { display: inline-grid; place-items: center; width: 154px; min-height: 52px; border-radius: 9px; padding: 8px 11px; background: #fff; color: var(--forest); }
.brand-image img { display: block; width: 100%; height: auto; }
.brand-image strong { font-size: 1rem; text-wrap: nowrap; }
.brand small { display: block; font-size: .75rem; }
.eyebrow { font-size: .73rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.button {
  border: 1px solid transparent; border-radius: 9px; min-height: 44px; padding: 10px 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; line-height: 1.2;
  text-align: center; text-decoration: none; font-weight: 700; color: var(--ink);
  background: var(--lime); transition: background-color .15s, border-color .15s, color .15s;
}
.button:hover { background: var(--lime-dark); }
.button.secondary { background: var(--surface); border-color: var(--line); }
.button.secondary:hover { border-color: #9daf9f; background: var(--green-wash); }
.button.ghost { background: transparent; color: var(--ink); }
.button.ghost:hover { background: var(--green-wash); }
.button.dark { background: var(--forest); color: #fff; }
.button.dark:hover { background: var(--forest-light); }
.button.danger { background: var(--red-wash); color: var(--red); }
.button.danger:hover { background: #f6d5cf; }
.button:disabled, .button[aria-disabled=true] { opacity: .56; cursor: default; }
.button.block { width: 100%; }
.button.compact { padding: 8px 12px; min-height: 38px; font-size: .88rem; }
.arrow { font-size: 1.06em; line-height: 1; flex: 0 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 2.6vw, 26px); box-shadow: var(--shadow); min-width: 0; }
.card.pad-sm { padding: 16px; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.notice { border: 1px solid var(--line); border-radius: 11px; background: var(--green-wash); padding: 13px 15px; color: var(--ink); }
.notice.warn { background: var(--amber-wash); color: #654418; border-color: #efdba9; }
.notice.error, .form-error { background: var(--red-wash); color: var(--red); border: 1px solid #f0c9c4; border-radius: 9px; padding: 10px 12px; }
.notice strong { display: block; margin-bottom: 4px; }
.form-error:empty { display: none; }
.form-status { font-size: .91rem; color: var(--muted); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-title { font-weight: 680; }
input:not([type=checkbox]), select, textarea {
  color: var(--ink); background: #fff; border: 1px solid #bcc9be; border-radius: 9px;
  padding: 10px 13px; min-width: 0; width: 100%; min-height: 45px;
}
input::placeholder, textarea::placeholder { color: #6b796e; }
textarea { min-height: 99px; resize: vertical; line-height: 1.6; }
.readonly { white-space: pre-wrap; overflow-wrap: anywhere; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.inline-form .field { flex: 1 1 150px; }
.inline-form .form-error { flex: 1 1 100%; }
.auth-layout { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(400px, 1.08fr) minmax(390px, .92fr); }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 670px; padding: clamp(27px, 5vw, 72px); isolation: isolate; overflow: hidden; color: #fff; background: var(--forest); }
.auth-visual::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(180deg, #11291de8 0%, #142e2252 40%, #11271be8 100%), url("/assets/depot.webp");
  background-size: cover; background-position: center;
}
.auth-visual .brand small { color: #d6e0d4; }
.auth-copy { max-width: 560px; display: grid; gap: 16px; }
.auth-copy h1 { font-size: clamp(2.5rem, 5.3vw, 5rem); max-width: 10em; }
.auth-copy p { color: #e3ebe2; font-size: clamp(1rem, 1.4vw, 1.26rem); max-width: 32ch; }
.auth-copy .eyebrow { color: var(--lime); }
.auth-main { display: grid; align-content: center; justify-items: center; padding: clamp(24px, 5vw, 74px); }
.auth-form { width: 100%; max-width: 440px; display: grid; gap: 17px; }
.auth-form h2 { font-size: clamp(1.9rem, 3vw, 2.65rem); }
.auth-form .form-error:not(:empty), .auth-form .form-status { grid-column: 1 / -1; }
.mode-switch { display: flex; flex-wrap: wrap; gap: 7px; padding: 5px; background: #e8eee4; border-radius: 10px; }
.mode-switch a { flex: 1; text-align: center; font-weight: 700; font-size: .88rem; padding: 9px 11px; min-height: 42px; border: 1px solid transparent; border-radius: 7px; color: var(--forest); text-decoration: none; white-space: nowrap; }
.mode-switch a[aria-current=page] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.mode-switch a:hover { background: var(--surface); }
.global-error { max-width: 620px; margin: 12vh auto 0; }

.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 26px 18px 19px; color: #fff; background: var(--forest); overflow-y: auto; }
.sidebar .brand { margin: 4px 6px 39px; }
.sidebar .brand small { color: #bed0c4; }
.side-label { margin: 4px 12px 8px; color: #afc2b5; }
.nav-list { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; border-radius: 9px; text-decoration: none; font-size: .93rem; font-weight: 640; color: #e5eee7; }
.nav-item:hover { background: #ffffff10; }
.nav-item[aria-current=page] { background: var(--forest-light); color: #fff; box-shadow: inset 3px 0 var(--lime); }
.nav-icon { display: inline-grid; place-items: center; min-width: 18px; height: 20px; font-size: 1rem; line-height: 1; color: var(--lime); }
.sidebar-footer { margin-top: auto; padding: 16px 5px 0; }
.sidebar-footer .button { width: 100%; background: #ffffff10; border-color: #ffffff25; color: #f5f9f4; justify-content: flex-start; }
.sidebar-footer .button:hover { background: #ffffff24; }
.workspace { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 70px; padding: 11px clamp(17px, 3vw, 43px); background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar > * { min-width: 0; }
.topbar .breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: .9rem; }
.topbar .breadcrumb a { color: var(--forest); text-decoration: none; }
.topbar .breadcrumb a:hover { text-decoration: underline; }
.account { display: flex; align-items: center; gap: 9px; text-align: right; }
.account strong { display: block; font-size: .9rem; line-height: 1.15; font-weight: 680; }
.account small { display: block; font-size: .74rem; margin-top: 4px; color: var(--muted); line-height: 1.05; }
.avatar { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border-radius: 50%; color: var(--forest); background: var(--green-wash); font-size: .82rem; font-weight: 750; }
.mobile-menu { display: none; }
.main-content { max-width: 1500px; margin: 0 auto; padding: clamp(18px, 3.4vw, 41px) clamp(17px, 3vw, 43px) 60px; }
.main-content.reading { max-width: 1250px; }
.page-head { display: grid; gap: 10px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.95rem, 3.2vw, 3.05rem); }
.page-head > p { max-width: 72ch; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: 292px; border-radius: 22px; padding: clamp(25px, 4vw, 52px); color: #fff; background: var(--forest); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; inset: 0 0 0 27%; z-index: -1;
  background-image: linear-gradient(90deg, var(--forest) 0%, #142b22a8 42%, #142b2249 100%), url("/assets/depot.webp");
  background-size: cover; background-position: center 52%; }
.hero-body { max-width: 560px; display: grid; justify-items: start; gap: 13px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.5rem); max-width: 13em; }
.hero p { color: #e6efe6; max-width: 49ch; }
.hero .eyebrow { color: var(--lime); }
.stats { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 14px; margin-top: 18px; }
.stat { min-width: 0; padding: 15px 19px; }
.stat strong { font-size: 1.55rem; line-height: 1.15; letter-spacing: -.035em; }
progress { display: block; appearance: none; width: 100%; height: 7px; border: 0; border-radius: 50px; overflow: hidden; color: #759a53; background: #e2e8de; }
progress::-webkit-progress-bar { background: #e2e8de; border-radius: 50px; }
progress::-webkit-progress-value { background: #759a53; border-radius: 50px; }
progress::-moz-progress-bar { background: #759a53; border-radius: 50px; }
.topics { display: grid; gap: 9px; margin-top: 14px; }
.topic-row { display: grid; grid-template-columns: 47px minmax(0,1fr) max-content; align-items: center; gap: 14px; padding: 13px 16px; color: inherit; text-decoration: none; }
.topic-row:hover:is(a) { border-color: #91a993; background: #fcfff8; }
.topic-row.active { border-color: #8ca680; }
.topic-row.locked .topic-number { background: #edf0e9; color: #5a695e; }
.topic-number { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--green-wash); color: #2b513e; font-weight: 750; font-size: .95rem; }
.topic-row.active .topic-number { background: var(--lime); color: var(--forest); }
.topic-row .title { display: block; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 6px; background: #e9eee7; color: #43584a; font-size: .75rem; font-weight: 700; line-height: 1.25; }
.status.good { background: var(--green-wash); color: #285038; }
.status.active { background: #e7f3b4; color: #34451d; }
.status.warning { background: var(--amber-wash); color: var(--amber); }
.status.failed { background: var(--red-wash); color: var(--red); }
.course-bottom { margin-top: 21px; }
.outline-grid { display: grid; grid-template-columns: 245px minmax(0,1fr); align-items: start; gap: 17px; }
.outline { position: sticky; top: 15px; padding: 13px; display: grid; gap: 5px; }
.mobile-outline { display: none; }
.outline > h2 { font-size: 1rem; padding: 5px 8px 7px; }
.outline a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); padding: 8px; border-radius: 7px; min-height: 42px; font-size: .88rem; line-height: 1.25; }
.outline a:hover, .outline a[aria-current=page] { background: var(--green-wash); }
.outline a[aria-current=page] { font-weight: 700; }
.lesson-seq { flex: 0 0 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; background: #f0f3eb; font-size: .75rem; }
.lesson-seq.done { background: var(--lime); }
.lesson h2 { margin-bottom: 13px; }
.lesson .eyebrow { color: var(--muted); margin-bottom: 8px; }
.lesson-content { max-width: 72ch; white-space: pre-line; font-size: 1rem; }
.lesson-content ol { margin: 10px 0 0; padding-left: 1.55em; }
.lesson-content li { margin-bottom: 9px; padding-left: 5px; }
.lesson details > summary { cursor: pointer; font-weight: 700; align-content: center; min-height: 42px; }
.lesson details > p { margin: 6px 0 9px; }
.lesson-figure { display: grid; gap: 7px; margin: 12px 0 0; }
.lesson-figure a { display: block; width: fit-content; max-width: 100%; }
.lesson-figure img { display: block; width: 100%; height: auto; max-width: 680px; border-radius: 8px; }
.topic-test { display: grid; gap: 12px; justify-items: start; }
.questions { display: grid; gap: 13px; }
.question h2 { font-size: 1.17rem; margin-top: 6px; }
.question-text { font-size: 1.02rem; white-space: pre-line; }
.question .field { margin-top: 13px; }
.sticky-action { position: sticky; bottom: 0; z-index: 2; background: #fffef9f4; border: 1px solid var(--line); border-radius: 13px 13px 0 0; padding: 13px; box-shadow: 0 -4px 16px #16362612; }
.feedback-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feedback-item { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 9px; align-items: start; }
.test-score { font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 780; letter-spacing: -.04em; }
.option-set { border: 0; padding: 8px 0 0; margin: 0; min-width: 0; }
.option-set legend { padding: 0; color: var(--muted); font-weight: 650; font-size: .9rem; }
.option-choice { display: grid; grid-template-columns: 19px minmax(0, 1fr); align-items: start; gap: 10px; cursor: pointer; min-height: 46px; padding: 11px 12px; border: 1px solid #c8d4c8; background: #fff; border-radius: 9px; }
.option-choice:hover, .option-choice:has(input:checked) { background: var(--green-wash); border-color: #91a993; }
.option-choice input, .check-inline input { margin: 4px 0 0; height: 17px; width: 17px; accent-color: var(--forest); }
.check-inline { display: inline-flex; align-items: flex-start; gap: 8px; max-width: max-content; cursor: pointer; }
.result-option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.result-option.good { background: #f3f8f0; border-color: #bbcebb; }
.result-option.failed { background: #fff8f5; border-color: #f0c9c4; }
.result-option p { flex: 1 1 100%; }
.test-score-row { width: 100%; }
.staff-layout { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(0,.82fr); gap: 18px; align-items: start; }
.staff-entry { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.staff-entry:last-child { border-bottom: 0; }
.staff-entry strong { display: block; overflow-wrap: anywhere; }
.staff-entry > * { min-width: 0; }
.staff-result { margin-bottom: 16px; }
.card details > summary { cursor: pointer; font-weight: 680; padding-block: 8px; }
.footer-note { padding-top: 24px; color: var(--muted); font-size: .81rem; }
.noscript { padding: 14px; text-align: center; }

@media (max-width: 1020px) {
  :root { --sidebar: 204px; }
  .outline-grid { grid-template-columns: 195px minmax(0,1fr); }
  .staff-layout { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0,1fr); }
  .sidebar { display: none; }
  .topbar { min-height: 59px; padding: 9px 14px; }
  .topbar .breadcrumb { display: none; }
  .account small { display: none; }
  .account strong { max-width: 31vw; }
  .mobile-menu { display: block; position: relative; min-width: 0; }
  .mobile-menu summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; gap: 7px; align-items: center; font-weight: 760; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu .brand-image { width: 91px; min-height: 35px; padding: 4px; border-radius: 5px; background: transparent; }
  .mobile-menu .brand-image strong { font-size: .9rem; }
  .mobile-menu-content { position: absolute; left: 0; z-index: 8; top: calc(100% + 6px); width: min(250px, 85vw); color: white; background: var(--forest); border: 1px solid var(--forest-light); border-radius: 11px; padding: 9px; box-shadow: 0 6px 20px #0003; }
  .mobile-menu-content .sidebar-footer { padding: 10px 0 0; }
  .main-content { padding: 17px 14px 42px; }
  .outline-grid { grid-template-columns: 1fr; }
  .desktop-outline { display: none; }
  .mobile-outline { display: block; padding: 3px 14px; }
  .mobile-outline summary { cursor: pointer; min-height: 44px; align-content: center; font-weight: 680; }
  .mobile-outline .outline { position: static; padding: 0 0 9px; grid-template-columns: repeat(auto-fit,minmax(124px,1fr)); gap: 3px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { min-height: 320px; padding: 23px 24px 24px; }
  .auth-visual .brand-image { width: 125px; min-height: 40px; padding: 6px 8px; }
  .auth-visual::before { background-position: center 44%; }
  .auth-copy h1 { font-size: clamp(2.1rem, 8vw, 3.4rem); line-height: 1.04; }
  .auth-main { padding: 31px 21px 48px; }
  .hero { border-radius: 17px; min-height: 248px; }
  .hero::before { inset: 0; background-image: linear-gradient(90deg, #142b22 2%, #142b229e 86%), url("/assets/depot.webp"); }
  .stats { gap: 8px; }
  .stat { padding: 12px 10px; }
  .stat strong { font-size: 1.26rem; }
  .stat .smaller { font-size: .74rem; }
  .topic-row { padding: 11px; gap: 9px; grid-template-columns: 38px minmax(0,1fr) max-content; }
  .topic-number { width: 34px; height: 35px; border-radius: 7px; }
  .topic-row .title { font-size: .92rem; }
  .topic-row .status { max-width: 108px; font-size: .7rem; }
  .global-error { margin: 10vh 14px 0; }
}
@media (max-width: 420px) {
  .hero { padding: 21px; }
  .hero h1 { font-size: 2rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:first-child { grid-column: 1/-1; }
  .panel-grid { grid-template-columns: 1fr; }
  .staff-entry { flex-wrap: wrap; }
  .sticky-action .row { flex: 1 1 100%; justify-content: space-between; }
  .sticky-action .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
