/* Каталог КВЕД — React-прототип */

.page-main--kved .kved-section {
  padding: var(--sect) 0;
}

/* Довгі назви класів — не роздувати hero на весь екран */
.kved-hero h1.kved-title-long {
  font-size: clamp(1.35rem, 4.2vw, 2.15rem);
  line-height: 1.22;
  max-width: min(36rem, 100%);
  margin-bottom: 16px;
}

.kved-hero .svc-hero-main {
  max-width: min(720px, 100%);
}

/* Той самий .svc-details, адаптований під lime-hero */
.kved-hero-expand {
  margin-top: 8px;
  max-width: min(640px, 100%);
}

.kved-hero-expand .svc-details-box {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(15, 23, 18, 0.1);
  padding: 16px 18px 18px;
  box-shadow: none;
}

.kved-hero-expand .svc-details-box.is-open {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.kved-hero-expand .svc-details-preview p,
.kved-hero-expand .svc-details-more p {
  margin: 0;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 500;
}

.kved-hero-expand .svc-details-toggle {
  margin-top: 14px;
  padding: 10px 18px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.85);
}

.kved-hero-expand .svc-details-more > *:first-child {
  margin-top: 12px;
}

.kved-prose {
  max-width: 720px;
  display: grid;
  gap: 16px;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.kved-prose p {
  margin: 0;
}

.kved-callout {
  margin-top: 8px;
}

.kved-structure {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .kved-structure {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .kved-structure {
    grid-template-columns: 1fr;
  }
}

.kved-struct-card {
  background: var(--paper);
  border: 1px solid rgba(15, 23, 18, 0.08);
  border-radius: var(--radius, 18px);
  padding: 22px 20px;
}

.kved-struct-card .kved-code {
  display: inline-block;
  font-family: Unbounded, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.kved-struct-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.kved-struct-card p,
.kved-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.kved-note {
  margin-top: 20px;
  max-width: 720px;
}

.kved-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .kved-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .kved-section-grid {
    grid-template-columns: 1fr;
  }
}

.kved-section-card {
  display: grid;
  gap: 10px;
  padding: 22px 20px;
  border-radius: var(--radius, 18px);
  background: var(--paper);
  border: 1px solid rgba(15, 23, 18, 0.08);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.kved-section-card:hover {
  border-color: rgba(15, 23, 18, 0.22);
  transform: translateY(-2px);
}

.kved-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--lime);
  font-family: Unbounded, sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}

.kved-section-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.kved-section-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.kved-list {
  display: grid;
  gap: 10px;
}

.kved-list-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 18px;
  border-radius: var(--radius, 16px);
  background: var(--paper);
  border: 1px solid rgba(15, 23, 18, 0.08);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.kved-list-item:hover {
  border-color: rgba(15, 23, 18, 0.22);
}

.kved-list-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--paper-2, #f3f6f1);
  font-family: Unbounded, sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
}

.kved-list-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.kved-list-body strong {
  font-size: 1rem;
  line-height: 1.35;
}

.kved-list-body small {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.kved-list-arrow {
  color: var(--ink-soft);
  font-size: 1.2rem;
}

.kved-group-block + .kved-group-block {
  margin-top: 36px;
}

.kved-group-head a {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
}

.kved-group-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
}

.kved-class-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .kved-class-grid {
    grid-template-columns: 1fr;
  }

  .kved-list-item {
    grid-template-columns: auto 1fr;
  }

  .kved-list-arrow {
    display: none;
  }
}

.kved-class-card {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 18px;
  border-radius: var(--radius, 16px);
  background: var(--paper);
  border: 1px solid rgba(15, 23, 18, 0.08);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.kved-class-card:hover,
.kved-class-card.is-detailed {
  border-color: rgba(15, 23, 18, 0.18);
}

.kved-class-card.is-detailed {
  background:
    linear-gradient(180deg, rgba(198, 255, 120, 0.22), transparent 48%),
    var(--paper);
}

.kved-class-card strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.kved-class-card em {
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.kved-class-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 960px) {
  .kved-class-layout {
    grid-template-columns: 1fr;
  }
}

.kved-class-main {
  display: grid;
  gap: 32px;
}

.kved-class-main h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.kved-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .kved-two-col {
    grid-template-columns: 1fr;
  }
}

.kved-two-col ul,
.kved-groups-ep {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.kved-two-col li {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper-2, #f3f6f1);
  color: var(--ink-soft);
  line-height: 1.45;
}

.kved-groups-ep {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 800px) {
  .kved-groups-ep {
    grid-template-columns: 1fr;
  }
}

.kved-groups-ep article {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 18, 0.08);
  background: var(--paper);
}

.kved-groups-ep h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.kved-groups-ep p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.5;
}

.kved-aside {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 96px;
}

.kved-aside-card {
  padding: 18px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid rgba(15, 23, 18, 0.08);
}

.kved-aside-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.kved-aside-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.kved-aside-card a {
  color: inherit;
  font-weight: 600;
}

.kved-aside-card li {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.kved-cta-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.kved-cta-inner h2 {
  margin: 8px 0 10px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.kved-cta-inner p {
  margin: 0;
  max-width: 520px;
  color: var(--ink-soft);
}

.kved-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 800px) {
  .kved-cta-inner {
    flex-direction: column;
    align-items: stretch;
  }
}

.kved-crumb-item {
  display: contents;
}
