/* SEO-страницы: хабы /for и /languages, страницы профессий, языков и пар «язык × профессия».
   Только токены. Жёлтый маркер используется как акцент, не как заливка больших областей. */

/* Иностранный текст: шрифты для письменностей, где системный шрифт сайта их не покрывает. */
main [lang="zh"], main [lang="ja"], main [lang="ko"] { font-family: var(--font-cjk); }
main [lang="ar"] { font-family: var(--font-arabic); }

/* Хлебные крошки: узкая полоса фона между шапкой и героем */
.crumbs-bar { background: var(--bg); border-bottom: 1px solid var(--line); }
.crumbs { padding-block: var(--sp-3); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }
.crumbs li { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; overflow-wrap: anywhere; }
.crumbs li:not(:last-child)::after { content: "/"; color: var(--line-strong); opacity: 0.5; }
.crumbs a { color: var(--text-muted); text-underline-offset: 0.2em; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 500; }

/* Герой: родной текст языка над заголовком */
.hero-native { margin: 0; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 500; color: var(--marker-fixed); line-height: 1.2; }

/* Ссылки-стрелки на светлых поверхностях: жёлтый на светлом нечитаем, поэтому подчёркивание маркером */
.callout .link-arrow, .link-cols .link-arrow {
  color: var(--text); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--marker); text-decoration-thickness: 3px; text-underline-offset: 0.25em;
}

/* Ситуации с пояснением */
.sit-list { list-style: none; margin: 0; padding: 0; display: grid; }
.sit-list li { display: grid; gap: var(--sp-2); padding-block: var(--sp-5); border-bottom: 1px solid var(--line); }
.sit-list li:first-child { padding-top: 0; }
.sit-list h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.sit-list p { color: var(--text-muted); line-height: 1.6; max-width: 40rem; }

/* Выноска: «можно просто как переводчик», примечания хабов */
.callout { display: grid; gap: var(--sp-4); max-width: 52rem; padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm); justify-items: start; }
.callout h2 { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.callout p { color: var(--text-muted); font-size: var(--fs-lg); line-height: 1.55; }

.beta-note { padding: var(--sp-4) var(--sp-5); background: var(--surface-2); border-radius: 14px; font-size: var(--fs-sm); line-height: 1.55; color: var(--text); max-width: 34rem; }

.prose h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; margin-top: var(--sp-4); }

/* Мелкие подписи и теги */
.tag { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-xs); font-weight: 500; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chips li { padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--surface-2); font-size: var(--fs-sm); color: var(--text); }
.chips-links a { color: inherit; text-decoration: none; }
.chips-links li:hover { background: var(--marker-fixed); color: var(--ink-fixed); }

/* Карточки пар в ролях и языках */
.pair-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.pair-card { display: grid; gap: var(--sp-2); align-content: start; height: 100%; padding: var(--sp-5); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
.pair-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pair-card > span { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.2; }
.pair-card strong { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; overflow-wrap: anywhere; }
.pair-card small { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.45; }
.pair-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Хаб /for: группы профессий; ведущая карточка группы крупнее остальных */
.role-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.role-card { flex: 1 1 15rem; min-width: 0; display: flex; }
.role-card a { flex: 1; display: grid; gap: var(--sp-3); align-content: start; padding: var(--sp-5); border-radius: 14px; border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color 0.2s, background 0.2s; }
.role-card a:hover { border-color: var(--line-strong); background: var(--surface); }
.role-card h3 { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
.role-card p { color: var(--text-muted); line-height: 1.5; }
.role-card small { color: var(--text-muted); font-size: var(--fs-sm); align-self: end; }
.role-card.is-lead { flex-basis: 100%; }
.role-card.is-lead a { background: var(--surface); border: 0; border-radius: 20px; box-shadow: var(--shadow-sm); padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); gap: var(--sp-4); border-block-start: 4px solid var(--marker); }
.role-card.is-lead a:hover { box-shadow: var(--shadow); }
.role-card.is-lead h3 { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.role-card.is-lead p { font-size: var(--fs-lg); max-width: 40rem; }
.role-card a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (min-width: 900px) {
  .hub-group { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--sp-7); align-items: start; }
  .hub-group .band-head { margin-bottom: 0; position: sticky; top: calc(var(--nav-h) + var(--sp-5)); }
}

/* Хаб /languages */
.lang-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.lang-card { display: grid; gap: var(--sp-3); align-content: start; padding: var(--sp-5); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.lang-card:not(.is-beta) { box-shadow: inset 0 4px 0 var(--marker), var(--shadow-sm); }
.lang-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.lang-card-head > span:first-child { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 600; line-height: 1.1; overflow-wrap: anywhere; }
.lang-card h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; }
.lang-card h3 a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.25em; }
.lang-card h3 a:hover { text-decoration-color: var(--marker); text-decoration-thickness: 3px; }
.lang-card p { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.55; }

/* Фразы языка */
.phrase-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.phrase-list li { display: grid; gap: var(--sp-2); padding: var(--sp-5); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm); }
.phrase-src { font-family: var(--font-display); font-size: 1.25rem; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.phrase-ru { color: var(--text-muted); }
@media (min-width: 700px) { .phrase-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Таблицы терминов и фраз */
.seo-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.seo-table th { padding: var(--sp-4) var(--sp-5); text-align: start; font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); background: var(--surface-2); }
.seo-table td { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; line-height: 1.45; }
.seo-table tbody tr:first-child td { border-top: 0; }
.seo-table td:first-child { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 550; }
.seo-phrases td:first-child { font-size: 1.0625rem; }
.seo-table td[lang="ar"] { text-align: start; }
.reg { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; background: var(--surface-2); color: var(--text); }
.reg-chat { background: var(--marker-fixed); color: var(--ink-fixed); }

@media (max-width: 640px) {
  .seo-table, .seo-table tbody, .seo-table tr, .seo-table td { display: block; }
  .seo-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .seo-table tr { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); }
  .seo-table tbody tr:first-child { border-top: 0; }
  .seo-table td { padding: var(--sp-1) 0; border: 0; }
  .seo-table td::before { content: attr(data-label); display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); margin-top: var(--sp-2); }
  .seo-table td:first-child::before { margin-top: 0; }
}

/* Что почитать дальше */
.link-cols { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.link-cols > div { display: grid; gap: var(--sp-3); align-content: start; padding: var(--sp-5); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm); }
.link-cols h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; }
.link-cols p { color: var(--text-muted); line-height: 1.5; }

/* Призыв внизу: пояснение рядом с кнопкой */
.closing-note { max-width: 34rem; font-size: var(--fs-lg); line-height: 1.5; }
@media (min-width: 900px) {
  .closing-note { grid-column: 1; }
  .closing-note ~ .btn { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
}
@media (max-width: 640px) {
  .seo-table td[dir="rtl"]::before { direction: ltr; text-align: left; }
}

.split .prose { align-content: start; }
