/**
 * HealthOS ICU public site.
 * Light landing design aligned with HealthOS Anaesthesia/Onco, while retaining ICU-specific
 * filters, conformance, terms, learning, Mermaid and PlantUML behaviours.
 */

:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #fff;
  --surface-soft: #eef1f8;
  --surface-strong: #e5e9f5;
  --ink: #151827;
  --muted: #5f677a;
  --line: #cdd3e2;
  --accent: #4338ca;
  --accent-dark: #312e81;
  --accent-soft: rgba(67, 56, 202, .08);
  --link: #312e81;
  --link-hover: #6d28d9;
  --good: #20744e;
  --warn: #a66a16;
  --danger: #b42336;
  --shadow: 0 18px 50px rgba(24, 27, 55, .12);
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body { overflow-x: hidden; }

a {
  color: var(--link);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(67, 56, 202, .42);
  text-underline-offset: .17em;
}
a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

p { margin: 0 0 .9rem; }
main p, main li { color: #334052; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin-bottom: .3rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

main h1:not(.hero h1),
main h2 {
  margin-top: 2.4rem;
  line-height: 1.15;
}

main h1:not(.hero h1) { font-size: clamp(2rem, 4vw, 3.2rem); }
main h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); }
main h3 { line-height: 1.2; }
h4 { color: var(--muted); }

.page-content h1[id],
.page-content h2[id],
.page-content h3[id],
.page-content h4[id],
.page-content h5[id],
.page-content h6[id] {
  scroll-margin-top: 5rem;
}

blockquote {
  margin: 1rem 0;
  padding: .8rem 1rem;
  border-left: 5px solid var(--accent);
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .88em;
  color: var(--accent-dark);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .08rem .3rem;
}

pre {
  background: #f0f3fa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin: 1rem 0;
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-size: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .92rem;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: .75rem .85rem;
  vertical-align: top;
  text-align: left;
}

th {
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 760;
}

td { color: #334052; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: .65rem .9rem;
  background: var(--ink);
  color: white;
  border-radius: 6px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 251, .93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: .75rem clamp(.55rem, 2vw, 1rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 760;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: contain;
  background: white;
  padding: 2px;
}

.brand:hover { color: var(--accent-dark); text-decoration: none; }

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  flex-wrap: nowrap;
  font-size: .84rem;
  min-width: 0;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  padding: .35rem .1rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 760; }

/* §2.16: mobile "burger" menu — hidden on desktop, collapses the 12-item nav on narrow screens
   instead of letting it wrap into a second header row. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
}

/* §2.15: persistent header call-to-action, before the language switcher. */
.btn-header-cta {
  min-height: 34px;
  padding: .4rem .8rem;
  font-size: .86rem;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: .32rem .62rem;
  border-radius: 999px;
  background: #22c55e;
  color: white;
  font-size: .74rem;
  font-weight: 820;
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
}

.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: white;
}

.lang-switcher a {
  padding: .32rem .55rem;
  text-decoration: none;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 700;
}

.lang-switcher a.active { background: var(--ink); color: white; }

.container {
  /* в сетке оболочки автоотступы сжимают блок по содержимому — держим полную колонку */
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  /* поля совпадают с первым экраном: текст страниц стоит по той же вертикали */
  padding: clamp(1.2rem, 5vw, 3.5rem) max(clamp(1rem, 4vw, 2rem), calc((100vw - 1600px) / 2 + 2rem));
}

.page-content {
  max-width: 52rem;
  margin: 0 auto;
}

.page-content.wide { max-width: 100%; }
.page-content .lead {
  max-width: 1040px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  color: #334052;
}

.hero {
  min-height: min(600px, calc(100vh - 190px));
  width: 100vw;
  margin: calc(-1 * clamp(1.2rem, 5vw, 3.5rem)) calc(50% - 50vw) 0;
  padding: clamp(3rem, 8vw, 5rem) max(clamp(1rem, 4vw, 2rem), calc((100vw - 1600px) / 2 + 2rem)) clamp(1.5rem, 4vw, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  background-image: linear-gradient(90deg, rgba(17, 19, 56, .95) 0%, rgba(31, 29, 76, .80) 52%, rgba(50, 35, 96, .36) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}

.hero > * {
  width: min(66.666vw, 945px);
  max-width: 100%;
}

.hero .eyebrow { color: #dcd9ff; }

.hero h1 {
  margin: 0;
  max-width: none;
  color: white;
  font-size: clamp(2rem, 7.2vw, 4.7rem);
  line-height: .95;
  letter-spacing: 0;
}

.hero .lead {
  margin-top: 1rem;
  color: white;
  max-width: 820px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.2rem;
}

.hero-microcopy {
  margin-top: 1rem;
  max-width: 760px;
  color: white;
  font-size: .95rem;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.hero-tags a { text-decoration: none; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #dcd9ff; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: .3rem .75rem; box-shadow: 0 0 14px rgba(67,56,202,.45); }
.hero-tags a:hover { border-color: rgba(255,255,255,.45); }

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 6px;
  padding: .65rem .95rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
}

.btn:hover,
button:hover {
  border-color: var(--accent);
  color: var(--ink);
  text-decoration: none;
}

.btn.primary,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn.primary:hover,
button.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
}

.hero .btn:not(.primary) { background: rgba(255, 255, 255, .88); }
.hero .btn.primary { box-shadow: 0 14px 34px rgba(20, 18, 60, .28); }
button:disabled { opacity: .45; cursor: not-allowed; }

.panel,
.panel-alt,
.track-card,
.learning-cta-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

/* Карточка программы: кнопка прижата к нижнему краю и стоит по центру. */
.track-card { display: flex; flex-direction: column; }

.panel-alt { background: var(--surface-soft); }

/* Новости: каждая новость — плашка того же семейства, что записи каталога источников. */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: .85rem;
  margin: 1.5rem 0;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
}
.news-card:hover { border-color: var(--accent); }
.news-card .date {
  align-self: flex-start;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: .18rem .6rem;
  margin-bottom: .55rem;
}
.news-card b { font-size: 1.02rem; line-height: 1.3; margin-bottom: .35rem; }
.news-card .teaser { color: #334052; font-size: .94rem; }
.news-card .text-link {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: auto;
  padding-top: .8rem;
  font-weight: 750;
  color: var(--accent-dark);
}

.card-grid,
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .85rem;
  margin: 1.5rem 0;
}

.board-item {
  display: block;
  min-height: 100%;
  padding: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 120ms, background 120ms;
}

.board-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  text-decoration: none;
}

.board-item h3,
.track-card h3 {
  margin: 0 0 .45rem;
  font-size: 1.05rem;
}

.board-item p,
.track-card p {
  margin: 0;
  color: #334052;
  font-size: .96rem;
}

.board-item p {
  font-weight: 400;
}

.track-card .track-meta {
  margin-bottom: .5rem;
  color: var(--muted);
  font-size: .86rem;
}

.track-card .btn { margin-top: auto; align-self: center; }

/* §2.6: one system-wide rule for the bottom-left action link inside a card/proof box, instead
   of every future page re-adding the same two declarations by hand. */
.card .text-link,
.proofs a .text-link,
.board-item .text-link,
.track-card .text-link {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: auto;
  align-self: flex-start;
  padding-top: .6rem;
  font-weight: 720;
  color: var(--link);
  text-decoration: none;
}
.card .text-link:hover,
.proofs a .text-link:hover,
.board-item .text-link:hover,
.track-card .text-link:hover { color: var(--link-hover); }

/* Eyebrow line above H1 — course/program pages print "Обучение · Курс · <КОД>" here (§2.5). */
.eyebrow {
  margin: 0 0 .5rem;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--accent-dark);
}

.learning-cta-panel {
  margin: 2rem 0;
  text-align: center;
}

.learning-cta-panel p {
  width: 84%;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@media (max-width: 720px) {
  .learning-cta-panel p {
    width: 100%;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--muted);
  background: white;
  white-space: nowrap;
}

.pill.implemented,
.pill.severity-success {
  color: var(--good);
  border-color: rgba(32, 116, 78, .38);
  background: rgba(32, 116, 78, .08);
}

.pill.partial,
.pill.severity-warning {
  color: var(--warn);
  border-color: rgba(166, 106, 22, .38);
  background: rgba(166, 106, 22, .08);
}

.pill.planned,
.pill.severity-info,
.pill.standard {
  color: var(--accent-dark);
  border-color: rgba(67, 56, 202, .38);
  background: rgba(67, 56, 202, .08);
}

.pill.regulator,
.pill.guidance {
  color: #8a4c13;
  border-color: rgba(166, 106, 22, .35);
  background: rgba(166, 106, 22, .08);
}

.pill.vendor {
  color: var(--good);
  border-color: rgba(32, 116, 78, .35);
  background: rgba(32, 116, 78, .08);
}

.pill.research {
  color: #6d28d9;
  border-color: rgba(109, 40, 217, .35);
  background: rgba(109, 40, 217, .08);
}

.pill.not_applicable,
.pill.referenced_only {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-soft);
}

.pill.severity-critical,
.pill.severity-error {
  color: var(--danger);
  border-color: rgba(180, 35, 54, .38);
  background: rgba(180, 35, 54, .08);
}

.status-banner {
  margin-bottom: 1.5rem;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.status-banner.warning { border-left-color: var(--warn); }

.sources-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 1.25rem;
}

.sources-filters label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: .86rem;
}

.sources-filters select,
.sources-filters input {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  line-height: 38px;
}

.source-row,
.term-entry,
.conformance-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.25rem;
  margin-bottom: 8px;
}

.source-row {
  display: grid;
  gap: .35rem;
  cursor: pointer;
}

.source-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.source-row-title,
.conformance-entry-title {
  font-size: .94rem;
  font-weight: 720;
}

.source-row-meta,
.conformance-entry-scope,
.track-card .track-meta {
  color: var(--muted);
}

.source-row-meta,
.conformance-entry-impl,
.conformance-entry-scope {
  font-size: .86rem;
}

.source-row-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* §2.2: plashki grouped in a bordered frame with a small caption below the row (not a duplicated pill). */
.entry-head { display: flex; flex-direction: column; align-items: stretch; gap: .45rem; }
/* Плашки записи каталога: отдельной строкой под заголовком и по правому краю плашки. */
.source-row-head > .entry-head { flex: 1 1 100%; min-width: 0; }
.source-row .source-row-pills { width: 100%; justify-content: flex-end; }
.pill-group {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .3rem .4rem .2rem;
}
.pill-group .pill { margin: 0; }
.pill-row { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pill-key {
  font-size: .68rem;
  line-height: 1;
  color: var(--muted);
  padding-left: .1rem;
}

.source-detail {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  gap: 10px;
  cursor: default;
}

.conformance-detail {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  color: var(--muted);
  font-size: .86rem;
}

.source-row.expanded .source-detail { display: grid; }
.conformance-detail .impl { color: var(--good); }
.conformance-detail .scope { color: var(--danger); }

.source-row-refs,
.source-status-line {
  color: var(--muted);
  font-size: .86rem;
}

.source-status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.terms-filters { grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr); }
.terms-list { margin-top: .5rem; }
.terms-section { margin-bottom: 2rem; }
.terms-section h2 {
  margin: 0 0 .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.35rem;
}

.term-entry h3 {
  margin: 0 0 .5rem;
  font-size: .98rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.conformance-matrix { margin: 1.5rem 0; }
.conformance-group { margin-bottom: 2rem; }
.conformance-group h3 {
  margin-bottom: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .06em;
}

.conformance-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
}

.conformance-entry-body {
  display: grid;
  gap: .4rem;
}

.conformance-entry-refs {
  color: var(--muted);
  font-size: .78rem;
}

.conformance-entry-refs a {
  color: var(--accent-dark);
  font-size: .78rem;
}

figure.diagram {
  margin: 1.5rem 0;
  text-align: center;
}

/* §2.10: converted Mermaid diagrams are embedded SVG inside figure.diagram — this keeps them
   from forcing horizontal scroll on mobile the way .mermaid-wrap's fixed min-width did. */
figure.diagram svg { max-width: 100%; height: auto; }

figure.platform-visual {
  margin: 1.5rem 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

figure.platform-visual img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

figure.diagram-plantuml img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

figure figcaption {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .86rem;
  text-align: center;
}

pre.diagram-error {
  border-color: var(--danger);
  color: var(--danger);
}

.tab-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  padding: 8px 14px;
  border-radius: 7px 7px 0 0;
  color: var(--muted);
  font-size: .92rem;
  cursor: pointer;
}

.tab-button:hover { color: var(--ink); background: var(--surface-soft); }
.tab-button.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: var(--line);
}

.section { display: grid; gap: .75rem; }
.section h3 { margin: 0; font-size: .95rem; }

.ref-row {
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-size: .92rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 1.2rem clamp(1rem, 4vw, 2rem);
  background: linear-gradient(90deg, rgba(17, 19, 56, .98) 0%, rgba(31, 29, 76, .98) 52%, rgba(50, 35, 96, .98) 100%);
  color: rgba(236, 241, 255, .82);
}

/* §2.15/Р10: footer in columns (brand + Audiences/Learning/Sources) instead of one text line. */
.site-footer__inner {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 1.5rem 1.25rem;
}

.site-footer__col { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.site-footer__col h4 {
  margin: 0 0 .3rem;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .55);
}
.site-footer__col--brand { gap: .9rem; }

.site-footer__meta { min-width: 0; }
.site-footer__logos {
  --footer-badge-slot: 3.625rem;
  --footer-badge-gap: .425rem;
  display: grid;
  grid-template-columns: repeat(4, var(--footer-badge-slot));
  align-items: center;
  justify-content: start;
  column-gap: var(--footer-badge-gap);
}
.site-footer__logos img {
  display: block;
  width: auto;
  height: 24px;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .32));
}

.site-footer a {
  font-weight: 400;
  color: rgba(255, 255, 255, .92);
  text-decoration-color: rgba(255, 255, 255, .35);
}
.site-footer a:hover {
  color: #c4b5fd;
  text-decoration-color: currentColor;
}

.error-page {
  max-width: 28rem;
  margin: 6rem auto;
  text-align: center;
}

.error-page h1 {
  margin-bottom: .5rem;
  color: var(--line);
  font-size: 56px;
}

@media (max-width: 1100px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
  }
  .site-footer__logos {
    --footer-badge-slot: 3rem;
    --footer-badge-gap: .325rem;
    justify-content: start;
  }
}

@media (max-width: 1400px) {
  /* §2.16: burger menu instead of the 12-item nav wrapping into extra header rows. */
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    justify-items: stretch;
    position: relative;
  }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: .5rem;
    padding: .4rem .9rem .8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .6rem 0; border-bottom: 1px solid var(--surface-soft); white-space: normal; }
  .site-nav a:last-child { border-bottom: 0; }

  .hero {
    min-height: 500px;
    background-position: 60% center;
  }
  .hero > * { width: 100%; }
  .card-grid,
  .tracks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conformance-entry { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .brand { font-size: .95rem; }
  .site-nav { gap: .35rem; font-size: .86rem; }
  .hero h1 { font-size: clamp(1.9rem, 10vw, 3rem); white-space: normal; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .card-grid,
  .tracks-grid,
  .sources-filters,
  .terms-filters { grid-template-columns: 1fr; }
  .conformance-detail { grid-template-columns: 1fr; }
  th, td { display: block; width: 100%; }
  tr { border-bottom: 1px solid var(--line); }
}
