/* ==========================================================================
   AERP Changelog — stylesheet
   Light and dark are both first-class: every colour is a token, and the dark
   block only redefines tokens. No component rule hard-codes a colour.
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #f6f7f9;
  --bg-elevated: #ffffff;
  --bg-sunken: #eceef1;
  --bg-hover: #f0f2f5;
  --bg-active: #e6eefb;

  --text: #16191d;
  --text-muted: #5b6472;
  --text-subtle: #869099;

  --border: #dfe3e8;
  --border-strong: #c6ccd4;

  --accent: #0366d6;
  --accent-hover: #0257b8;
  --accent-soft: #e6f0fc;
  --accent-text: #ffffff;

  --c-feat: #1a7f37;
  --c-fix: #cf222e;
  --c-perf: #9a6700;
  --c-security: #bc4c00;
  --c-api: #6639ba;
  --c-db: #0969da;
  --c-ui: #bf3989;
  --c-i18n: #1b7c83;
  --c-refactor: #6e7781;
  --c-docs: #0550ae;
  --c-test: #57606a;
  --c-build: #7d4e00;
  --c-ci: #8250df;
  --c-deps: #0a7ea4;
  --c-revert: #82071e;
  --c-chore: #6e7781;
  --c-other: #57606a;
  --c-breaking: #a40e26;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(16 22 26 / 6%), 0 1px 3px rgb(16 22 26 / 4%);
  --shadow-md: 0 4px 12px rgb(16 22 26 / 10%);
  --shadow-lg: 0 12px 36px rgb(16 22 26 / 18%);

  --header-height: 60px;
  --sidebar-width: 268px;
  --content-max: 1520px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d1117;
  --bg-elevated: #151b23;
  --bg-sunken: #010409;
  --bg-hover: #1c232c;
  --bg-active: #16283f;

  --text: #e6edf3;
  --text-muted: #9198a1;
  --text-subtle: #6d757e;

  --border: #2a313c;
  --border-strong: #3d444d;

  --accent: #4493f8;
  --accent-hover: #6cb0ff;
  --accent-soft: #12233b;
  --accent-text: #05080d;

  --c-feat: #3fb950;
  --c-fix: #f85149;
  --c-perf: #d29922;
  --c-security: #db6d28;
  --c-api: #a371f7;
  --c-db: #58a6ff;
  --c-ui: #db61a2;
  --c-i18n: #39c5cf;
  --c-refactor: #8b949e;
  --c-docs: #58a6ff;
  --c-test: #8b949e;
  --c-build: #e3b341;
  --c-ci: #bc8cff;
  --c-deps: #39c5cf;
  --c-revert: #ff7b72;
  --c-chore: #8b949e;
  --c-other: #8b949e;
  --c-breaking: #ff7b72;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-md: 0 4px 14px rgb(0 0 0 / 45%);
  --shadow-lg: 0 16px 40px rgb(0 0 0 / 60%);
}

/* --------------------------------------------------------------- base ---- */

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code, kbd {
  font-family: var(--mono);
  font-size: .86em;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  transition: top .15s;
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------- header ---- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 15px;
}

.brand-sub {
  color: var(--text-subtle);
  font-weight: 450;
}

.search-shell {
  position: relative;
  flex: 1;
  max-width: 560px;
  margin-inline: auto;
}

.search-shell svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

#search {
  width: 100%;
  height: 36px;
  padding: 0 40px 0 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
}

#search::placeholder { color: var(--text-subtle); }

#search:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 3px;
  pointer-events: none;
}

kbd {
  min-width: 20px;
  padding: 2px 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-sunken);
  color: var(--text-subtle);
  font-size: 10.5px;
  line-height: 1.3;
  text-align: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  transition: background .12s, color .12s;
}

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

.icon-button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Show the theme you would switch TO, not the one you are already in. */
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

#menu-toggle { display: none; }

/* ------------------------------------------------------------ layout ---- */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 24px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 16px 64px;
}

/* ----------------------------------------------------------- sidebar ---- */

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.repo-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 22px;
}

.repo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  transition: background .12s;
}

.repo-item:hover { background: var(--bg-hover); }

.repo-item[aria-current="true"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  font-weight: 600;
}

.repo-item-body {
  flex: 1;
  min-width: 0;
}

.repo-item-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.repo-item-meta {
  display: block;
  font-size: 11px;
  color: var(--text-subtle);
}

.repo-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.repo-item[aria-current="true"] .repo-count {
  background: var(--accent);
  color: var(--accent-text);
}

.sidebar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 2px;
}

.stat-tile {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.stat-value {
  display: block;
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* -------------------------------------------------------------- main ---- */

.content { min-width: 0; }

.content-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.content-title {
  margin: 0;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -.015em;
}

.content-subtitle {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.content-subtitle a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------ filters --- */

.filters {
  position: sticky;
  top: calc(var(--header-height) + 1px);
  z-index: 40;
  margin: 0 -4px 16px;
  padding: 10px 4px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12.5px;
  white-space: nowrap;
  transition: border-color .12s, color .12s, background .12s;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 12%, var(--bg-elevated));
  font-weight: 600;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.chip-count {
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.chip.chip-reset {
  margin-left: auto;
  color: var(--text-subtle);
}

.filter-summary {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-subtle);
}

/* ------------------------------------------------------------ release --- */

.release-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.release {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  scroll-margin-top: calc(var(--header-height) + 80px);
}

.release:target,
.release.is-highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg-sunken) 45%, transparent), transparent);
}

.version-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
}

.version-tag:hover { text-decoration: none; background: var(--accent-hover); }

.repo-tag {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12px;
}

.repo-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.release-date {
  color: var(--text-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.release-head-spacer { flex: 1; }

.release-actions {
  display: flex;
  gap: 2px;
}

.release-body { padding: 14px 18px 16px; }

.headline {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: var(--text);
}

.summary-block {
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.summary-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

.summary-block ul { margin: 0; padding-left: 18px; }
.summary-block li { margin: 2px 0; }

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}

.stat-strip b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.diff-add { color: var(--c-feat); font-variant-numeric: tabular-nums; }
.diff-del { color: var(--c-fix); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------- change list --- */

.section { margin-bottom: 14px; }
.section:last-child { margin-bottom: 0; }

.section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .01em;
}

.section-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 15%, transparent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.changes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.change {
  display: flex;
  gap: 9px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: background .12s;
}

.change:hover { background: var(--bg-hover); }

.change-marker {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: currentColor;
}

.change-main { min-width: 0; flex: 1; }

.change-text {
  color: var(--text);
  overflow-wrap: anywhere;
}

.scope {
  font-weight: 650;
  color: var(--text);
}

.change-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-subtle);
}

.change-body {
  margin: 3px 0 0;
  padding-left: 9px;
  border-left: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.sha {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
}

a.sha:hover { color: var(--accent); text-decoration: none; background: var(--accent-soft); }

.person {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

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

.avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-sunken);
  object-fit: cover;
}

.pill {
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--text-subtle);
}

.pill-breaking {
  border-color: var(--c-breaking);
  color: var(--c-breaking);
  font-weight: 650;
}

/* ---------------------------------------------------------- footer -------- */

.release-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-subtle);
}

.people-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.people-label {
  font-weight: 600;
  color: var(--text-muted);
}

details.file-list {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

details.file-list > summary {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-muted);
  user-select: none;
}

details.file-list > summary:hover { color: var(--text); }
details.file-list[open] > summary { border-bottom: 1px solid var(--border); }

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  font-size: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.file-row:last-child { border-bottom: none; }

.file-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  unicode-bidi: isolate;
  text-align: left;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.file-status {
  width: 62px;
  flex-shrink: 0;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-subtle);
}

/* --------------------------------------------------------- overview ------ */

.section-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-subtle);
}


.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.overview-card {
  display: block;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: inherit;
  text-align: left;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}

.overview-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.overview-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 3px;
}

.overview-meta {
  font-size: 12px;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.overview-headline {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.overview-avatars {
  display: flex;
  margin-top: 10px;
}

.overview-avatars img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--bg-elevated);
  margin-left: -6px;
  background: var(--bg-sunken);
}

.overview-avatars img:first-child { margin-left: 0; }

.warn-badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-perf) 18%, transparent);
  color: var(--c-perf);
  font-size: 10.5px;
  font-weight: 600;
}

/* ------------------------------------------------------------ states ----- */

.state {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
}

.state-icon { font-size: 30px; margin-bottom: 10px; opacity: .65; }
.state-title { margin: 0 0 6px; font-size: 16px; font-weight: 650; color: var(--text); }
.state p { margin: 0 auto; max-width: 460px; font-size: 13px; }

.skeleton {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  padding: 18px;
  margin-bottom: 14px;
}

.skeleton-bar {
  height: 11px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--bg-hover) 37%, var(--bg-sunken) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  margin-bottom: 9px;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.load-more {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 11px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.load-more:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------ palette --- */

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  background: rgb(0 0 0 / 42%);
  backdrop-filter: blur(2px);
}

.palette-backdrop[hidden] { display: none; }

.palette {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

#palette-input {
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

#palette-input:focus { outline: none; }

.palette-results {
  max-height: 46vh;
  overflow-y: auto;
  padding: 6px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  font-size: 13.5px;
}

.palette-item[aria-selected="true"] { background: var(--accent-soft); }

.palette-item .kind {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-subtle);
}

.palette-empty { padding: 22px; text-align: center; color: var(--text-subtle); font-size: 13px; }

.palette-foot {
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  font-size: 11px;
  color: var(--text-subtle);
}

/* --------------------------------------------------------------- toast --- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  transform: translate(-50%, 12px);
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------- footer ---- */

.app-footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 22px 16px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}

/* --------------------------------------------------------- responsive --- */

@media (max-width: 1080px) {
  :root { --sidebar-width: 232px; }
}

@media (max-width: 880px) {
  #menu-toggle { display: grid; }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 14px;
  }

  .sidebar {
    position: fixed;
    inset: var(--header-height) auto 0 0;
    z-index: 70;
    width: 280px;
    max-height: none;
    padding: 16px 12px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(-102%);
    transition: transform .2s ease;
  }

  .sidebar.is-open { transform: none; }

  .sidebar-scrim {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    z-index: 65;
    background: rgb(0 0 0 / 38%);
  }

  .sidebar-scrim[hidden] { display: none; }

  .search-hint { display: none; }
  #search { padding-right: 12px; }
  .brand-sub { display: none; }
}

@media (max-width: 560px) {
  .app-header { gap: 8px; padding: 0 10px; }
  .brand span:not(.brand-mark) { display: none; }
  .content-title { font-size: 19px; }
  .release-head, .release-body { padding-inline: 13px; }
  .sidebar-stats { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------- print ---- */

@media print {
  .app-header, .sidebar, .filters, .release-actions, .load-more, .app-footer, .sidebar-scrim { display: none !important; }
  .layout { grid-template-columns: 1fr; padding: 0; }
  .release { break-inside: avoid; box-shadow: none; border-color: #ccc; }
  body { background: #fff; }
}
