:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #657282;
  --line: #d9e0e7;
  --soft: #f5f7f8;
  --paper: #ffffff;
  --accent: #0c6b5f;
  --accent-2: #b64f28;
  --accent-3: #265f99;
  --shadow: 0 18px 50px rgba(23, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #f8faf9;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  font-weight: 800;
  background: var(--accent);
  border-radius: 8px;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  padding: 4px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lang-switch button {
  width: 40px;
  height: 32px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.lang-switch button.active {
  color: #fff;
  background: var(--ink);
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: clamp(18px, 3vw, 42px);
  align-items: stretch;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 56px) 26px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
}

.lead {
  max-width: 720px;
  color: #3d4a57;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.audience-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.audience-pills span {
  padding: 8px 11px;
  color: #2e3c48;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--accent);
}

.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.hero-panel {
  display: grid;
  gap: 1px;
  align-self: center;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(23, 33, 43, 0.08);
}

.hero-panel div {
  display: grid;
  gap: 7px;
  padding: 18px;
  background: #fff;
}

.hero-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-panel strong {
  font-size: 15px;
  line-height: 1.45;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(18px, 4vw, 56px) 28px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats div {
  min-height: 94px;
  padding: 18px;
  background: #fff;
}

.stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 32px;
}

.stats span {
  color: var(--muted);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 320px);
  gap: 12px;
  margin: 0 clamp(18px, 4vw, 56px) 20px;
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.catalog-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 0 clamp(18px, 4vw, 56px) 52px;
}

.category-list {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100svh - 112px);
  padding: 14px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.aside-title {
  margin: 4px 6px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cat-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
  padding: 10px 8px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.cat-button span {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-button small {
  color: var(--muted);
}

.cat-button.active,
.cat-button:hover {
  color: var(--accent);
  background: #eaf4f1;
}

.catalog-main {
  min-width: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.category-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.category-card.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.category-card div {
  padding: 14px;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  line-height: 1.25;
}

.category-card small {
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head p:last-child,
#result-count {
  color: var(--muted);
}

.groups {
  display: grid;
  gap: 12px;
}

.group {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 0;
  cursor: pointer;
}

.group-toggle span {
  font-size: 17px;
  font-weight: 900;
}

.group-toggle small {
  color: var(--muted);
}

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  background: #fff;
  border-top: 1px solid var(--line);
}

.group.collapsed .items {
  display: none;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 112px;
  padding: 14px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.item-row:has(.product-thumb) {
  grid-template-columns: 108px minmax(0, 1fr);
}

.product-thumb {
  width: 108px;
  height: 92px;
  object-fit: contain;
  padding: 4px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.item-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-index {
  flex: 0 0 auto;
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 900;
}

.item-row strong {
  line-height: 1.35;
}

.item-row p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.downloads {
  margin: 0 clamp(18px, 4vw, 56px) 52px;
  padding: clamp(22px, 4vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.downloads {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
  gap: 24px;
  align-items: center;
}

.downloads p {
  color: var(--muted);
  line-height: 1.55;
}

.download-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.download-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.download-card span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 32px;
  color: #fff;
  background: var(--accent-2);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.download-card small {
  color: var(--muted);
  line-height: 1.4;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .hero,
  .downloads {
    grid-template-columns: 1fr;
  }

  .catalog-shell {
    grid-template-columns: 1fr;
  }

  .category-list {
    position: static;
    max-height: 260px;
  }
}

@media (max-width: 720px) {
  .brand {
    min-width: 0;
  }

  .topbar {
    gap: 14px;
  }

  .lang-switch {
    margin-left: auto;
  }

  .stats,
  .download-list {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .items {
    grid-template-columns: 1fr;
  }

  .item-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .item-row:has(.product-thumb) {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .product-thumb {
    width: 88px;
    height: 78px;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .nav {
    gap: 12px;
    font-size: 13px;
  }

  .stats,
  .download-list {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary,
  .secondary {
    width: 100%;
  }
}
