/* ALLCUT — /downloads/
   Page head with counts · catalogue block · filter tools (JS only) · document table grouped by range. */

/* ───────────── page head ───────────── */
.dl-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); gap: 40px 64px; align-items: end; }
.dl-head__kf .kf__item { padding-right: 12px; }
@media (max-width: 860px) { .dl-head { grid-template-columns: 1fr; } }

/* ───────────── catalogue ───────────── */
.dl-cat { background: var(--white); border-bottom: 1px solid var(--rule); padding-block: clamp(40px, 5vw, 72px); }
.dl-cat__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); gap: 32px 64px; align-items: end; }
.dl-cat__text .h2 { margin-top: 18px; max-width: 18ch; }
.dl-cat__text .body { margin: 16px 0 0; max-width: 52ch; }
.dl-cat__name { font: 500 13px/1.35 var(--f-mono); letter-spacing: 0; overflow-wrap: anywhere; }
.dl-cat__actions { margin-top: 20px; }
.dl-cat__actions .btn { flex: 1 1 auto; }
@media (max-width: 860px) { .dl-cat__inner { grid-template-columns: 1fr; } }

/* ───────────── documents section ───────────── */
.dl-docs { padding-block: clamp(56px, 7vw, 104px); }
.dl-docs__head { margin-bottom: clamp(24px, 3vw, 36px); }
.dl-docs__head .h2 { margin-top: 18px; }

/* filter tools: hidden without JS (everything is listed) */
html:not(.js) .dl-tools { display: none; }
.dl-tools {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 16px 32px; align-items: end;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.dl-tools__ranges { display: flex; flex-wrap: wrap; align-self: end; }
.dl-seg {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; margin: 0 -1px -1px 0;
  border: 1px solid var(--rule-2); background: var(--white); color: var(--ink-2);
  font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  transition: color .15s, background-color .15s, border-color .15s;
}
.dl-seg:hover { color: var(--ink); border-color: var(--ink-4); position: relative; z-index: 1; }
.dl-seg[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); position: relative; z-index: 2; }
.dl-seg__n { color: var(--ink-4); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.dl-seg[aria-pressed="true"] .dl-seg__n { color: #a9a49b; }
.dl-seg:focus-visible { position: relative; z-index: 3; }
.dl-seg.is-zero { color: var(--ink-4); }

.dl-tools__search .input::placeholder { color: var(--ink-4); }
.dl-tools__search .input::-webkit-search-cancel-button { cursor: pointer; }
.dl-tools__result { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 40px; }
.dl-tools__status { margin: 0; color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.dl-tools__status strong { color: var(--ink); font-weight: 600; }
.dl-tools__result [hidden] { display: none; }

/* ───────────── table ───────────── */
.dl-table [hidden] { display: none !important; }
.dl-col-model { width: 34%; }
.dl-table thead th { padding-top: 14px; }
.dl-table td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.dl-table th[scope="row"] { vertical-align: middle; }

/* range header rows */
.dl-range th {
  padding: 32px 0 12px; border-bottom: 1px solid var(--rule-2);
  font: inherit; letter-spacing: normal; text-transform: none; color: var(--ink); white-space: normal;
}
.dl-table tbody:first-of-type .dl-range th, .dl-table tbody.is-first .dl-range th { padding-top: 22px; }
.dl-table tbody tr.dl-range:hover { background: none; }
.dl-range__inner { display: flex; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; }
.dl-range__name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; transition: color .15s; }
.dl-range__name:hover { color: var(--red-ink); }
.dl-range__short { color: var(--ink-3); font-size: 14.5px; line-height: 1.4; flex: 1 1 280px; }
.dl-range__n { margin-left: auto; font: 500 11px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* model cell */
.dl-table th.dl-model {
  font: 600 16px/1.3 var(--f-sans); letter-spacing: -0.01em; text-transform: none; color: var(--ink); white-space: normal;
}
.dl-model a { transition: color .15s; }
.dl-model a:hover { color: var(--red-ink); }
.dl-model__sub { display: block; margin-top: 2px; font: 400 13.5px/1.35 var(--f-sans); color: var(--ink-3); letter-spacing: 0; }

/* file link: icon · type · size */
.dl-file {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 0;
  font: 500 12.5px/1 var(--f-mono); letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums;
  transition: color .15s;
}
.dl-file svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); transition: color .15s, transform .15s var(--ease); }
.dl-file__size { color: var(--ink-3); }
.dl-file__size::before { content: "·"; margin-right: 8px; color: var(--ink-4); }
.dl-file:hover, .dl-file:hover .dl-file__size { color: var(--red-ink); }
.dl-file:hover svg { color: var(--red-ink); transform: translateY(1px); }

/* empty state + catalogue note */
.dl-empty { margin: 0; padding: 28px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.dl-empty__reset { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--red-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dl-empty__reset:hover { color: var(--red-deep); }
.dl-note { margin: 24px 0 0; font-size: 14.5px; color: var(--ink-3); }

/* ───────────── tablet ───────────── */
@media (max-width: 1180px) {
  .dl-tools { grid-template-columns: 1fr; }
  .dl-tools__search { max-width: 420px; }
}
@media (max-width: 960px) { .dl-col-model { width: 30%; } }

/* ───────────── phones: rows reflow to stacked blocks ───────────── */
@media (max-width: 720px) {
  .dl-tools__ranges { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .dl-tools__ranges::-webkit-scrollbar { display: none; }
  .dl-seg { min-height: 44px; padding: 0 12px; }
  .dl-tools__search { max-width: none; }

  .dl-wrap { overflow: visible; }
  .dl-table, .dl-table tbody { display: block; }
  .dl-table colgroup { display: none; }
  .dl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dl-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 12px; padding: 14px 0 10px; border-bottom: 1px solid var(--rule); }
  .dl-table tr > th, .dl-table tr > td { display: block; padding: 0; border: 0; }
  .dl-table th[scope="row"] { grid-column: 1 / -1; margin-bottom: 8px; }
  .dl-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 500 10.5px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .dl-table td.is-empty { visibility: hidden; }
  .dl-file { min-height: 36px; gap: 6px; font-size: 11.5px; letter-spacing: 0; white-space: nowrap; }
  .dl-file__size::before { display: none; }

  .dl-table tr.dl-range { display: block; padding: 0; border-bottom: 1px solid var(--rule-2); }
  .dl-table tr.dl-range > th { display: block; padding: 28px 0 10px; }
  .dl-table tbody:first-of-type tr.dl-range > th, .dl-table tbody.is-first tr.dl-range > th { padding-top: 18px; }
  .dl-range__short { flex-basis: 100%; order: 3; }
}
@media (max-width: 380px) {
  .dl-table tr { column-gap: 8px; }
  .dl-file svg { display: none; }
}
