:root {
  --ink: #102033;
  --buaa-blue: #0f2f5a;
  --flight-blue: #1768a6;
  --signal: #08756c;
  --warning: #a75509;
  --danger: #a33a35;
  --paper: #ffffff;
  --canvas: #f2f6f9;
  --line: #d8e1e8;
  --muted: #647386;
  --soft-blue: #eaf2f8;
  --soft-green: #e7f4f0;
  --soft-warning: #fff3df;
  --radius: 10px;
  --numeric: Bahnschrift, "DIN Alternate", "Segoe UI", sans-serif;
  --text: "Microsoft YaHei UI", "Noto Sans SC", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--text);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 104, 166, 0.25);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.65rem 1rem;
  background: var(--paper);
  color: var(--buaa-blue);
  border: 1px solid var(--flight-blue);
}

.skip-link:focus {
  top: 1rem;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 28px 20px 22px;
  background: var(--buaa-blue);
  color: #fff;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  font-family: var(--numeric);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  font-weight: 650;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
}

.nav-list {
  display: grid;
  gap: 7px;
  margin-top: 52px;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.nav-item.is-active {
  box-shadow: inset 3px 0 0 #65b9dc;
}

.nav-icon {
  width: 20px;
  font-family: var(--numeric);
  font-size: 19px;
  text-align: center;
}

.sidebar-note {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: #f1b35c;
  box-shadow: 0 0 0 4px rgba(241, 179, 92, 0.14);
}

.sidebar-note.is-connected .status-dot {
  background: #5bc29a;
  box-shadow: 0 0 0 4px rgba(91, 194, 154, 0.14);
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note strong {
  font-size: 12px;
  font-weight: 600;
}

.sidebar-note span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

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

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--buaa-blue);
  font-size: 13px;
  font-weight: 700;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
}

.sidebar-user strong {
  font-size: 12px;
}

.sidebar-user small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--numeric);
  font-size: 10px;
}

.main-content {
  min-height: 100vh;
  margin-left: 248px;
  padding: 42px clamp(28px, 4vw, 68px) 72px;
}

.view {
  display: none;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.view.is-visible {
  display: block;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 26px;
}

.context-line {
  margin: 0 0 8px;
  color: var(--flight-blue);
  font-size: 13px;
  font-weight: 650;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

h2 {
  margin-bottom: 5px;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.page-intro,
.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.button {
  min-height: 39px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.button.primary {
  background: var(--buaa-blue);
  color: #fff;
}

.button.primary:hover {
  background: #17406f;
}

.button.secondary,
.button.ghost {
  border-color: var(--line);
  background: var(--paper);
}

.button.secondary:hover,
.button.ghost:hover {
  border-color: #aebbc6;
}

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #ebc685;
  border-radius: 8px;
  background: var(--soft-warning);
  color: #6f3b06;
}

.notice-symbol {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--warning);
  color: #fff;
  font-family: var(--numeric);
  font-size: 12px;
  font-weight: 700;
}

.notice strong,
.notice p {
  display: block;
  margin: 0;
  font-size: 12px;
}

.notice p {
  margin-top: 2px;
  color: #805522;
}

.text-button,
.inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--flight-blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.notice .text-button {
  margin-left: auto;
  color: #6f3b06;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.flight-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 1.65fr auto;
  gap: 34px;
  align-items: stretch;
  min-height: 182px;
  overflow: hidden;
  padding: 28px 30px;
  border-radius: var(--radius);
  background: var(--buaa-blue);
  color: #fff;
}

.flight-board::after {
  position: absolute;
  right: -68px;
  bottom: -88px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.primary-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 30px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.metric-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 7px 0 2px;
}

.metric-value {
  font-family: var(--numeric);
  font-size: clamp(52px, 6vw, 74px);
  font-weight: 450;
  letter-spacing: -0.055em;
  line-height: 1;
}

.metric-unit {
  color: rgba(255, 255, 255, 0.54);
  font-family: var(--numeric);
  font-size: 14px;
}

.primary-metric p {
  max-width: 290px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  line-height: 1.6;
}

.metric-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  align-content: center;
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.metric-ledger div {
  display: flex;
  min-height: 56px;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  background: var(--buaa-blue);
}

.metric-ledger span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

.metric-ledger strong {
  margin-top: 5px;
  font-family: var(--numeric);
  font-size: 17px;
  font-weight: 500;
}

.board-stamp {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  transform: rotate(-2deg);
  text-align: center;
}

.board-stamp span,
.board-stamp strong,
.board-stamp small {
  display: block;
}

.board-stamp span,
.board-stamp small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
}

.board-stamp strong {
  margin: 3px 0;
  font-family: var(--numeric);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.route-section {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.legend {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--signal);
}

.rule-route {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.route-step {
  position: relative;
  min-width: 0;
  padding: 17px 16px 15px;
  border-right: 1px solid var(--line);
}

.route-step:last-child {
  border-right: 0;
}

.route-step::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--line);
  content: "";
}

.route-step.is-complete::after {
  background: var(--signal);
}

.route-code {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-size: 11px;
  font-weight: 700;
}

.route-step.is-complete .route-code {
  border-color: var(--signal);
  background: var(--soft-green);
  color: var(--signal);
}

.route-step h3 {
  overflow: hidden;
  margin: 15px 0 4px;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-step p {
  margin: 0;
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 10px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}

.work-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.compact-heading {
  align-items: flex-start;
}

.scenario-result {
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--soft-blue);
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-size: 11px;
  white-space: nowrap;
}

.scenario-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.scenario-item {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) 48px;
  gap: 14px;
  align-items: center;
}

.scenario-item label {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 9px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--flight-blue);
}

.scenario-score {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  font-family: var(--numeric);
  font-size: 13px;
}

.scenario-score input {
  width: 36px;
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--numeric);
  text-align: center;
}

.panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.data-ledger {
  margin: 18px 0 20px;
}

.data-ledger div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.data-ledger dt,
.data-ledger dd {
  margin: 0;
  font-size: 11px;
}

.data-ledger dt {
  color: var(--muted);
}

.data-ledger dd {
  text-align: right;
}

.source-tag {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
}

.source-tag.demo {
  background: var(--soft-warning);
  color: var(--warning);
}

.source-tag.school {
  background: #e3f5ee;
  color: #167653;
}

.status-chip.issue {
  background: #fcebea;
  color: var(--danger);
}

.status-chip.outside {
  background: #edf1f4;
  color: var(--muted);
}

.header-stat {
  min-width: 120px;
  padding-left: 18px;
  border-left: 2px solid var(--flight-blue);
}

.header-stat span,
.header-stat strong {
  display: block;
}

.rule-picker {
  display: grid;
  min-width: min(310px, 38vw);
  gap: 5px;
}

.rule-picker > span,
.rule-picker small {
  color: var(--muted);
  font-size: 9px;
}

.rule-picker select {
  height: 40px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
}

.header-stat span {
  color: var(--muted);
  font-size: 10px;
}

.header-stat strong {
  margin-top: 4px;
  font-family: var(--numeric);
  font-size: 23px;
  font-weight: 480;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.search-field {
  display: flex;
  min-width: 240px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--muted);
}

.search-field input,
.filter-bar select {
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
  font-size: 12px;
}

.search-field input {
  width: 100%;
}

.filter-bar > label:not(.search-field) {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}

.filter-bar select {
  min-width: 145px;
  padding: 0 30px 0 11px;
}

.filter-count {
  min-width: 62px;
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 10px;
  text-align: right;
}

.table-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f7f9fb;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafcfd;
}

.course-name-cell strong,
.course-name-cell small {
  display: block;
}

.course-name-cell strong {
  max-width: 280px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-name-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 9px;
}

.group-chip {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-size: 10px;
  font-weight: 700;
}

.score-number,
.grade-point,
.term-code,
.credit-number {
  font-family: var(--numeric);
}

.score-number {
  font-size: 13px;
  font-weight: 520;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--soft-green);
  color: var(--signal);
  font-size: 9px;
  white-space: nowrap;
}

.status-chip.pending {
  background: #eef1f4;
  color: var(--muted);
}

.status-chip.pass-only {
  background: var(--soft-blue);
  color: var(--flight-blue);
}

.status-chip.candidate {
  background: var(--soft-warning);
  color: var(--warning);
}

.edit-button {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
  color: var(--flight-blue);
  font-size: 10px;
}

.empty-state {
  padding: 54px 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.official-badge {
  padding: 7px 10px;
  border: 1px solid #99c7bd;
  border-radius: 5px;
  background: var(--soft-green);
  color: var(--signal);
  font-size: 10px;
  font-weight: 650;
}

.rule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.7fr);
  gap: 20px;
  align-items: start;
}

.rule-document {
  padding: 26px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--buaa-blue);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
  background: var(--paper);
}

.document-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.document-title span {
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 10px;
}

.document-title h2 {
  max-width: 500px;
  margin: 5px 0 0;
  font-size: 20px;
}

.formula-block {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--flight-blue);
  background: var(--soft-blue);
}

.formula-block span,
.formula-block small {
  color: var(--muted);
  font-size: 10px;
}

.formula-block p {
  margin: 8px 0 6px;
  font-family: var(--numeric);
  font-size: clamp(17px, 2.4vw, 24px);
  letter-spacing: -0.02em;
}

.mapping-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.mapping-row span {
  padding: 10px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 10px;
  text-align: center;
}

.mapping-row span:last-child {
  border-right: 0;
}

.mapping-row b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-family: var(--text);
  font-size: 11px;
}

.rule-table {
  display: grid;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.rule-row {
  display: grid;
  grid-template-columns: 38px minmax(130px, 1fr) minmax(170px, 1.4fr);
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}

.rule-row .code {
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-weight: 700;
}

.rule-row strong {
  font-size: 11px;
}

.rule-row span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.rule-aside {
  display: grid;
  gap: 12px;
}

.aside-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.aside-block.caution {
  border-color: #ebc685;
  background: var(--soft-warning);
}

.aside-index {
  display: inline-block;
  margin-bottom: 12px;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--flight-blue);
  color: var(--flight-blue);
  font-size: 9px;
  font-weight: 700;
}

.aside-block.caution .aside-index {
  border-color: var(--warning);
  color: var(--warning);
}

.aside-block h2 {
  font-size: 14px;
}

.aside-block p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.calendar-page-header {
  margin-bottom: 18px;
}

.calendar-updated {
  align-self: end;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 10px;
}

.calendar-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--buaa-blue);
  color: #fff;
}

.calendar-summary > div {
  display: grid;
  gap: 5px;
  padding: 17px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.calendar-summary > div:last-child {
  border-right: 0;
}

.calendar-summary span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
}

.calendar-summary strong {
  font-family: var(--numeric);
  font-size: 24px;
  font-weight: 600;
}

.calendar-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--paper);
}

.calendar-filter-bar label {
  display: flex;
  align-items: center;
}

.calendar-filter-bar select,
.calendar-search {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

.calendar-filter-bar select {
  padding: 0 28px 0 10px;
  font-size: 10px;
}

.calendar-search {
  flex: 1 1 210px;
  min-width: 160px;
  padding: 0 10px;
}

.calendar-search span {
  margin-right: 7px;
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-size: 18px;
}

.calendar-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

#calendar-filter-count {
  min-width: 42px;
  margin-left: auto;
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 10px;
  text-align: right;
}

.calendar-notice {
  padding: 11px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--warning);
  background: var(--soft-warning);
  color: #6e5124;
  font-size: 10px;
  line-height: 1.65;
}

.competition-calendar {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.calendar-month-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.calendar-month-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--soft-blue);
}

.calendar-month-group > header h2 {
  margin: 0;
  color: var(--buaa-blue);
  font-family: var(--numeric);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.calendar-month-group > header span {
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 9px;
}

.competition-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 114px;
  gap: 16px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.competition-row:last-child {
  border-bottom: 0;
}

.calendar-date-ticket {
  display: grid;
  min-height: 76px;
  place-content: center;
  border: 1px solid #b9cce0;
  border-top: 4px solid var(--flight-blue);
  border-radius: 3px;
  background: #f8fbfe;
  text-align: center;
}

.calendar-date-ticket span {
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-size: 9px;
}

.calendar-date-ticket strong {
  margin-top: 3px;
  font-family: var(--numeric);
  font-size: 15px;
  line-height: 1.1;
}

.calendar-date-ticket em {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 9px;
  font-style: normal;
}

.competition-main {
  min-width: 0;
}

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

.competition-tags span {
  padding: 3px 6px;
  border-radius: 3px;
  background: #edf3f8;
  color: #43617b;
  font-size: 8px;
}

.competition-tags span:first-child {
  background: var(--buaa-blue);
  color: #fff;
}

.competition-main h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.competition-main p {
  margin: 5px 0 0;
  color: var(--ink);
  font-family: var(--numeric);
  font-size: 10px;
}

.competition-main small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.competition-source {
  display: grid;
  justify-items: end;
  gap: 7px;
  text-align: right;
}

.competition-source small {
  color: var(--muted);
  font-size: 9px;
}

.competition-source a {
  color: var(--flight-blue);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

.competition-source a:hover {
  text-decoration: underline;
}

.calendar-status {
  padding: 4px 7px;
  border: 1px solid #b9cce0;
  border-radius: 999px;
  color: var(--flight-blue);
  font-size: 8px;
  font-weight: 700;
}

.calendar-status.is-estimated,
.calendar-status.is-pending {
  border-color: #e1bb78;
  background: var(--soft-warning);
  color: var(--warning);
}

.calendar-status.is-not-held {
  border-color: #cbd0d5;
  background: #f1f2f3;
  color: #68727b;
}

.calendar-empty {
  padding: 44px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.mobile-header,
.mobile-nav {
  display: none;
}

dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(15, 47, 90, 0.25);
}

dialog.integration-dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 24px;
  overflow: auto;
}

dialog::backdrop {
  background: rgba(11, 30, 49, 0.48);
  backdrop-filter: blur(2px);
}

#course-form {
  padding: 24px;
}

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

.dialog-header span {
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-size: 10px;
}

.dialog-header h2 {
  margin-top: 5px;
  font-size: 19px;
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #eef2f5;
  cursor: pointer;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.field > span {
  font-size: 11px;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
}

.field small {
  color: var(--muted);
  font-size: 9px;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 19px;
  padding: 13px;
  border-radius: 7px;
  background: var(--soft-warning);
}

.check-field input {
  margin-top: 3px;
  accent-color: var(--flight-blue);
}

.check-field strong,
.check-field small {
  display: block;
}

.check-field strong {
  font-size: 11px;
}

.check-field small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.dialog-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 10px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.privacy-note {
  display: flex;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid #d6e4ef;
  border-radius: 8px;
  background: #f3f8fb;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.privacy-note > span {
  color: var(--flight-blue);
  font-size: 18px;
}

.privacy-note p {
  margin: 0;
}

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

.captcha-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 116px auto;
  align-items: center;
  gap: 9px;
}

.captcha-row img {
  width: 116px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f7f9;
  object-fit: contain;
}

.connected-account {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid #cfe6dc;
  border-radius: 9px;
  background: #f1faf6;
}

.connected-account > div {
  display: grid;
  flex: 1;
  gap: 3px;
}

.connected-account strong {
  font-size: 13px;
}

.connected-account span:not(.avatar, .status-chip) {
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 10px;
}

.term-selection {
  margin-top: 20px;
}

.term-selection > div:first-child {
  display: grid;
  gap: 4px;
}

.term-selection > div:first-child strong {
  font-size: 12px;
}

.term-selection > div:first-child span {
  color: var(--muted);
  font-size: 10px;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.term-check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--numeric);
  font-size: 10px;
  cursor: pointer;
}

.term-check:has(input:checked) {
  border-color: #9ec5dc;
  background: #edf6fb;
}

.term-check input {
  accent-color: var(--flight-blue);
}

.split-actions {
  justify-content: space-between;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sidebar-user > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.sidebar-logout {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font-size: 10px;
}

.sidebar-logout:hover {
  color: #fff;
}

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

.page-header-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.target-board {
  display: grid;
  grid-template-columns: 0.8fr 0.85fr auto 1.25fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 19px 22px;
  border-radius: var(--radius);
  background: var(--buaa-blue);
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 47, 90, 0.12);
}

.target-board > div,
.target-board > label,
.target-result {
  display: grid;
  gap: 5px;
}

.target-board span,
.target-board small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
}

.target-board strong {
  font-family: var(--numeric);
  font-size: 25px;
  font-weight: 620;
}

.target-board input {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-family: var(--numeric);
}

.target-board .button.primary {
  background: #fff;
  color: var(--buaa-blue);
}

.target-result {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr);
  gap: 18px;
}

.regret-panel {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #d7c8ac;
  border-radius: var(--radius);
  background: #fffdf8;
}

.regret-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid #e8dec9;
  background: #f8f2e7;
}

.regret-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.regret-heading h2,
.regret-heading p {
  margin: 0;
}

.regret-heading p,
.regret-heading > small {
  color: #776b58;
  font-size: 9px;
}

.capsule-mark {
  display: grid;
  width: 39px;
  height: 25px;
  place-items: center;
  border: 1px solid #b47b35;
  border-radius: 18px;
  background: linear-gradient(90deg, #b45a37 0 50%, #fff 50%);
  box-shadow: inset 0 0 0 2px #fff;
  color: var(--buaa-blue);
  font-family: var(--numeric);
  font-size: 8px;
  font-weight: 700;
}

.analysis-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #eee4d3;
}

.analysis-summary-strip > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 20px;
  border-right: 1px solid #eee4d3;
}

.analysis-summary-strip > div:last-child {
  border-right: 0;
}

.analysis-summary-strip span {
  color: #776b58;
  font-size: 9px;
}

.analysis-summary-strip strong {
  font-family: var(--numeric);
  font-size: 13px;
}

.regret-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px 20px 14px;
  column-gap: 28px;
}

.regret-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid #eee4d3;
}

.regret-dose {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #ece3d2;
  color: #7f6744;
  font-family: var(--numeric);
  font-size: 9px;
}

.regret-item.is-primary .regret-dose {
  background: var(--warning);
  color: #fff;
}

.regret-course,
.regret-shift {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.regret-course strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.regret-course small,
.regret-shift span {
  color: #827867;
  font-size: 9px;
}

.regret-shift {
  justify-items: end;
  font-family: var(--numeric);
}

.regret-shift strong {
  color: var(--warning);
  font-size: 13px;
}

.analysis-data-grid {
  margin-top: 18px;
}

.group-performance,
.grade-distribution {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}

.group-performance-row,
.distribution-row {
  display: grid;
  grid-template-columns: 34px minmax(100px, 1fr) 48px 58px;
  gap: 9px;
  align-items: center;
  font-size: 9px;
}

.group-performance-row > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 5px;
  background: var(--soft-blue);
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-weight: 700;
}

.group-performance-row > div,
.distribution-row > div {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #e8eef2;
}

.group-performance-row i,
.distribution-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--flight-blue);
}

.distribution-row i {
  background: var(--signal);
}

.group-performance-row strong,
.distribution-row strong {
  font-family: var(--numeric);
  text-align: right;
}

.group-performance-row small,
.distribution-row small {
  color: var(--muted);
  text-align: right;
}

.analysis-ledger,
.comprehensive-entry-panel,
.comprehensive-items-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.term-timeline,
.impact-list,
.comprehensive-items {
  display: grid;
  margin-top: 16px;
}

.term-row {
  padding: 13px 0;
  border-top: 1px solid #e8eef2;
}

.term-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.term-row-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
}

.term-row-head span {
  color: var(--muted);
  font-family: var(--numeric);
}

.term-row-head b {
  color: var(--flight-blue);
  font-weight: 650;
}

.term-bars {
  display: grid;
  gap: 3px;
  margin: 8px 0 6px;
}

.term-bars::before,
.term-bars::after {
  content: "";
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: #e7edf2;
}

.term-bars::after {
  grid-row: 2;
}

.term-bars i {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  height: 4px;
  border-radius: 4px;
  background: #9eb1c0;
}

.term-bars i + i {
  grid-row: 2;
  background: var(--flight-blue);
}

.term-row > small,
.impact-item small,
.comprehensive-item small {
  color: var(--muted);
  font-size: 9px;
}

.impact-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #e8eef2;
}

.impact-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.impact-rank {
  color: #9aa9b5;
  font-family: var(--numeric);
  font-size: 10px;
}

.impact-item div {
  display: grid;
  gap: 3px;
}

.impact-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.impact-item > b {
  color: var(--flight-blue);
  font-family: var(--numeric);
  font-size: 10px;
}

.empty-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.reference-chip {
  padding: 6px 9px;
  border: 1px solid #e6bc76;
  border-radius: 5px;
  background: var(--soft-warning);
  color: var(--warning);
  font-size: 10px;
  font-weight: 650;
}

.comprehensive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.comprehensive-editor {
  display: grid;
  gap: 14px;
}

.base-score-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.65fr) auto;
  gap: 12px;
  align-items: end;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.compact-check,
.inline-field {
  margin-top: 0;
}

.compact-check {
  min-height: 42px;
  padding: 8px 11px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.category-cell {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.category-cell:last-child {
  border-right: 0;
}

.category-cell span,
.category-cell small {
  color: var(--muted);
  font-size: 9px;
}

.category-cell strong {
  font-family: var(--numeric);
  font-size: 17px;
}

.category-cell.is-limited {
  box-shadow: inset 0 3px 0 #d69532;
}

.comprehensive-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 12px;
  align-items: end;
}

.comprehensive-auto-fields {
  display: contents;
}

.comprehensive-form .wide-field {
  grid-column: span 2;
}

.comprehensive-form .button {
  margin-top: 15px;
}

.auto-score-preview {
  display: grid;
  gap: 4px;
  min-height: 42px;
  align-content: center;
  margin-top: 15px;
  padding: 7px 11px;
  border-left: 3px solid var(--signal);
  background: var(--soft-green);
}

.auto-score-preview span {
  color: var(--muted);
  font-size: 9px;
}

.auto-score-preview strong {
  color: var(--signal);
  font-family: var(--numeric);
  font-size: 11px;
}

.auto-score-preview.is-pending {
  border-left-color: #d2a04f;
  background: var(--soft-warning);
}

.auto-score-preview.is-pending strong {
  color: var(--warning);
  font-family: var(--text);
}

.comprehensive-items-section {
  min-height: 135px;
}

.comprehensive-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 110px 24px;
  gap: 11px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #e8eef2;
}

.comprehensive-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.comprehensive-item > div {
  display: grid;
  gap: 3px;
}

.comprehensive-item strong {
  font-size: 11px;
}

.comprehensive-item em {
  color: var(--warning);
  font-size: 9px;
  font-style: normal;
}

.comprehensive-item.is-excluded {
  opacity: 0.58;
}

.item-category {
  color: var(--flight-blue);
  font-size: 9px;
  font-weight: 650;
}

.item-score {
  display: grid;
  justify-items: end;
  color: var(--muted);
  font-family: var(--numeric);
  font-size: 9px;
}

.item-score b {
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
}

.item-delete {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f6;
  color: var(--muted);
  cursor: pointer;
}

.item-delete:hover {
  background: #f8e9e7;
  color: var(--danger);
}

.comprehensive-ledger {
  position: sticky;
  top: 24px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--buaa-blue);
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 47, 90, 0.16);
}

.ledger-title,
.ledger-base,
.ledger-row,
.ledger-addition,
.ledger-final {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.ledger-title {
  padding-block: 16px;
  background: rgba(0, 0, 0, 0.12);
}

.ledger-title span {
  font-size: 12px;
  font-weight: 650;
}

.ledger-title small,
.ledger-row small,
.comprehensive-ledger > p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
}

.ledger-base span,
.ledger-row > span,
.ledger-addition span,
.ledger-final span {
  font-size: 10px;
}

.ledger-base strong,
.ledger-row strong,
.ledger-addition strong,
.ledger-final strong {
  font-family: var(--numeric);
  font-size: 13px;
}

.ledger-row > span {
  display: grid;
  gap: 2px;
}

.ledger-addition {
  background: rgba(255, 255, 255, 0.04);
}

.ledger-final {
  border-bottom: 0;
  background: #fff;
  color: var(--buaa-blue);
}

.ledger-final strong {
  font-size: 24px;
}

.comprehensive-ledger > p {
  margin: 0;
  padding: 13px 17px 16px;
  line-height: 1.65;
}

.saved-account-note {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #b6dcd2;
  border-radius: 7px;
  background: var(--soft-green);
}

.saved-account-note strong {
  color: var(--signal);
  font-size: 11px;
}

.saved-account-note span {
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 520px) {
  dialog.integration-dialog {
    padding: 19px;
  }

  .captcha-row {
    grid-template-columns: 1fr 110px;
  }

  .captcha-row .text-button {
    grid-column: 2;
  }

  .term-grid {
    grid-template-columns: 1fr;
  }

  .rule-picker {
    width: 100%;
    min-width: 0;
  }
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(380px, calc(100vw - 48px));
  padding: 11px 14px;
  border-radius: 7px;
  background: #102033;
  color: #fff;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .flight-board {
    grid-template-columns: minmax(220px, 0.8fr) 1.4fr;
  }

  .board-stamp {
    display: none;
  }

  .rule-route {
    grid-template-columns: repeat(3, 1fr);
  }

  .route-step:nth-child(3) {
    border-right: 0;
  }

  .route-step:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .rule-layout {
    grid-template-columns: 1fr;
  }

  .rule-aside {
    grid-template-columns: repeat(3, 1fr);
  }

  .target-board {
    grid-template-columns: 0.7fr 0.8fr auto;
  }

  .target-result {
    grid-column: 1 / -1;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.17);
    border-left: 0;
  }

  .comprehensive-layout {
    grid-template-columns: 1fr;
  }

  .comprehensive-ledger {
    position: static;
  }
}

@media (max-width: 820px) {
  .sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: var(--buaa-blue);
    color: #fff;
  }

  .brand.compact .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  .brand.compact strong {
    font-size: 13px;
  }

  .demo-pill {
    padding: 4px 7px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
  }

  .main-content {
    margin-left: 0;
    padding: 26px 18px 92px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    height: 64px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
  }

  .mobile-nav button {
    display: grid;
    place-items: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 9px;
  }

  .mobile-nav span {
    font-family: var(--numeric);
    font-size: 17px;
  }

  .mobile-nav button.is-active {
    color: var(--flight-blue);
  }

  .page-header {
    align-items: flex-start;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .regret-list {
    grid-template-columns: 1fr;
  }

  .comprehensive-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .base-score-strip {
    grid-template-columns: 1fr auto;
  }

  .base-score-strip .inline-field {
    grid-column: 1;
  }

  .table-shell {
    overflow-x: auto;
  }

  table {
    min-width: 880px;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .search-field {
    min-width: 100%;
  }

  .filter-count {
    margin-left: auto;
  }

  .calendar-filter-bar {
    flex-wrap: wrap;
  }

  .calendar-search {
    flex-basis: 100%;
  }

  .competition-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .competition-source {
    grid-column: 2;
    grid-auto-flow: column;
    justify-content: start;
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 28px;
  }

  .page-header {
    display: grid;
    gap: 18px;
  }

  .export-actions {
    flex-wrap: wrap;
  }

  .page-header-side {
    justify-items: start;
  }

  .regret-heading {
    align-items: flex-start;
  }

  .regret-heading > small {
    max-width: 130px;
    text-align: right;
  }

  .analysis-summary-strip {
    grid-template-columns: 1fr;
  }

  .analysis-summary-strip > div {
    border-right: 0;
    border-bottom: 1px solid #eee4d3;
  }

  .analysis-summary-strip > div:last-child {
    border-bottom: 0;
  }

  .regret-list {
    padding-inline: 14px;
  }

  .regret-item {
    grid-template-columns: 25px minmax(0, 1fr);
  }

  .regret-shift {
    grid-column: 2;
    justify-items: start;
  }

  .target-board {
    grid-template-columns: 1fr 1fr;
  }

  .target-board .button,
  .target-result {
    grid-column: 1 / -1;
  }

  .category-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-cell:nth-child(2) {
    border-right: 0;
  }

  .category-cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .base-score-strip,
  .comprehensive-form {
    grid-template-columns: 1fr;
  }

  .base-score-strip .inline-field,
  .comprehensive-form .wide-field {
    grid-column: 1;
  }

  .comprehensive-item {
    grid-template-columns: 62px minmax(0, 1fr) 24px;
  }

  .item-score {
    grid-column: 2;
    justify-items: start;
  }

  .item-delete {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .flight-board {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 24px;
  }

  .primary-metric {
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .rule-route {
    grid-template-columns: repeat(2, 1fr);
  }

  .route-step:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .route-step:nth-child(even) {
    border-right: 0;
  }

  .route-step:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .scenario-item {
    grid-template-columns: minmax(130px, 1fr) 64px;
  }

  .scenario-item input[type="range"] {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .rule-aside {
    grid-template-columns: 1fr;
  }

  .rule-document {
    padding: 20px;
  }

  .mapping-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .mapping-row span:nth-child(even) {
    border-right: 0;
  }

  .mapping-row span {
    border-bottom: 1px solid var(--line);
  }

  .mapping-row span:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .rule-row {
    grid-template-columns: 30px 1fr;
    gap: 4px;
    padding: 9px 0;
  }

  .rule-row span:last-child {
    grid-column: 2;
  }

  .notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .notice .text-button {
    margin-left: 36px;
  }

  .calendar-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-summary > div:nth-child(2) {
    border-right: 0;
  }

  .calendar-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .calendar-filter-bar label:not(.calendar-search) {
    flex: 1 1 calc(50% - 4px);
  }

  .calendar-filter-bar select {
    width: 100%;
  }

  #calendar-filter-count {
    width: 100%;
  }

  .competition-row {
    gap: 12px;
    padding: 14px 12px;
  }

  .competition-source {
    grid-auto-flow: row;
  }
}

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