:root {
  --bg: #f4f5f7;
  --paper: #fff;
  --text: #20272e;
  --muted: #4c5662;
  --line: #cdd3da;
  --green: #17633d;
  --green-light: #eaf5ed;
  --blue: #214c9a;
  --blue-light: #eef3ff;
  --amber: #775000;
  --amber-light: #fff4d6;
  --purple: #64408c;
  --purple-light: #f4eefb;
  --programme-header-height: 34px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.45; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
a { color: var(--blue); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #245bc4; outline-offset: 2px; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; clip: rect(0, 0, 0, 0); width: 1px; height: 1px; overflow: hidden; margin: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; background: white; padding: 12px; }
.skip-link:focus { top: 8px; }

.topbar { min-height: 53px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: white; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { white-space: nowrap; text-decoration: none; color: var(--text); font-size: 15px; }
.brand strong { font-weight: 650; }
.brand-divider { color: var(--muted); margin: 0 7px; }
.topbar nav { display: flex; gap: 2px; align-self: stretch; margin-left: auto; }
.nav-tab { border: 0; background: transparent; padding: 0 14px; font-weight: 500; font-size: 13px; color: var(--muted); position: relative; min-height: 52px; }
.nav-tab.active { color: var(--text); font-weight: 650; }
.nav-tab.active:after { position: absolute; bottom: -1px; left: 14px; right: 14px; height: 3px; background: var(--blue); content: ''; }
.nav-tab #nav-source-count { font-size: 11px; background: #edf0f3; color: var(--muted); border-radius: 3px; margin-left: 3px; padding: 1px 4px; }
.language-picker { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--text); }
.language-picker svg { width: 20px; height: 20px; }
#language-select { flex-shrink: 0; width: auto; min-width: 90px; max-width: 115px; min-height: 34px; padding: 6px 22px 6px 8px; border: 1px solid #aab4bf; border-radius: 4px; background: white; color: var(--text); font-size: 13px; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 1px solid #aab4bf; border-radius: 4px; background: white; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; min-height: 34px; }
.button:hover { background: #eef1f5; }
.button svg { width: 16px; height: 16px; }
main { padding: 0 16px; margin: auto; max-width: 2400px; }
.dataset-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 42px; font-size: 12px; color: var(--muted); }
#edition-date { white-space: nowrap; }
.stats { display: flex; align-items: center; gap: 18px; }
.stat { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.stat-number { font-size: 13px; font-weight: 650; color: var(--text); }

.workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 16px; align-items: start; }
.filters { padding: 11px 1px; }
.filter-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.filter-heading h2 { font-size: 15px; margin: 0; font-weight: 650; }
.text-button { padding: 2px 0; background: none; border: 0; color: var(--muted); font-size: 12px; text-decoration: underline; text-decoration-color: #7b8794; text-underline-offset: 3px; }
.text-button:hover { color: var(--blue); }
fieldset { border: 0; padding: 0; margin: 0 0 17px; }
legend, .field-label { font-size: 12px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 6px; }
.scope-options { display: flex; flex-direction: column; gap: 6px; }
.scope-option { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid #bac3ce; padding: 9px 8px; border-radius: 4px; cursor: pointer; }
.scope-option:has(input:checked) { border-color: #54739d; background: #f0f4fa; box-shadow: inset 2px 0 #54739d; }
.scope-option input { accent-color: var(--blue); margin: 0; width: 15px; height: 15px; flex-shrink: 0; }
.scope-option strong { display: block; font-size: 13px; font-weight: 500; line-height: 1.4; }
.field-label { margin-top: 16px; }
.filters select { width: 100%; font-size: 13px; padding: 7px 24px 7px 8px; border: 1px solid #aab4bf; border-radius: 4px; color: var(--text); background: white; min-height: 36px; cursor: pointer; }
.switch-row { display: flex; align-items: center; font-size: 13px; font-weight: 500; line-height: 1.5; margin: 18px 0 21px; gap: 8px; position: relative; cursor: pointer; }
.switch-row small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.switch-row input { position: absolute; right: 0; opacity: 0; width: 34px; height: 28px; z-index: 2; cursor: pointer; margin: 0; }
.switch { pointer-events: none; margin-left: auto; width: 32px; height: 20px; background: #66717e; border-radius: 20px; position: relative; flex-shrink: 0; }
.switch:after { content: ''; width: 14px; height: 14px; position: absolute; left: 3px; top: 3px; background: white; border-radius: 50%; transition: transform .15s; }
.switch-row input:checked + .switch { background: var(--blue); }
.switch-row input:checked + .switch:after { transform: translateX(12px); }
.switch-row input:focus-visible + .switch { outline: 3px solid #245bc4; outline-offset: 3px; }
.affiliation-key { border-top: 1px solid var(--line); padding-top: 12px; }
.affiliation-key h3 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 9px; }
.affiliation-key p { display: flex; align-items: center; gap: 7px; font-size: 12px; margin: 8px 0; }
.badge { font-size: 10px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; background: #edf0f3; color: #495361; border-radius: 3px; padding: 3px 4px; letter-spacing: .2px; line-height: 1.1; white-space: nowrap; }
.badge.cs { background: var(--blue-light); color: var(--blue); }
.badge.sci { background: var(--green-light); color: var(--green); }
.subtle { font-size: 12px; color: var(--muted); line-height: 1.6; }

.matrix-panel { min-width: 0; background: white; border: 1px solid #bbc4ce; border-radius: 5px; overflow: hidden; }
.matrix-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px 9px; gap: 10px; }
.matrix-toolbar h2 { font-size: 16px; font-weight: 650; margin: 0 0 3px; }
.matrix-toolbar p { font-size: 12px; margin: 0; color: var(--muted); }
.toolbar-actions { display: flex; align-items: center; gap: 7px; }
.search-box { display: flex; gap: 6px; align-items: center; background: white; border: 1px solid #aab4bf; border-radius: 4px; padding: 7px 8px; width: 290px; color: var(--muted); min-height: 36px; }
.search-box svg { width: 16px; height: 16px; }
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; font-size: 13px; color: var(--text); }
.search-box:focus-within { outline: 3px solid #245bc4; outline-offset: 1px; }
.search-box input:focus-visible { outline: 0; }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.icon-button { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #aab4bf; background: white; border-radius: 4px; font-size: 24px; color: var(--muted); }
.icon-button:hover { background: #eef1f5; }
.icon-button svg { width: 17px; height: 17px; }
.legend { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 0 14px 10px; font-size: 12px; color: var(--muted); }
.legend > span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend .text-button { margin-left: auto; font-size: 12px; }
.status-dot { display: inline-flex; align-items: center; justify-content: center; font-style: normal; width: 20px; height: 20px; border-radius: 4px; font-size: 14px; font-weight: 650; }
.direct { background: var(--green-light); color: var(--green); }
.conditional { background: var(--amber-light); color: var(--amber); }
.admission { background: var(--purple-light); color: var(--purple); }
.unavailable { background: #f5efed; color: #6d514a; }
.unclear { background: #fff0e4; color: #8c4217; }
.unknown { background: #f1f3f5; color: #59616a; }
.table-viewport { overflow: auto; height: calc(100dvh - 285px); min-height: 340px; scrollbar-color: #7a8796 #edf0f4; scrollbar-width: thin; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.pathway-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; table-layout: fixed; }
.pathway-table caption { position: absolute; clip: rect(0, 0, 0, 0); height: 1px; width: 1px; overflow: hidden; }
.master-label-column { width: 320px; }
.bachelor-data-column { width: 82px; }
.pathway-table thead th { position: sticky; top: 0; z-index: 5; background: #f6f7f9; color: var(--text); border-bottom: 1px solid #bac4d0; border-right: 1px solid var(--line); padding: 8px 6px; vertical-align: top; text-align: center; font-weight: 600; width: 82px; min-width: 82px; max-width: 82px; line-height: 1.4; height: 76px; }
.pathway-table thead th.cs-column { background: #f5f7fc; box-shadow: inset 0 3px var(--blue); }
.pathway-table thead th.sci-column { box-shadow: inset 0 3px var(--green); }
.pathway-table thead th.cs-column.sci-column { box-shadow: inset 0 3px var(--blue); }
.pathway-table thead th.matrix-corner { left: 0; top: 0; z-index: 7; text-align: left; width: 320px; min-width: 320px; max-width: 320px; background: #f6f7f9; padding: 10px 12px; vertical-align: bottom; border-right: 2px solid #bbc4ce; box-shadow: 2px 0 4px #20272e08; }
.pathway-table .bachelor-programme-groups th:not(.matrix-corner) { top: 0; z-index: 6; height: var(--programme-header-height); padding: 6px 9px; vertical-align: middle; background: #e9edf2; font-size: 12px; line-height: 21px; width: auto; min-width: 0; max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 2px solid #b4bfcb; }
.pathway-table thead:has(.bachelor-programme-groups) > tr:not(.bachelor-programme-groups) th { top: var(--programme-header-height); }
.corner-title { font-size: 13px; font-weight: 600; color: var(--text); display: block; line-height: 1.5; }
.corner-sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 5px; display: block; }
.col-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px; margin-bottom: 7px; }
.column-name { display: block; max-width: 100%; margin: auto; overflow-wrap: anywhere; hyphens: auto; }
.col-button { position: relative; font: inherit; padding: 0; color: inherit; border: 0; background: none; line-height: inherit; }
.col-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.pathway-table thead th:focus-within { z-index: 9; }
.column-full-name { display: none; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(calc(-50% + var(--tooltip-shift, 0px))); z-index: 12; width: max-content; max-width: 260px; padding: 8px 10px; border: 1px solid #20272e; border-radius: 4px; background: #20272e; color: white; box-shadow: 0 3px 10px #20272e33; font-size: 13px; font-weight: 500; line-height: 1.45; text-align: left; text-decoration: none; white-space: normal; overflow-wrap: normal; hyphens: none; pointer-events: none; }
.bachelor-major-headers th:focus-within .column-full-name { display: block; }
.bachelor-major-headers th:last-child .column-full-name { left: auto; right: 0; transform: translateX(var(--tooltip-shift, 0px)); }
.pathway-table tbody th { position: sticky; left: 0; background: white; border-right: 2px solid #bbc4ce; border-bottom: 1px solid var(--line); z-index: 3; text-align: left; padding: 6px 10px 6px 12px; font-weight: 500; box-shadow: 2px 0 4px #20272e08; line-height: 1.4; }
.row-name { display: block; margin: 0; line-height: 1.4; font-weight: 550; font-size: 13px; }
.row-name-button { display: block; width: 100%; text-align: left; color: inherit; font: inherit; line-height: inherit; border: 0; background: none; padding: 0; }
.row-name-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; width: 100%; }
.row-heading .row-name { flex: 1 1 auto; width: auto; min-width: 0; max-width: 100%; margin: 0; overflow-wrap: anywhere; white-space: normal; }
.row-badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; flex: 0 1 auto; max-width: 100%; white-space: normal; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.pathway-table tbody td { padding: 0; border-right: 1px solid #d9dee5; border-bottom: 1px solid var(--line); height: 36px; text-align: center; background: white; }
.pathway-table tbody tr:hover > td, .pathway-table tbody tr:hover > th { background: #f2f5f9; }
.pathway-table tbody th.cs-row { border-left: 3px solid var(--blue); padding-left: 9px; }
.pathway-table tbody th.sci-row:not(.cs-row) { border-left: 3px solid var(--green); padding-left: 9px; }
.cell-button { background: none; color: inherit; border: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 34px; position: relative; padding: 4px; }
.cell-button .status-dot { width: 29px; height: 27px; font-size: 18px; border: 1px solid transparent; }
.cell-button:hover .status-dot, .cell-button:focus-visible .status-dot { border-color: currentColor; }
.cell-button .unknown { font-size: 24px; background: transparent; color: #616c78; }
.cell-button.dimmed .status-dot { background: #f1f3f5; color: #59616a; }
.inherit-marker { font-size: 12px; position: absolute; right: calc(50% - 25px); top: calc(50% - 16px); color: var(--muted); }
.pathway-table .programme-group th { background: #e9edf2 !important; padding: 6px 12px !important; font-size: 13px !important; font-weight: 650 !important; z-index: 4 !important; white-space: normal; color: var(--text); border-top: 1px solid #aab5c2; border-bottom: 1px solid #bcc6d1 !important; }
.pathway-table .programme-group td { height: 36px; vertical-align: middle; background: #e9edf2 !important; border-top: 1px solid #aab5c2; border-bottom: 1px solid #bcc6d1 !important; }
.programme-group .cell-button { min-height: 34px; padding: 3px 4px; }
.programme-group th button[data-master] { display: block; min-width: 0; width: auto; padding: 0; border: 0; background: none; color: inherit; font: inherit; line-height: 1.4; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.programme-group th button[data-master]:hover { text-decoration: underline; text-underline-offset: 3px; }
.pathway-table td.inherited-cell { background: white; }
.pathway-table td.group-spacer { background: #f1f4f7; }
.pathway-table .major-row.has-children > th { background: #f1f4f7; }
.major-row.has-children .row-name { font-weight: 600; }
.pathway-table .track-row th { padding-left: 27px !important; }
.track-row .row-name { font-size: 13px; font-weight: 400; }
.track-row .row-name:before { content: '↳'; margin-right: 5px; color: var(--muted); }
.track-row { height: 34px; }
.track-row td { height: 34px; }
.track-row .cell-button { height: 100%; min-height: 33px; }
.track-row .status-dot { width: 27px; height: 25px; font-size: 17px; }
.pathway-table td.merged-cell { position: relative; vertical-align: middle; border-right-color: #c3cdd8; border-bottom: 1px solid #aebac8; }
.merged-cell .cell-button { position: absolute; inset: 0; height: 100%; min-height: 0; padding: 4px; }
.shared-rule-label { display: block; max-width: 104px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.35; white-space: normal; }
.pathway-table .programme-admission th { font-size: 12px; color: var(--muted); font-weight: 500; background: #f7f8fa; }
.pathway-table td.admission-summary-cell, .pathway-table .programme-admission td { text-align: left; vertical-align: middle; padding: 9px 14px; background: #f7f8fa; color: var(--muted); font-size: 12px; line-height: 1.5; }
.admission-summary-cell button, .programme-admission td button { color: var(--blue); background: none; border: 0; padding: 0; font-size: 12px; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.admission-summary-cell .status-dot, .programme-admission td .status-dot { margin-right: 5px; vertical-align: middle; }
.matrix-footer { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); gap: 10px; }
.scroll-hint { white-space: nowrap; }
.scroll-hint span { font-size: 16px; margin-left: 6px; color: var(--muted); }
.coverage-note { display: flex; gap: 8px; align-items: flex-start; background: #f7f8fa; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); }
.coverage-note svg { width: 15px; height: 15px; margin-top: 2px; }
.coverage-note p { font-size: 12px; line-height: 1.5; margin: 0; }
.coverage-note strong { font-weight: 600; color: var(--text); }
.page-footer { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 12px; padding: 10px 0; line-height: 1.5; }

.content-panel { background: white; border: 1px solid var(--line); padding: 24px; border-radius: 5px; min-height: 400px; }
.content-panel h2 { font-size: 23px; font-weight: 650; margin: 0 0 24px; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.section-heading .button { margin-bottom: 20px; }
.source-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.source-card { border: 1px solid var(--line); border-radius: 4px; padding: 14px; }
.source-card h3 { font-size: 15px; font-weight: 600; line-height: 1.5; margin: 5px 0 7px; }
.source-card a { color: var(--blue); text-decoration-color: #6985ac; }
.source-card p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 6px 0 0; }
.source-card .source-url { overflow-wrap: anywhere; color: var(--muted); }
.source-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.source-kind { text-transform: uppercase; }
.gaps-section { margin-bottom: 20px; }
.gaps-section summary { font-size: 14px; font-weight: 600; cursor: pointer; padding: 12px 14px; background: #fff8e8; border: 1px solid #d8bf85; border-radius: 4px; color: #705017; }
.gap-list { border: 1px solid #d8bf85; border-top: 0; border-radius: 0 0 4px 4px; padding: 8px 16px; }
.gap-item { font-size: 14px; line-height: 1.7; padding: 10px 0; border-bottom: 1px solid var(--line); }
.gap-item:last-child { border: 0; }
.gap-item p { margin: 0 0 5px; }
.gap-item a { font-size: 13px; margin-right: 12px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1250px; }
.about-grid h3 { font-size: 16px; font-weight: 650; margin: 18px 0 8px; }
.about-grid p { font-size: 15px; color: var(--muted); line-height: 1.7; }
.about-status { display: flex; gap: 10px; margin-bottom: 14px; }
.about-status .status-dot { width: 27px; height: 27px; flex-shrink: 0; font-size: 18px; }
.about-status strong { font-size: 15px; font-weight: 600; }
.about-status p { font-size: 14px; margin: 3px 0 0; line-height: 1.6; }
.data-links { background: #f5f7f9; border: 1px solid var(--line); border-radius: 4px; padding: 0 16px 12px; margin-top: 20px; }
.data-links a { display: block; font-size: 14px; margin: 9px 0; }
.loading, .empty-state { padding: 65px 25px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-state strong { display: block; color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.empty-state button { margin-top: 16px; }
.error-panel { padding: 20px; background: #fff0e4; border: 1px solid #d4ab8b; color: #8c4217; border-radius: 4px; margin: 16px 0; line-height: 1.7; }

dialog { position: fixed; inset: 0 0 0 auto; margin: 0; max-height: 100dvh; height: 100dvh; width: 560px; max-width: 100vw; border: 0; border-left: 1px solid #bac4cf; padding: 30px 25px 24px; color: var(--text); background: white; box-shadow: -8px 0 30px #1822311f; overflow: auto; }
dialog::backdrop { background: #19253566; }
.dialog-close { position: absolute; right: 14px; top: 14px; background: #f5f7f9; border-color: #aab4bf; width: 34px; height: 34px; font-size: 24px; }
.detail-eyebrow { font-size: 12px; color: var(--muted); font-weight: 600; margin: 10px 0 17px; }
.route-origin { background: #f5f7f9; border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; }
.route-origin span:first-child { font-size: 12px; color: var(--muted); }
.route-origin h3 { font-size: 16px; font-weight: 600; margin: 5px 0; }
.detail-arrow { font-size: 22px; margin: 7px 13px; color: var(--muted); }
#detail-title { font-size: 24px; font-weight: 650; line-height: 1.35; margin: 5px 0 7px; }
.detail-programme { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0 0 10px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 17px; }
.detail-status { padding: 12px; background: #f5f7f9; border: 1px solid var(--line); border-radius: 4px; display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.detail-status .status-dot { width: 27px; height: 27px; font-size: 18px; flex-shrink: 0; }
.detail-status.direct { background: #f3f9f4; border-color: #a8c4b1; }
.detail-status.conditional { background: #fffaee; border-color: #d8c692; }
.detail-status.admission { background: #f8f5fc; border-color: #c5b4d8; }
.detail-status.unknown { background: #f5f7f9; border-color: var(--line); }
.detail-section { margin: 20px 0; }
.detail-section h3 { font-size: 14px; font-weight: 650; color: var(--text); margin: 0 0 9px; }
.detail-section p { font-size: 15px; line-height: 1.7; color: var(--text); margin: 8px 0; }
.condition-list { list-style: none; padding: 0; margin: 0; }
.condition-list li { padding: 10px 0; font-size: 15px; line-height: 1.7; border-bottom: 1px solid var(--line); color: var(--text); }
.condition-list li:last-child { border-bottom: 0; }
.condition-type { display: block; font-size: 12px; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.condition-list summary { cursor: pointer; font-size: 13px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.detail-source { border: 1px solid var(--line); border-radius: 4px; padding: 11px 13px; margin: 8px 0; }
.detail-source a { font-size: 14px; font-weight: 500; line-height: 1.6; }
.detail-source p { font-size: 12px; margin: 5px 0 0; color: var(--muted); }
.detail-note { font-size: 14px; line-height: 1.6; border-left: 3px solid #8597ac; background: #f4f6f9; padding: 10px 12px; color: var(--muted); margin: 13px 0; }
.detail-note.warning { background: #fff8e8; border-color: #b78a30; color: #705017; }
.detail-actions { display: flex; gap: 7px; margin-top: 22px; flex-wrap: wrap; }
.detail-actions .button { font-size: 13px; }
.small-code { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .topbar { padding: 8px 16px 0; gap: 0 12px; flex-wrap: wrap; }
  .topbar nav { order: 3; width: 100%; justify-content: center; min-height: 42px; }
  .nav-tab { padding: 0 10px; min-height: 42px; }
  .download-top { margin-left: auto; }
  .workspace { grid-template-columns: 226px minmax(0, 1fr); gap: 12px; }
  .stats { gap: 12px; }
  .search-box { width: 245px; }
  .matrix-toolbar { flex-wrap: wrap; }
  .toolbar-actions { flex: 1; }
  .toolbar-actions .search-box { flex: 1; }
  .legend { gap: 8px 12px; }
  .legend .text-button { margin-left: 0; }
  .table-viewport { height: calc(100dvh - 325px); }
}
@media (max-width: 850px) {
  .topbar { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .brand { font-size: 14px; }
  .topbar nav { order: 3; width: 100%; justify-content: center; min-height: 42px; }
  .nav-tab { min-height: 42px; font-size: 13px; }
  .download-top { margin-left: auto; }
  .dataset-bar { align-items: flex-start; flex-direction: column; gap: 6px; padding: 10px 0; }
  #edition-date { white-space: normal; }
  .stats { gap: 8px 14px; flex-wrap: wrap; }
  .workspace { grid-template-columns: 1fr; gap: 10px; }
  .filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; padding: 5px 0; }
  .filter-heading { grid-column: 1 / -1; margin-bottom: 11px; }
  .scope-fieldset { grid-column: 1 / -1; margin-bottom: 2px; }
  .scope-options { flex-direction: row; }
  .scope-option { flex: 1; min-width: 0; padding: 8px; }
  .filters .field-label { grid-row: 3; margin-top: 12px; }
  .filters > select { grid-row: 4; }
  .switch-row { grid-column: 1 / -1; justify-self: start; gap: 14px; margin: 12px 0 3px; }
  .switch { margin-left: 0; }
  .switch-row small { display: none; }
  .affiliation-key { display: none; }
  .table-viewport { height: 65dvh; min-height: 340px; }
  .legend .text-button { margin-left: auto; }
  .about-grid { gap: 25px; }
  .source-list { grid-template-columns: 1fr; }
  .matrix-toolbar { padding: 10px 12px; }
  .toolbar-actions { flex: initial; }
  .search-box { width: 260px; }
}
@media (max-width: 540px) {
  main { padding: 0 10px; }
  .topbar { padding: 10px 10px 0; }
  .brand { font-size: 13px; }
  .brand-divider { margin: 0 3px; }
  .topbar nav { flex: 0 0 calc(100% - 42px); width: calc(100% - 42px); min-width: 0; justify-content: flex-start; }
  .nav-tab { padding: 0 8px; }
  .download-top { order: 4; flex-shrink: 0; font-size: 0; padding: 5px; width: 30px; min-height: 30px; gap: 0; }
  .download-top:after { content: '↓'; font-size: 18px; line-height: 1; }
  .stats { gap: 6px 12px; }
  .filters { grid-template-columns: 1fr 1fr; gap: 0 9px; }
  .scope-options { flex-direction: column; gap: 5px; }
  .scope-option { padding: 8px; gap: 8px; }
  .scope-fieldset { margin-bottom: 4px; }
  .filters .field-label[for="status-filter"] { grid-row: 5; grid-column: 1 / -1; }
  .filters #status-filter { grid-row: 6; grid-column: 1 / -1; }
  .filters .field-label { margin-top: 10px; }
  .filter-heading { margin-bottom: 9px; }
  .switch-row { margin: 12px 0 2px; }
  .matrix-toolbar { display: block; padding: 12px 10px 10px; }
  .toolbar-actions { margin-top: 9px; }
  .search-box { width: auto; flex: 1; }
  .legend { padding: 0 10px 9px; gap: 7px 12px; }
  .legend .text-button { width: 100%; text-align: left; margin: 2px 0 0; }
  .master-label-column { width: 196px; }
  .bachelor-data-column { width: 80px; }
  .pathway-table thead th.matrix-corner { width: 196px; min-width: 196px; max-width: 196px; padding: 10px; }
  .pathway-table thead th { width: 80px; min-width: 80px; max-width: 80px; padding: 8px 5px; }
  .pathway-table tbody th { padding: 6px 9px 6px 10px; }
  .pathway-table tbody th.cs-row, .pathway-table tbody th.sci-row:not(.cs-row) { padding-left: 7px; }
  .pathway-table .programme-group th { padding: 6px 9px !important; }
  .matrix-footer { padding: 8px 10px; align-items: flex-start; }
  .scroll-hint { font-size: 0; }
  .scroll-hint span { font-size: 18px; margin: 0; }
  .coverage-note { padding: 8px 10px; }
  .page-footer { display: block; padding: 9px 0; }
  .page-footer > span { display: block; margin: 4px 0; }
  .content-panel { padding: 18px 14px; }
  .content-panel h2 { font-size: 22px; line-height: 1.3; margin-bottom: 18px; }
  .about-grid { grid-template-columns: 1fr; gap: 0; }
  .section-heading { display: block; }
  .section-heading > .button { margin-bottom: 16px; }
  .source-card { padding: 12px; }
  .source-meta { flex-wrap: wrap; gap: 5px; }
  dialog { padding: 30px 18px 24px; }
  #detail-title { font-size: 22px; }
  .pathway-table .track-row th { padding-left: 22px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
