/* One offer system, adapted to existing markup. No content or search changes. */
:root {
  --offer-ink: #19382e;
  --offer-muted: #52665b;
  --offer-green: #087b49;
  --offer-line: #d5e2d9;
  --offer-paper: #fff;
  --offer-soft: #edf5ef;
  --offer-radius: 20px;
  --offer-pad: 24px;
  --offer-gap: 20px;
  --offer-title: 22px;
  --offer-copy: 15px;
  --offer-price: 20px;
  --offer-action-radius: 10px;
  --offer-action-size: 14px;
  --offer-small: 12px;
  --offer-on-green: #fff;
  --offer-badge-ink: #28573d;
  --offer-selected: #eff6f1;
}
html.a11y-mode.a11y-font-large { --offer-title: 26px; --offer-copy: 18px; --offer-price: 23px; --offer-action-size: 17px; --offer-small: 15px; }
html.a11y-mode.a11y-font-xlarge { --offer-title: 30px; --offer-copy: 21px; --offer-price: 26px; --offer-action-size: 19px; --offer-small: 17px; }
html.a11y-mode.a11y-theme-dark { --offer-paper: #000; --offer-ink: #fff; --offer-muted: #fff; --offer-soft: #111; --offer-line: #fff; --offer-green: #fff; --offer-on-green: #000; --offer-badge-ink: #fff; --offer-selected: #181818; }
html.a11y-mode.a11y-theme-yellow { --offer-paper: #000; --offer-ink: #ff0; --offer-muted: #ff0; --offer-soft: #111; --offer-line: #ff0; --offer-green: #ff0; --offer-on-green: #000; --offer-badge-ink: #ff0; --offer-selected: #181818; }

/* The same surface for programmes, services, directions and compact comparisons.
   Finder cards are selected by their data hook, not all nt-development cards:
   downloads, process steps, cases and document cards deliberately stay separate. */
body main :is(.nt-services-course,
  .services-catalog__card, .s-product-list-type-1__item, .training-catalog__card,
  [data-finder-card], .training-center-hub__directions > a,
  .program-related__card, .worker-catalog__card) {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: var(--offer-pad) !important;
  gap: 0;
  border: 1px solid var(--offer-line) !important;
  border-radius: var(--offer-radius) !important;
  background: var(--offer-paper) !important;
  color: var(--offer-ink);
  box-shadow: 0 4px 18px rgb(22 57 38 / 4%);
  text-decoration: none;
  overflow-wrap: anywhere;
  transform: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
body main :is(.nt-services-course,
  .services-catalog__card, .s-product-list-type-1__item, .training-catalog__card,
  [data-finder-card], .training-center-hub__directions > a,
  .program-related__card, .worker-catalog__card):is(:hover, :focus-within) {
  border-color: #80aa90 !important;
  box-shadow: 0 8px 24px rgb(22 57 38 / 8%);
  transform: none;
}

/* Shared title and copy roles. Legacy ID rules are adapted explicitly below. */
body main :is(.nt-services-course,
  .services-catalog__card, .training-catalog__card, [data-finder-card],
  .training-center-hub__directions > a, .worker-catalog__card) h3 {
  margin: 16px 0 10px !important;
  color: var(--offer-ink) !important;
  font-size: var(--offer-title) !important;
  font-weight: 700;
  line-height: 1.3 !important;
  letter-spacing: -.015em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
body main [data-finder-card] h3 a {
  color: inherit;
  font: inherit;
  text-decoration: none;
}
body .page-modern main[data-visual-unified] :is(.training-catalog__card,
  [data-finder-card], .training-center-hub__directions > a, .worker-catalog__card) p,
body main :is(.nt-services-course,
  .services-catalog__card, .training-catalog__card, [data-finder-card],
  .training-center-hub__directions > a) p {
  margin: 0 0 20px;
  color: var(--offer-muted);
  font-size: var(--offer-copy) !important;
  line-height: 1.6 !important;
}

/* Primary action for an offer is an outlined, full-width link. Its original
   wording, href, accessible name and link/button semantics remain untouched. */
body main :is(.nt-services-course__bottom > a, .services-catalog__card > a,
  .training-catalog__card > div > a, .training-catalog__card > div > button,
  [data-finder-card] > a, .training-center-hub__directions > a > div > strong,
  .worker-catalog__action) {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 48px !important;
  height: auto;
  margin-top: auto;
  padding: 11px 16px;
  align-items: center;
  justify-content: center;
  align-self: stretch !important;
  border: 1px solid #a0bdab !important;
  border-radius: var(--offer-action-radius) !important;
  background: var(--offer-paper) !important;
  color: var(--offer-green) !important;
  font-family: inherit;
  font-size: var(--offer-action-size) !important;
  font-weight: 700;
  line-height: 1.4 !important;
  text-align: center !important;
  text-decoration: none;
  white-space: normal !important;
  box-shadow: none;
  transform: none;
}
body main :is(.nt-services-course__bottom:hover > a:hover,
  .services-catalog__card > a:hover, .training-catalog__card > div > a:hover,
  .training-catalog__card > div > button:hover, [data-finder-card] > a:hover,
  .training-center-hub__directions > a:hover > div > strong,
  .worker-catalog__action:hover) {
  background: var(--offer-green) !important;
  border-color: var(--offer-green) !important;
  color: var(--offer-on-green) !important;
  transform: none;
}
body main :is(.home-catalog-card a, .home-catalog-feature a, .nt-services-course a,
  .nt-services-course button, .services-catalog__card a, .training-catalog__card a,
  .training-catalog__card button, [data-finder-card] a, .worker-catalog__card a,
  .worker-catalog__card button, .training-center-hub__directions > a,
  .program-related__card):focus-visible {
  outline: 3px solid #9b6417 !important;
  outline-offset: 3px;
}

/* Consistent badge, parameters and price hierarchy. */
body main :is(.services-catalog__code, .training-catalog__card > span,
  .training-center-hub__directions > a > span, .program-related__card > span,
  .nt-services-course__top > span:first-child, .worker-catalog__card-topline > span) {
  position: static;
  display: inline-flex;
  width: fit-content !important;
  max-width: 100%;
  min-width: 0;
  height: auto !important;
  padding: 6px 10px !important;
  margin: 0;
  align-items: center;
  align-self: flex-start;
  border: 1px solid #d6e7da;
  border-radius: 8px !important;
  background: var(--offer-soft) !important;
  color: var(--offer-badge-ink) !important;
  font-size: var(--offer-small) !important;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;
}
body main :is(.nt-services-course__bottom > strong,
  .training-catalog__card > div > strong, [data-finder-price],
  .worker-catalog__card-price strong) {
  color: var(--offer-ink);
  font-size: var(--offer-price) !important;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}
body main .training-catalog__card > div > strong { text-align: left !important; align-self: flex-start; }

/* Home is an editorial overview, not another uniform catalogue. Preserve the
   original 12-column composition, green lead cards and orange/red accents from
   catalog-cards-v1.css. Improve only reading and interaction affordances. */
body main :is(.home-catalog-card p, .home-catalog-feature__content > p) {
  color: var(--offer-muted);
  font-size: 15px;
  line-height: 1.55;
}
body main .home-catalog-card h3 { line-height: 1.18 !important; overflow-wrap: anywhere; }
body main :is(.home-catalog-card__action, .home-catalog-feature__action) {
  box-sizing: border-box;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 16px;
  line-height: 1.4;
  white-space: normal;
}
body main :is(.home-catalog-card__options, .home-catalog-feature__links) a {
  box-sizing: border-box;
  display: inline-flex;
  min-height: 44px;
  padding: 8px 12px;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
}
/* Five training destinations form a deliberate layout, not a wrapped orphan. */
body main .home-catalog-feature_training .home-catalog-feature__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
}
body main .home-catalog-feature_training .home-catalog-feature__links a {
  min-width: 0;
  justify-content: center;
  text-align: center;
}
body main .home-catalog-feature_training .home-catalog-feature__links a:last-child { grid-column: 1 / -1; }
@media (min-width: 960px) {
  body main .home-catalog-feature_training .home-catalog-feature__links { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body main .home-catalog-feature_training .home-catalog-feature__links a { grid-column: span 2; }
  body main .home-catalog-feature_training .home-catalog-feature__links a:nth-last-child(-n + 2) { grid-column: span 3; }
}
@media (min-width: 1360px) {
  body main .home-catalog-feature_training .home-catalog-feature__links { display: flex; flex-wrap: nowrap; }
  body main .home-catalog-feature_training .home-catalog-feature__links a { flex: 1 1 auto; }
}
/* Card accents identify directions; choice controls keep a calm green surface. */
body main .home-catalog-card__options a {
  border-color: #9bc9aa;
  background: #eff7f1;
  color: #075c32;
}
body main .home-catalog-card__options a:is(:hover, :focus-visible) {
  border-color: #087b49;
  background: #e3f2e8;
  color: #075c32;
}
body main :is(.home-catalog-card__link, .home-catalog-card__cover-link,
  .home-catalog-feature__cover-link):focus-visible { outline-offset: -5px !important; }

/* Grid adapters: equal cards within each offer list, not a redesign of sections. */
body main :is(.nt-services-courses, .services-catalog__grid,
  .training-catalog__grid, [data-finder-list], .training-center-hub__directions,
  .program-related__grid, .worker-catalog__grid) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--offer-gap);
  align-items: stretch;
}
body main .training-center-hub__directions > a { grid-column: auto !important; }
body main .training-center-hub__directions:not(.training-center-hub__directions_secondary) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-modern .training-catalog__card { padding: var(--offer-pad) !important; }
body main .training-center-hub__directions > a > div { display: flex; flex: 1; min-width: 0; flex-direction: column; }
body main .nt-services-course__top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
body main .nt-services-course__top > span:last-child { font-size: 14px; color: var(--offer-muted); }
body main :is(.nt-services-course__bottom, .training-catalog__card > div) {
  display: flex;
  width: 100%;
  margin-top: auto;
  padding-top: 16px;
  gap: 16px;
  flex-direction: column;
  align-items: stretch;
  border-top: 1px solid var(--offer-line);
}
body main .nt-services-course_help { background: var(--offer-selected) !important; }
body main .nt-services-course_help > button { margin-top: auto; min-height: 46px; border-radius: var(--offer-action-radius); white-space: normal; }
body main [data-finder-card] > p { margin-top: 0; }
body main [data-finder-card] dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; margin: auto 0 20px; padding-top: 16px; border-top: 1px solid var(--offer-line); }
body main [data-finder-card] dt { margin: 0; color: var(--offer-muted); font-size: 13px; }
body main [data-finder-card] dd { min-width: 0; margin: 0; font-size: 17px; font-weight: 700; line-height: 1.5; }
body main [data-finder-card] dt:nth-of-type(1) { grid-area: 1 / 1; }
body main [data-finder-card] dd:nth-of-type(1) { grid-area: 2 / 1; }
body main [data-finder-card] dt:nth-of-type(2) { grid-area: 1 / 2; }
body main [data-finder-card] dd:nth-of-type(2) { grid-area: 2 / 2; }
body main [data-finder-card] > a { margin-top: 0; }
body main .worker-catalog__card dl { flex: 1; margin: 10px 0 20px; }
body main .worker-catalog__card-price { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; margin: auto 0 16px; padding-top: 16px; border-top: 1px solid var(--offer-line); }
body main .worker-catalog__card-price span { color: var(--offer-muted); font-size: 13px; }
body main .worker-catalog__card-topline > .worker-catalog__detail-badge { background: var(--offer-green) !important; color: var(--offer-on-green) !important; }
body main .services-catalog__card::after { display: none; }

/* A whole-card link for comparing adjacent programmes stays compact and is not
   given a fake nested button. Current-page and keyboard states stay explicit. */
body main .program-related__card > strong { margin: 16px 0 10px; color: var(--offer-ink); font-size: calc(var(--offer-title) - 2px); line-height: 1.35; }
body main .program-related__card > small { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--offer-line); color: var(--offer-muted); font-size: 15px; line-height: 1.6; }
body main .program-related__card[aria-current="page"] { border-color: #638d71 !important; background: var(--offer-selected) !important; }

/* Legacy cards: use layout areas instead of absolutely positioning the price.
   display:contents only flattens a non-semantic div; title and copy keep tags. */
.page-modern #product-list .s-product-list-type-1__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--offer-gap); }
.page-modern #product-list .s-product-list-type-1__item { min-height: 0; padding: var(--offer-pad) !important; background: #fff; }
.page-modern #product-list .s-product-list-type-1__item::before { display: none; }
.page-modern #product-list .s-product-list-type-1__item-content { display: grid !important; grid-template-areas: 'title' 'copy' 'price' 'action'; grid-template-rows: auto 1fr auto auto; gap: 0; height: 100%; width: 100%; }
.page-modern #product-list .s-product-list-type-1__info { display: contents; }
.page-modern main[data-visual-unified] #product-list .s-product-list-type-1__item [data-goods-field="title"] { grid-area: title; margin: 0 0 10px !important; color: var(--offer-ink); font-size: var(--offer-title) !important; font-weight: 700; line-height: 1.3 !important; }
.page-modern main[data-visual-unified] #product-list .s-product-list-type-1__item [data-goods-field="description"] { grid-area: copy; margin: 0 0 20px !important; color: var(--offer-muted) !important; font-size: var(--offer-copy) !important; line-height: 1.6 !important; }
.page-modern #product-list .s-product-list-type-1__price { grid-area: price; position: static; align-self: stretch; max-width: 100% !important; width: auto !important; padding: 16px 0 0; margin: 0 0 16px !important; border: 0; border-top: 1px solid var(--offer-line); border-radius: 0; background: transparent; color: var(--offer-ink); font-size: var(--offer-price) !important; line-height: 1.35 !important; text-align: left; white-space: normal !important; }
.page-modern main[data-visual-unified] #product-list .s-product-list-type-1__item .s-product-list-type-1__price { font-size: var(--offer-price) !important; }
.page-modern #product-list .program-card-link { grid-area: action; width: 100%; max-width: 100%; min-height: 46px; padding: 11px 16px; margin: 0; align-self: stretch; color: var(--offer-green); border: 1px solid #a0bdab; border-radius: var(--offer-action-radius); background: #fff; font-size: 14px; font-weight: 700; line-height: 1.4; text-align: center; }
.page-modern main[data-visual-unified] #product-list .s-product-list-type-1__item .program-card-link { width: 100%; max-width: 100%; min-height: 48px !important; height: auto; padding: 11px 16px; border: 1px solid #a0bdab !important; border-radius: var(--offer-action-radius) !important; }
.page-modern main[data-visual-unified] #product-list .program-card-link { background: var(--offer-paper) !important; color: var(--offer-green) !important; font-size: var(--offer-action-size) !important; }
.page-modern #product-list .program-card-link:is(:hover, :focus-visible) { background: var(--offer-green) !important; color: var(--offer-on-green) !important; }
.page-modern #product-list .program-card-link:focus-visible { outline: 3px solid #9b6417 !important; outline-offset: 3px; }
.page-modern #product-list .program-card-link::after,
.page-modern .training-catalog__card a::after { display: none; }

/* Filtering must always win over a card's flex layout, including dynamic rows. */
body main :is(.services-catalog__card, .training-catalog__card, [data-finder-card], .worker-catalog__card)[hidden] { display: none !important; }

@media (max-width: 1100px) {
  body main :is(.nt-services-courses,
    .services-catalog__grid, .training-catalog__grid, [data-finder-list],
    .training-center-hub__directions, .program-related__grid, .worker-catalog__grid),
  .page-modern #product-list .s-product-list-type-1__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body main .training-center-hub__directions:not(.training-center-hub__directions_secondary) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  :root { --offer-pad: 22px; --offer-gap: 16px; }
  body main :is(.nt-services-courses,
    .services-catalog__grid, .training-catalog__grid, [data-finder-list],
    .training-center-hub__directions, .program-related__grid, .worker-catalog__grid),
  .page-modern #product-list .s-product-list-type-1__list { grid-template-columns: minmax(0, 1fr); }
  body main .training-center-hub__directions:not(.training-center-hub__directions_secondary) { grid-template-columns: minmax(0, 1fr); }
  .page-modern #product-list .s-product-list-type-1__item { padding: var(--offer-pad) !important; }
}
@media (prefers-reduced-motion: reduce) {
  body main :is(.nt-services-course,
    .services-catalog__card, .s-product-list-type-1__item, .training-catalog__card,
    [data-finder-card], .training-center-hub__directions > a,
    .program-related__card, .worker-catalog__card) { transition: none; }
}
