.md-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.md-heading h2 {
  margin: 10px 0;
  font-size: 36px;
}
.md-heading p {
  margin: 8px 0 0;
  color: #697168;
  font-size: 13px;
  line-height: 1.7;
}
.md-school-year {
  color: #697168;
  font:
    12px Consolas,
    monospace;
  white-space: nowrap;
}
.md-grades {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
  border: 1px solid #b9c2b2;
  background: #eef0e7;
}
.md-grade-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.md-grade-group + .md-grade-group {
  border-left: 1px solid #c8ccc1;
  padding-left: 14px;
}
.md-grade-label {
  margin: 0 10px 0 0;
  color: #687761;
  font-size: 12px;
  white-space: nowrap;
}
.md-grades button {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 8px;
  background: transparent;
  color: #3d573d;
  border: 1px solid transparent;
  cursor: pointer;
}
.md-grades button strong {
  font-size: 14px;
  white-space: nowrap;
}
.md-grades button small {
  color: #829076;
  font:
    11px Consolas,
    monospace;
  white-space: nowrap;
}
.md-grades button[aria-pressed='true'] {
  background: #1b332a;
  color: #f1f4df;
  border-color: #1b332a;
  box-shadow: inset 3px 0 #e5f348;
}
.md-grades button[aria-pressed='true'] small {
  color: #c4d3b3;
}
.md-grades button:not([aria-pressed='true']):hover {
  background: #dce5d3;
}
.md-sections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #b9c2b2;
  border-top: 0;
  background: #e0e5d9;
}
.md-sections button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 12px;
  min-height: 65px;
  border: 0;
  border-right: 1px solid #bdc7b5;
  background: transparent;
  color: #5d6c5c;
  font:
    600 15px 'Microsoft YaHei',
    sans-serif;
  cursor: pointer;
}
.md-sections button:last-child {
  border-right: 0;
}
.md-sections button > span {
  font:
    12px Consolas,
    monospace;
  color: #7b8875;
}
.md-sections button[aria-pressed='true'] {
  background: #1b332a;
  color: #f0f3e6;
  box-shadow: inset 0 3px #e5f348;
}
.md-sections button[aria-pressed='true'] > span {
  color: #e5f348;
}
.md-sections button:not([aria-pressed='true']):hover {
  background: #d6dece;
  color: #244d39;
}
.md-location {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 20px;
  border: 1px solid #b9c2b2;
  border-top: 0;
  border-bottom: 0;
  background: #f5f5f0;
  color: #5e7258;
  font-size: 12px;
  line-height: 1.7;
}
.md-location strong {
  color: #244d39;
  font-weight: 600;
}
.md-location small {
  color: #7a8572;
  font-size: 11px;
}
.md-explorer {
  display: block;
  width: 100%;
  height: calc(100vh - 210px);
  min-height: 750px;
  border: 1px solid #b9c2b2;
  background: #f5f5f0;
}
.md-page button:focus-visible {
  outline: 2px solid #245444;
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .md-grades {
    flex-direction: column;
    gap: 9px;
  }
  .md-grade-group + .md-grade-group {
    border-left: 0;
    padding-left: 0;
    padding-top: 9px;
    border-top: 1px solid #c8ccc1;
  }
  .md-grade-label {
    min-width: 46px;
  }
}
@media (max-width: 600px) {
  .md-heading {
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
    flex-direction: column;
  }
  .md-heading h2 {
    font-size: 28px;
  }
  .md-grades {
    padding: 12px;
  }
  .md-grade-group {
    gap: 3px;
  }
  .md-grade-label {
    min-width: 35px;
    margin-right: 3px;
    font-size: 11px;
  }
  .md-grades button {
    flex-direction: column;
    gap: 6px;
    padding: 9px 3px;
    min-height: 58px;
  }
  .md-grades button strong {
    font-size: 13px;
  }
  .md-grades button small {
    font-size: 10px;
  }
  .md-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md-sections button {
    min-height: 56px;
    padding: 15px 8px;
    font-size: 13px;
    gap: 8px;
    border-bottom: 1px solid #bdc7b5;
  }
  .md-sections button:nth-child(2n) {
    border-right: 0;
  }
  .md-sections button:nth-child(n + 3) {
    border-bottom: 0;
  }
  .md-location {
    padding: 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .md-explorer {
    min-height: 740px;
  }
}
