﻿:root {
  --line: #dbe1ea;
  --line-strong: #c7d2e4;
  --text: #0f172a;
  --muted: #475569;
  --accent: #1d4ed8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    radial-gradient(1200px 520px at 110% -20%, rgba(59, 130, 246, .10), transparent 60%),
    radial-gradient(900px 420px at -10% 20%, rgba(16, 185, 129, .08), transparent 58%),
    #f5f6f8;
}
main { width: min(1180px, calc(100% - 24px)); margin: 20px auto 30px; }
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.crumbs { margin: 0; font-size: 13px; color: #64748b; line-height: 1.35; overflow-wrap: anywhere; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.hero-home {
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  background: #fff;
}
h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 42px); line-height: 1.15; overflow-wrap: anywhere; }
.lead { margin: 0; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; max-width: 980px; }
.hero-chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-chip {
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
}
.list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  align-items: stretch;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  align-self: stretch;
  box-shadow: 0 8px 16px rgba(15, 23, 42, .06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
}
.card-image picture {
  display: block;
  width: 100%;
  height: 100%;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #fff;
  min-height: 0;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .28s ease;
}
.card-image.contain .thumb {
  object-fit: contain;
  background: #fff;
}
.thumb-category {
  position: absolute;
  left: 8px;
  top: 8px;
  border-radius: 8px;
  border: 1px solid #d9e7db;
  background: #ffffff;
  color: #22a447;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  padding: 4px 8px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .10);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  max-width: calc(100% - 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-body {
  padding: 10px 12px 12px;
  background: #fff;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.card-title {
  margin: 0 0 7px;
  font-size: 18px;
  line-height: 1.22;
  min-height: calc(1.22em * 2);
  max-height: calc(1.22em * 2);
  font-weight: 700;
  overflow-wrap: break-word;
  overflow: hidden;
}
.card-title-link {
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: calc(1.22em * 2);
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-title-link:hover {
  text-decoration: underline;
}
.card-title mark {
  background: #fef08a;
  color: #111827;
  border-radius: 4px;
  padding: 0 2px;
}
.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
  overflow: hidden;
}
.action {
  position: relative;
  overflow: hidden;
  height: 34px;
  border-radius: 9px;
  --action-fill: #e5e7eb;
  --action-border: #e5e7eb;
  --action-text: #111827;
  border: 1px solid var(--action-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  color: var(--action-text);
  background: var(--action-fill);
  box-shadow: none;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
  gap: 0;
  white-space: nowrap;
  padding: 0 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  user-select: none;
  -webkit-user-drag: none;
  text-shadow: none;
}
.action::before {
  content: none;
}
.action > span {
  position: relative;
  z-index: 2;
}
.action-icon {
  display: none;
}
.action-icon svg {
  width: 12px;
  height: 12px;
  display: block;
  fill: currentColor;
}
.action:hover {
  transform: translateY(-1px);
  border-color: var(--action-border);
  background: var(--action-fill);
  filter: brightness(.97);
}
.action:active {
  transform: translateY(0) scale(.985);
}
.action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .2);
}
.action.open {
  --action-fill: #23b100;
  --action-border: #23b100;
  --action-text: #ffffff;
}
.action.open .action-icon {
  color: #ffffff;
}
.action.file {
  --action-fill: #e5e7eb;
  --action-border: #e5e7eb;
  --action-text: #111827;
}
.action.file .action-icon {
  color: #ffffff;
}
.empty {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  color: #475569;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}
.catalog-seo,
.catalog-links {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}
.catalog-seo h2,
.catalog-links h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
}
.catalog-seo p {
  margin: 0 0 9px;
  color: #334155;
  line-height: 1.55;
}
.catalog-seo-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: #334155;
  line-height: 1.5;
  display: grid;
  gap: 5px;
}
.catalog-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.catalog-links-item {
  display: block;
  border: 1px solid #dbe5f5;
  border-radius: 10px;
  background: #f8fbff;
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  padding: 9px 10px;
  min-height: 44px;
}
.catalog-links-item:hover {
  background: #eef4ff;
  border-color: #c9d7ef;
}
.catalog-faq {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}
.catalog-faq h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
}
.catalog-faq-list {
  display: grid;
  gap: 8px;
}
.catalog-faq-item {
  border: 1px solid #dbe5f5;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0 10px;
}
.catalog-faq-item summary {
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  padding: 10px 0;
}
.catalog-faq-item summary::-webkit-details-marker {
  display: none;
}
.catalog-faq-item p {
  margin: 0 0 10px;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}
@media (hover: hover) {
  .card:hover,
  .card:hover .thumb {
    transform: none;
  }
}
@media (min-width: 761px) {
  .card-title {
    font-size: 10px;
    line-height: 1.2;
    min-height: calc(1.2em * 2);
    max-height: calc(1.2em * 2);
  }
  .card-title-link {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: calc(1.2em * 2);
  }
  .card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    width: 100%;
  }
  .card-actions .action {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    font-size: 11px;
    border-radius: 0;
    justify-self: stretch;
    padding: 0 8px;
  }
  .card-actions .action:first-child {
    border-radius: 8px 0 0 8px;
  }
  .card-actions .action:last-child {
    border-radius: 0 8px 8px 0;
    border-left: 0;
    margin-left: 0;
  }
}
@media (max-width: 960px) {
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  main { width: min(1180px, calc(100% - 16px)); margin: 14px auto 20px; }
  .hero { padding: 12px; border-radius: 14px; }
  .crumbs { font-size: 12px; }
  .hero-home { width: 100%; text-align: center; }
  h1 { font-size: clamp(22px, 7vw, 30px); line-height: 1.18; }
  h2 { font-size: 18px; line-height: 1.25; }
  .lead { font-size: 14px; }
  .list { grid-template-columns: 1fr; gap: 10px; }
  .card { border-radius: 12px; }
  .card-image { aspect-ratio: 4 / 3; }
  .thumb-category {
    left: 10px;
    top: 10px;
    font-size: 11px;
    padding: 5px 9px;
  }
  .card-body { padding: 9px 10px 10px; }
  .card-title {
    font-size: 15px;
    line-height: 1.24;
    margin-bottom: 6px;
    min-height: calc(1.24em * 2);
    max-height: calc(1.24em * 2);
  }
  .card-title-link { max-height: calc(1.24em * 2); }
  .card-actions { grid-template-columns: 1fr; gap: 7px; }
  .card-actions { overflow: visible; }
  .action {
    width: 100%;
    min-width: 0;
    height: 36px;
    font-size: 13px;
    padding: 0 11px;
    border-radius: 9px;
    justify-self: stretch;
  }
  .catalog-seo,
  .catalog-links { margin-top: 10px; padding: 12px; border-radius: 12px; }
  .catalog-faq { margin-top: 10px; padding: 12px; border-radius: 12px; }
  .catalog-links-grid { grid-template-columns: 1fr; }
  .catalog-links-item { min-height: 40px; font-size: 13px; }
  .catalog-faq-item summary { font-size: 14px; }
  .catalog-faq-item p { font-size: 13px; }
}
@media (max-width: 420px) {
  .card-title {
    font-size: 14px;
  }
}
