:root {
  color-scheme:light;
  --ink:#1d302a;
  --muted:#61726b;
  --green:#154c3e;
  --line:#dfe5de;
  --soft:#edf3ed;
  --paper:#fff;
  --surface:#f5f6f1;
  --serif:Georgia,'Times New Roman',serif;
  --sans:Inter,'Segoe UI',Arial,sans-serif;
  font:16px/1.45 var(--sans);
  color:var(--ink);
  background:var(--surface);
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

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

button,select {
  cursor:pointer;
}

button,a {
  -webkit-tap-highlight-color:transparent;
}

button {
  border:0;
  background:none;
}

a {
  color:inherit;
  text-decoration:none;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #a8863b;
  outline-offset:3px;
}

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

.icon {
  width:19px;
  height:19px;
  flex:none;
  vertical-align:middle;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}

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

h1,h2 {
  font-family:var(--serif);
  font-weight:500;
  letter-spacing:-.035em;
}

button,a,input,select {
  touch-action:manipulation;
}

[hidden] {
  display:none!important;
}

.mast {
  background:#fff;
  border-bottom:1px solid var(--line);
}

.mast-inner,.container {
  max-width:1480px;
  width:calc(100% - clamp(36px,8vw,136px));
  margin:auto;
}

.mast-inner {
  height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.brand {
  display:inline-flex;
  align-items:center;
  gap:11px;
}

.brand>span {
  font:600 23px/1 var(--serif);
  letter-spacing:-.045em;
  color:#183f34;
}

.brand small {
  display:block;
  text-transform:uppercase;
  font:650 10px/1 var(--sans);
  letter-spacing:.23em;
  margin-top:6px;
}

.mast nav {
  display:flex;
  align-items:center;
  gap:6px;
}

.navlink,.btn,.linkbtn,.group-tabs button,.switch button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:.9rem;
  font-weight:580;
}

.navlink {
  border-radius:8px;
  padding:10px 16px;
  color:#63726a;
}

.navlink.active {
  background:#eaf1e9;
  color:var(--green);
}

.navlink:hover,.linkbtn:hover {
  color:var(--green);
  background:#f0f4ee;
}

.btn {
  min-height:40px;
  padding:8px 13px;
  border:1px solid #d6dfd7;
  border-radius:8px;
  background:#fff;
  color:#294a3c;
  white-space:nowrap;
}

.btn:hover,.group-tabs button:hover,.switch button:hover {
  background:#f0f4ed;
}

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

.btn.primary:hover {
  background:#21604c;
}

.btn.icon-only {
  width:40px;
  padding:8px;
}

.linkbtn {
  padding:7px;
  border-radius:7px;
  color:var(--green);
}

.container {
  padding:28px 0 48px;
}

.hero {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:linear-gradient(105deg,#123e34,#164637 70%,#225744);
  border-radius:16px;
  min-height:202px;
  display:flex;
  align-items:center;
  color:#fffdf3;
}

.hero-art {
  position:absolute;
  right:0;
  bottom:-1px;
  height:100%;
  width:52%;
  object-fit:cover;
  object-position:center 65%;
  z-index:-1;
  pointer-events:none;
}

.hero-copy {
  padding:29px clamp(22px,3vw,48px);
}

.hero-date {
  color:#dbdabc;
  text-transform:uppercase;
  letter-spacing:.11em;
  font-size:.73rem;
  font-weight:650;
  display:flex;
  align-items:center;
  gap:8px;
}

.hero-date .icon {
  width:16px;
  height:16px;
}

.hero h1 {
  font-size:clamp(36px,3.85vw,65px);
  line-height:1.14;
  margin:12px 0 19px;
  letter-spacing:-.047em;
}

.hero-meta {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.hero-meta span {
  font-size:.84rem;
  font-weight:500;
  border:1px solid #ffffff2e;
  background:#ffffff09;
  color:#f1f1df;
  border-radius:20px;
  padding:4px 11px;
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.hero-meta .icon {
  width:15px;
  height:15px;
  color:#dfd4a9;
}

.layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,26.4%);
  align-items:start;
  gap:22px;
  margin-top:23px;
}

.card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  min-width:0;
  overflow:hidden;
  box-shadow:0 2px 4px #1f392503;
}

.card-head,.section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.card-head {
  padding:21px 23px 14px;
}

.card h2,.section-head h2 {
  font-size:clamp(1.4rem,1.9vw,1.85rem);
  line-height:1.16;
}

.title-with-icon {
  display:flex;
  align-items:center;
  gap:10px;
}

.title-icon {
  display:grid;
  place-items:center;
  width:35px;
  height:35px;
  background:#edf3eb;
  color:#31614e;
  border-radius:9px;
}

.toolbar {
  padding:2px 23px 16px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px;
}

.group-tabs,.switch {
  display:inline-flex;
  gap:3px;
  border:1px solid #e1e7df;
  background:#f2f5ef;
  border-radius:9px;
  padding:3px;
}

.group-tabs button,.switch button {
  color:#617368;
  background:none;
  border-radius:6px;
  padding:7px 12px;
  min-height:34px;
}

.group-tabs button.active,.switch button.active {
  background:#fff;
  color:#194d3b;
  box-shadow:0 1px 5px #243d2920;
}

.group-tabs .count {
  background:#e4eae1;
  border-radius:5px;
  padding:0 5px;
  font-size:.76rem;
}

.group-tabs .active .count {
  background:#e4efe2;
  color:#245b40;
}

.tools {
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

.search {
  display:flex;
  align-items:center;
  border:1px solid var(--line);
  border-radius:8px;
  padding:0 9px;
  background:#fff;
  color:#728277;
  min-height:39px;
  gap:6px;
}

.search input {
  width:9.5em;
  min-width:0;
  border:0;
  background:transparent;
  font-size:.88rem;
  outline:0;
}

.search:focus-within {
  border-color:var(--green);
}

.search input:focus-visible {
  outline:0;
}

.search .icon {
  width:16px;
}

.sort-wrap {
  position:relative;
  display:inline-flex;
  align-items:center;
  border:1px solid var(--line);
  border-radius:8px;
}

.sort-wrap>.icon {
  pointer-events:none;
  position:absolute;
  left:10px;
  width:17px;
}

.sort-wrap select,select.field {
  appearance:none;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23567160' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
}

.sort-wrap select {
  padding:8px 29px 8px 34px;
  border:0;
  border-radius:8px;
  font-size:.85rem;
  min-height:37px;
}

.mobile-subject {
  display:none;
}

.subject-caption {
  padding:0 23px 14px;
  color:var(--green);
  font-weight:600;
  display:flex;
  align-items:center;
  gap:8px;
}

.subhead-actions {
  display:flex;
  gap:6px;
  align-items:center;
}

.grade-table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:.94rem;
}

.grade-table th {
  background:#f6f8f3;
  color:#617367;
  font-size:.78rem;
  font-weight:600;
  padding:11px 12px;
  border-block:1px solid var(--line);
  white-space:nowrap;
}

.grade-table td {
  padding:9px 12px;
  border-bottom:1px solid #e9ede7;
  height:54px;
}

.grade-table th:first-child,.grade-table td:first-child {
  padding-left:23px;
}

.grade-table th:last-child,.grade-table td:last-child {
  padding-right:23px;
}

.grade-table tr:last-child td {
  border-bottom:0;
}

.grade-table tbody tr:hover {
  background:#fafbf8;
}

.grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 3px 14px 3px 22px;
  background: #f3f6ef;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
}

.grid-paging {
  display: flex;
  gap: 5px;
}

.grid-paging button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.grid-paging button:first-child .icon {
  transform: rotate(180deg);
}

.lesson-scroll {
  overflow: auto;
  max-height: 66vh;
  max-height: 66dvh;
  scrollbar-color: #899f8b #f1f4ed;
}

.lesson-grid {
  --name-width: 13rem;
  --lesson-width: 7rem;
  width: max(100%, calc(var(--name-width) + var(--lesson-count) * var(--lesson-width)));
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  text-align: center;
  font-size: .93rem;
}

.lesson-grid .grid-name {
  width: var(--name-width);
}

.lesson-grid th, .lesson-grid td {
  padding: 4px 6px;
  border-right: 1px solid #e5ebe3;
  border-bottom: 1px solid #e5ebe3;
  overflow-wrap: anywhere;
}

.lesson-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-block: 9px;
  background: #f6f8f3;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.25;
}

.lesson-grid small {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 400;
}

.lesson-grid thead small {
  margin-bottom: 4px;
}

.lesson-grid th:first-child {
  position: sticky;
  left: 0;
  text-align: left;
  padding-inline: 12px;
  border-right-color: #c8d5c8;
}

.lesson-grid thead th:first-child {
  z-index: 3;
}

.lesson-grid tbody th {
  z-index: 1;
  height: 54px;
  background: white;
}

.lesson-grid tr:hover :is(td, th[scope="row"]) {
  background: #f9fbf7;
}

.grid-score {
  display: inline-grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 6px;
}

.grid-score:hover {
  background: var(--soft);
}

.grid-score .icon {
  width: 16px;
  color: var(--muted);
}

.grid-history {
  list-style: none;
  padding: 0;
  margin: 0;
}

.board .lesson-grid {
  --name-width: clamp(13rem, 20vw, 23rem);
  --lesson-width: 8rem;
  font-size: clamp(1rem, 1.5vw, 1.6rem);
}

.board .lesson-grid thead th, .board .lesson-grid .mark {
  font-size: 1.05em;
}

.board .lesson-scroll {
  max-height: calc(100dvh - 218px);
}

@media (max-width: 640px) {
  .lesson-grid, .board .lesson-grid {
    --name-width: clamp(6.5rem, 31vw, 10rem);
    --lesson-width: 5.4rem;
    font-size: .85rem;
  }
  .lesson-grid th:first-child {
    padding-inline: 8px;
  }
  .lesson-grid .person .avatar {
    display: none;
  }
  .grid-toolbar {
    padding-inline: 12px;
  }
}

.person {
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:560;
}

.person:hover,.student-card:hover strong {
  color:#236c4f;
  text-decoration:underline;
  text-underline-offset:3px;
}

.avatar {
  display:inline-grid;
  place-items:center;
  flex:none;
  width:34px;
  height:34px;
  overflow:hidden;
  border-radius:50%;
  background:var(--avatar-bg);
  color:var(--avatar-fg);
  font-size:.75rem;
  font-weight:650;
  letter-spacing:.015em;
}

.avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
}

.a0 {
  --avatar-bg:#e2eee3;
  --avatar-fg:#376549;
}

.a1 {
  --avatar-bg:#eee6d6;
  --avatar-fg:#755b32;
}

.a2 {
  --avatar-bg:#e1ebef;
  --avatar-fg:#426174;
}

.a3 {
  --avatar-bg:#ede6ef;
  --avatar-fg:#6c567a;
}

.a4 {
  --avatar-bg:#f1e3da;
  --avatar-fg:#805d47;
}

.a5 {
  --avatar-bg:#e2ede9;
  --avatar-fg:#386b5e;
}

.dash {
  color:#94a299;
}

.total {
  color:#64766a;
  font-variant-numeric:tabular-nums;
}

.last-grade {
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.last-grade small,.minor {
  font-size:.8rem;
  color:var(--muted);
}

.mark {
  font-size:.9rem;
  border-radius:6px;
  font-weight:650;
  display:inline-grid;
  min-width:28px;
  height:27px;
  padding:0 5px;
  place-items:center;
  background:#e9eee7;
  color:#4e6653;
}

.m5 {
  background:#dceede;
  color:#245b35;
}

.m4 {
  background:#e5eedc;
  color:#506528;
}

.m3 {
  background:#f6ecd2;
  color:#80611c;
}

.m2,.m1 {
  background:#f7e2dc;
  color:#974a36;
}

.avg {
  font-weight:650;
  color:var(--green);
}

.cell-btn {
  padding:5px;
  line-height:1;
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--green);
  background:white;
}

.endnote {
  border-top:1px solid var(--line);
  padding:12px 23px;
  color:var(--muted);
  font-size:.81rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

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

.subjects .card-head {
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}

.subjects h2 {
  font-size:1.45rem;
}

.num {
  font:600 .78rem var(--sans);
  color:#546c59;
  background:#f0f3ed;
  border:1px solid #e2e7df;
  border-radius:6px;
  padding:3px 8px;
}

.subject-list {
  padding:10px;
}

.subbtn {
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  width:100%;
  padding:8px 9px;
  border-radius:8px;
  min-height:49px;
  font-size:.9rem;
  font-weight:560;
}

.subbtn:hover,.subbtn.active {
  background:#edf4eb;
}

.subbtn.active {
  color:var(--green);
}

.subbtn .chev {
  margin-left:auto;
  width:14px;
  color:#96a299;
}

.subject-icon {
  background:#f1efe6;
  color:#87764e;
  width:32px;
  height:32px;
  display:inline-grid;
  place-items:center;
  border-radius:8px;
  flex:none;
}

.c0,.c1,.c5 {
  background:#eaf1e7;
  color:#457152;
}

.c2,.c6 {
  background:#eef1f5;
  color:#577086;
}

.c3,.c7 {
  background:#f3ede1;
  color:#8b7547;
}

.c4,.c8 {
  background:#f0ebf1;
  color:#806c83;
}

.c9 {
  background:#e8efee;
  color:#4c716a;
}

.subbtn .subject-icon .icon {
  width:18px;
}

.subbtn .subtext {
  min-width:0;
  line-height:1.25;
}

.subtext small {
  display:block;
  font-size:.78rem;
  font-weight:450;
  color:var(--muted);
  margin-top:3px;
}

.active .subject-icon {
  background:#dce8d8;
}

.side-rule {
  border:0;
  border-top:1px solid var(--line);
  margin:8px 5px;
}

.section-head {
  margin:26px 0 14px;
  flex-wrap:wrap;
}

.simple-card {
  padding:22px;
}

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

.student-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:12px;
}

.student-card {
  display:flex;
  align-items:center;
  gap:12px;
  padding:17px;
}

.student-card .avatar {
  width:43px;
  height:43px;
  font-size:.88rem;
}

.student-card strong {
  font-size:.96rem;
}

.student-card small {
  display:block;
  color:var(--muted);
  margin-top:3px;
}

.student-card>.icon {
  margin-left:auto;
  color:#8b9d90;
  width:15px;
}

.metric-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin:17px 0;
}

.metric {
  padding:18px 21px;
}

.metric .minor {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:.89rem;
}

.metric strong {
  display:block;
  font:500 34px/1.2 var(--serif);
  margin-top:7px;
  color:var(--green);
}

.stats-layout {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
}

.bars {
  padding:0 22px 22px;
}

.bar-row {
  display:grid;
  grid-template-columns:minmax(24px,auto) 1fr 35px;
  align-items:center;
  gap:12px;
  margin:13px 0;
}

.bar-track {
  height:10px;
  background:#edf1ea;
  border-radius:7px;
  overflow:hidden;
}

.bar-fill {
  height:100%;
  background:#618d6c;
  border-radius:7px;
}

.bar-count {
  font-size:.9rem;
  text-align:right;
}

.subject-stats {
  list-style:none;
  margin:0;
  padding:0 22px 15px;
}

.subject-stats li {
  display:flex;
  align-items:center;
  gap:10px;
  border-top:1px solid var(--line);
  padding:9px 0;
  font-size:.9rem;
}

.subject-stats li>strong {
  margin-left:auto;
  white-space:nowrap;
}

.crumb {
  margin-bottom:14px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:.9rem;
}

.crumb .icon {
  transform:rotate(180deg);
  width:15px;
}

.profile-head {
  display:flex;
  align-items:center;
  gap:17px;
  padding:24px;
}

.profile-head .avatar {
  width:75px;
  height:75px;
  font-size:1.5rem;
}

.profile-head h1 {
  font-size:clamp(1.75rem,3.5vw,3.1rem);
  line-height:1.12;
}

.profile-head p {
  color:var(--muted);
  margin-top:5px;
}

.profile-head .btn {
  margin-left:auto;
}

.photo-input {
  position:relative;
  cursor:pointer;
}

.photo-input input {
  position:absolute;
  inset:0;
  width:100%;
  opacity:0;
  cursor:pointer;
}

.photo-input .camera {
  position:absolute;
  border-radius:50%;
  padding:4px;
  background:var(--green);
  color:white;
  border:2px solid white;
  bottom:-3px;
  right:-3px;
  line-height:1;
}

.profile-list {
  padding:0 22px 16px;
}

.profile-list details {
  border-top:1px solid var(--line);
}

.profile-list summary {
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 0;
  cursor:pointer;
  list-style:none;
}

.profile-list summary::-webkit-details-marker {
  display:none;
}

.profile-list summary strong {
  margin-left:auto;
}

.profile-list details[open] summary>.chev {
  transform:rotate(90deg);
}

.lesson-row,.history-row {
  padding:10px 0 10px 12px;
  border-top:1px solid #edf0eb;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.history-row .minor,.lesson-row .minor {
  display:block;
  margin-top:3px;
}

.history-row>span:last-child {
  white-space:nowrap;
}

.no-lessons {
  color:var(--muted);
  font-size:.88rem;
  padding:8px 0 14px 42px;
}

dialog {
  border:1px solid var(--line);
  border-radius:16px;
  width:min(455px,calc(100% - 24px));
  max-height:90dvh;
  padding:0;
  color:var(--ink);
  box-shadow:0 18px 75px #132c2338;
}

dialog::backdrop {
  background:#172f28a6;
}

body:has(dialog[open]) {
  overflow:hidden;
}

.modal-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:18px 22px 12px;
}

.modal-head h2 {
  font-size:1.65rem;
}

.modal-head button {
  width:36px;
  height:36px;
  border-radius:50%;
  background:#f3f5ef;
}

.form {
  padding:3px 22px 22px;
  display:grid;
  gap:12px;
}

.form label,.form legend {
  display:block;
  font-weight:600;
  font-size:.87rem;
}

.field {
  margin-top:4px;
  width:100%;
  padding:9px 12px;
  min-height:43px;
  border:1px solid #ccd7cb;
  border-radius:8px;
  background:white;
  font-size:1rem;
  font-weight:400;
}

.form select.field {
  padding-right:30px;
}

.form fieldset {
  margin:0;
  padding:0;
  border:0;
}

.scores {
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:7px;
  margin-top:7px;
}

.scores button {
  height:44px;
  border:1px solid var(--line);
  background:#f5f7f1;
  border-radius:8px;
  font-weight:600;
}

.scores button.active {
  background:var(--green);
  color:white;
  border-color:var(--green);
}

.form-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-top:3px;
}

.error {
  color:#9b412e;
  font-size:.9rem;
}

.form-info {
  color:var(--muted);
  font-size:.86rem;
}

.lesson-manager {
  padding:0 22px;
  max-height:34dvh;
  overflow:auto;
}

.lesson-manager li {
  padding:3px 0;
}

.form.single {
  padding-top:10px;
}

.sep {
  border-bottom:1px solid var(--line);
}

#status {
  position:fixed;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  border-radius:9px;
  background:#183f33;
  color:white;
  box-shadow:0 5px 16px #16332522;
  z-index:10;
  max-width:90%;
  text-align:center;
}

#status:not(:empty) {
  padding:10px 17px;
}

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

.board .mast,.board .hero,.board .subjects,.board .entry,.board .tools .search {
  display:none;
}

.board .container {
  width:97%;
  max-width:none;
  padding:10px 0;
}

.board .layout {
  display:block;
  margin:0;
}

.board .grade-table {
  font-size:clamp(1.1rem,1.8vw,2rem);
}

.board .grade-table th {
  font-size:1rem;
}

.board .grade-table td {
  height:45px;
  padding-block:5px;
}

.board .grade-table .avatar {
  width:30px;
  height:30px;
}

.board .mobile-subject {
  display:inline-flex;
}

#account {
  display:flex;
  align-items:center;
  gap:7px;
}

.subject-caption {
  flex-wrap:wrap;
}

.filters,.filters .sort-wrap,.subject-caption .sort-wrap {
  max-width:100%;
}

.filters select,.subject-caption select {
  max-width:100%;
  min-width:0;
}

@media(min-width:1550px) {
  .hero {
    min-height:220px;
  }
}

@media(max-width:1120px) {
  .mast-inner,.container {
    width:94%;
  }
  .layout {
    gap:15px;
    grid-template-columns:minmax(0,1fr) minmax(235px,27%);
  }
  .toolbar,.card-head {
    padding-left:16px;
    padding-right:16px;
  }
  .tools {
    gap:5px;
  }
  .search input {
    width:7.4em;
  }
  .sort-wrap select {
    max-width:130px;
  }
  .group-tabs button {
    padding-inline:8px;
  }
  .subbtn {
    gap:8px;
  }
  .grade-table td,.grade-table th {
    padding-inline:8px;
  }
}

@media(max-width:880px) {
  .mast-inner {
    height:66px;
    gap:6px;
  }
  .navlink {
    padding:9px 10px;
  }
  .layout {
    grid-template-columns:minmax(0,1fr);
  }
  .subjects {
    display:none;
  }
  .mobile-subject {
    display:inline-flex;
  }
  .hero-art {
    width:49%;
    object-fit:cover;
    object-position:54% center;
  }
  .hero {
    min-height:183px;
  }
  .hero h1 {
    font-size:clamp(35px,5.1vw,47px);
  }
  .hero-copy {
    padding:24px;
  }
  .subhead-actions .btn {
    padding-inline:9px;
  }
  .toolbar {
    gap:7px;
  }
  .profile-head {
    padding:17px;
  }
  .grade-table td {
    height:55px;
  }
  .stats-layout {
    gap:10px;
  }
}

@media(max-width:640px) {
  .mast-inner,.container {
    width:calc(100% - 24px);
  }
  .mast-inner {
    height:61px;
    flex-wrap:wrap;
  }
  .brand img {
    width:35px;
    height:35px;
  }
  .brand>span {
    font-size:20px;
  }
  .brand small {
    font-size:8px;
  }
  .brand {
    gap:8px;
  }
  .mast nav {
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:4;
    justify-content:space-around;
    border-top:1px solid var(--line);
    background:#fffc;
    backdrop-filter:blur(16px);
    padding:4px 7px max(5px,env(safe-area-inset-bottom));
    gap:4px;
  }
  .navlink {
    flex:1;
    flex-direction:column;
    gap:2px;
    font-size:.73rem;
    padding:5px 6px;
  }
  .navlink .icon {
    width:18px;
    height:18px;
  }
  #account .btn {
    font-size:.82rem;
    min-height:36px;
  }
  .container {
    padding:14px 0 80px;
  }
  .hero {
    min-height:164px;
    border-radius:12px;
  }
  .hero-copy {
    padding:20px 15px;
  }
  .hero-art {
    width:62%;
    height:100%;
    object-fit:cover;
    object-position:56% bottom;
    opacity:.53;
    mask-image:linear-gradient(90deg,transparent,#000 45%);
  }
  .hero-date {
    font-size:.65rem;
    letter-spacing:.07em;
  }
  .hero h1 {
    font-size:clamp(29px,7.4vw,40px);
    margin:11px 0 16px;
  }
  .hero-meta {
    gap:5px;
  }
  .hero-meta span {
    font-size:.73rem;
    padding:3px 7px;
    gap:4px;
    background:#1b4a3e;
  }
  .hero-meta .icon {
    width:13px;
  }
  .layout {
    margin-top:13px;
  }
  .card {
    border-radius:11px;
  }
  .title-icon {
    width:28px;
    height:28px;
    border-radius:7px;
  }
  .title-icon .icon {
    width:16px;
  }
  .title-with-icon {
    gap:7px;
  }
  .card-head {
    padding:14px 12px 11px;
  }
  .card h2,.section-head h2 {
    font-size:1.34rem;
  }
  .subhead-actions .btn {
    padding:6px 8px;
    min-height:35px;
    font-size:.8rem;
  }
  .subhead-actions .btn .icon {
    width:15px;
  }
  .board-label {
    display:none;
  }
  .toolbar {
    padding:0 12px 12px;
    align-items:stretch;
  }
  .group-tabs {
    flex:1;
  }
  .group-tabs button {
    flex:1;
    white-space:nowrap;
    font-size:.82rem;
  }
  .mobile-subject {
    max-width:46%;
  }
  .mobile-subject select {
    max-width:100%;
    font-size:.82rem;
    padding-left:10px;
  }
  .mobile-subject>.icon {
    display:none;
  }
  .tools {
    width:100%;
    margin-left:0;
  }
  .tools .search {
    flex:1;
  }
  .search input {
    width:100%;
  }
  .sort-wrap select {
    max-width:145px;
  }
  .grade-table th {
    font-size:.7rem;
    white-space:normal;
  }
  .grade-table td,.grade-table th {
    padding-inline:4px;
  }
  .grade-table th:first-child,.grade-table td:first-child {
    padding-left:11px;
  }
  .grade-table th:last-child,.grade-table td:last-child {
    padding-right:7px;
  }
  .grade-table td {
    font-size:.86rem;
  }
  .grade-table .person {
    gap:6px;
  }
  .grade-table .avatar {
    width:28px;
    height:28px;
    font-size:.62rem;
  }
  .grade-table td:first-child {
    width:53%;
  }
  .grade-table .lesson-col {
    display:none;
  }
  .last-grade {
    gap:2px;
    flex-direction:column;
    align-items:flex-start;
  }
  .last-grade small {
    font-size:.65rem;
  }
  .endnote {
    padding:10px 12px;
  }
  .subject-caption {
    padding:0 12px 11px;
  }
  .section-head {
    margin:18px 0 11px;
  }
  .metric-grid {
    gap:6px;
    margin:10px 0;
  }
  .metric {
    padding:11px 8px;
  }
  .metric .minor {
    font-size:.73rem;
    gap:4px;
  }
  .metric .minor .icon {
    width:13px;
  }
  .metric strong {
    font-size:26px;
  }
  .stats-layout {
    grid-template-columns:1fr;
  }
  .profile-list,.subject-stats,.bars {
    padding-left:13px;
    padding-right:13px;
  }
  .student-grid {
    gap:7px;
  }
  .student-card {
    padding:11px;
  }
  .profile-head {
    gap:10px;
    flex-wrap:wrap;
  }
  .profile-head h1 {
    font-size:1.5rem;
  }
  .profile-head .avatar {
    width:50px;
    height:50px;
    font-size:1rem;
  }
  .profile-head .btn {
    font-size:.8rem;
  }
  .hero-meta span,.sort-wrap select,.group-tabs button {
    min-height:30px;
  }
  #status {
    bottom:75px;
  }
  .board .container {
    padding-bottom:10px;
  }
  .board .toolbar {
    align-items:center;
  }
  .board .tools {
    width:auto;
  }
  .board .group-tabs {
    flex:none;
  }
  .board .grade-table td {
    height:34px;
  }
  .board .grade-table {
    font-size:.93rem;
  }
  .board .grade-table th {
    font-size:.8rem;
  }
}

@media(max-width:365px) {
  .grade-table .avatar {
    display:none;
  }
  .title-with-icon .title-icon {
    display:none;
  }
  .hero-copy {
    padding:15px 11px;
  }
  .hero-meta {
    gap:3px;
  }
  .toolbar .mobile-subject {
    max-width:40%;
  }
}
