:root {
  color-scheme: light;

  --bg: #f3f3f3;
  --header: #fbfbfb;
  --panel: #fbfbfb;
  --panel-2: #f9f9f9;
  --panel-3: #f0f0f0;
  --table-head: #f7f7f7;

  --border: #e1e1e1;
  --border-soft: #ededed;
  --control-border: #c7c7c7;

  --text: #1a1a1a;
  --table-text: #323130;
  --muted: #616161;
  --muted-2: #8a8a8a;

  --accent: #0067c0;
  --accent-strong: #005a9e;
  --accent-text: #ffffff;
  --focus-border: #0067c0;
  --focus-ring: rgba(0, 103, 192, .18);

  --folder: #c59b26;
  --danger: #dc2626;

  --row-hover: #f0f0f0;
  --row-selected: #0078d4;
  --row-selected-text: #ffffff;

  --button-bg: #ffffff;
  --button-hover: #f3f3f3;
  --button-border: #c7c7c7;

  --kbd-bg: #f3f5f7;
  --kbd-border: #d2dae2;

  --breadcrumb-separator: #a4adb7;
  --waveform-opacity: .72;
  --waveform-filter: grayscale(1) brightness(.62) contrast(1.2);
  --waveform-color: #616161;
  --playhead: #c43e00;

  --promo-bg: #e9f3fb;
  --promo-border: #b8d8ef;
  --promo-kicker: #005a9e;

  --range-track: #d7dee6;
  --range-fill: #0067c0;
  --range-thumb: #ffffff;
  --range-thumb-border: #0067c0;

  --toast-bg: #ffffff;
  --toast-border: #d3dbe3;
  --toast-text: #24303b;
  --toast-shadow: 0 12px 35px rgba(15, 23, 42, .16);

  --radius: 10px;
  --header-h: 72px;

  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #202020;
    --header: #1c1c1c;
    --panel: #272727;
    --panel-2: #2d2d2d;
    --panel-3: #333333;
    --table-head: #2b2b2b;

    --border: #3d3d3d;
    --border-soft: #333333;
    --control-border: #555555;

    --text: #ffffff;
    --table-text: #f5f5f5;
    --muted: #c5c5c5;
    --muted-2: #9d9d9d;

    --accent: #60cdff;
    --accent-strong: #76d5ff;
    --accent-text: #00344f;
    --focus-border: #60cdff;
    --focus-ring: rgba(96, 205, 255, .18);

    --folder: #e7c55e;
    --danger: #ff8c8c;

    --row-hover: #323232;
    --row-selected: #005fb8;
    --row-selected-text: #ffffff;

    --button-bg: #323232;
    --button-hover: #3b3b3b;
    --button-border: #555555;

    --kbd-bg: #22272c;
    --kbd-border: #3b4249;

    --breadcrumb-separator: #535b63;
    --waveform-opacity: .72;
    --waveform-filter: grayscale(1) brightness(1.55);
    --waveform-color: #c5c5c5;
    --playhead: #ff8c42;

    --promo-bg: #24343c;
    --promo-border: #3c6578;
    --promo-kicker: #76d5ff;

    --range-track: #555555;
    --range-fill: #60cdff;
    --range-thumb: #272727;
    --range-thumb-border: #60cdff;

    --toast-bg: #242a2f;
    --toast-border: #3b444c;
    --toast-text: #e9edf0;
    --toast-shadow: 0 12px 35px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 0; }
button, input, select { font: inherit; }
input, select { accent-color: var(--accent); }
button, select { color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-strong); }

.app-header {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 280px minmax(360px, 720px) 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 22px;
  background: var(--header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-mark {
  inline-size: clamp(2.125rem, 3vw, 2.5rem);
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  overflow: hidden;
}
.brand-mark img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand small { color: var(--muted); margin-top: 2px; font-size: 11px; }

.global-search {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.global-search:focus-within { border-color: var(--focus-border); box-shadow: 0 0 0 3px var(--focus-ring); }
.search-icon { color: var(--muted); font-size: 21px; line-height: 1; transform: rotate(-20deg); }
.global-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.global-search input::placeholder { color: var(--muted-2); }
kbd { border: 1px solid var(--kbd-border); background: var(--kbd-bg); color: var(--muted); padding: 2px 7px; border-radius: 5px; font-size: 11px; }
.header-actions { justify-self: end; }
.result-count { color: var(--muted); font-size: 13px; }

.app-shell { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 82px;
  align-self: start;
  height: calc(100vh - 82px);
  min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 18px 12px 14px;
  overflow: hidden;
}
.sidebar-title-row { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 11px; }
.sidebar h2 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.text-button { border: 0; background: transparent; color: var(--accent); font-size: 12px; padding: 4px; }

.folder-tree { min-height: 80px; flex: 1 1 auto; overflow: auto; font-size: 13px; }
.folder-node { user-select: none; }
.folder-row { display: grid; grid-template-columns: 20px 18px minmax(0,1fr); align-items: center; min-height: 31px; border-radius: 6px; padding-right: 7px; color: var(--table-text); }
.folder-row:hover { background: var(--row-hover); }
.folder-row.is-selected { background: var(--row-selected); color: var(--row-selected-text); }
.folder-toggle { width: 20px; height: 28px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; }
.folder-toggle.empty { visibility: hidden; }
.folder-icon { color: var(--folder); font-size: 15px; }
.folder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.folder-children { margin-left: 18px; }
.folder-node.is-collapsed > .folder-children { display: none; }

.content-pane { min-width: 0; padding: 24px 26px 34px; }
.content-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 18px; }
.content-head h1 { font-size: clamp(1.3rem, 2vw, 1.5rem); margin: 6px 0 0; font-weight: 650; letter-spacing: -.02em; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; align-items: center; }
.breadcrumbs button { border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 12px; }
.breadcrumbs button:hover { color: var(--accent); }
.breadcrumbs .separator { color: var(--breadcrumb-separator); font-size: 11px; }
.view-meta { color: var(--muted); font-size: 12px; }

.product-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 12px;
  padding: 18px 20px;
  border: 1px solid var(--promo-border);
  border-radius: var(--radius);
  background: var(--promo-bg);
}
.product-callout-copy { min-width: 0; }
.product-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--promo-kicker);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.product-callout h2 { margin: 0; font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.28; }
.product-callout p { max-width: 820px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.product-callout p a { font-weight: 600; text-underline-offset: 2px; }
.product-callout-action { display: grid; justify-items: stretch; gap: 5px; min-width: 190px; }
.product-callout-action small { color: var(--muted); font-size: 10px; text-align: center; }
.primary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid var(--accent-strong);
  border-radius: 8px;
  background: var(--accent-strong);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.primary-button:hover { filter: brightness(1.04); }
.primary-button.is-disabled { opacity: .58; cursor: not-allowed; }

.toolbar {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.checkbox-filter {
  min-width: 0;
  margin: 0;
  padding: 6px 10px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 6px 10px;
}
.checkbox-filter legend { margin: 0 auto; padding: 0 7px; color: var(--muted); font-size: 10px; font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.toolbar .checkbox-filter label { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--table-text); font-size: 11px; line-height: 1; white-space: nowrap; }
.checkbox-filter input { width: 15px; height: 15px; margin: 0; }
.format-filter,
.channels-filter { flex: 0 1 175px; }
.sort-filter { flex: 1 1 360px; }
.toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }

label.scope-control {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  min-width: 0;
  max-width: 180px;
  padding-bottom: 1px;
  cursor: pointer;
}
.scope-control input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--accent-strong); }
.scope-control span { display: grid; gap: 1px; }
.scope-control strong { color: var(--table-text); font-size: 11px; font-weight: 600; }
.scope-control small { color: var(--muted); font-size: 9px; line-height: 1.3; }

.table-wrap { position: relative; min-height: 320px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.sound-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sound-table thead { background: var(--table-head); }
.sound-table th { height: 38px; text-align: left; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 0 12px; border-bottom: 1px solid var(--border); }
.sound-table td { height: 54px; border-bottom: 1px solid var(--border-soft); padding: 7px 12px; font-size: 13px; color: var(--table-text); vertical-align: middle; }
.sound-table tbody tr:last-child td { border-bottom: 0; }
.sound-table tbody tr:hover { background: var(--row-hover); }
.sound-table tbody tr.is-active-audio { background: var(--row-selected); }
.sound-table tbody tr.is-selected-file:not(.is-active-audio) { background: var(--row-hover); box-shadow: inset 3px 0 var(--accent); }
.sound-table tbody tr.is-active-audio,
.sound-table tbody tr.is-active-audio td,
.sound-table tbody tr.is-active-audio .filename,
.sound-table tbody tr.is-active-audio .subtle { color: var(--row-selected-text); }
.waveform-col { width: 38%; }
.download-col { width: 62px; }
.sound-table th:nth-child(3) { width: 90px; }
.filename { color: var(--text); font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subtle { color: var(--muted); font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--button-border); background: var(--button-bg); color: var(--table-text); }
.icon-button:hover { border-color: var(--focus-border); background: var(--button-hover); }
.icon-button.is-playing { border-color: var(--row-selected-text); color: var(--row-selected-text); background: transparent; }
.waveform-player { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; }
.waveform { width: 100%; height: 34px; object-fit: fill; opacity: var(--waveform-opacity); filter: var(--waveform-filter); }

.empty-state, .loading-state { min-height: 280px; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 7px; }
.empty-state strong { color: var(--table-text); }
.is-hidden { display: none !important; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding-top: 16px; color: var(--muted); font-size: 12px; }
.pager-button { min-width: 100px; height: 34px; border: 1px solid var(--border); background: var(--panel); border-radius: 7px; }
.pager-button:hover:not(:disabled) { border-color: var(--focus-border); background: var(--row-hover); }
.pager-button:disabled { opacity: .35; cursor: default; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; padding: 10px 13px; border-radius: 8px; background: var(--toast-bg); border: 1px solid var(--toast-border); color: var(--toast-text); box-shadow: var(--toast-shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; font-size: 12px; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); color: var(--danger); }

@media (max-width: 1180px) {
  .app-header { grid-template-columns: 230px minmax(0, 1fr) auto; gap: 16px; }
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .content-pane { padding-inline: 20px; }
}

@media (min-width: 621px) and (max-width: 1000px) {
  .toolbar { gap: 4px; padding: 6px 5px; }
  .checkbox-filter { padding: 4px 5px 6px; gap: 4px 6px; }
  .checkbox-filter legend { padding-inline: 4px; font-size: 8px; }
  .toolbar .checkbox-filter label { gap: 3px; font-size: 9px; }
  .checkbox-filter input,
  .scope-control input { width: 13px; height: 13px; }
  .format-filter { flex-basis: 105px; }
  .channels-filter { flex-basis: 125px; }
  .sort-filter { flex-basis: 260px; }
  label.scope-control { gap: 5px; max-width: 132px; }
  .scope-control strong { font-size: 9px; }
  .scope-control small { font-size: 7px; }
}

@media (max-width: 820px) {
  :root { --header-h: auto; }

  .app-header {
    height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    padding: 10px 14px 12px;
  }
  .brand { min-width: 0; }
  .brand > span:last-child { min-width: 0; }
  .brand strong, .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .global-search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .header-actions { grid-column: 2; grid-row: 1; }
  kbd { display: none; }

  .app-shell { min-height: 0; grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    top: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px 10px;
    max-height: min(34vh, 280px);
  }
  .folder-tree { overflow: auto; }
  .file-info { display: none !important; }

  .content-pane { padding: 18px 14px 28px; }
  .content-head { align-items: flex-start; margin-bottom: 14px; }
  .view-meta { padding-top: 4px; white-space: nowrap; }

  .product-callout { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 15px 16px; }
  .product-callout-action { min-width: 175px; }

  .toolbar { align-items: stretch; gap: 10px; }
  label.scope-control { max-width: none; }

  .table-wrap { overflow-x: auto; }
  .sound-table { min-width: 650px; }
}

@media (max-width: 620px) {
  .app-header { padding-inline: 12px; }
  .brand small { display: none; }
  .result-count { font-size: 12px; }

  .content-pane { padding-inline: 10px; }
  .content-head { gap: 10px; }
  .content-head h1 { margin-top: 4px; }

  .product-callout { grid-template-columns: 1fr; gap: 13px; padding: 14px; }
  .product-callout-action { min-width: 0; width: 100%; }
  .primary-button { width: 100%; }

  .toolbar { padding: 10px; }

  .table-wrap {
    overflow: visible;
    min-height: 0;
    border: 0;
    background: transparent;
  }
  .sound-table { min-width: 0; table-layout: auto; }
  .sound-table thead { display: none; }
  .sound-table,
  .sound-table tbody { display: block; width: 100%; }
  .sound-table tbody { display: grid; gap: 10px; }
  .sound-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
      "name download"
      "wave wave"
      "duration duration";
    gap: 6px 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
  }
  .sound-table tbody tr:hover { background: var(--panel); }
  .sound-table td {
    height: auto;
    min-width: 0;
    padding: 2px 0;
    border: 0;
  }
  .sound-table td:nth-child(1) { grid-area: name; }
  .sound-table td:nth-child(2) { grid-area: wave; padding-block: 4px; }
  .sound-table td:nth-child(3) { grid-area: duration; }
  .sound-table td:nth-child(4) { grid-area: download; justify-self: end; }
  .sound-table td[data-label] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 5px;
    border-top: 1px solid var(--border-soft);
  }
  .sound-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
  }
  .filename { font-size: 14px; }
  .subtle { white-space: normal; overflow-wrap: anywhere; }
  .waveform { height: 42px; }

  .pagination { gap: 8px; }
  .pager-button { min-width: 0; flex: 1 1 0; }
  .toast { left: 10px; right: 10px; bottom: 10px; text-align: center; }
}

@media (max-width: 390px) {
  .app-header { grid-template-columns: minmax(0, 1fr) auto; }
  .brand strong { font-size: 14px; }
  .content-head { display: block; }
  .view-meta { margin-top: 6px; }
  .pagination { flex-wrap: wrap; }
  .pagination span { order: -1; width: 100%; text-align: center; }
}

/* Stage 5: shared DigDeScript website shell */
.site-header {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(330px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 10px 22px;
  background: var(--header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-promo {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--promo-border);
  border-radius: 9px;
  background: var(--promo-bg);
}
.header-promo-copy { min-width: 0; display: grid; gap: 2px; }
.header-promo-copy strong { font-size: 12px; line-height: 1.2; color: var(--text); }
.header-promo-copy span {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-promo-copy a { font-weight: 600; text-underline-offset: 2px; }
.header-promo-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.header-download { min-height: 34px; padding: 7px 12px; font-size: 11px; flex: 0 0 auto; }

.catalog-source {
  display: grid;
  gap: 3px;
  margin: 18px 7px 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 10.5px;
  line-height: 1.4;
}
.catalog-source strong { color: var(--text); font-size: 11px; }
.catalog-source span { color: var(--muted); }
.catalog-source a { width: fit-content; font-weight: 650; text-underline-offset: 2px; }
.catalog-source .library-download { width: 100%; margin-top: 7px; text-align: center; }

.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.site-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav-link:hover { color: var(--text); background: var(--row-hover); }
.site-nav-link.is-active { color: var(--row-selected-text); background: var(--row-selected); }
.mobile-download-links,
.mobile-filter-toggle { display: none; }

.catalog-shell {
  height: calc(100vh - 82px);
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
}
.catalog-page { overflow: hidden; }
.catalog-page .site-footer { display: none; }
.catalog-page .content-pane { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.catalog-controls { flex: 0 0 auto; }
.catalog-page .table-wrap { flex: 1 1 auto; min-height: 140px; overflow: auto; }
.catalog-page .sound-table thead { position: sticky; top: 0; z-index: 2; }
.catalog-page .pagination { flex: 0 0 auto; }

.path-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 28px;
  margin-bottom: 10px;
}

.catalog-search-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.catalog-search { flex: 1 1 auto; min-width: 0; }
.catalog-search-row .result-count { flex: 0 0 auto; white-space: nowrap; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  background: var(--header);
  color: var(--muted);
  font-size: 11px;
}
.site-footer a { color: inherit; }

/* License recovery */
.recovery-page { max-width: 900px; }
.recovery-page { display: grid; gap: 14px; }
.recovery-page .page-hero { margin-bottom: 8px; }
.recovery-card { padding: clamp(18px, 3vw, 26px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.recovery-card h2 { margin: 0 0 8px; font-size: clamp(1.15rem, 2vw, 1.45rem); }
.recovery-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.recovery-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.recovery-card-heading small { color: var(--muted); text-align: right; }
.recovery-notice, .recovery-error { margin: 0; padding: 12px 14px; border-radius: 8px; }
.recovery-notice { border: 1px solid var(--promo-border); background: var(--promo-bg); }
.recovery-error { border: 1px solid color-mix(in srgb, var(--danger) 50%, var(--border)); background: color-mix(in srgb, var(--danger) 10%, var(--panel)); }
.recovery-form { display: grid; gap: 7px; margin-top: 18px; }
.recovery-form label { color: var(--muted); font-size: 12px; font-weight: 650; }
.recovery-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.recovery-form input { min-height: 40px; padding: 8px 11px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--button-bg); color: var(--text); }
.recovery-form input:focus { outline: 0; border-color: var(--focus-border); box-shadow: 0 0 0 3px var(--focus-ring); }
.recovery-privacy { font-size: 11px; }
.recovery-devices { display: grid; gap: 8px; margin-top: 17px; }
.recovery-device { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--panel-2); }
.recovery-device strong, .recovery-device span, .recovery-device small { display: block; }
.recovery-device span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.recovery-device small { margin-top: 5px; color: var(--muted-2); }
.recovery-danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.recovery-confirm-form { display: grid; justify-items: start; gap: 4px; margin-top: 15px; }
.recovery-confirm-form label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.danger-button { min-height: 38px; margin-top: 16px; padding: 8px 13px; border: 1px solid var(--danger); border-radius: 8px; background: transparent; color: var(--danger); font-weight: 650; }
.danger-button:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.license-key-value { display: block; margin: 16px 0; padding: 14px; overflow-wrap: anywhere; border: 1px solid var(--promo-border); border-radius: 8px; background: var(--promo-bg); font: 700 clamp(.9rem, 2.5vw, 1.2rem) ui-monospace, monospace; letter-spacing: .04em; text-align: center; user-select: all; }
.recovery-empty { padding: 12px; border: 1px dashed var(--border); border-radius: 8px; }

.standard-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0 64px;
}
.page-hero { max-width: 760px; margin-bottom: 30px; }
.page-hero.compact { margin-bottom: 24px; }
.page-kicker, .card-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--promo-kicker);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.page-hero h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.035em; line-height: 1.05; }
.page-hero p { margin: 14px 0 0; color: var(--muted); line-height: 1.65; }
.page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card, .software-card, .social-card, .video-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.feature-card {
  display: grid;
  gap: 7px;
  min-height: 130px;
  align-content: start;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}
.feature-card:hover { border-color: var(--focus-border); background: var(--row-hover); }
.feature-card strong { font-size: 15px; }
.feature-card span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.software-grid { display: grid; gap: 14px; }
.software-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px; }
.software-card h2, .social-card h2 { margin: 0 0 7px; font-size: 18px; }
.software-card p, .social-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.software-actions { flex: 0 0 auto; }
.secondary-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--button-border);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.secondary-button:hover { background: var(--button-hover); border-color: var(--focus-border); }
.media-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, .7fr); gap: 16px; align-items: start; }
.video-card { overflow: hidden; }
.video-frame { aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-card-copy, .social-card { padding: 16px; }
.video-card-copy { display: grid; gap: 4px; }
.video-card-copy span { color: var(--muted); font-size: 12px; }

/* Home page */
.home-page { display: grid; gap: clamp(48px, 7vw, 86px); }
.home-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); align-items: stretch; gap: clamp(34px, 6vw, 76px); }
.home-hero-copy { align-self: center; }
.home-hero-copy h1 { max-width: 760px; margin: 0; font-size: clamp(2.2rem, 5vw, 4.35rem); line-height: .99; letter-spacing: -.052em; }
.home-hero-copy > p { max-width: 660px; margin: 20px 0 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.14rem); line-height: 1.65; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.home-actions .primary-button, .home-actions .secondary-button, .edition-card > .primary-button, .edition-card > .secondary-button, .home-demo-panel > .primary-button { min-height: 42px; padding-inline: 17px; }
.home-highlights { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; color: var(--muted); font-size: 11px; list-style: none; }
.home-highlights li { position: relative; padding-left: 13px; }
.home-highlights li::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); transform: translateY(-50%); }
.product-preview { position: relative; min-width: 0; min-height: 0; display: grid; align-items: center; margin: 0; }
.product-screenshot-link { display: block; width: 100%; box-sizing: border-box; padding: clamp(.375rem, 1vw, .75rem); overflow: hidden; border: 1px solid var(--border); border-radius: .875rem; background: var(--panel); box-shadow: 0 1.375rem 3.75rem rgba(0, 0, 0, .12); }
.product-screenshot-link picture, .product-screenshot-link img { display: block; width: 100%; height: auto; }
.product-preview figcaption { position: absolute; right: 10px; bottom: 9px; padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--muted); font-size: 10px; text-align: right; pointer-events: none; }
.product-screenshot-link:focus-visible, .edition-screenshot-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.image-modal { width: calc(100vw - 32px); max-width: none; height: calc(100vh - 32px); max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); box-shadow: 0 24px 80px rgba(0, 0, 0, .45); }
.image-modal::backdrop { background: rgba(0, 0, 0, .78); }
.image-modal[open] { display: grid; place-items: center; }
.image-modal img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-modal-close { position: absolute; z-index: 1; top: 10px; right: 10px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.image-modal-close:hover { background: rgba(0, 0, 0, .9); }
.image-modal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body.has-image-modal { overflow: hidden; }
.placeholder-window-bar { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border-bottom: 1px solid var(--border); background: var(--header); color: var(--muted); font-size: 10px; }
.placeholder-window-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 15px 0 0 var(--border), 30px 0 0 var(--border); margin-right: 28px; }
.placeholder-app-layout { height: calc(100% - 38px); display: grid; grid-template-columns: 30% 1fr; }
.placeholder-sidebar { border-right: 1px solid var(--border); background: repeating-linear-gradient(to bottom, transparent 0 22px, var(--border-soft) 23px 24px); opacity: .8; }
.placeholder-library { padding: 15px; background: var(--panel-2); }
.placeholder-search { height: 30px; margin-bottom: 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); }
.placeholder-wave-row { height: 50px; margin-bottom: 8px; border: 1px solid var(--border-soft); border-radius: 6px; background: linear-gradient(90deg, var(--panel) 0 35%, transparent 35%), repeating-linear-gradient(90deg, transparent 0 6px, var(--muted-2) 7px 8px, transparent 9px 13px); opacity: .75; }
.placeholder-wave-row.short { background-size: 100%, 60% 100%; background-repeat: no-repeat; }
.placeholder-caption { position: absolute; right: 12px; bottom: 11px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 9px; }
.home-section { display: grid; gap: 24px; }
.section-heading { max-width: 720px; }
.section-heading h2, .home-demo-panel h2, .home-final-cta h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.03em; }
.section-heading > p, .home-demo-panel p { margin: 12px 0 0; color: var(--muted); line-height: 1.65; }
.section-heading-row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.home-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home-feature-card, .edition-card, .tool-card, .learning-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.home-feature-card { min-height: 190px; padding: 18px; }
.feature-number { color: var(--promo-kicker); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.home-feature-card h3, .edition-card h3, .tool-card h3, .learning-card h3 { margin: 22px 0 7px; font-size: 17px; }
.home-feature-card p, .edition-card p, .tool-card p, .learning-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.home-demo-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 30px; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--promo-border); border-radius: 14px; background: var(--promo-bg); }
.edition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); gap: clamp(.75rem, 2vw, 1rem); }
.edition-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.25rem, 3vw, 1.875rem); }
.edition-card.is-featured { border-color: var(--promo-border); box-shadow: inset 0 3px 0 var(--accent); }
.edition-screenshot-link { width: 100%; margin: 0 0 1.375rem; overflow: hidden; border: 1px solid var(--border); border-radius: .5rem; background: var(--panel-3); }
.edition-screenshot-link picture, .edition-screenshot-link img { display: block; width: 100%; }
.edition-screenshot-link img { height: auto; transition: transform 160ms ease; }
.edition-screenshot-link:hover img { transform: scale(1.012); }
.edition-card h3 { margin-top: 0; font-size: 22px; }
.edition-card ul { display: grid; gap: 9px; margin: 20px 0 25px; padding-left: 18px; color: var(--table-text); font-size: 12px; line-height: 1.45; }
.edition-card > a:last-child { margin-top: auto; }
.tools-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 14px; }
.tool-card { overflow: hidden; }
.tool-card:not(.compact-tool-card) { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); }
.tool-card-copy { padding: 22px; }
.tool-card h3 { margin-top: 0; font-size: 20px; }
.tool-visual-placeholder { min-height: 220px; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, var(--promo-border), transparent 7%, var(--panel-3) 8%, var(--panel-2) 46%, var(--panel-3)); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.status-label { display: inline-flex; margin-top: 17px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.compact-tool-card { display: flex; align-items: center; }
.learning-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.learning-card { overflow: hidden; }
.learning-card > div:last-child { padding: 17px; }
.learning-card h3 { margin-top: 0; }
.video-placeholder { aspect-ratio: 16 / 9; display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--panel-3); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.play-placeholder { width: 38px; height: 38px; display: grid; place-items: center; padding-left: 2px; border: 1px solid var(--control-border); border-radius: 50%; background: var(--button-bg); color: var(--table-text); font-size: 12px; }
.text-link { color: var(--accent-strong); font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.home-final-cta { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: clamp(24px, 4vw, 38px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.home-final-cta .home-actions { flex: 0 0 auto; margin: 0; }

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: minmax(190px, 230px) minmax(300px, 1fr);
    gap: 10px 16px;
  }
  .site-nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; padding-top: 1px; }
  .catalog-shell { grid-template-columns: 250px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 14px 12px;
  }
  .brand { width: fit-content; }
  .header-promo { width: 100%; }
  .site-nav { grid-column: auto; justify-content: flex-start; }
  .catalog-shell { min-height: 0; grid-template-columns: 1fr; }
  .catalog-search-row { align-items: stretch; }
  .catalog-search-row .result-count { align-self: center; }
  .path-row { margin-bottom: 8px; }
  .page-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
  .home-hero { grid-template-columns: 1fr; min-height: 0; }
  .product-preview { position: static; width: 100%; }
  .product-screenshot-link { width: 100%; }
  .product-screenshot-link picture, .product-screenshot-link img { width: 100%; height: auto; }
  .product-preview figcaption { position: static; margin-top: 9px; padding: 0; background: none; }
  .home-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-grid { grid-template-columns: 1fr; }
  .learning-grid { grid-template-columns: 1fr; }
  .learning-card { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 1.2fr); }
  .home-final-cta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .brand small { display: none; }
  .header-promo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px; }
  .header-promo-copy span { white-space: normal; }
  .header-download { min-height: 32px; }
  .site-nav { margin-inline: -4px; padding-bottom: 2px; }
  .site-nav-link { padding-inline: 7px; font-size: 11px; }
  .catalog-search-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .catalog-search-row .result-count { justify-self: end; }
  .path-row { align-items: flex-start; }
  .site-footer { display: grid; padding-inline: 12px; }
  .standard-page { width: min(100% - 20px, 1180px); padding-top: 26px; }
  .software-card { align-items: flex-start; flex-direction: column; }
  .software-actions, .software-actions .secondary-button { width: 100%; }
  .home-page { gap: 48px; }
  .home-hero { gap: 30px; }
  .home-hero-copy h1 { font-size: clamp(2rem, 12vw, 3.2rem); }
  .home-actions, .home-actions a { width: 100%; }
  .home-feature-grid, .edition-grid { grid-template-columns: 1fr; }
  .home-feature-card { min-height: 0; }
  .home-demo-panel { grid-template-columns: 1fr; }
  .home-demo-panel > .primary-button { width: 100%; }
  .tool-card:not(.compact-tool-card), .learning-card { grid-template-columns: 1fr; }
  .tool-visual-placeholder { min-height: 180px; }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
  .home-final-cta { padding-inline: 0; }
  .recovery-card-heading, .recovery-device { align-items: stretch; flex-direction: column; }
  .recovery-card-heading small { text-align: left; }
  .recovery-device form, .recovery-device button { width: 100%; }
  .recovery-form > div { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .header-promo { grid-template-columns: 1fr; }
  .header-download { width: 100%; }
  .site-nav { gap: 1px; }
  .site-nav-link { font-size: 10.5px; }
}

/* Centered navigation, compact promo and mobile menus */
.menu-toggle,
.mobile-folder-toggle { display: none; }

.site-header {
  grid-template-columns: minmax(190px, 1fr) auto minmax(290px, 1fr);
  gap: 18px;
  min-height: 82px;
}
.site-header > .brand { justify-self: start; }
.site-nav {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  justify-content: center;
  gap: 4px;
}
.header-promo {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  width: min(100%, 430px);
  padding: 7px 8px 7px 11px;
  gap: 10px;
}
.header-promo-copy { gap: 1px; }
.header-promo-copy > strong { font-size: 12px; }
.header-promo-copy > span {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.3;
  white-space: normal;
}
.header-download {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10.5px;
}

.folder-panel { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.file-info {
  flex: 0 0 auto;
  margin: 14px 7px 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}
.file-info h2 { margin: 0 0 8px; }
.file-info-empty { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.file-info-content { display: grid; gap: 4px; }
.file-info-name { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.file-info-path { overflow: hidden; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.file-info dl { display: grid; gap: 4px; margin: 5px 0 0; font-size: 10px; }
.file-info dl div { display: flex; justify-content: space-between; gap: 10px; }
.file-info dt { color: var(--muted); }
.file-info dd { min-width: 0; margin: 0; color: var(--table-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info a { font-weight: 600; text-underline-offset: 2px; }
.catalog-source { flex: 0 0 auto; }
.waveform-placeholder {
  position: relative;
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  opacity: .75;
}
.waveform-canvas {
  display: block;
  width: 100%;
  height: 34px;
  cursor: crosshair;
  touch-action: none;
}
.waveform-canvas:focus-visible {
  outline: 2px solid var(--focus-border);
  outline-offset: 2px;
  border-radius: 3px;
}
.waveform-canvas.is-unavailable { opacity: .35; }
.waveform-placeholder::before {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--border);
}
.waveform-placeholder span {
  position: absolute;
  left: 50%;
  width: 22%;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--border);
  opacity: .55;
}

@media (max-width: 1180px) and (min-width: 821px) {
  .site-header {
    grid-template-columns: minmax(175px, .75fr) auto minmax(360px, 1fr);
    gap: 12px;
    padding-inline: 16px;
  }
  .site-nav-link { padding-inline: 7px; font-size: 11.5px; }
  .header-promo { width: min(100%, 390px); }
  .catalog-shell { grid-template-columns: 250px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .site-header {
    position: sticky;
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    gap: 9px 12px;
    padding: 9px 12px 10px;
  }
  .site-header > .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .menu-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: 40px;
    height: 38px;
    display: grid;
    place-content: center;
    gap: 4px;
    padding: 0;
    border: 1px solid var(--button-border);
    border-radius: 8px;
    background: var(--button-bg);
  }
  .menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
  }
  .site-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    display: none;
    padding: 5px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--panel);
    overflow: visible;
  }
  .site-nav.is-open { display: grid; }
  .site-nav-link {
    width: 100%;
    justify-content: flex-start;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .header-promo {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 9px;
  }

  .catalog-page { overflow: auto; }
  .catalog-shell { height: auto; grid-template-columns: 1fr; min-height: 0; overflow: visible; }
  .catalog-page .content-pane { height: auto; overflow: visible; }
  .sidebar {
    max-height: none;
    overflow: visible;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .mobile-folder-toggle {
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--table-text);
    text-align: left;
  }
  .mobile-folder-icon { color: var(--folder); }
  .mobile-folder-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }
  .mobile-folder-chevron {
    justify-self: end;
    color: var(--muted);
    transition: transform .16s ease;
  }
  .sidebar.is-open .mobile-folder-chevron { transform: rotate(180deg); }
  .folder-panel {
    display: none;
    max-height: min(52vh, 420px);
    margin-top: 8px;
    overflow: auto;
    padding: 7px 4px 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
  }
  .sidebar.is-open .folder-panel { display: block; }
  .folder-tree { overflow: visible; }

  .page-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .brand small { display: none; }
  .catalog-page { overflow: hidden; }
  .site-header { grid-template-rows: auto auto; }
  .header-promo { display: none; }
  .site-nav { grid-row: 2; }
  .mobile-download-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding-top: 5px; border-top: 1px solid var(--border); }
  .mobile-download-links .site-nav-link { justify-content: center; text-align: center; }
  .mobile-download-links .site-nav-link.is-disabled { opacity: .55; }
  .catalog-shell { height: calc(100dvh - 68px); grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  .catalog-page .content-pane { height: auto; min-height: 0; overflow: hidden; padding-top: 10px; padding-bottom: 8px; }
  .catalog-controls { min-height: 0; }
  .mobile-filter-toggle {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 6px 10px;
    border: 1px solid var(--control-border);
    border-radius: 7px;
    background: var(--panel-2);
    color: var(--table-text);
    font-weight: 600;
  }
  .mobile-filter-toggle[aria-expanded="true"] span:last-child { transform: rotate(180deg); }
  .toolbar { display: none; }
  .toolbar.is-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "format channels" "sort sort" "scope scope";
    gap: 8px 10px;
    max-height: min(42vh, 330px);
    overflow: auto;
  }
  .toolbar.is-open .format-filter { grid-area: format; }
  .toolbar.is-open .channels-filter { grid-area: channels; }
  .toolbar.is-open .sort-filter { grid-area: sort; }
  .toolbar.is-open .scope-control { grid-area: scope; }
  .catalog-page .table-wrap { flex: 1 1 auto; min-height: 80px; overflow: auto; }
  .catalog-page .pagination { padding-top: 7px; }
  .catalog-search-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .catalog-search-row .result-count { justify-self: end; }
  .site-footer { display: grid; padding-inline: 12px; }
  .standard-page { width: min(100% - 20px, 1180px); padding-top: 26px; }
  .software-card { align-items: flex-start; flex-direction: column; }
  .software-actions, .software-actions .secondary-button { width: 100%; }
}

@media (max-width: 430px) {
  .header-promo { gap: 6px; }
}
