:root {
  color-scheme:light;
  --ink:#1b312a;
  --muted:#54655c;
  --green:#234b3c;
  --green-dark:#183830;
  --lime:#dbee9d;
  --paper:#fafaf5;
  --white:#fff;
  --line:#e0e5dc;
  --soft:#edf3e7;
  --radius:15px;
  font-family:"Avenir Next",Avenir,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-synthesis:none;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

button,input,textarea,select {
  font:inherit;
}

button,a[href],select {
  touch-action:manipulation;
}

a {
  color:inherit;
}

button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid #63843e;
  outline-offset:3px;
}

button:disabled {
  cursor:wait;
  opacity:.65;
}

[hidden] {
  display:none!important;
}

.icon-library {
  display:none;
}

.icon,.brand-mark svg {
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:none;
}

.skip {
  position:absolute;
  top:5px;
  left:8px;
  z-index:10;
  padding:10px;
  background:white;
  transform:translateY(-200%);
}

.skip:focus {
  transform:none;
}

.layout {
  display:grid;
  grid-template-columns:228px minmax(0,1fr);
  min-height:100vh;
}

.rail {
  position:sticky;
  top:0;
  height:100dvh;
  background:var(--green-dark);
  color:#eff4ea;
  display:flex;
  flex-direction:column;
  padding:25px 16px 16px;
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
  padding:0 5px;
  font-size:22px;
  letter-spacing:-1px;
  font-weight:750;
  text-decoration:none;
  margin-bottom:36px;
}

.brand-mark {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:10px;
  background:var(--lime);
  color:var(--green-dark);
  flex:none;
}

.brand-mark svg {
  width:23px;
  height:23px;
}

.rail-body {
  display:grid;
  gap:6px;
  overflow:auto;
}

.rail-label {
  font-size:11px;
  font-weight:700;
  letter-spacing:.09em;
  color:#b7c7ba;
  padding:0 9px;
  margin:0 0 8px;
}

.rail-btn {
  width:100%;
  display:flex;
  align-items:center;
  gap:11px;
  text-align:left;
  text-decoration:none;
  padding:11px 9px;
  border:0;
  background:none;
  color:inherit;
  border-radius:8px;
  font-size:14px;
  font-weight:650;
  cursor:pointer;
}

.rail-btn:hover,.rail-btn[aria-current=page] {
  background:#305348;
  color:white;
}

.rail-btn[aria-current=page] .icon {
  color:var(--lime);
}

.rail-footer {
  margin-top:auto;
  padding-top:18px;
}

.profile {
  display:flex;
  min-width:0;
  gap:10px;
  align-items:center;
  padding:14px 3px 8px;
  border-top:1px solid #466259;
}

.profile-text {
  min-width:0;
  flex:1;
}

.profile-text strong,.profile-text small {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.profile-text strong {
  font-size:12px;
}

.profile-text small {
  font-size:11px;
  color:#c7d5ca;
  margin-top:3px;
}

.avatar {
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border-radius:50%;
  background:#e8eed9;
  color:#284a3b;
  font-weight:800;
  font-size:12px;
  flex:none;
}

.rail-footer button.icon-btn {
  color:inherit;
  background:none;
  border:0;
  padding:5px;
}

.rail-footer .rail-btn {
  margin-bottom:5px;
}

.shell {
  min-width:0;
}

.topbar {
  min-height:67px;
  padding:12px clamp(22px,4vw,54px);
  background:#fff;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--muted);
  font-size:13px;
  font-weight:650;
}

.topbar button {
  font:inherit;
  color:var(--muted);
  padding:0;
  background:none;
  border:0;
  cursor:pointer;
}

.topbar .icon {
  width:13px;
  height:13px;
}

.topbar strong {
  color:var(--ink);
}

main {
  max-width:1500px;
  margin:0 auto;
  padding:34px clamp(22px,4vw,54px) 60px;
  outline:none;
}

.loading {
  color:var(--muted);
}

h1,h2,h3,p {
  margin-top:0;
}

h1,h2 {
  letter-spacing:-.033em;
  line-height:1.12;
}

h1 {
  font-size:clamp(35px,4.8vw,58px);
  font-weight:730;
  margin-bottom:12px;
}

h2 {
  font-size:25px;
  margin-bottom:8px;
}

h3 {
  font-size:17px;
  line-height:1.3;
  margin-bottom:6px;
}

p {
  line-height:1.55;
  margin-bottom:12px;
}

.muted,.help {
  color:var(--muted);
}

.help {
  font-size:13px;
}

.meta {
  color:var(--muted);
  font-size:13px;
  margin-bottom:0;
}

.actions {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.section-head,.heading {
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}

.section-head {
  align-items:center;
  margin-bottom:15px;
}

.section-head h2,.section-head h3,.heading p:last-child {
  margin-bottom:0;
}

.label {
  font-size:12px;
  font-weight:750;
  color:var(--green);
  letter-spacing:.045em;
  margin-bottom:6px;
}

.btn,.icon-btn {
  border:1px solid var(--line);
  background:white;
  color:var(--ink);
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:13px;
  font-weight:740;
  cursor:pointer;
  text-decoration:none;
  white-space:nowrap;
  min-height:39px;
  padding:8px 13px;
}

.btn:hover,.icon-btn:hover {
  background:var(--soft);
  border-color:#aabca9;
}

.btn.primary {
  background:var(--green);
  border-color:var(--green);
  color:white;
}

.btn.primary:hover {
  background:#14382b;
}

.btn.lime {
  background:var(--lime);
  border-color:var(--lime);
  color:#203c2b;
}

.btn.lime:hover {
  background:#cbe581;
}

.btn.text {
  border-color:transparent;
  background:transparent;
}

.btn.danger {
  color:#873c30;
}

.btn .icon,.icon-btn .icon {
  width:16px;
  height:16px;
}

.icon-btn {
  min-width:39px;
  padding:7px;
}

.banner {
  position:relative;
  overflow:hidden;
  background:#e8efdf;
  border:1px solid #dce7d6;
  border-radius:19px;
  padding:34px 35px;
  margin-bottom:29px;
  isolation:isolate;
}

.banner p {
  max-width:45ch;
  color:#3c5648;
  margin-bottom:21px;
}

.banner-copy {
  position:relative;
  z-index:1;
}

.banner-art {
  position:absolute;
  right:5%;
  top:50%;
  transform:translateY(-50%) rotate(-10deg);
  width:32%;
  max-width:285px;
  opacity:.94;
}

.surface,.unit-card {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
}

.surface {
  padding:21px;
}

.unit-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr));
  gap:13px;
}

.unit-card {
  display:flex;
  min-height:150px;
  flex-direction:column;
  align-items:flex-start;
  text-align:left;
  padding:17px;
  cursor:pointer;
  width:100%;
  color:inherit;
}

.unit-card:hover {
  border-color:#83a185;
  background:#fefff9;
}

.unit-card-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  margin-bottom:14px;
}

.unit-card-top>.icon {
  width:21px;
  height:21px;
  color:#476b52;
}

.unit-card h3 {
  overflow-wrap:anywhere;
}

.unit-card .meta {
  margin-top:auto;
}

.empty {
  border:1px dashed #c8d4c4;
  border-radius:var(--radius);
  padding:27px 22px;
  color:var(--muted);
  background:#fdfef9;
}

.empty h3 {
  color:var(--ink);
}

.empty p:last-child {
  margin-bottom:0;
}

.status {
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 8px;
  border-radius:18px;
  font-size:11px;
  font-weight:750;
  background:#edf0e9;
  color:#435849;
  white-space:nowrap;
}

.status:before {
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}

.status.submitted {
  color:#684c14;
  background:#fbf0d4;
}

.status.approved {
  color:#285a36;
  background:#e4f3de;
}

.status.changes {
  color:#823d2b;
  background:#f8e9e1;
}

.group {
  margin-top:27px;
}

.heading {
  margin-bottom:18px;
}

.heading h1 {
  font-size:clamp(30px,4vw,47px);
  overflow-wrap:anywhere;
}

.heading .status {
  margin-bottom:8px;
}

.heading aside {
  flex:none;
}

.notice {
  background:#edf3e7;
  border:1px solid #dce7d5;
  border-radius:9px;
  padding:10px 13px;
  font-size:13px;
  margin:0 0 16px;
}

.notice.error {
  background:#fbede7;
  border-color:#f0d7ce;
  color:#7c2d22;
}

.notice p:last-child {
  margin-bottom:0;
}

.tabs {
  display:flex;
  gap:18px;
  border-bottom:1px solid var(--line);
  margin-bottom:20px;
  overflow:auto;
}

.tabs button {
  border:0;
  border-bottom:2px solid transparent;
  background:none;
  color:var(--muted);
  padding:9px 3px 11px;
  display:flex;
  align-items:center;
  gap:7px;
  font-weight:750;
  font-size:13px;
  white-space:nowrap;
  cursor:pointer;
}

.tabs button[aria-current=page] {
  border-color:#48724e;
  color:var(--ink);
}

.tabs .icon {
  width:16px;
  height:16px;
}

.planner {
  display:grid;
  grid-template-columns:minmax(250px,.85fr) minmax(300px,1.15fr);
  gap:15px;
  align-items:start;
}

.week-controls {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  margin:15px 0 10px;
}

.week-controls strong {
  font-size:13px;
  text-align:center;
}

.week-controls .icon-btn {
  min-width:32px;
  min-height:32px;
}

.day {
  border-top:1px solid var(--line);
  padding:9px 0;
  display:grid;
  grid-template-columns:47px minmax(0,1fr) 32px;
  gap:7px;
  align-items:start;
}

.date-label {
  font-size:11px;
  font-weight:750;
  padding:5px 0;
  color:var(--muted);
}

.date-label b {
  display:block;
  font-size:18px;
  line-height:1.15;
  color:var(--ink);
}

.day .icon-btn {
  height:29px;
  min-height:29px;
  min-width:29px;
}

.lesson-list {
  display:grid;
  gap:5px;
}

.lesson-chip {
  display:flex;
  align-items:center;
  gap:6px;
  text-align:left;
  width:100%;
  padding:6px 7px;
  font-size:12px;
  font-weight:700;
  border-radius:7px;
  border:1px solid #e3ebdf;
  background:#f5f8f1;
  color:var(--ink);
  cursor:pointer;
  overflow-wrap:anywhere;
}

.lesson-chip[aria-current=true],.lesson-chip:hover {
  background:#e6f0d8;
  border-color:#9ab684;
}

.day-empty {
  font-size:12px;
  color:var(--muted);
  padding:6px 0;
}

.undated {
  border-top:1px solid var(--line);
  padding-top:12px;
  margin:0;
}

.undated summary {
  cursor:pointer;
  font-size:13px;
  font-weight:750;
  margin-bottom:7px;
}

.undated .lesson-list {
  margin-top:8px;
}

.field-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.field-grid .wide {
  grid-column:1/-1;
}

.fields {
  display:grid;
  gap:13px;
}

.field {
  display:grid;
  gap:5px;
  min-width:0;
  font-size:13px;
  font-weight:720;
}

.field input,.field textarea,.field select {
  display:block;
  width:100%;
  border:1px solid #cfd8ca;
  border-radius:8px;
  background:#fcfdf9;
  color:var(--ink);
  padding:9px 10px;
  font-weight:510;
  min-width:0;
}

.field textarea {
  resize:vertical;
  min-height:75px;
}

.field input:read-only,.field textarea:read-only {
  background:#f2f4ed;
}

.field input::placeholder,.field textarea::placeholder {
  color:#627568;
}

.field span.help {
  font-weight:500;
}

.check-label {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:13px;
  font-weight:720;
}

.check-label input {
  width:16px;
  height:16px;
  accent-color:var(--green);
}

.editor-actions {
  margin-top:15px;
}

.editor-actions .help {
  margin:0;
}

.section-stack {
  display:grid;
  gap:15px;
}

.resource-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.slide {
  border:1px solid var(--line);
  border-radius:10px;
  padding:12px;
  background:#f6f8ee;
}

.slide small {
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:750;
  margin-bottom:8px;
}

.slide .field+.field {
  margin-top:8px;
}

.select-wrap {
  max-width:350px;
}

.review-history {
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:10px;
}

.review-history li {
  border-left:2px solid #c4d4be;
  padding-left:12px;
}

.review-history .meta {
  margin:6px 0;
}

.review-history p {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.preserve {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.form-prompt {
  font-weight:640;
  padding:10px 12px;
  background:var(--soft);
  border-radius:8px;
}

.review-form {
  margin-top:16px;
}

dialog {
  border:1px solid var(--line);
  border-radius:17px;
  padding:22px;
  width:min(620px,calc(100% - 26px));
  max-height:calc(100vh - 28px);
  color:var(--ink);
  box-shadow:0 15px 50px #112d2236;
}

dialog::backdrop {
  background:#12291e85;
}

.dialog-head {
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  margin-bottom:14px;
}

.dialog-head h2 {
  margin:3px 0;
}

.import-tabs {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.import-tabs .btn[aria-pressed=true] {
  background:#e0eccf;
  border-color:#aac19f;
}

.dialog-actions {
  justify-content:flex-end;
  margin-top:15px;
}

.toast {
  position:fixed;
  z-index:8;
  bottom:20px;
  right:20px;
  max-width:min(380px,calc(100% - 40px));
  border-radius:10px;
  padding:11px 15px;
  background:#183830;
  color:white;
  box-shadow:0 8px 28px #152d2440;
  font-size:14px;
  font-weight:650;
}

.auth {
  min-height:calc(100vh - 160px);
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(260px,.95fr);
  align-items:center;
  gap:clamp(20px,4vw,50px);
}

.auth .banner {
  height:100%;
  min-height:300px;
  margin:0;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  flex-direction:column;
}

.auth .banner-art {
  top:auto;
  bottom:12px;
  width:47%;
  transform:rotate(-10deg);
  opacity:.46;
}

.auth .banner p {
  max-width:33ch;
}

.auth-card {
  width:100%;
  max-width:405px;
  justify-self:center;
}

.auth-card .btn.primary {
  justify-self:start;
}

.auth-card .fields {
  margin-top:14px;
}

.auth-card .notice {
  margin-top:12px;
}

@media(max-width:1050px) {
  .planner {
    grid-template-columns:minmax(210px,.88fr) minmax(250px,1.12fr);
  }
  .layout {
    grid-template-columns:190px minmax(0,1fr);
  }
  .rail {
    padding-inline:12px;
  }
  .brand {
    font-size:20px;
  }
  .banner-art {
    right:3%;
  }
}

@media(max-width:800px) {
  .planner,.auth {
    grid-template-columns:1fr;
  }
  .auth .banner {
    min-height:225px;
  }
  .auth .banner-art {
    width:31%;
  }
  .heading {
    flex-wrap:wrap;
  }
  .layout {
    grid-template-columns:160px minmax(0,1fr);
  }
  .brand {
    font-size:17px;
    gap:7px;
  }
  .brand-mark {
    width:28px;
    height:28px;
  }
  .rail-btn {
    font-size:12px;
  }
  .banner {
    padding:24px;
  }
  .banner p {
    max-width:35ch;
  }
  .banner-art {
    right:3%;
    opacity:.55;
  }
}

@media(max-width:580px) {
  .layout {
    display:block;
  }
  .rail {
    position:static;
    height:auto;
    display:flex;
    flex-wrap:wrap;
    flex-direction:row;
    padding:12px;
    gap:8px;
  }
  .brand {
    margin:0 auto 0 0;
  }
  .rail-body {
    display:flex;
    order:3;
    width:100%;
    gap:3px;
  }
  .rail-label,.profile-text,.rail-footer>.rail-btn {
    display:none;
  }
  .rail-footer {
    margin:0;
    padding:0;
  }
  .profile {
    border:0;
    padding:0;
  }
  .rail-btn {
    width:auto;
    gap:6px;
    padding:6px;
  }
  .rail-btn .icon {
    width:15px;
    height:15px;
  }
  .topbar {
    min-height:47px;
    padding:8px 15px;
  }
  main {
    padding:19px 14px 35px;
  }
  .resource-grid,.field-grid {
    grid-template-columns:1fr;
  }
  .banner-art {
    width:33%;
    opacity:.28;
  }
  .banner {
    padding:20px;
  }
  .surface {
    padding:14px;
  }
  .auth .banner {
    min-height:180px;
  }
  .auth .banner-art {
    opacity:.27;
  }
  .section-head {
    gap:9px;
  }
  .section-head h2 {
    font-size:21px;
  }
  .btn {
    padding:7px 9px;
  }
  .heading aside {
    flex:auto;
  }
}

@media print {
  .rail,.topbar,.actions,.tabs,.skip,.toast,.notice,.select-wrap {
    display:none!important;
  }
  .layout {
    display:block;
  }
  main {
    padding:0;
  }
  .surface,.slide {
    break-inside:avoid;
    border-color:#b5bdb2;
  }
  body {
    background:white;
  }
  .field textarea {
    min-height:100px;
  }
}

.calendar-art {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  position:relative;
  aspect-ratio:1.42;
  border:1px solid #a9ba9e;
  background:#fafbf3;
  border-radius:13px;
  padding:15px 14px 13px;
  box-shadow:0 10px 25px #4d6d2926;
}

.calendar-art span {
  height:14px;
  grid-column:1/-1;
  background:#cfdfa8;
  border-radius:4px;
  margin-bottom:3px;
}

.calendar-art b {
  height:100%;
  border-radius:3px;
  background:#e9efdb;
  border:1px solid #d8e3ce;
}

.calendar-art b:nth-of-type(3n+2) {
  background:#cfdfa8;
  border-color:#c2d498;
}

.calendar-art b:nth-of-type(7) {
  background:#648b60;
  border-color:#5a8055;
}

.back-sheet {
  position:absolute;
  inset:0;
  transform:translate(12%,-10%) rotate(17deg);
  background:#f3f7e6;
  box-shadow:none;
}

#print-sheet {
  display:none;
}

@media print {
  body:has(#print-sheet) .layout {
    display:none;
  }
  #print-sheet {
    display:block;
    margin:18mm 12mm;
    font:16pt/1.65 Georgia,serif;
  }
  #print-sheet h1 {
    font:24pt/1.1 Georgia,serif;
  }
  #print-sheet p {
    margin:12mm 0;
  }
}
