:root {
  --ink: #243c36;
  --muted: #6c7772;
  --green: #205448;
  --green-light: #e8f0e9;
  --paper: #f8f9f5;
  --line: #e2e7df;
  --white: #fff;
  --red: #a54242;
  --amber: #916123;
  --radius: 18px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5
}

* {
  box-sizing: border-box
}

body {
  margin: 0
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent
}

button,
a {
  touch-action: manipulation
}

a {
  color: var(--green);
  text-underline-offset: 3px
}

button {
  cursor: pointer;
  min-height: 44px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 15px;
  font-weight: 600
}

button:hover {
  background: #eef3ec
}

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

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

button.primary:hover {
  background: #163f35
}

button.ghost {
  background: transparent;
  border-color: transparent
}

button.small {
  padding: 6px 11px;
  font-size: 13px
}

button.danger {
  color: var(--red)
}

:focus-visible {
  outline: 3px solid #d0a04c;
  outline-offset: 3px
}

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

h1 {
  font-size: 34px;
  letter-spacing: -1.1px;
  line-height: 1.2;
  font-weight: 650;
  margin-bottom: 10px
}

h2 {
  font-size: 21px;
  letter-spacing: -.45px;
  margin-bottom: 15px
}

h3 {
  font-size: 16px;
  margin-bottom: 7px
}

p {
  margin-bottom: 15px
}

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

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 12px
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 22px;
  display: flex;
  flex-direction: column
}

.brand {
  container: brand / inline-size;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 750;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -.4px;
  text-decoration: none;
  color: var(--ink)
}

.brand img {
  width: 40px;
  height: 40px;
  flex-shrink: 0
}

.brand-type, .brand-type > span {display:block; white-space:nowrap}
.brand-type {line-height:1.08}
@container brand (min-width:11em) {
  .brand-type {display:grid; grid-template-columns:max-content max-content; column-gap:.25em}
  .brand-type > span:first-child {grid-column:1 / -1}
}
@container brand (min-width:13.5em) {
  .brand-type {display:flex; gap:.25em}
}

.sidebar > .nav {margin-top:32px}

.nav {
  display: grid;
  gap: 7px
}

.nav button {
  text-align: left;
  border: 0;
  background: transparent;
  font-weight: 550;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px
}

.nav button.active {
  background: var(--green-light);
  color: var(--green)
}

.icon {
  width: 20px;
  height: 20px;
  flex: none
}

.sidebar-account { margin-top: auto; }
.sidebar-bottom {
  margin-top:0;
  padding:14px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  text-align:left
}
.sidebar-bottom .user {margin-top:0}
.sidebar-bottom .avatar {flex-shrink:0}
.sidebar-bottom .user strong {overflow-wrap:anywhere}
.sidebar-bottom .account-signout {font-size:12px; display:flex; gap:.4em; align-items:center; justify-content:flex-start; width:100%; margin-top:12px; padding:6px 0 6px 45px; text-align:left}
.account-signout .icon {width:13px; height:13px; flex-shrink:0; stroke-width:2}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #efe8d9;
  color: #806638;
  font-weight: 650
}

.user small {
  display: block;
  color: var(--muted)
}

.workspace {
  min-width: 0
}



.content {
  max-width: 1250px;
  margin: auto;
  padding: 38px 42px 60px
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 27px
}

.page-head p {
  margin-bottom: 0
}

.date-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap
}

.date-picker input {
  max-width: 160px;
  background: white
}

.date-picker button {
  padding: 8px 12px
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  background: #e8efe5;
  border: 1px solid #dce5d7;
  border-radius: var(--radius);
  padding: 27px 30px;
  margin-bottom: 25px;
  gap: 20px;
  align-items: center
}

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

.hero p {
  max-width: 620px;
  margin: 0;
  color: #5c7062
}

.hero-mark {
  width: 84px;
  height: 84px;
  background: #f9fbf3;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #739260
}

.hero-mark .icon {
  width: 42px;
  height: 42px
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 31px
}

.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px
}

.stat span {
  display: block;
  font-size: 12px;
  color: var(--muted)
}

.stat strong {
  font-size: 28px;
  letter-spacing: -.6px;
  font-weight: 600
}

.stat strong.warn {
  color: var(--amber)
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 25px 0 14px
}

.section-heading h2 {
  margin: 0
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  padding: 5px 8px;
  line-height: 1.35
}

.status.reported,
.status.done {
  background: #e9f2e8;
  color: #476b43
}

.status.none {
  background: #eaf0f6;
  color: #52718d
}

.status.unreported {
  background: #f4efdf;
  color: #8c7437
}

.status.alert {
  background: #f9e9e7;
  color: #a24d45
}

.status.neutral {
  background: #f0f1ee;
  color: #707970
}

.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px
}

.class-card {
  --card-inset: 21px;
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: visible
}

.class-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px var(--card-inset);
  gap: 10px
}

.class-name {
  display: flex;
  align-items: center;
  gap: 12px
}

.class-dot {
  height: 37px;
  width: 37px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--class-color) 12%, white);
  color: var(--class-color);
  font-weight: 700;
  font-size: 13px;
  flex: none
}

.class-name h3 {
  margin: 0
}

.class-name small {
  color: var(--muted);
  font-size: 11px
}

.class-body {
  padding: 0 var(--card-inset) 17px
}

.class-body>p {
  font-size: 13px;
  margin: 0;
  color: var(--muted)
}

.work-item {
  border-top: 1px solid #edf0e9;
  padding: 13px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px
}

.work-item:last-child {
  padding-bottom: 0
}

.work-link {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
  min-height: 44px;
  flex: 1;
  min-width: 0;
  display: block;
  font-weight: 550;
  overflow-wrap: anywhere
}

.work-link:hover {
  background: transparent;
  color: #1c7056
}

.work-link small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px
}

.tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px
}

.check-icon {
  height: 21px;
  width: 21px;
  border: 1.5px solid #cdd6ca;
  border-radius: 6px;
  margin-top: 3px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--green)
}

.check-icon.checked {
  background: #e7f0e4;
  border-color: #a2ba99
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 21px;
  margin-bottom: 18px
}

.panel h3 {
  font-size: 15px
}

.aside-note {
  background: #f3efe4;
  border: 1px solid #e9e2d0;
  color: #776b4d
}

.aside-note p {
  font-size: 12px;
  margin-bottom: 0
}

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

.attention-item button {
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  font-size: 13px;
  min-height: 44px;
  width: 100%
}

.attention-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px
}

.legend {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--class-color)
}

.empty {
  border: 1px dashed #d4ddd0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  background: #fafbf7
}

.empty p {
  margin: 0;
  font-size: 13px
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px
}

.segmented {
  display: flex;
  padding: 4px;
  background: #edf0e9;
  border-radius: 10px;
  gap: 3px
}

.segmented button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  min-height: 38px;
  font-size: 13px
}

.segmented button.active {
  background: white;
  box-shadow: 0 1px 4px #0000000c
}

.toolbar select {
  max-width: 210px
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden
}

.calendar-day {
  background: white;
  padding: 8px;
  min-height: 130px;
  min-width: 0
}

.calendar-day.today {
  background: #f0f5e9
}

.calendar-day.outside {
  background: #f6f7f3
}

.day-number {
  font-size: 12px;
  border: 0;
  background: transparent;
  padding: 3px;
  min-height: 32px;
  min-width: 32px
}

.calendar-event {
  display: block;
  width: 100%;
  font-size: 11px;
  text-align: left;
  border: 0;
  border-left: 3px solid var(--class-color);
  border-radius: 3px;
  background: #f1f4ee;
  margin: 4px 0;
  padding: 6px;
  overflow: hidden;
  line-height: 1.3;
  font-weight: 500;
  min-height: 36px;
  overflow-wrap: anywhere
}

.weekday {
  background: #f6f7f3;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 9px
}

.calendar-list .panel {
  padding: 16px 20px
}

.calendar-list h3 {
  font-size: 13px
}

.calendar-list .work-item {
  padding: 10px 0
}

.field {
  display: block;
  margin-bottom: 17px;
  font-size: 13px;
  font-weight: 600
}

.field input,
.field select,
.field textarea {
  margin-top: 7px
}

input:not([type=checkbox]):not([type=color]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d6ded3;
  background: #fff;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 400
}

textarea {
  min-height: 100px;
  resize: vertical
}

input[type=checkbox] {
  height: 19px;
  width: 19px;
  accent-color: var(--green);
  flex: none
}

input[type=color] {
  height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px
}

.field small,
.help {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

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

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px
}

.form-error {
  color: var(--red);
  font-size: 13px;
  margin: 12px 0;
  white-space: pre-line
}

.form-error:empty {
  display: none
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px
}

.form-shell {
  max-width: 760px
}

.form-shell>.panel,
.form-shell>.student-context {
  padding: 26px
}

.form-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px
}

.form-title h2 {
  margin: 0
}

.checkpoint-form {
  padding: 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px
}

.checkpoint-form .field {
  margin-bottom: 12px
}

.upload-area {
  border: 1px dashed #bacbb4;
  border-radius: 12px;
  padding: 18px;
  background: #f7faf4
}

.upload-area .help {
  margin-top: 10px
}

.upload-area input {
  padding: 0;
  border: 0
}

.file-progress {
  padding: 8px 0;
  font-size: 12px;
  overflow-wrap: anywhere
}

.file-progress progress {
  width: 100%;
  height: 7px;
  accent-color: var(--green)
}

.detail-title {
  font-size: 30px
}

.detail-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 18px;
  flex-wrap: wrap
}

.prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px
}

.detail-checkpoint {
  border-top: 1px solid var(--line);
  padding: 18px 0
}

.detail-checkpoint:last-child {
  padding-bottom: 0
}

.detail-checkpoint h3 {
  margin-bottom: 3px
}

.note {
  background: #f6f7f3;
  border-radius: 10px;
  padding: 13px;
  margin: 12px 0
}

.note p {
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 6px 0
}

.note small {
  font-size: 10px;
  color: var(--muted)
}

.attachment {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 9px 0;
  font-size: 12px;
  overflow-wrap: anywhere
}

.attachment a {
  flex: 1;
  min-width: 0
}

.attachment img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px
}

.attachment .download {
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px
}

.grade-number {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.8px
}

.progress-bar {
  height: 7px;
  background: #edf0e7;
  border-radius: 8px;
  overflow: hidden;
  margin: 12px 0
}

.progress-bar>span {
  display: block;
  height: 100%;
  background: #6d9361
}

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

.auth-main {
  padding: 45px;
  display: grid;
  place-items: center;
  background: white
}

.auth-form {
  width: 100%;
  max-width: 390px
}

.auth-form h2 {
  font-size: 28px
}

.auth-form .primary {
  width: 100%
}

.auth-form .brand {
  margin-bottom: 45px
}

.auth-form p {
  font-size: 14px;
  color: var(--muted)
}

.auth-equation {display:flex; justify-content:space-between; align-items:center; width:100%; margin-top:32px; text-align:center; color:#b6c5b9; font-size:clamp(32px, 10vw, 46px); font-weight:300; letter-spacing:0; line-height:1.2; user-select:none}

#toast {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  background: #375e7d;
  color: white;
  padding: 13px 22px;
  border-radius: 12px;
  box-shadow: 0 8px 25px #0002;
  z-index: 100;
  display: none;
  max-width: calc(100vw - 32px);
  font-size: 13px
}

#toast.visible {
  display: block
}

.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted)
}

.mobile-nav {
  display: none
}

dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  max-width: 560px;
  width: calc(100% - 32px);
  color: var(--ink)
}

dialog::backdrop {
  background: #152b2466
}

dialog input {
  margin: 15px 0
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px
}

.settings-grid .panel {
  margin: 0
}

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

.override {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding: 6px 0
}

.teacher-card {
  padding: 15px 0;
  border-top: 1px solid var(--line)
}

.teacher-card p {
  margin-bottom: 7px;
  font-size: 13px
}

.teacher-card .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px
}

.teacher-card .check-row {
  font-size: 12px
}

.class-settings {
  border-top: 1px solid var(--line);
  padding: 16px 0
}

.class-settings summary {
  cursor: pointer;
  min-height: 44px;
  font-weight: 600
}

.class-settings form {
  padding-top: 10px
}

.url {
  font-size: 12px;
  overflow-wrap: anywhere
}

.history {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0;
  border-top: 1px solid var(--line)
}

details.history>summary {
  cursor: pointer
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 10px
}

.label-line {
  display: flex;
  justify-content: space-between;
  gap: 12px
}


@media(min-width:1600px) {
  .content {
    padding-top: 50px
  }
}

@media(max-width:1150px) {
  .shell {
    grid-template-columns: 205px minmax(0, 1fr)
  }

  .sidebar {
    padding: 26px 16px
  }

  .content {
    padding: 30px 25px
  }


  .grid-main,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 250px
  }

  .class-card { --card-inset: 16px; }

  .class-header {
    padding: 16px var(--card-inset)
  }

  .class-body {
    padding: 0 var(--card-inset) 16px
  }

  .page-head {
    align-items: flex-start
  }

  .stats {
    gap: 10px
  }

  .stat {
    padding: 15px
  }

  .settings-grid {
    grid-template-columns: 1fr
  }
}

@media(max-width:900px) {

  .grid-main,
  .detail-grid {
    grid-template-columns: 1fr
  }

  .daily-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start
  }

  .page-head {
    flex-wrap: wrap
  }

  .stats {
    grid-template-columns: repeat(2, 1fr)
  }

  .calendar-day {
    padding: 4px
  }

  .calendar-event {
    font-size: 10px;
    padding: 4px
  }
}

@media(max-width:650px) {
  .shell {
    display: block
  }

  .sidebar {
    display: none
  }







  .content {
    padding: 26px 17px 105px
  }

  h1 {
    font-size: 28px;
    letter-spacing: -.8px
  }

  .page-head {
    gap: 17px;
    margin-bottom: 21px
  }

  .page-head p {
    font-size: 13px
  }

  .date-picker {
    width: 100%
  }

  .date-picker input {
    flex: 1;
    max-width: none;
    width: 130px
  }

  .hero {
    padding: 21px;
    gap: 10px
  }

  .hero h2 {
    font-size: 20px
  }

  .hero p {
    font-size: 12px
  }

  .hero-mark {
    width: 50px;
    height: 50px
  }

  .hero-mark .icon {
    width: 27px;
    height: 27px
  }

  .stats {
    gap: 9px;
    margin-bottom: 25px
  }

  .stat {
    padding: 13px 16px
  }

  .stat strong {
    font-size: 26px
  }

  .stat span {
    font-size: 11px
  }

  .section-heading h2 {
    font-size: 18px
  }

  .class-card { --card-inset: 14px; }

  .class-header {
    padding: 16px var(--card-inset);
    align-items: flex-start
  }

  .class-header .status {
    max-width: 130px;
    font-size: 10px
  }

  .class-name {
    gap: 9px
  }

  .class-name h3 {
    font-size: 14px
  }

  .class-dot {
    width: 32px;
    height: 34px
  }

  .class-body {
    padding: 0 var(--card-inset) 15px
  }

  .daily-aside {
    display: block
  }

  .panel {
    padding: 19px
  }

  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--line);
    background: #fffffff5;
    backdrop-filter: blur(10px);
    padding: 7px 8px max(8px, env(safe-area-inset-bottom));
    z-index: 20
  }

  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    min-width: 70px;
    border: 0;
    background: transparent;
    padding: 5px 10px;
    color: var(--muted)
  }

  .mobile-nav button.active {
    color: var(--green);
    background: var(--green-light)
  }

  .mobile-nav .icon {
    width: 21px;
    height: 21px
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
    gap: 0
  }

  .auth-shell {
    display: block
  }

  .auth-main {
    min-height: 100vh;
    padding: 32px 25px
  }

  .auth-form .brand {
    margin-bottom: 50px
  }

  .toolbar {
    gap: 9px
  }

  .segmented {
    width: 100%;
    justify-content: space-between
  }

  .segmented button {
    flex: 1
  }

  .calendar-day {
    min-height: 92px;
    padding: 2px
  }

  .calendar-event {
    font-size: 9px;
    border-left-width: 2px;
    max-height: 44px;
    padding: 3px;
    min-height: 32px
  }

  .day-number {
    font-size: 11px;
    min-width: 28px
  }

  .weekday {
    font-size: 9px;
    padding: 6px 0
  }

  .calendar-grid.week {
    grid-template-columns: 1fr;
    gap: 1px
  }

  .calendar-grid.week .calendar-day {
    min-height: 80px;
    padding: 12px
  }

  .calendar-grid.week .calendar-event {
    font-size: 12px;
    max-height: none
  }

  .calendar-grid.week .weekday {
    display: none
  }

  .detail-title {
    font-size: 26px
  }

  .form-shell>.panel,
.form-shell>.student-context {
    padding: 19px
  }

  .form-actions>button {
    flex: 1
  }

  .settings-grid {
    gap: 16px
  }

  .toolbar select {
    max-width: 100%
  }

  #toast {
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right))
  }

  .detail-meta {
    gap: 9px
  }

  .work-link {
    font-size: 13px
  }

  .label-line {
    flex-wrap: wrap
  }

  .form-actions .help {
    flex-basis: 100%
  }
}

@media(prefers-reduced-motion:no-preference) {
  button {
    transition: background .15s
  }

  .class-card {
    animation: appear .25s ease both
  }

  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(4px)
    }

    to {
      opacity: 1;
      transform: translateY(0)
    }
  }
}

.event-short {
  display: none
}

.date-picker {
  flex-shrink: 0
}

.work-link>small {
  overflow-wrap: anywhere
}

@media(min-width:651px) {
  .date-picker {
    flex-wrap: nowrap
  }
}

@media(max-width:650px) {
  .calendar-grid.month .event-full {
    display: none
  }

  .calendar-grid.month .event-short {
    display: block;
    font-size: 10px;
    line-height: 1.5
  }

  .calendar-grid.month .calendar-event {
    min-height: 40px;
    max-height: none
  }
}

@media(max-width:650px) {
  .mobile-nav button {
    min-width: 0;
    flex: 1;
    padding: 5px 6px
  }

  .class-name {
    min-width: 0
  }

  .class-name h3 {
    overflow-wrap: anywhere
  }

  .panel,
  .field {
    min-width: 0
  }

  .prose a,
  .panel>p>a {
    overflow-wrap: anywhere
  }
}

@media(max-width:360px) {


  .hero-mark {
    display: none
  }

  .class-header {
    flex-wrap: wrap
  }

  .status {
    font-size: 10px
  }
}
.calendar-list .work-item .check-icon{border-color:var(--class-color);color:var(--class-color)}

/* Imported school days stay readable alongside assignment deadlines. */
.school-notice { background: #f0f5f1; border-left: 3px solid #64836e; padding: 12px 15px; border-radius: 8px; margin-bottom: 16px; overflow-wrap: anywhere; }
.school-notice strong, .school-notice span, .school-notice small { display: block; }
.school-notice span { margin-top: 4px; font-size: 13px; }
.school-notice small { margin-top: 5px; color: #58685e; }
.school-notice.compact { padding: 7px; margin: 7px 0; font-size: 11px; }
.school-notice.compact button { padding: 5px 0; font-size: 11px; white-space: normal; }
.calendar-import-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-height: 420px; overflow-y: auto; margin: 16px 0; }
.calendar-import-dates > div { padding: 10px; background: #f6f7f3; border-radius: 8px; overflow-wrap: anywhere; }
.calendar-import-dates strong, .calendar-import-dates span, .calendar-import-dates small { display: block; font-size: 13px; }
.calendar-import-dates span { margin-top: 5px; }
#school-calendar-form details { margin-bottom: 18px; }
#school-calendar-form .two-col { margin-top: 18px; }
#calendar-preview { margin-top: 20px; }
@media (max-width: 600px) { .calendar-import-dates { grid-template-columns: 1fr; } }

/* Consistent inset caret across desktop and mobile native dropdowns. */
select:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
@media (forced-colors: active) {
  select:not([multiple]) { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: 12px; }
}

.academic-toolbar {display:grid; grid-template-columns:minmax(0, 260px) minmax(0, 1fr); align-items:center; gap:7px 20px; margin-bottom:24px; padding-bottom:18px; border-bottom:1px solid var(--line)}
.academic-toolbar select {grid-column:1; grid-row:1; width:100%; min-width:0; font-size:13px; font-weight:400}
.academic-period {grid-column:2; grid-row:1; font-size:14px; font-weight:500; line-height:1.35; color:var(--ink)}
.academic-period small {display:block; margin-top:4px; font-size:12px; font-weight:400; color:var(--muted)}
.toolbar .period-filter {margin:0}
.period-summary {display:flex; flex-wrap:wrap; gap:8px 20px; padding:18px; border-radius:12px; background:#eef3e8; margin-bottom:18px}
.period-summary small {flex-basis:100%; color:#586f67}
.period-dates {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:16px 0}
.period-dates fieldset {border:1px solid #d6dfd3; border-radius:12px; min-width:0; padding:14px}
.period-dates legend {font-weight:600; padding:0 6px; font-size:14px}
.new-year {margin-top:24px; padding-top:18px; border-top:1px solid #d6dfd3}
.new-year form {margin-top:18px}
.class-order {margin:16px 0}
.notice-details {padding-left:20px; line-height:1.6; overflow-wrap:anywhere}
.notice-details li {margin-bottom:12px}
dialog {max-height:85dvh; overflow-y:auto; overflow-wrap:anywhere}
@media(max-width:640px) {
  .period-dates {grid-template-columns:1fr}
  .toolbar .period-filter {width:100%; min-width:0}
}
@media(max-width:600px) {
  .calendar-grid.month .school-notice.compact {padding:5px 1px; border-left-width:2px; font-size:10px; line-height:1.3}
  .calendar-grid.month .school-notice.compact button {font-size:10px; min-width:0; width:100%; padding:5px 0}
}

.school-notice .notice-narrow {display:none}
@media(max-width:600px) {
  .calendar-grid.month .school-notice .notice-wide {display:none}
  .calendar-grid.month .school-notice .notice-narrow {display:block; margin:0; font-size:10px}
}

@media(max-width:480px) {
  .academic-toolbar {grid-template-columns:minmax(0,1fr); gap:8px}
  .academic-period {grid-column:1; grid-row:2; margin-top:4px}
}

/* Settings sections use ordinary links for keyboard and browser navigation. */
.settings-nav {display:flex; flex-wrap:wrap; gap:8px; padding-bottom:18px; margin-bottom:22px; border-bottom:1px solid var(--line)}
.settings-nav a {display:flex; align-items:center; min-height:44px; padding:10px 15px; border:1px solid var(--line); border-radius:10px; background:var(--white); color:var(--ink); font-size:13px; font-weight:600; text-decoration:none}
.settings-nav a:hover {background:var(--green-light)}
.settings-nav a[aria-current=page] {background:var(--green); border-color:var(--green); color:white}
.settings-content.single-section {grid-template-columns:minmax(0,1fr)}
@media(max-width:480px) {.settings-nav {gap:6px}.settings-nav a {padding:9px 12px}}

/* Compact, functional page headings and class context. */
.daily-content .page-head h1 {letter-spacing:.015em}
.calendar-filters {align-items:flex-end}
.calendar-filters > .field {margin-bottom:0}
.imported-calendar-details {margin-top:20px; margin-bottom:16px}
.class-focused .page-head {border-left:4px solid var(--focus-color); padding:14px 18px; border-radius:0 12px 12px 0; background:color-mix(in srgb, var(--focus-color) 8%, var(--paper))}
.class-focused .calendar-filters #class-filter {border-color:var(--focus-color); box-shadow:inset 4px 0 var(--focus-color)}
.class-focused .calendar-filters .segmented .active {box-shadow:inset 0 -3px var(--focus-color)}

.hidden-class-badge {display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; width:30px; height:28px; margin:0 8px; border-radius:7px; background:#eef0ed; color:#56685f}
.hidden-class-badge .icon {width:20px; height:20px; stroke-width:1.8}
.class-settings.schedule-hidden > summary {background:#f2f4f0; border-radius:8px; padding:12px 8px}

/* Prevent mobile browsers from zooming small form text during autofill/focus. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea,
  .academic-toolbar select {font-size:16px}
}

.student-context {margin-bottom:20px; padding:14px 18px; border:1px solid var(--line); border-radius:12px; background:var(--white); display:flex; align-items:center; justify-content:space-between; gap:12px; overflow-wrap:anywhere}
.student-label {display:block; font-size:11px; font-weight:650; color:var(--muted); margin-bottom:4px}
.student-context strong {display:block; font-size:21px; line-height:1.3}
.student-info {display:block; margin-top:4px; color:var(--muted); font-size:13px}

/* Capture is a touch-device action; ordinary file uploads remain universal. */
.camera-upload { display: none; margin-bottom: 14px; }
.camera-button { position: relative; display: inline-flex; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: white; font-weight: 650; cursor: pointer; }
.camera-button input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.camera-button:focus-within { outline: 2px solid #c99a43; outline-offset: 3px; }
.camera-selection { display: block; overflow-wrap: anywhere; }
@media (hover: none) and (pointer: coarse) { .camera-upload { display: block; } }

.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.settings-heading h2 { margin: 0; }
.settings-heading button { flex-shrink: 0; }
@media (max-width: 600px) { .settings-heading { align-items: flex-start; flex-direction: column; } }
dialog:has(#new-year-form) { max-width: 760px; }
dialog:has(#settings-form-title) { max-height: calc(100dvh - 32px); overflow-y: auto; }

/* Keep teacher reporting actions close to the assignment list. */
.academic-toolbar > .period-filter { grid-column: 2; grid-row: 1; width: 260px; max-width: 100%; margin: 0; }
@media (max-width: 600px) {
  .academic-toolbar > .period-filter { grid-column: 1; grid-row: 2; width: 100%; }
}
.academic-toolbar > .period-filter select { margin: 0; }

/* Teacher workspace: identity, daily actions, then work. */
.teacher-workspace { max-width: 1080px; margin: 0 auto; }
.teacher-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.teacher-header h1 { display: flex; align-items: center; gap: 12px; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; margin: 0; }
.class-accent { width: 5px; height: 32px; border-radius: 3px; background: var(--focus-color); flex-shrink: 0; }
.teacher-header .student-context { padding: 0; border: 0; border-radius: 0; background: none; margin: 0; }
.teacher-header .student-context strong { font-size: 18px; }
.teacher-header .student-label { font-size: 12px; margin-bottom: 3px; }
.teacher-header .student-info { font-size: 13px; }
.teacher-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.teacher-filters .academic-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; border: 0; }
.teacher-filters .academic-toolbar > select, .teacher-filters .period-filter { width: 240px; max-width: 100%; }
.teacher-filters select { font-size: 13px; background-color: transparent; }
.teacher-filters .field { margin: 0; }
.teacher-filters .teacher-class-filter { min-width: 180px; }
.teacher-workspace h2 { font-size: 18px; line-height: 1.4; letter-spacing: -.015em; margin: 0; }
.teacher-report { padding: 24px 0; border-bottom: 1px solid var(--line); }
.teacher-report-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.teacher-report .help { margin: 0; font-size: 13px; }
.teacher-report .form-actions { margin-top: 18px; }
.teacher-report .report-secondary { background: transparent; border-color: #9eafa3; }
.teacher-report .date-picker input { background: transparent; font-size: 13px; }
.teacher-report .date-picker button { background: transparent; }
.teacher-assignments .section-heading { margin: 24px 0 12px; }
.teacher-work-list { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px; }
.teacher-work-list .work-item:first-child { border-top: 0; }
.teacher-work-list .work-item:last-child { padding-bottom: 14px; }
.teacher-workspace .work-link { font-size: 15px; }
.teacher-workspace .work-item .status:not(.alert) { background: transparent; padding-left: 0; padding-right: 6px; font-weight: 500; }
.teacher-archive, .teacher-other-work { margin-top: 24px; }
.teacher-permalink { margin-top: 24px; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .teacher-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .teacher-header .student-context { padding-left: 17px; }
  .teacher-report-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 480px) {
  .teacher-filters, .teacher-filters .academic-toolbar { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; }
  .teacher-filters .academic-toolbar > select, .teacher-filters .period-filter { width: 100%; }
  .teacher-filters select, .teacher-report .date-picker input { font-size: 16px; }
  .teacher-report .date-picker { gap: 4px; }
  .teacher-report .date-picker button { padding: 8px; }
  .teacher-report .date-picker input { max-width: 145px; }
}
@media (max-width: 480px) {
  .teacher-report .form-actions { align-items: stretch; }
  .teacher-report .form-actions button { flex: 1 1 130px; }
}

.teacher-workspace #report-title { font-size: 24px; }
.teacher-filters select,
.teacher-report .date-picker input,
.teacher-report .date-picker button { border-color: #9eafa3; }

.teacher-profile-panel { max-width: 640px; }
.teacher-profile-note { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }
.teacher-contact { overflow-wrap: anywhere; font-size: 13px; }

.teacher-settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.teacher-settings-grid .teacher-profile-panel { max-width: none; }
.parent-contact { padding: 16px 0; border-top: 1px solid var(--line); }
.parent-contact h3 { font-size: 15px; margin: 0 0 6px; }
.parent-contact a { overflow-wrap: anywhere; }
@media (max-width: 800px) { .teacher-settings-grid { grid-template-columns: minmax(0, 1fr); } }

.history { padding: 16px 0; font-size: 13px; }
.history-title { color: var(--ink); font-weight: 650; }
.history-meta { display: block; margin: 5px 0 0 16px; color: var(--muted); font-size: 12px; }
.history-body { margin: 16px 0 0 16px; color: var(--ink); }
.history-body p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
.history-change + .history-change { margin-top: 18px; }
.history-change h4 { margin: 0 0 8px; font-size: 13px; font-weight: 650; }
.history-values { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px 24px; }
.history-value-label { font-size: 11px; color: var(--muted); font-weight: 650; }
@media(max-width:480px) { .history-values { grid-template-columns: minmax(0,1fr); } .history-body { margin-left: 0; } }

.report-confirmation { font-size: 13px; font-weight: 600; color: var(--ink); }

.no-homework-message { padding: 14px 16px; margin: 0 0 16px; border-radius: 8px; background: #eaf0f6; color: #375e7d; }
.no-homework-message strong { display: block; font-size: 16px; font-weight: 650; }
.no-homework-message span { display: block; margin-top: 5px; font-size: 12px; color: #526b80; }
.no-homework-message:last-child { margin-bottom: 0; }

.class-body > section + section { margin-top: 22px; }
.class-body section > h4 { font-size: 16px; margin: 0 0 8px; font-weight: 700; color: var(--ink); }
.past-due-work .work-item:first-of-type { border-top-color: #ead2cd; }
.daily-report-message { margin: 0; padding: 12px 0; color: var(--muted); }
/* Leave breathing room before the following checkpoint divider. */
.class-body > section > .work-item:last-child { padding-bottom: 13px; }

.class-body .checkpoint-work { margin-left: 0; }
.class-body > section { margin-left: 0; padding-left: 0; text-align: left; }
.class-body .no-homework-message { padding-left: 0; padding-right: 0; background: transparent; }

.new-assignment-dot { position: absolute; top: 50%; left: -22px; transform: translateY(-50%); width: 9px; height: 9px; border-radius: 50%; background: #7f9a7d; }

#toast.above-account {
  top: auto;
  right: auto;
  left: var(--toast-left);
  bottom: var(--toast-bottom);
  width: var(--toast-width);
  padding: 13px 14px;
  overflow-wrap: anywhere;
}

@media(max-width:650px) { .new-assignment-dot { left: -14px; } }


.teacher-help-links { display:flex; justify-content:center; align-items:center; gap:0; padding:12px 4px 0; font-size:12px; }
.teacher-help-links a { padding:0 12px; }
.teacher-help-links a + a { border-left:1px solid var(--line); }
.teacher-help-links a { color:var(--muted); text-decoration:none; }
.teacher-help-links a:hover, .teacher-help-links a[aria-current="page"] { color:var(--ink); text-decoration:underline; }
.teacher-info-page { max-width:680px; }
.teacher-info-page h1 { font-size:30px; margin:0 0 20px; }
.teacher-info-page h2 { font-size:20px; margin-top:30px; }
.teacher-info-page > p { line-height:1.7; margin-bottom:20px; }
.teacher-info-page form { margin-top:28px; }
.support-unavailable { color:var(--muted); }
.support-result { margin-top:18px; color:var(--ink); }
.mobile-help-links { display:none; }
@media(max-width:650px) { .mobile-help-links { display:block; margin-top:24px; } }

#assignment-form .assignment-options { border-top:1px solid var(--line); padding:16px 0; }
#assignment-form .assignment-options > summary { cursor:pointer; font-size:17px; font-weight:650; }
.assignment-options-body { padding-top:16px; }
#assignment-form [hidden] { display:none !important; }

.grade-number.grade-ungraded { font-size:18px; font-weight:500; letter-spacing:normal; }

.teacher-notifications { grid-column:1 / -1; max-width:760px; width:100%; }
.notification-days { border:0; padding:0; margin:20px 0; }
.notification-days legend { font-weight:600; margin-bottom:12px; }
.notification-days .checks { display:flex; flex-wrap:wrap; gap:16px; }
.notification-summary, .notification-confirm { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }

.check-row.notification-toggle { padding:18px; margin:8px 0 28px; background:var(--green-light); border:1px solid #c8d8cc; border-radius:12px; font-weight:650; cursor:pointer; }
.notification-toggle input { flex-shrink:0; }

.teacher-profile-panel .profile-email { display:block; margin-top:7px; font-size:14px; font-weight:400; overflow-wrap:anywhere; }

.sidebar-help-nav { margin-bottom:16px; }

/* Align card sections with the class name, after the period badge and gap. */
.class-card { --class-label-offset: 49px; }
.class-card .class-body { padding-left: calc(var(--card-inset) + var(--class-label-offset)); }
@media(max-width:650px) {
  .class-card { --class-label-offset: 41px; }
}

.repeat-preview { margin-top:16px; padding:16px; border-radius:9px; background:var(--green-light); font-size:13px; }
.repeat-preview table { width:100%; margin-top:10px; border-collapse:collapse; text-align:left; }
.repeat-preview th, .repeat-preview td { padding:5px 8px 5px 0; }
.repeat-preview p { margin:10px 0 0; }

/* Calendar closure notices sit below assignments in visual emphasis. */
.calendar-grid .school-notice.compact {
  display:flex; flex-wrap:wrap; align-items:center; gap:0 8px;
  padding:2px 0; margin:5px 0 7px; border:0; border-radius:0;
  background:transparent; color:var(--muted); font-size:11px; line-height:1.35;
}
.calendar-grid .school-notice.compact strong { font-weight:500; }
.calendar-grid .school-notice.compact span { margin:0; font-size:inherit; }
.calendar-grid .school-notice.compact button {
  width:auto; min-width:0; min-height:24px; padding:2px 0; border:0;
  background:transparent; color:var(--muted); font-size:10px; font-weight:400;
  text-decoration:underline; text-underline-offset:2px;
}
.calendar-grid .school-notice.compact button:hover { color:var(--ink); }
