.arts-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 19px;
}

.arts-tabs .button {
  background: var(--panel);
  border-color: var(--border);
  color: var(--muted);
}

.arts-tabs .button:hover {
  background: var(--panel-hover);
  color: var(--ink);
}

.arts-tabs .button[aria-current="page"] {
  background: #312720;
  border-color: #805e3e;
  color: var(--gold-light);
}

.progression-map {
  container-type: inline-size;
  --map-course-dot: #e6b77e;
  --map-band-line: #f6d4a4;
  --map-cell-gap: 5px;
}

.progression-map > h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.map-bands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.map-band {
  min-width: 0;
  min-height: 44px;
  padding: 6px;
  color: var(--muted);
  font-weight: 650;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.map-band:hover {
  color: var(--gold-light);
  background: var(--panel-hover);
}

.map-band[aria-pressed="true"] {
  color: var(--gold-ink);
  background: var(--gold);
  border-color: var(--gold);
}

.map-band-info {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.map-band-info strong { color: var(--gold-light); }
.map-axis { display: none; }

.map-axis-pairs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--map-cell-gap);
  text-align: center;
}

.map-axis-pairs > * {
  padding: 5px 2px;
  border-bottom: 1px solid #524438;
  color: var(--muted);
}

.map-list {
  display: grid;
  gap: 8px;
}

.map-ladder {
  display: grid;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.map-ladder-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 7px;
}

.map-ladder-label strong { color: var(--ink); }
.map-ladder-label small { color: var(--muted); font-size: 11px; }
.map-art-link { font-size: 11px; }

.map-nodes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--map-cell-gap);
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-nodes li { position: relative; display: flex; min-width: 0; }
.map-nodes li + li::before {
  position: absolute;
  inset: 50% 100% auto auto;
  width: var(--map-cell-gap);
  height: 1px;
  background: #8e7254;
  content: "";
}
.map-nodes li:nth-child(6)::before { display: none; }

.map-node-button {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 62px;
  padding: 5px 3px;
  color: var(--muted);
  background: #1d212a;
  border: 1px solid #35404b;
  border-radius: 7px;
  text-align: center;
}

.map-node-button:hover {
  background: #292a31;
  border-color: #8d7257;
  color: var(--ink);
}

.map-node-button[data-maturity="course"] {
  color: var(--ink);
  background: #252226;
  border-color: #58493b;
}

.map-node-button[data-maturity="locked"] { border-style: dashed; }

.map-node-button[aria-pressed="true"] {
  color: var(--gold-light);
  background: #342a23;
  border-color: #a67e54;
}

.map-node-button[data-band]::before {
  position: absolute;
  inset: 3px 5px auto;
  border-top: 2px solid var(--map-band-line);
  content: "";
}

.map-node-index {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.map-node-button[data-maturity="course"] .map-node-index::after,
.map-key-course::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--map-course-dot);
  content: "";
}

.map-node-text {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.25;
}

.map-step-info {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  min-width: 0;
  padding: 8px 1px 1px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.map-step-info strong { color: var(--gold-light); }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 11px;
}

.map-key-band, .map-key-course, .map-key-locked {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-key-locked::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px dashed currentColor;
  border-radius: 2px;
  content: "";
}

.map-key-band::before {
  width: 15px;
  border-top: 2px solid var(--map-band-line);
  content: "";
}

.map-electives h3 {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 17px;
}

.map-branch-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-branch-list li {
  min-width: 0;
  padding: 8px 11px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.map-branch-list small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

@container (min-width: 480px) {
  .map-bands { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .map-branch-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (min-width: 870px) {
  .map-axis, .map-ladder {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
  }

  .map-axis {
    display: grid;
    align-items: center;
    margin-bottom: 7px;
    padding: 0 10px;
    color: var(--muted);
    font-size: 11px;
  }

  .map-ladder-label { display: block; }
  .map-ladder-label small { display: block; }
  .map-nodes { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .map-nodes li:nth-child(6)::before { display: block; }
}

@media (max-width: 620px) {
  .arts-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 12px;
    padding: 3px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
  }

  .arts-tabs .button {
    min-height: 44px;
    padding: 7px 8px;
    background: transparent;
    border-color: transparent;
  }

  .progression-map {
    --map-cell-gap: 4px;
    margin-top: 24px;
  }

  .progression-map > h2 { margin-bottom: 10px; }

  .map-bands {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .map-band {
    padding-inline: 2px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .map-band-info { margin: 8px 0 12px; }
  .map-list { gap: 10px; }
  .map-ladder { gap: 7px; padding: 10px; }

  .map-ladder-label {
    align-items: center;
    min-height: 24px;
  }

  .map-ladder-label strong { font-size: 15px; }
  .map-ladder-label small { font-size: 12px; }

  .map-art-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-inline-start: auto;
    padding-inline: 4px;
    font-size: 12px;
  }

  .map-nodes { row-gap: 6px; }

  .map-node-button {
    min-height: 52px;
    padding: 7px 1px 4px;
  }

  .map-node-button[data-band]::before { border-radius: 2px; }

  .map-node-text {
    font-size: clamp(11px, 2.85vw, 12px);
    text-wrap: balance;
  }

  .map-step-info {
    gap: 7px 12px;
    padding-top: 9px;
  }

  .map-step-info .button { min-height: 44px; }
  .map-legend { font-size: 12px; }
  .art-course-back { min-height: 44px; }
}
