/* ===== ГЛАВНАЯ СТРАНИЦА ===== */

/* Поиск в hero — отличается от ИП-варианта (поиск шире, кнопка крупнее) */
/* ===== HERO-СЕКЦИЯ ===== */

/* ===== КОНТЕНТ ===== */

.content {
  display: block;
  padding: 18px clamp(20px, 4vw, 64px) 20px;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent;
}

.home-grid {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-grid .section {
  background: #ffffff;
  width: 100%;
}

.home-grid .section::before {
  display: none;
}

.home-grid .section.section-plain {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.home-grid .section.section-plain h2 {
  line-height: 1.28;
  overflow: visible;
}

.home-grid .section.section-plain#features h2,
.home-grid .section.section-heading-large h2 {
  margin-bottom: 12px;
  max-width: 610px;
  margin-left: auto;
  margin-right: auto;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  color: #111827;
}

.home-grid .section.section-heading-large h2 {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.home-grid #home-intro + #forwho,
.home-grid #forwho + #features {
  margin-top: clamp(10px, 1.4vw, 20px);
}

.home-grid #features + #okved {
  margin-top: 28px;
}

.home-grid #okved + #ip-alphabet {
  margin-top: 28px;
}

.section-sub {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
  max-width: 680px;
}

/* ===== Возможности ===== */

.feature-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  min-height: 0;
  padding: 16px 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  overflow: visible;
}

.feature-card,
.feature-card-1 {
  border-color: rgba(199, 210, 254, 0.9);
  background: rgba(238, 242, 255, 0.9);
}

.feature-card-2 {
  border-color: rgba(199, 210, 254, 0.9);
  background: rgba(238, 242, 255, 0.9);
}

.feature-card-3 {
  border-color: rgba(199, 210, 254, 0.9);
  background: rgba(238, 242, 255, 0.9);
}

.feature-card-4 {
  border-color: rgba(199, 210, 254, 0.9);
  background: rgba(238, 242, 255, 0.9);
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.feature-points {
  display: grid;
  gap: 5px;
}

.feature-point {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #64748b;
  font-size: 13px;
  line-height: 1.42;
}

.feature-mark {
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(219, 234, 254, 0.85);
  flex-shrink: 0;
}

/* ===== ОКВЭД-разделы ===== */

.okved-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px 20px;
  margin-top: 4px;
  font-size: 13px;
}

.okved-row {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.okved-code {
  font-weight: 600;
  color: #111827;
  width: 22px;
  flex-shrink: 0;
}

.okved-name {
  color: #4b5563;
}

.okved-toggle {
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--tag-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  line-height: 16px;
  font-weight: 600;
  font-size: 16px;
}

.okved-toggle:hover,
.okved-toggle[aria-expanded="true"] {
  color: var(--tag-text);
}

.okved-item {
  display: block;
}

.okved-details {
  margin-left: 54px;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
}

.okved-detail-line {
  margin-top: 4px;
}

.okved-search-link {
  display: block;
  color: #4b5563;
  text-decoration: none;
}

.okved-search-link:hover {
  color: var(--link-hover);
}

.okved-detail-line:first-child {
  margin-top: 0;
}

.okved-subcode {
  display: inline-block;
  width: 26px;
  font-weight: 600;
  color: #111827;
}

/* ===== Источники данных ===== */

.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
}

/* ===== Задачи ===== */

.home-intro-note {
  max-width: 760px;
}

.home-intro-note h1 {
  margin-bottom: 12px;
  max-width: 610px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
  color: #111827;
  font-weight: 700;
  text-transform: none;
}

.home-intro-note p {
  margin: 0;
  max-width: 660px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.62;
}

.content-error {
  padding-top: 78px;
  padding-bottom: 96px;
}

.content-error .main {
  max-width: none;
  margin: 0;
}

.error-grid {
  max-width: 980px;
  margin: 0 auto;
  gap: 0;
}

.error-intro {
  max-width: 860px;
  text-align: center;
}

.error-code {
  margin-bottom: 18px;
  color: #2563eb;
  font-size: clamp(58px, 9vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.error-intro h1 {
  max-width: 610px;
  margin-left: auto;
  margin-right: auto;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
}

.error-intro p {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  font-size: 18px;
  line-height: 1.65;
}

.error-home-link {
  margin-top: 24px;
  display: inline-flex;
  color: #2563eb;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.error-home-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.task-solution {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
  gap: 34px;
  align-items: center;
}

.task-copy {
  min-width: 0;
}

.task-solution-head h2 {
  margin-bottom: 12px;
  max-width: 610px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: none;
  color: #111827;
}

.heading-brand-word {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tag-text);
}

.task-solution-head p {
  margin: 0;
  max-width: 660px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 28px;
  margin-top: 24px;
  font-size: 13px;
}

.task-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 2px 0;
}

.task-mark {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(219, 234, 254, 0.95);
  flex-shrink: 0;
}

.task-title {
  font-weight: 650;
  margin-bottom: 4px;
  color: #111827;
}

.task-text {
  color: #6b7280;
  line-height: 1.42;
}

.task-photo {
  position: relative;
  min-height: 340px;
  padding: 0 0 34px 58px;
}

.task-photo-empty {
  display: none;
  padding: 0;
}

.task-photo-main,
.task-photo-small {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(148, 163, 184, 0.85);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.95));
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.task-photo-main {
  min-height: 330px;
}

.task-photo-small {
  position: absolute;
  left: 0;
  top: 34px;
  width: 150px;
  min-height: 116px;
  background:
    linear-gradient(135deg, rgba(226, 232, 240, 0.92), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.task-photo-badge {
  position: absolute;
  left: 58px;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.26);
}

.task-photo-badge strong {
  font-size: 34px;
  line-height: 1;
}

.task-photo-badge span {
  font-size: 12px;
  line-height: 1.15;
}

/* ===== Адаптив главной ===== */

@media (max-width: 1180px) {
  .feature-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .task-solution {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

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

  .task-photo {
    min-height: 0;
    padding: 0 0 34px 38px;
  }

  .task-photo-main {
    min-height: 240px;
  }

  .task-photo-small {
    width: 126px;
    min-height: 94px;
    top: 24px;
  }

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

@media (max-width: 640px) {
  .content {
    padding: 12px;
  }

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

  .feature-card {
    padding-inline: 22px;
  }
}
