/* Внутренние страницы — продолжение базовой темы */

body.subpage {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--page-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--page-grid-line) 1px, transparent 1px);
  background-size: 100% 48px, 48px 100%;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.subpage main {
  flex: 1;
}

.subpage .shell > main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline-start: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-inline-end: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(8px * 2);
  padding-block: calc(8px * 3);
}

.site-brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--fg);
  text-decoration: none;
}

.site-brand:hover {
  opacity: 0.85;
}

.site-brand:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: calc(8px * 3);
  justify-content: flex-end;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  position: relative;
  padding-block: 2px;
}

.nav a[aria-current="page"]::after,
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
}

.nav a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.page-inner {
  padding-block: calc(8px * 8) calc(8px * 12);
  position: relative;
}

.page-inner::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(8px * 8);
  width: 3rem;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
  opacity: 0.7;
}

.page-inner h1 {
  margin: 0 0 calc(8px * 3);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-inner .lead {
  font-size: 1.125rem;
  color: var(--fg-muted);
  max-width: 46ch;
  margin: 0 0 calc(8px * 4);
}

.page-inner p {
  margin: 0 0 calc(8px * 2);
  max-width: 58ch;
  color: var(--fg-muted);
}

/* Публичная оферта (Terms) */
.legal-page .legal-offer {
  margin-top: calc(8px * 4);
}

.legal-page .legal-offer h2 {
  margin: calc(8px * 5) 0 calc(8px * 2);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.3;
  max-width: none;
}

.legal-page .legal-offer > section:first-of-type h2 {
  margin-top: calc(8px * 2);
}

.legal-page .legal-offer h3 {
  margin: calc(8px * 3) 0 calc(8px * 1);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.35;
  max-width: none;
}

.legal-page .legal-offer h4 {
  margin: calc(8px * 2) 0 calc(8px * 1);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.35;
  max-width: none;
}

.legal-page .legal-offer p,
.legal-page .legal-offer li {
  max-width: 72ch;
  line-height: 1.65;
  color: var(--fg-muted);
}

.legal-page .legal-offer ul,
.legal-page .legal-offer ol {
  margin: 0 0 calc(8px * 2);
  padding-left: 1.35rem;
}

.legal-page .legal-offer li {
  margin-bottom: 0.45em;
}

.legal-page .legal-offer li:last-child {
  margin-bottom: 0;
}

.legal-page .legal-doc-meta {
  margin: 0 0 calc(8px * 3);
  font-size: 0.9375rem;
  color: var(--fg-muted);
  max-width: 72ch;
}

.legal-page .legal-requisites {
  margin-top: calc(8px * 5);
  padding: calc(8px * 4);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.legal-page .legal-requisites h2 {
  margin-top: 0;
}

.legal-page .legal-requisites p {
  max-width: none;
}

.legal-page .legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 calc(8px * 2);
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.legal-page table.legal-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.45;
}

.legal-page .legal-table th,
.legal-page .legal-table td {
  padding: calc(8px * 2) calc(8px * 2);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--fg-muted);
}

.legal-page .legal-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--surface-panel);
}

.legal-page .legal-table tr:last-child th,
.legal-page .legal-table tr:last-child td {
  border-bottom: none;
}

.legal-page .legal-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: calc(8px * 5) 0;
}

/* Форма обратной связи (контакты) */
.contact-form {
  position: relative;
  max-width: 36rem;
  margin: calc(8px * 4) 0 calc(8px * 6);
  padding: calc(8px * 4);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: 8px;
}

.contact-form__success {
  margin: 0 0 calc(8px * 3);
  padding: calc(8px * 3);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-left-color: var(--binary-bright);
  background: var(--surface-panel);
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.contact-form__success[hidden] {
  display: none !important;
}

.contact-form__error {
  margin: 0 0 calc(8px * 3);
  padding: calc(8px * 3);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-left-color: #b85c5c;
  background: var(--surface-panel);
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.contact-form__error[hidden] {
  display: none !important;
}

.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.contact-form__intro {
  margin: 0 0 calc(8px * 3);
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: none;
}

.contact-form__field {
  margin: 0 0 calc(8px * 3);
}

.contact-form__field:last-of-type {
  margin-bottom: calc(8px * 2);
}

.contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: calc(8px * 1);
}

.contact-form .label-optional {
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--fg-muted);
  opacity: 0.85;
}

.contact-form input[type="text"]:not(.contact-form__honeypot),
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: calc(8px * 2) calc(8px * 2);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  color: var(--fg);
  background: var(--card-fill);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.contact-form textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 1px var(--fg);
}

.contact-form__hint {
  margin: calc(8px * 1) 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--fg-muted);
}

.contact-form__actions {
  margin-top: calc(8px * 3);
}

.contact-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 calc(8px * 4);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--card-fill);
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.contact-form__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.contact-form__submit:hover {
  background: var(--surface-panel);
  color: var(--fg);
}

.contact-form__submit:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.contact-form__footer {
  margin: calc(8px * 3) 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-muted);
}

.contact-form__footer a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-inner .jp-aside {
  font-family: var(--font-jp);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--binary-bright);
  margin-bottom: calc(8px * 2);
}

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  margin-bottom: calc(8px * 4);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.back-link:hover {
  color: var(--fg);
  border-bottom-color: currentColor;
}

.back-link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.text-link {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link:hover {
  opacity: 0.85;
}

.text-link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.site-footer__inner {
  display: grid;
  gap: calc(8px * 2);
  padding-block: calc(8px * 4);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: calc(8px * 3);
  }
}

.site-footer__brand {
  color: var(--fg);
  font-weight: 600;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: calc(8px * 2) calc(8px * 4);
  justify-content: center;
}

.site-footer__links a {
  color: var(--fg-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--fg);
}

.site-footer__copy {
  text-align: right;
}

@media (max-width: 767px) {
  .site-footer__copy {
    text-align: left;
  }
}

/* System status — мониторинг страниц */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-meta {
  margin-block: calc(8px * 4) calc(8px * 5);
  padding: calc(8px * 4);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.status-meta__grid {
  display: grid;
  gap: calc(8px * 3);
  margin: 0;
}

@media (min-width: 640px) {
  .status-meta__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.status-meta__grid > div {
  margin: 0;
}

.status-meta__grid dt {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 calc(8px * 1);
}

.status-meta__grid dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
}

.status-meta__note {
  margin: calc(8px * 3) 0 calc(8px * 3);
  max-width: 62ch;
  font-size: 14px;
  color: var(--fg-muted);
}

.status-check-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--fg);
  border: 1px solid var(--fg);
  padding: calc(8px * 2) calc(8px * 3);
  cursor: pointer;
  transition: opacity 0.2s var(--ease);
}

.status-check-btn:hover:not(:disabled) {
  opacity: 0.88;
}

.status-check-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status-check-btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.status-board {
  margin-block: 0 calc(8px * 6);
  overflow-x: auto;
  border: 1px solid var(--line);
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.status-table th,
.status-table td {
  padding: calc(8px * 2) calc(8px * 3);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.status-table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--surface-panel);
}

.status-table tbody th {
  font-weight: 500;
  color: var(--fg);
  max-width: 14rem;
}

.status-table tbody td {
  color: var(--fg-muted);
}

.status-table tbody tr:last-child th,
.status-table tbody tr:last-child td {
  border-bottom: none;
}

.status-table code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--binary-bright);
}

/* Столбец «Файл»: контрастнее подписей и кода статуса */
.status-table thead th:nth-child(2) {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.14em;
}

.status-table tbody td:nth-child(2) {
  color: var(--fg);
}

.status-table tbody td:nth-child(2) code {
  display: inline-block;
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-panel);
}

.status-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px solid var(--line);
  min-width: 2.75rem;
  text-align: center;
}

.status-code--ok {
  color: #b8f5c8;
  border-color: rgba(120, 220, 160, 0.45);
  background: rgba(80, 200, 120, 0.12);
}

.status-code--warn {
  color: #ffe8a8;
  border-color: rgba(240, 200, 100, 0.45);
  background: rgba(240, 180, 60, 0.1);
}

.status-code--bad {
  color: #ffb8b8;
  border-color: rgba(240, 120, 120, 0.45);
  background: rgba(220, 80, 80, 0.1);
}

.status-code--pending {
  color: var(--fg);
  border-color: var(--line-strong);
  animation: status-pulse 1.1s ease-in-out infinite;
}

.status-code--muted {
  color: var(--fg-muted);
  border-color: var(--line);
  background: transparent;
}

/* Светлая тема: коды статуса должны оставаться читаемыми на светлом фоне */
html[data-theme="light"] .status-code--ok {
  color: #0f3d26;
  border-color: rgba(22, 110, 72, 0.55);
  background: rgba(34, 150, 95, 0.2);
}

html[data-theme="light"] .status-code--warn {
  color: #5c4300;
  border-color: rgba(170, 120, 0, 0.55);
  background: rgba(245, 200, 70, 0.35);
}

html[data-theme="light"] .status-code--bad {
  color: #6a1212;
  border-color: rgba(180, 50, 50, 0.5);
  background: rgba(220, 80, 80, 0.18);
}

html[data-theme="light"] .status-code--pending {
  color: var(--fg);
  border-color: var(--line-strong);
  background: var(--surface-panel);
}

html[data-theme="light"] .status-code--muted {
  color: var(--fg);
  border-color: var(--line-strong);
  background: var(--surface-panel);
  opacity: 0.92;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.status-legend {
  margin-top: calc(8px * 2);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.status-legend summary {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  padding: calc(8px * 3);
  cursor: pointer;
  list-style: none;
}

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

.status-legend summary::after {
  content: " +";
  color: var(--fg-muted);
}

.status-legend[open] summary::after {
  content: " −";
}

.status-legend__body {
  padding: 0 calc(8px * 3) calc(8px * 4);
  border-top: 1px solid var(--line);
}

.status-legend__intro {
  margin: calc(8px * 3) 0;
  font-size: 14px;
  color: var(--fg-muted);
  max-width: 58ch;
}

.status-legend__list {
  margin: 0;
  display: grid;
  gap: calc(8px * 2);
}

.status-legend__list > div {
  display: grid;
  grid-template-columns: minmax(5rem, auto) 1fr;
  gap: calc(8px * 2);
  align-items: start;
}

@media (max-width: 520px) {
  .status-legend__list > div {
    grid-template-columns: 1fr;
  }
}

.status-legend__list dt {
  margin: 0;
}

.status-legend__list dd {
  margin: 0;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
}

/* Страница услуги: ремонт ПК / ноутбуки */
.service-detail-page .service-section {
  margin-top: calc(8px * 10);
}

.service-detail-page .service-section:first-of-type {
  margin-top: calc(8px * 7);
}

.service-section__title {
  margin: 0 0 calc(8px * 2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}

.service-section__intro {
  margin: 0 0 calc(8px * 4);
  max-width: 62ch;
  color: var(--fg-muted);
  font-size: 1rem;
}

.service-grid {
  display: grid;
  gap: calc(8px * 2);
}

@media (min-width: 720px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Четыре равных блока (курсы): всегда не более двух колонок */
@media (min-width: 640px) {
  .service-grid.service-grid--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .service-grid.service-grid--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.service-item {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: calc(8px * 3);
  min-height: 100%;
}

.service-item h3 {
  margin: 0 0 calc(8px * 2);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.service-item p {
  margin: 0;
  max-width: none;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}

.service-item .service-list {
  margin-top: calc(8px * 3);
}

.service-item__meta {
  margin: calc(8px * 3) 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.service-item__meta strong {
  color: var(--fg);
  font-weight: 600;
}

/* Форматы обучения: неактивный блок */
.service-item--inactive {
  position: relative;
  opacity: 0.52;
  pointer-events: none;
  border-style: dashed;
  background: transparent;
}

.service-item--inactive h3 {
  color: var(--fg-muted);
}

.service-item--inactive p {
  color: var(--fg-muted);
  opacity: 0.92;
}

.service-item__badge {
  display: inline-block;
  margin: 0 0 calc(8px * 2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: var(--surface-panel);
}

/* Карточка курса — как service-card на главной (pages.css для подстраниц) */
a.edu-course-card {
  border: 1px solid var(--line);
  padding: calc(8px * 4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100%;
  transition:
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
  border-radius: 0;
  background: var(--card-fill);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
}

a.edu-course-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    var(--card-shine) 8px,
    var(--card-shine) 9px
  );
  mask-image: linear-gradient(180deg, black, transparent 85%);
}

a.edu-course-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px var(--card-shadow);
}

a.edu-course-card:hover::before {
  opacity: 1;
}

a.edu-course-card:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.edu-course-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: calc(8px * 3);
  color: var(--fg);
}

.edu-course-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.edu-course-card__title {
  margin: 0 0 calc(8px * 2);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.edu-course-card__lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--fg-muted);
}

.edu-course-card .edu-course-card__list {
  margin-top: calc(8px * 3);
  margin-bottom: 0;
}

.edu-course-card__meta {
  margin: calc(8px * 3) 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.edu-course-card__meta strong {
  color: var(--fg);
  font-weight: 600;
}

.edu-course-card__cta {
  margin-top: auto;
  padding-top: calc(8px * 3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  align-self: flex-start;
}

a.edu-course-card:hover .edu-course-card__cta {
  opacity: 0.85;
}

.service-callout {
  margin: 0;
  padding: calc(8px * 4);
  border: 1px solid var(--line-strong);
  background: var(--surface-panel);
}

.service-callout__badge {
  margin: 0 0 calc(8px * 2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--binary-bright);
}

.service-callout__lead {
  margin: 0 0 calc(8px * 4);
  max-width: 68ch;
  color: var(--fg-muted);
}

.service-callout__cols {
  display: grid;
  gap: calc(8px * 4);
}

@media (min-width: 768px) {
  .service-callout__cols {
    grid-template-columns: 1fr 1fr;
    gap: calc(8px * 5);
  }
}

.service-callout__sub {
  margin: 0 0 calc(8px * 2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
}

.service-callout__foot {
  margin: calc(8px * 4) 0 0;
  max-width: 68ch;
  font-size: 14px;
  color: var(--fg-muted);
}

.service-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.65;
}

.service-list li {
  margin-bottom: calc(8px * 1);
}

.service-list li:last-child {
  margin-bottom: 0;
}

.service-list--tight {
  padding-left: 1.1rem;
}

.service-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: svc-step;
  max-width: 62ch;
}

.service-steps li {
  position: relative;
  margin: 0 0 calc(8px * 3);
  padding-left: calc(8px * 5);
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
  counter-increment: svc-step;
}

.service-steps li::before {
  content: counter(svc-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg);
  opacity: 0.85;
}

.service-steps li:last-child {
  margin-bottom: 0;
}

.service-steps strong {
  color: var(--fg);
  font-weight: 600;
}

.service-cta {
  margin-top: calc(8px * 10);
  padding-top: calc(8px * 5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(8px * 3);
}

.service-cta__text {
  margin: 0;
  max-width: 36ch;
  color: var(--fg-muted);
  font-size: 15px;
}

.service-cta__link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  padding: calc(8px * 2) calc(8px * 3);
  border: 1px solid var(--line-strong);
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.service-cta__link:hover {
  background: var(--surface-hover);
  border-color: var(--fg-muted);
}

.service-cta__link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* Страница «Обучение» — та же сетка и типографика, усиленные панели и ритм секций */
.education-page .page-inner .lead {
  max-width: 52ch;
}

.education-page .page-inner > p:not(.lead):not(.jp-aside) {
  max-width: 62ch;
}

.education-page .service-detail-page .service-section:first-of-type {
  margin-top: calc(8px * 6);
}

.education-page .service-section#tracks {
  position: relative;
  padding: calc(8px * 4) calc(8px * 4) calc(8px * 5);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .education-page .service-section#tracks {
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.04);
}

.education-page .service-section#tracks::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--binary-bright), transparent 72%);
  opacity: 0.9;
  pointer-events: none;
}

.education-page .service-section#tracks .service-section__intro {
  margin-bottom: calc(8px * 5);
}

.education-page .service-section#tracks .service-grid {
  gap: calc(8px * 3);
}

.education-page .service-section + .service-section {
  padding-top: calc(8px * 8);
  border-top: 1px solid var(--line);
}

.education-page .service-section#format .service-item:not(.service-item--inactive) {
  border-color: var(--line-strong);
  background: var(--surface-panel);
}

.education-page .service-cta {
  margin-top: calc(8px * 10);
}

/* Адаптив: телефон, планшет, узкий ноутбук */
@media (max-width: 900px) {
  .page-inner {
    padding-block: calc(8px * 6) calc(8px * 10);
  }

  .page-inner h1 {
    font-size: clamp(1.5rem, 4.5vw, 2.35rem);
  }

  .page-inner .lead {
    font-size: 1.0625rem;
  }
}

@media (max-width: 560px) {
  .site-header__bar {
    flex-direction: column;
    align-items: stretch;
    gap: calc(8px * 2);
    padding-block: calc(8px * 2);
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: calc(8px * 1) calc(8px * 2);
  }

  .nav a {
    font-size: 10px;
    letter-spacing: 0.09em;
    padding: 0.65em 0.35em;
    min-height: 44px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    text-align: center;
  }

  .page-inner {
    padding-block: calc(8px * 5) calc(8px * 8);
  }

  .page-inner::before {
    width: 2rem;
    top: calc(8px * 5);
  }

  .status-table th,
  .status-table td {
    padding: calc(8px * 1.5) calc(8px * 2);
    font-size: 13px;
  }

  .status-table thead th {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .contact-form {
    padding: calc(8px * 3);
    border-radius: 6px;
  }

  .contact-form input[type="text"]:not(.contact-form__honeypot),
  .contact-form input[type="email"],
  .contact-form input[type="tel"],
  .contact-form textarea {
    font-size: 16px;
  }

  .service-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .service-cta__link {
    text-align: center;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .education-page .service-section#tracks {
    padding: calc(8px * 3);
  }
}

@media (max-width: 380px) {
  .nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(8px * 1);
  }

  .nav a {
    width: 100%;
  }
}
