/* Section Advisor: forest, mint, and a shared course-color system. */
:root {
  color-scheme: dark;
  --bg: #091a17;
  --surface: #102823;
  --surface-hover: #142f29;
  --text: #f3f4e9;
  --muted: #a8bdb2;
  --line: #355149;
  --mint: #a3edba;
  --danger: #ffb0a7;
  --radius: 10px;
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis: none
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5
}

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

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

button,a {
  touch-action: manipulation
}

button {
  cursor: pointer
}

button: disabled {
  opacity: .42;
  cursor: not-allowed
}

button,a,input,select,textarea {
  outline-offset: 4px
}

:focus-visible {
  outline: 2px solid var(--mint)
}

a {
  color: inherit
}

button {
  color: inherit
}

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

button {
  border: 0;
  background: none
}

input,select,textarea {
  color: var(--text);
  background: #0b201b;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  min-width: 0
}

input: :placeholder,textarea::placeholder {
  color: #8aa297
}

input: focus,select:focus,textarea:focus {
  border-color: var(--mint)
}

textarea {
  resize: vertical;
  width: 100%;
  line-height: 1.55
}

input[type=number] {
  appearance: textfield
}

select {
  cursor: pointer
}

button,a {
  transition: background .16s,border-color .16s,color .16s,transform .16s
}

.container {
  width: min(1456px,calc(100% - 80px));
  margin: auto
}

[hidden] {
  display: none!important
}

.sr-only {
  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 {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 20;
  background: var(--mint);
  color: var(--bg);
  padding: 10px
}

.skip-link:focus {
  top: 10px
}

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

.topbar-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -.5px
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2,9px);
  gap: 3px
}

.brand-mark i {
  width: 9px;
  height: 9px;
  background: var(--mint);
  border-radius: 2px
}

.text-button {
  padding: 7px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550
}

.text-button:hover {
  color: var(--mint)
}

.topbar .text-button span {
  margin-left: 14px;
  font-size: 20px
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 38px 0 32px
}

.intro h1 {
  font-size: clamp(30px,3.4vw,48px);
  line-height: 1.16;
  letter-spacing: -1.8px;
  font-weight: 750
}

.intro p {
  font-size: 18px;
  color: var(--muted);
  margin-top: 9px;
  letter-spacing: -.3px
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #78958a;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 11px 17px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.35;
  min-height: 43px
}

.button:hover {
  background: var(--surface-hover);
  border-color: var(--mint)
}

.button.primary {
  color: #0a2619;
  background: var(--mint);
  border-color: var(--mint)
}

.button.primary:hover {
  background: #bbf8ce
}

.button>span {
  font-size: 22px;
  line-height: 1
}

.button.small {
  font-size: 12px;
  padding: 8px 12px;
  min-height: 35px
}

.view-nav {
  border-block: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px
}

.view-nav [role=tablist] {
  display: flex;
  gap: 30px;
  align-self: stretch
}

.view-nav button {
  border-bottom: 3px solid transparent;
  padding: 15px 3px 12px;
  font-size: 15px;
  white-space: nowrap
}

.view-nav button[aria-selected=true] {
  border-color: var(--mint);
  font-weight: 650
}

.view-nav button[aria-selected=false] {
  color: var(--muted)
}

#dataset-summary {
  color: var(--muted);
  font-size: 12px
}

.tools {
  display: flex;
  gap: 20px;
  margin: 22px 0 17px
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  border: 1px solid #678379;
  border-radius: 7px;
  padding: 0 15px;
  min-width: 0
}

.search-wrap:focus-within {
  border-color: var(--mint)
}

.search-wrap svg {
  color: var(--muted);
  flex-shrink: 0
}

.search-wrap input {
  border: 0;
  background: none;
  flex: 1;
  width: 100%;
  padding: 12px 0;
  outline: none
}

.sort-wrap {
  border: 1px solid #678379;
  display: flex;
  align-items: center;
  padding-left: 16px;
  gap: 5px;
  border-radius: 7px;
  min-width: 255px
}

.sort-wrap span {
  color: var(--muted)
}

.sort-wrap select {
  border: 0;
  background: none;
  padding: 12px 12px 12px 0;
  flex: 1;
  outline: none
}

.sort-wrap option {
  background: var(--surface)
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 23px
}

.filter-container button {
  border: 1px solid #668377;
  border-radius: 30px;
  padding: 7px 16px;
  line-height: 1.4;
  color: #d7e2d9;
  font-size: 13px
}

.filter-container button:hover {
  background: var(--surface-hover)
}

.filter-container button.active {
  background: var(--mint);
  border-color: var(--mint);
  color: #0b2518;
  font-weight: 650
}

#section-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
  align-items: stretch
}

.section-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 21px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color .2s,transform .2s
}

.section-card:hover {
  border-color: #6d9b87;
  transform: translateY(-2px)
}

.card-header {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  min-height: 60px
}

.card-header h2 {
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -.8px
}

.course-count {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px
}

.tags {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 66%
}

.tag {
  padding: 4px 8px;
  border-radius: 20px;
  background: #1b3b30;
  color: #c7dfd0;
  font-size: 10px;
  white-space: nowrap;
  border: 1px solid #315646
}

.tag.warning {
  background: #402f24;
  color: #ffd3a5;
  border-color: #65503c
}

.stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  border-block: 1px solid #476156;
  padding: 13px 0;
  margin: 0 0 7px;
  gap: 10px
}

.stats>div {
  padding-left: 12px;
  border-left: 1px solid #476156
}

.stats>div:first-child {
  padding-left: 5px;
  border: 0
}

.stats dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px
}

.stats dd {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.3px;
  white-space: nowrap
}

.course-list {
  list-style: none;
  padding: 0;
  margin: 0 0 19px
}

.course-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  border-bottom: 1px solid #344c42;
  font-size: 12px
}

.swatch {
  height: 15px;
  width: 15px;
  border-radius: 4px;
  background: var(--course-color);
  flex-shrink: 0
}

.course-row strong {
  font-size: 12px;
  min-width: 65px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums
}

.course-row .course-meta {
  color: var(--muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px
}

.course-days {
  font-size: 10px;
  color: #d4e1d7;
  text-align: right;
  white-space: nowrap
}

.section-card .view-details {
  width: 100%;
  margin-top: auto;
  justify-content: space-between;
  font-size: 13px;
  min-height: 39px;
  padding: 9px 13px
}

.empty-state {
  padding: 65px 20px;
  text-align: center;
  grid-column: 1/-1;
  border: 1px dashed var(--line);
  border-radius: 10px
}

.empty-state h2 {
  font-size: 22px
}

.empty-state p {
  margin: 8px 0 20px;
  color: var(--muted)
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
  padding: 26px 0 35px
}

.table-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 25px 0 18px
}

.table-heading h2 {
  font-size: 21px;
  letter-spacing: -.5px
}

.table-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap
}

th {
  text-align: left;
  background: #163128;
  color: #b3ccbc;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  padding: 14px 13px
}

td {
  padding: 12px 13px;
  border-top: 1px solid var(--line);
  vertical-align: top
}

tbody tr:hover {
  background: var(--surface)
}

.table-course {
  display: flex;
  gap: 10px;
  align-items: center
}

.table-course small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  max-width: 200px;
  white-space: normal
}

.meeting-cell span {
  display: block;
  line-height: 25px
}

.table-actions {
  display: flex;
  gap: 8px
}

.table-actions button {
  font-size: 11px;
  color: var(--mint);
  padding: 4px
}

.table-actions .delete {
  color: #e6aca3
}

.helper {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6
}

p.helper {
  margin-top: 13px
}

.notice {
  background: #2d3020;
  border: 1px solid #655c31;
  border-radius: 8px;
  color: #f6d99a;
  padding: 12px 15px;
  margin-bottom: 20px;
  font-size: 13px
}

dialog {
  color: var(--text);
  background: var(--bg);
  border: 1px solid #4c6c5b;
  border-radius: 14px;
  padding: 0;
  max-width: calc(100vw - 28px);
  max-height: 90dvh;
  box-shadow: 0 30px 100px #0008
}

dialog: :backdrop {
  background: #000a;
  backdrop-filter: blur(5px)
}

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

dialog[open] {
  display: flex;
  flex-direction: column
}

.form-dialog {
  width: 680px
}

.dialog-heading {
  padding: 23px 25px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0
}

.dialog-heading h2 {
  font-size: 23px;
  letter-spacing: -.7px
}

.dialog-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px
}

.dialog-content {
  padding: 22px 25px;
  overflow: auto;
  min-height: 0
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--muted);
  line-height: 1
}

.icon-button:hover {
  background: var(--surface-hover);
  color: var(--text)
}

#course-form {
  padding: 21px 25px 0;
  overflow: auto;
  min-height: 0
}

label {
  font-size: 12px;
  font-weight: 500
}

label>input:not([type=color]),label>select,label>textarea {
  display: block;
  width: 100%;
  margin-top: 7px
}

label .optional {
  color: var(--muted);
  font-weight: 400
}

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

.span-2 {
  grid-column: 1/-1
}

.color-field {
  display: flex;
  gap: 12px;
  align-items: center
}

.color-field input {
  width: 36px;
  height: 30px;
  padding: 2px;
  cursor: pointer
}

.meeting-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 8px
}

.meeting-heading h3 {
  font-size: 14px
}

.meeting-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.1fr 1.35fr 28px;
  gap: 9px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  align-items: end
}

.meeting-row input,.meeting-row select {
  padding: 9px 6px;
  font-size: 12px;
  width: 100%
}

.meeting-row .icon-button {
  margin-bottom: 6px
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 19px 25px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--bg)
}

#course-form .dialog-footer {
  margin: 20px -25px 0
}

.error {
  padding: 11px 13px;
  border: 1px solid #87584d;
  border-radius: 7px;
  color: var(--danger);
  background: #39251f;
  font-size: 12px;
  margin-top: 15px
}

.file-zone {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px dashed #628374;
  padding: 19px;
  border-radius: 9px;
  background: var(--surface)
}

.file-zone input {
  padding: 8px;
  background: transparent;
  border: 0;
  font-size: 12px;
  margin: 0!important
}

.file-zone input::file-selector-button {
  background: var(--mint);
  color: #0b2518;
  border: 0;
  padding: 8px 12px;
  margin-right: 12px;
  border-radius: 5px;
  cursor: pointer
}

.json-label {
  display: block;
  margin-top: 19px
}

#json-input,#scraper-code {
  font-family: ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size: 11px
}

.import-options {
  margin-top: 15px
}

.import-options select {
  max-width: 100%
}

.import-options p {
  margin-top: 8px
}

.import-preview {
  background: #143927;
  border: 1px solid #3a7854;
  padding: 15px;
  border-radius: 9px;
  margin-top: 15px
}

.import-preview strong {
  font-size: 14px
}

.import-preview p {
  font-size: 12px;
  color: #c1dac8;
  margin-top: 5px
}

.import-preview.replace {
  background: #362e20;
  border-color: #7b6438
}

.import-links {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 14px
}

.instructions {
  padding-left: 20px;
  margin: 0 0 20px;
  font-size: 13px
}

.instructions li {
  padding-left: 6px;
  margin-bottom: 12px
}

.instructions+.helper {
  margin-bottom: 20px
}

#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 13px 16px;
  background: #1e402e;
  border: 1px solid #689276;
  border-radius: 10px;
  box-shadow: 0 8px 30px #0005;
  width: max-content;
  max-width: calc(100vw - 32px);
  font-size: 13px
}

#toast .text-button {
  color: var(--mint)
}

.schedule-dialog {
  width: 1280px
}

.schedule-dialog>.dialog-heading {
  align-items: center;
  padding-block: 14px
}

.schedule-dialog .dialog-content {
  padding: 22px 26px
}

.schedule-title-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin-bottom: 18px
}

.schedule-title-row h2 {
  font-size: 32px;
  letter-spacing: -1px
}

.schedule-title-row p {
  color: var(--muted);
  font-size: 12px
}

.schedule-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border-block: 1px solid var(--line);
  padding: 15px 0;
  margin-bottom: 20px
}

.schedule-stats dt {
  font-size: 11px;
  color: var(--muted)
}

.schedule-stats dd {
  font-size: 20px;
  margin: 3px 0 0;
  font-weight: 650
}

.week-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px
}

.week-grid {
  display: grid;
  grid-template-columns: 58px repeat(var(--days,6),minmax(125px,1fr));
  min-width: 840px
}

.time-column {
  position: relative;
  background: var(--bg)
}

.time-label {
  position: absolute;
  left: 8px;
  font-size: 9px;
  color: var(--muted);
  transform: translateY(-7px)
}

.timeline-column {
  border-left: 1px solid var(--line);
  min-width: 0
}

.timeline-day,.time-header {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 650;
  background: var(--surface)
}

.time-header {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400
}

.timeline-body {
  position: relative;
  background: repeating-linear-gradient(to bottom,transparent 0,transparent 59px,#2d4639 59px,#2d4639 60px)
}

.timeline-event {
  position: absolute;
  border-radius: 5px;
  background: var(--course-color);
  color: #10241b;
  border-left: 3px solid #0002;
  padding: 7px 6px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.4
}

.timeline-event strong {
  display: block;
  font-size: 11px
}

.timeline-event small {
  display: block;
  font-size: 9px;
  margin-top: 3px
}

.timeline-event .event-name {
  font-size: 9px;
  margin: 3px 0;
  font-weight: 500
}

.daily-title {
  margin: 27px 0 14px;
  font-size: 17px
}

.schedule-day {
  margin-top: 18px
}

.schedule-day h3 {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px
}

.schedule-meeting {
  border-left: 3px solid var(--course-color);
  display: flex;
  gap: 17px;
  align-items: center;
  background: var(--surface);
  padding: 12px 14px;
  margin-top: 7px;
  border-radius: 0 7px 7px 0;
  font-size: 12px
}

.schedule-meeting time {
  min-width: 155px;
  font-size: 11px
}

.schedule-meeting small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px
}

.conflict-note {
  background: #3a2a20;
  color: #ffd3ad;
  border: 1px solid #76523c;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px
}

@media(min-width:1600px) {
  .intro {
    padding-block: 43px 37px
  }

  .intro h1 {
    font-size: 50px
  }

  .section-card {
    padding: 24px
  }

  .course-row {
    min-height: 47px
  }

  .card-header h2 {
    font-size: 32px
  }

  .stats dd {
    font-size: 18px
  }

}

@media(max-width:1100px) {
  .container {
    width: calc(100% - 48px)
  }

  .intro {
    align-items: flex-start
  }

  .intro h1 {
    font-size: 36px
  }

  .intro p {
    font-size: 15px
  }

  .intro .actions {
    padding-top: 5px
  }

  .button {
    padding: 10px 12px;
    font-size: 12px
  }

  #section-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))
  }

  .course-row {
    min-height: 43px
  }

  .card-header h2 {
    font-size: 30px
  }

}

@media(max-width:680px) {
  .container {
    width: calc(100% - 32px)
  }

  .topbar-inner {
    min-height: 61px
  }

  .brand {
    font-size: 18px
  }

  .topbar .text-button {
    font-size: 10px
  }

  .topbar .text-button span {
    margin-left: 3px;
    font-size: 15px
  }

  .intro {
    display: block;
    padding: 30px 0 25px
  }

  .intro h1 {
    font-size: 33px;
    letter-spacing: -1.35px
  }

  .intro p {
    font-size: 13px;
    margin-top: 8px
  }

  .intro .actions {
    margin-top: 23px;
    gap: 9px
  }

  .intro .button {
    min-height: 42px;
    font-size: 13px;
    padding: 10px 16px
  }

  .view-nav {
    align-items: center;
    gap: 10px
  }

  .view-nav [role=tablist] {
    gap: 18px
  }

  .view-nav button {
    font-size: 12px;
    padding-inline: 0;
    min-height: 50px
  }

  #dataset-summary {
    font-size: 10px;
    max-width: 88px;
    text-align: right;
    line-height: 1.6
  }

  .tools {
    flex-direction: column;
    gap: 10px;
    margin: 18px 0 15px
  }

  .sort-wrap {
    min-width: 0;
    align-self: flex-end;
    width: 210px;
    font-size: 12px
  }

  .sort-wrap select {
    padding-block: 8px
  }

  .search-wrap {
    width: 100%
  }

  .search-wrap input {
    font-size: 12px
  }

  .filter-container {
    gap: 8px;
    margin-bottom: 18px
  }

  .filter-container button {
    font-size: 11px;
    padding: 6px 12px;
    min-height: 34px
  }

  #section-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 15px
  }

  .section-card {
    padding: 20px
  }

  .card-header h2 {
    font-size: 30px
  }

  .course-row {
    min-height: 45px
  }

  .stats dd {
    font-size: 17px
  }

  .stats dt {
    font-size: 11px
  }

  .course-row strong {
    font-size: 13px
  }

  .course-row .course-meta {
    font-size: 11px
  }

  .course-days {
    font-size: 10px
  }

  .tag {
    font-size: 10px
  }

  footer {
    flex-direction: column;
    font-size: 10px;
    padding-block: 24px
  }

  .dialog-heading {
    padding: 18px
  }

  .dialog-heading h2 {
    font-size: 20px
  }

  .dialog-heading p {
    font-size: 11px
  }

  .dialog-content {
    padding: 18px
  }

  #course-form {
    padding: 18px 18px 0
  }

  .dialog-footer {
    padding: 16px;
    flex-wrap: wrap;
    gap: 8px
  }

  #course-form .dialog-footer {
    margin-inline: -18px
  }

  .form-grid {
    gap: 12px
  }

  .meeting-row {
    grid-template-columns: 1fr 1fr 1fr 27px;
    gap: 8px;
    padding: 13px 0
  }

  .meeting-row label:nth-child(4) {
    grid-column: 1/4;
    grid-row: 2
  }

  .meeting-row .icon-button {
    grid-column: 4;
    grid-row: 2;
    margin-bottom: 7px
  }

  .meeting-row input {
    min-height: 39px
  }

  .color-field {
    flex-wrap: wrap
  }

  .color-field .helper {
    font-size: 10px
  }

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

  .table-heading p {
    font-size: 11px
  }

  .import-links {
    gap: 12px;
    flex-wrap: wrap
  }

  .import-links .text-button {
    font-size: 11px
  }

  .schedule-dialog .dialog-content {
    padding: 18px
  }

  .schedule-stats {
    gap: 10px
  }

  .schedule-stats dd {
    font-size: 16px
  }

  .schedule-stats dt {
    font-size: 10px
  }

  .schedule-title-row h2 {
    font-size: 28px
  }

  .schedule-meeting {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px
  }

  .schedule-dialog>.dialog-heading {
    padding: 12px 16px
  }

  #toast {
    gap: 12px;
    font-size: 11px
  }

  .empty-state {
    padding: 40px 16px
  }

}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition: none!important;
    scroll-behavior: auto!important
  }

}

@media(max-width:360px) {
  .intro h1 {
    font-size: 29px
  }

  .stats dd {
    font-size: 14px
  }

  .stats {
    gap: 6px
  }

  .stats>div {
    padding-left: 8px
  }

  .topbar .text-button {
    max-width: 104px;
    text-align: right
  }

  .view-nav [role=tablist] {
    gap: 14px
  }

}

.academic-context {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 25px;
  padding: 19px 21px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface)
}

.context-fields {
  display: flex;
  gap: 18px;
  flex: 1
}

.context-fields label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .2px;
  min-width: 115px
}

.context-fields label:first-child {
  min-width: 175px
}

.context-fields select {
  color: var(--text);
  font-size: 13px;
  padding: 9px 35px 9px 12px;
  background: var(--bg);
  margin-top: 6px
}

.academic-context>.button {
  margin-bottom: 1px
}

.scope-note {
  padding: 11px 14px;
  background: var(--surface);
  border-left: 3px solid var(--mint);
  font-size: 12px;
  line-height: 1.6;
  color: #cae2d0;
  margin-bottom: 17px
}

.section-form-dialog {
  width: 850px
}

.terms-dialog {
  width: 820px
}

#section-form {
  overflow: auto;
  min-height: 0;
  padding: 20px 25px 0
}

#section-form>.dialog-footer {
  margin: 20px -25px 0
}

.section-context {
  display: grid;
  grid-template-columns: 1.3fr 1fr .9fr auto;
  align-items: end;
  gap: 13px;
  margin-bottom: 17px
}

.section-context .button {
  min-height: 44px;
  font-size: 12px
}

.section-context input,.section-context select {
  width: 100%
}

#section-map-curriculum {
  padding: 0 0 14px
}

.section-code-label {
  display: block;
  padding: 16px 0 24px
}

.section-code-label input {
  max-width: 270px
}

.section-code-label .helper {
  display: block;
  margin-top: 7px
}

.section-course {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px 18px 6px;
  margin: 0 0 24px;
  background: #0c211b;
  min-width: 0
}

.section-course legend {
  padding: 0 9px;
  color: var(--mint);
  font-size: 15px;
  max-width: 100%
}

.section-course legend span {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 12px
}

.section-course .meeting-heading {
  margin: 17px 0 5px
}

.section-course .meeting-row {
  grid-template-columns: 1fr 1fr 1fr 1.7fr 28px
}

.terms-dialog .dialog-content>section>h3 {
  font-size: 15px;
  margin-bottom: 12px
}

.period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line)
}

.period-row strong {
  font-size: 12px;
  font-weight: 600
}

.period-row span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px
}

.period-row .button:disabled {
  opacity: .65
}

.period-create {
  display: grid;
  grid-template-columns: 1.3fr 1fr .85fr auto;
  gap: 11px;
  align-items: end;
  margin: 18px 0 10px
}

.period-create .button {
  font-size: 12px
}

.curriculum-editor {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 3px
}

.curriculum-context {
  display: flex;
  gap: 16px;
  margin-bottom: 18px
}

.curriculum-context label {
  flex: 1
}

.curriculum-row {
  display: grid;
  grid-template-columns: 1fr 2.3fr 30px;
  gap: 12px;
  align-items: end;
  padding: 10px 0
}

.curriculum-row .icon-button {
  margin-bottom: 7px
}

.curriculum-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line)
}

.curriculum-editor .meeting-heading .helper {
  margin: 5px 0 0
}

.table-heading .actions {
  gap: 7px
}

input[readonly] {
  color: var(--muted);
  background: #10241c
}

@media(max-width:900px) {
  .section-context,.period-create {
    grid-template-columns: 1.4fr 1fr 1fr
  }

  .section-context .button,.period-create .button {
    grid-column: 1/-1;
    justify-self: end
  }

  .context-fields {
    gap: 12px
  }

  .context-fields label {
    min-width: 90px
  }

  .context-fields label:first-child {
    min-width: 155px
  }

  .academic-context>.button {
    font-size: 10px;
    padding: 9px
  }

  .academic-context {
    gap: 12px;
    padding: 16px
  }

}

@media(max-width:680px) {
  .academic-context {
    display: block;
    margin-bottom: 21px;
    padding: 15px
  }

  .context-fields {
    gap: 9px
  }

  .context-fields label {
    min-width: 0;
    flex: 1
  }

  .context-fields label:first-child {
    min-width: 0;
    flex: 1.4
  }

  .context-fields select {
    font-size: 11px;
    padding: 9px 3px 9px 7px
  }

  .academic-context>.button {
    margin-top: 13px;
    font-size: 11px;
    min-height: 34px;
    width: 100%
  }

  .section-context,.period-create {
    gap: 10px;
    grid-template-columns: 1.35fr 1fr 1fr
  }

  .section-context input,.section-context select,.period-create input,.period-create select {
    font-size: 11px;
    padding: 10px 5px
  }

  .section-context .button,.period-create .button {
    justify-self: stretch
  }

  #section-form {
    padding: 17px 16px 0
  }

  #section-form>.dialog-footer {
    margin-inline: -16px
  }

  .section-course {
    padding: 12px 12px 4px
  }

  .section-course legend span {
    display: block;
    margin: 3px 0 0;
    font-size: 10px
  }

  .section-course legend {
    font-size: 14px;
    line-height: 1.35;
    max-width: 95%;
    padding-bottom: 4px
  }

  .section-course .meeting-row {
    grid-template-columns: 1fr 1fr 1fr 26px
  }

  .curriculum-row {
    grid-template-columns: 1fr 1.7fr 26px;
    gap: 8px
  }

  .curriculum-row input {
    padding: 10px 6px;
    font-size: 11px
  }

  .curriculum-row label {
    font-size: 10px
  }

  .curriculum-row .optional {
    display: none
  }

  .period-row strong {
    font-size: 11px
  }

  .period-row span {
    font-size: 10px
  }

  .table-heading {
    align-items: flex-start;
    flex-direction: column
  }

  .table-heading .actions {
    align-self: flex-end;
    flex-wrap: wrap
  }

  .curriculum-footer {
    flex-wrap: wrap
  }

  .curriculum-footer .button {
    margin-left: auto
  }

  .scope-note {
    font-size: 11px
  }

}
