/* =========================================================
   Solidus — блог: список статей и страницы статей.
   Шапка и подвал — фирменные чёрно-золотые,
   тело статьи — светлое, для комфортного чтения длинных текстов.
   ========================================================= */

:root {
  /* фирменные цвета (как в css/main.css) */
  --ink: #0a0a0a;
  --ink-2: #161616;
  --ink-line: rgba(255, 255, 255, 0.12);
  --cream: #f4f1ea;
  --muted-dark: #a8a397;
  --gold: #ffd60a;
  --gold-rgb: 255 214 10;
  --gold-deep: #6b5800; /* золото для текста на светлом фоне: контраст > 4.5:1 */

  /* светлое тело статьи */
  --paper: #fbfaf6;
  --paper-2: #f2efe6;
  --text: #17150f;
  --text-2: #4a463c;
  --line: #e2ddcf;
  --link: #665300;
  --link-hover: #000;

  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 70ch;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) {
  body {
    font-size: 19px;
  }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: var(--gold);
  color: #000;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Шапка ---------- */
.b-header {
  background: var(--ink);
  color: var(--cream);
  border-bottom: 1px solid var(--ink-line);
  position: sticky;
  top: 0;
  z-index: 20;
}
/* в режиме для слабовидящих шапка не должна перекрывать увеличенный текст */
html.a11y-on .b-header {
  position: static;
}
.b-header__inner {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: 10px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-right: auto;
}
.logo:hover {
  color: var(--cream);
}
.logo b {
  color: var(--gold);
  font-weight: 700;
}
.logo__mark {
  width: 28px;
  height: 28px;
  flex: none;
  /* знак как маска: цвет берётся из --gold, чтобы менялся вместе с палитрой */
  background: var(--gold);
  -webkit-mask: url(../img/brand/solidus-mark-gold.svg) center / contain no-repeat;
  mask: url(../img/brand/solidus-mark-gold.svg) center / contain no-repeat;
}
.logo__name {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.logo__name small {
  font-size: 0.34em;
  font-weight: 500;
  letter-spacing: 0.62em;
  margin-top: 0.42em;
  opacity: 0.62;
}
.logo__sub {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--muted-dark);
  padding-left: 10px;
  border-left: 1px solid var(--ink-line);
}
.b-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 15px;
}
.b-nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
}
.b-nav a:hover,
.b-nav a[aria-current='page'] {
  color: var(--gold);
}
.a11y-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid rgb(var(--gold-rgb) / 0.6);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font: 600 14px/1.2 var(--font-body);
  cursor: pointer;
}
.a11y-btn:hover {
  background: var(--gold);
  color: #000;
}
.a11y-btn svg {
  flex: none;
}
@media (max-width: 640px) {
  .logo__sub {
    display: none;
  }
  .b-nav {
    order: 3;
    width: 100%;
    gap: 6px 16px;
  }
  .b-header {
    position: static;
  }
}

/* ---------- Хлебные крошки ---------- */
.crumbs {
  font-size: 15px;
  color: var(--text-2);
  margin: 28px 0 0;
}
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.crumbs li + li::before {
  content: '/';
  margin-right: 8px;
  color: #9a9483;
}

/* ---------- Список статей ---------- */
.b-hero {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 6vw, 72px);
}
.b-hero .crumbs {
  margin: 0 0 24px;
  color: var(--muted-dark);
}
.b-hero .crumbs a {
  color: var(--cream);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin: 0 0 18px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}
.b-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
.b-hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.b-hero p {
  max-width: 60ch;
  margin: 0;
  color: #d9d4c7;
}

.cards {
  list-style: none;
  margin: 0;
  padding: clamp(32px, 5vw, 64px) 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 28px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover,
.card:focus-within {
  border-color: var(--gold-deep);
  box-shadow: 0 10px 30px rgba(23, 21, 15, 0.08);
}
@media (prefers-reduced-motion: no-preference) {
  .card:hover {
    transform: translateY(-2px);
  }
}
.card__tag {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}
.card h2 a {
  color: var(--text);
  text-decoration: none;
}
/* вся карточка кликабельна */
.card h2 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.6;
}
.card__meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 15px;
  color: var(--text-2);
}

/* ---------- Страница статьи ---------- */
.post {
  padding-bottom: clamp(48px, 7vw, 96px);
}
.post__head {
  max-width: var(--measure);
  margin: 0 auto;
}
.post h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 18px 0 18px;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.post__lead {
  font-size: 1.12em;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 18px;
}
.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 15px;
  color: var(--text-2);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.post__body {
  max-width: var(--measure);
  margin: 0 auto;
}
.post__body > * {
  margin-top: 0;
}
.post__body p,
.post__body ul,
.post__body ol {
  margin: 0 0 1.1em;
}
.post__body ul,
.post__body ol {
  padding-left: 1.3em;
}
.post__body li {
  margin-bottom: 0.4em;
}
.post__body li::marker {
  color: var(--gold-deep);
}
.post__body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(23px, 2.6vw, 29px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2em 0 0.7em;
  scroll-margin-top: 90px;
}
.post__body h3 {
  font-size: 1.1em;
  font-weight: 800;
  line-height: 1.35;
  margin: 1.6em 0 0.5em;
  scroll-margin-top: 90px;
}
.post__body strong {
  font-weight: 800;
}
.post__body code {
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

/* «Коротко» */
.tldr {
  margin: 28px 0 28px;
  padding: 22px 24px 8px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  border-left: 6px solid var(--gold);
}
.tldr h2 {
  margin: 0 0 10px !important;
  font-size: 15px !important;
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  color: var(--gold);
}
.tldr ul {
  padding-left: 1.2em;
}
.tldr li::marker {
  color: var(--gold) !important;
}
.tldr a {
  color: var(--gold);
}

/* Оглавление */
.toc {
  margin: 0 0 32px;
  padding: 18px 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toc summary {
  cursor: pointer;
  font-weight: 800;
  list-style-position: outside;
}
.toc ol {
  margin: 12px 0 4px !important;
  padding-left: 1.4em;
  font-size: 0.95em;
}
.toc li {
  margin-bottom: 0.3em;
}

/* Таблицы */
.table-wrap {
  margin: 0 0 1.4em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  line-height: 1.5;
}
caption {
  text-align: left;
  font-weight: 800;
  padding: 12px 14px 0;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
thead th {
  background: var(--paper-2);
  font-weight: 800;
}
tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}
tbody th {
  font-weight: 700;
}

/* Выноски */
.note {
  margin: 0 0 1.3em;
  padding: 16px 20px;
  border-radius: 12px;
  background: #fff9d6;
  border: 1px solid #f2df7a;
}
.note--warn {
  background: #fdecea;
  border-color: #efb8b1;
}
.note p:last-child,
.note ul:last-child {
  margin-bottom: 0;
}
.note__title {
  display: block;
  font-weight: 800;
  margin-bottom: 4px;
}

/* Чек-лист */
.checklist {
  list-style: none;
  padding-left: 0 !important;
}
.checklist li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 0.7em;
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 22px;
  height: 22px;
  border: 2px solid var(--gold-deep);
  border-radius: 6px;
  background: #fff;
}

/* Источники и дата актуальности */
.sources {
  margin-top: 2.4em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
  font-size: 0.92em;
}
.sources h2 {
  margin-top: 0 !important;
}
.sources li {
  overflow-wrap: anywhere;
}
.actual {
  display: inline-block;
  margin: 0 0 1em;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 700;
}
.disclaimer {
  font-size: 15px;
  color: var(--text-2);
}

/* Мягкий призыв */
.cta {
  max-width: var(--measure);
  margin: 2.6em auto 0;
  padding: clamp(24px, 4vw, 36px);
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
}
.cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(21px, 2.4vw, 26px);
  line-height: 1.3;
  margin: 0 0 12px;
}
.cta p {
  margin: 0 0 20px;
  color: #d9d4c7;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid var(--gold);
}
.btn:hover {
  background: transparent;
  color: var(--gold);
}
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(244, 241, 234, 0.4);
}
.btn--ghost:hover {
  border-color: var(--gold);
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Читайте также */
.more {
  max-width: var(--measure);
  margin: 2.4em auto 0;
}
.more h2 {
  font-size: 1.1em;
  font-weight: 800;
  margin: 0 0 0.6em;
}
.more ul {
  margin: 0;
  padding-left: 1.2em;
}

/* ---------- Подвал ---------- */
.b-footer {
  background: var(--ink);
  color: var(--muted-dark);
  padding: 36px 0;
  font-size: 15px;
}
.b-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}
.b-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.b-footer a {
  color: var(--cream);
  text-decoration: none;
}
.b-footer a:hover {
  color: var(--gold);
}
.b-footer__slogan {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.b-footer__slogan em {
  font-style: normal;
  color: var(--gold);
}

/* ---------- Печать ---------- */
@media print {
  .b-header,
  .b-footer,
  .toc,
  .cta,
  .a11y-btn,
  .more {
    display: none !important;
  }
  body {
    background: #fff;
    font-size: 12pt;
  }
  .tldr {
    background: #fff;
    color: #000;
    border: 1px solid #000;
  }
  .tldr h2 {
    color: #000;
  }
  a {
    color: #000;
  }
}
