:root {
  --bg: #f6f7fa;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #0a0e1a;
  --ink-soft: #1f2433;
  --muted: #5b6473;
  --muted-soft: #98a0ad;
  --line: #e8ebf1;
  --line-strong: #d4d9e2;
  --accent: #2f5cff;
  --accent-dark: #1d3fcf;
  --accent-soft: rgba(47, 92, 255, 0.08);
  --accent-glow: rgba(47, 92, 255, 0.18);
  --success: #0ea36b;
  --success-soft: rgba(14, 163, 107, 0.1);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.1);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Inter", "Manrope", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11", "tnum";
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

.page-shell--narrow {
  width: min(1120px, calc(100% - 32px));
}

/* --- Hero / Company hero --- */
.hero,
.company-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hero::before,
.company-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(135deg, black 0%, transparent 60%);
          mask-image: linear-gradient(135deg, black 0%, transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}

.hero::after,
.company-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #6c8aff 50%, #00c6a8 100%);
  pointer-events: none;
}

.hero h1,
.company-hero h1,
.section-head h2,
.company-card h2,
.sidebar-card h2,
.program-card h2,
.filter-panel h3 {
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
}

.hero h1,
.company-hero h1 {
  position: relative;
  max-width: 18ch;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  letter-spacing: -0.035em;
}

.hero__kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__kicker::before,
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero__lead,
.section-head p,
.company-card__sheet,
.program-preview,
.program-nav a {
  color: var(--muted);
}

.hero__lead {
  position: relative;
  max-width: 64ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero__stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero__stats div {
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.hero__stats span {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}

.hero__stats-text {
  font-size: clamp(1rem, 1.6vw, 1.35rem) !important;
  letter-spacing: -0.01em !important;
}

.hero__stats small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- Catalog --- */
.catalog,
.company-layout {
  margin-top: 36px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin-top: 6px;
}

.section-head p {
  margin: 8px 0 0;
  max-width: 70ch;
  font-size: 0.98rem;
}

/* --- Filter panel --- */
.filter-panel {
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.filter-panel__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.filter-panel h3 {
  font-size: 1.15rem;
  margin-top: 4px;
}

.filter-result {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.filter-controls {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 18px;
}

.filter-field {
  flex: 1 1 auto;
  display: grid;
  gap: 6px;
}

.filter-field span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.filter-field input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.filter-field input::placeholder {
  color: var(--muted-soft);
}

.filter-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* --- Buttons --- */
.button-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.button-link {
  margin-top: auto;
  color: #ffffff;
  background: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-sm);
}

.button-link::after {
  content: "→";
  font-size: 1.05em;
  transition: transform 150ms ease;
}

.button-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 22px var(--accent-glow);
  transform: translateY(-1px);
}

.button-link:hover::after {
  transform: translateX(3px);
}

.button-link--ghost {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.button-link--ghost::after {
  content: none;
}

.button-link--ghost:hover {
  background: var(--surface-2);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.back-link {
  margin-bottom: 20px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 500;
}

.back-link::before {
  content: "←";
  margin-right: 4px;
  transition: transform 150ms ease;
}

.back-link:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface-2);
}

.back-link:hover::before {
  transform: translateX(-3px);
}

/* --- Company grid --- */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 14px;
}

.company-card,
.sidebar-card,
.program-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.company-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
  padding: 22px;
  position: relative;
  isolation: isolate;
}

.company-card.is-hidden {
  display: none;
}

.company-card__top {
  display: grid;
  gap: 10px;
}

.company-card .eyebrow {
  align-self: start;
  margin: 0;
}

.company-card h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.company-card__sheet {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted-soft);
  text-transform: uppercase;
  font-weight: 500;
}

.company-card:hover,
.program-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

/* --- Tags --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}

.tag-muted {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-weight: 600;
}

/* --- Company layout --- */
.company-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.company-sidebar {
  position: sticky;
  top: 18px;
}

.sidebar-card {
  padding: 22px;
}

.sidebar-card .eyebrow {
  margin-bottom: 10px;
}

.sidebar-card h2 {
  font-size: 1.1rem;
}

.program-nav {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.program-nav li {
  position: relative;
  padding: 0;
}

.program-nav li + li {
  border-top: 1px solid var(--line);
}

.program-nav a {
  display: block;
  padding: 11px 12px 11px 14px;
  margin: 0 -12px 0 -14px;
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  transition:
    border-color 120ms ease,
    color 120ms ease,
    background 120ms ease;
}

.program-nav a:hover {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.program-nav__title {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.program-nav__meta {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  text-transform: none;
}

/* --- Program list --- */
.program-list {
  display: grid;
  gap: 14px;
}

.program-card {
  padding: 24px;
}

.program-card__header {
  display: flex;
  gap: 14px;
  align-items: start;
}

.program-card h2 {
  flex: 1;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  letter-spacing: -0.015em;
}

.program-verified {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.program-index {
  flex: 0 0 auto;
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.program-preview {
  margin: 14px 0 0;
  font-size: 0.96rem;
  line-height: 1.6;
}

.program-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.program-tag-list li {
  display: contents;
}

.program-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.program-tag:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.program-client {
  margin: 16px 0 0;
  padding: 16px 18px;
  border: 1px solid rgba(14, 163, 107, 0.22);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm);
  background: var(--success-soft);
}

.program-client__label {
  margin: 0 0 8px;
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.program-client__body p {
  margin: 0;
  color: var(--ink);
  font-size: 0.97rem;
  line-height: 1.6;
}

.program-client__body p + p {
  margin-top: 10px;
}

.program-preview + .program-details,
.program-client + .program-preview {
  margin-top: 14px;
}

.program-details {
  margin-top: 16px;
}

.program-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  list-style: none;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.program-details summary::-webkit-details-marker {
  display: none;
}

.program-details summary::after {
  content: "+";
  font-size: 1.1em;
  font-weight: 400;
  transition: transform 200ms ease;
}

.program-details[open] summary::after {
  transform: rotate(45deg);
}

.program-details summary:hover {
  background: var(--surface-2);
  border-color: var(--ink);
}

.program-details__body {
  margin-top: 14px;
  padding: 18px 20px 6px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
}

.program-details__body p {
  margin: 0 0 12px;
}

abbr.kasko-term {
  position: relative;
  text-decoration: underline dotted var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: help;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

abbr.kasko-term:hover {
  background: var(--accent-soft);
  border-radius: 3px;
}

/* Custom popover on focus — works on touch devices too, where :hover and the
   native title tooltip don't fire. Tapping the underlined term focuses it
   (tabindex=0) and reveals the explanation. */
abbr.kasko-term:focus::after {
  content: attr(title);
  position: absolute;
  z-index: 50;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
  white-space: normal;
  pointer-events: none;
}

abbr.kasko-term:focus::before {
  content: "";
  position: absolute;
  z-index: 51;
  bottom: calc(100% + 2px);
  left: 12px;
  border: 6px solid transparent;
  border-top-color: var(--ink);
  pointer-events: none;
}

.program-section-title {
  margin: 18px 0 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.program-bullet-list {
  margin: 0 0 14px;
  padding-left: 20px;
}

.program-bullet-list li {
  margin: 0 0 6px;
}

.program-bullet-list li::marker {
  color: var(--accent);
}

/* --- Empty state --- */
.empty-state {
  margin: 24px 0 0;
  padding: 22px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .company-layout {
    grid-template-columns: 1fr;
  }

  .company-sidebar {
    position: static;
  }

  .filter-panel__top,
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .page-shell--narrow {
    width: min(100% - 20px, 1240px);
    padding-top: 16px;
  }

  .hero,
  .company-hero {
    padding: 30px 22px;
    border-radius: 16px;
  }

  .company-card,
  .sidebar-card,
  .program-card {
    padding: 20px;
    border-radius: 12px;
  }

  /* Program card header: don't squash the title between index pill and
     verified-date pill — put the date on its own row. */
  .program-card__header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .program-card__header h2 {
    flex: 1 1 calc(100% - 48px);
    min-width: 0;
  }

  .program-verified {
    flex-basis: 100%;
    font-size: 0.72rem;
  }

  /* The company-hero summary text can be long ("Полное · Угон+Тоталь ·
     Третьи лица") — keep it from spilling sideways. */
  .hero__stats-text {
    overflow-wrap: anywhere;
  }

  /* Larger tap targets in the footer nav. */
  .site-footer__nav a {
    padding: 4px 0;
  }
}

/* --- Freshness marker --- */
.freshness {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.freshness::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(14, 163, 107, 0.18);
}

.hero__updated {
  position: relative;
  margin: 22px 0 0;
}

/* --- Site footer --- */
.site-footer {
  margin-top: 56px;
  padding: 32px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer__credit {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}

.site-footer__credit strong {
  color: var(--accent-dark);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.site-footer__nav a {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-footer__nav a:hover {
  border-bottom-color: var(--accent-dark);
}

.site-footer__nav span[aria-hidden] {
  color: var(--muted-soft);
}

.site-footer__legal {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .site-footer {
    padding: 24px 22px;
    border-radius: 16px;
  }
}

/* --- Hero CTA --- */
.hero__cta {
  position: relative;
  margin: 28px 0 0;
}

/* --- Comparison table --- */
.comparison-section {
  margin-top: 20px;
}

.comparison-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.comparison-details summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid transparent;
  transition: background 150ms ease, border-color 150ms ease;
}

.comparison-details summary::-webkit-details-marker {
  display: none;
}

.comparison-details[open] summary {
  background: var(--surface-2);
  border-bottom-color: var(--line);
}

.comparison-details summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.3em;
  font-weight: 400;
  color: var(--muted);
  transition: transform 200ms ease;
}

.comparison-details[open] summary::after {
  transform: rotate(45deg);
}

.comparison-details summary:hover {
  background: var(--surface-2);
}

.comparison-details__label {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.comparison-details__hint {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comparison-section__lead {
  margin: 16px 22px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.comparison-table-wrap {
  margin: 14px 0 0;
  padding: 0 22px 22px;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.comparison-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  padding: 12px 14px;
  border-bottom: 2px solid var(--line-strong);
  text-align: center;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.comparison-table thead th.comparison-table__name,
.comparison-table thead th.comparison-table__company {
  text-align: left;
}

.comparison-table tbody tr + tr th,
.comparison-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.comparison-table tbody tr:hover td,
.comparison-table tbody tr:hover th {
  background: var(--accent-soft);
}

.comparison-table tbody th,
.comparison-table tbody td {
  padding: 12px 14px;
  text-align: center;
  vertical-align: middle;
}

.comparison-table tbody th.comparison-table__name,
.comparison-table tbody td.comparison-table__company {
  text-align: left;
  font-weight: 500;
}

.comparison-table tbody th.comparison-table__name a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

.comparison-table tbody th.comparison-table__name a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

.comparison-table__yes {
  color: var(--success);
  font-weight: 700;
  font-size: 1.1rem;
}

.comparison-table__no {
  color: var(--muted-soft);
  font-weight: 400;
}

@media (max-width: 640px) {
  .comparison-details summary,
  .comparison-section__lead,
  .comparison-table-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }
  .comparison-table thead th,
  .comparison-table tbody th,
  .comparison-table tbody td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }
}

/* --- Programs page (global program catalog) --- */
.programs-page {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.tag-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.tag-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.tag-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.tag-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tag-chip.is-active .tag-chip__count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.view-toggle {
  display: inline-flex;
  margin-top: 4px;
  padding: 4px;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  align-self: start;
  width: max-content;
}

.view-toggle__btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.view-toggle__btn:hover {
  color: var(--ink);
}

.view-toggle__btn.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.programs-table-wrap--full {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.programs-table-wrap--full .comparison-table {
  margin: 0;
}

.programs-table-wrap--full .comparison-table thead th {
  padding: 14px 16px;
}

.programs-table-wrap--full .comparison-table tbody th,
.programs-table-wrap--full .comparison-table tbody td {
  padding: 14px 16px;
}

.comparison-table tbody tr.is-hidden {
  display: none;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 14px;
}

.programs-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.programs-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.programs-card.is-hidden {
  display: none;
}

.programs-card__top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.programs-card__company {
  align-self: start;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 150ms ease, border-color 150ms ease;
}

.programs-card__company:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.program-tag-list--compact {
  margin: 0;
}

.programs-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
}

.program-client-snippet {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.programs-card .button-link {
  align-self: start;
  margin-top: auto;
}

/* --- Methodology page --- */
.methodology {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.methodology__section {
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.methodology__section h2 {
  margin: 0 0 14px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.methodology__section p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.methodology__section p + p {
  margin-top: 12px;
}

.methodology__section a {
  color: var(--accent-dark);
}

.methodology__list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.methodology__list li::marker {
  color: var(--accent);
}

.methodology__list strong {
  color: var(--ink);
}

@media (max-width: 640px) {
  .methodology__section {
    padding: 22px 20px;
    border-radius: 14px;
  }
}
