/* Брендбук ФСА: страница /brandbook и PDF-версия.
   На сайте листы идут стопкой карточек, при печати каждый лист — A4 альбомный. */

.bb {
  --bb-paper: #f5f5f5; --bb-surface: #ffffff; --bb-ink: #131112; --bb-muted: #5d5b63;
  --bb-line: rgba(19, 17, 18, .2); --bb-blue: #22478e; --bb-navy: #0e1c39; --bb-red: #e61c2a;
  --bb-link: #22478e; --bb-focus: #3671e3;
  font-family: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--bb-ink); font-size: 15px; line-height: 1.5;
  display: grid; gap: 32px;
}
.bb *, .bb *::before, .bb *::after { box-sizing: border-box; }
.bb h2, .bb h3, .bb h4, .bb p, .bb ul { margin: 0; color: inherit; }
.bb ul { padding-left: 1.1em; }
.bb li + li { margin-top: 4px; }
.bb-tnum { font-variant-numeric: tabular-nums; }

/* ---------- Лист ---------- */
.bb-page {
  position: relative; overflow: hidden;
  background: var(--bb-surface); border-radius: 32px;
  padding: 48px 56px; display: flex; flex-direction: column; gap: 32px;
}
.bb-page--navy { background: var(--bb-navy); color: #f5f5f5; --bb-ink: #f5f5f5; --bb-muted: #a9b5cc; --bb-line: rgba(245,245,245,.25); --bb-link: #6e9bf0; }
.bb-page--blue { background: var(--bb-blue); color: #f5f5f5; --bb-ink: #f5f5f5; --bb-muted: #c9d4ea; --bb-line: rgba(245,245,245,.3); }
.bb-page__head { display: flex; align-items: baseline; gap: 24px; }
.bb-page__num { font-size: 14px; color: var(--bb-muted); min-width: 28px; }
.bb-page__title { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -0.015em; }
.bb-page__lead { font-size: 18px; font-weight: 300; line-height: 1.45; max-width: 62ch; color: var(--bb-ink); }
.bb-page__foot {
  margin-top: auto; display: flex; justify-content: space-between; gap: 16px;
  font-size: 12px; color: var(--bb-muted); padding-top: 16px; border-top: 1px solid var(--bb-line);
}
.bb-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.bb-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.bb-cols--wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.bb-h { font-size: 20px; font-weight: 500; line-height: 1.25; margin-bottom: 8px !important; }
.bb-small { font-size: 13px; color: var(--bb-muted); line-height: 1.45; }
.bb-rules { font-size: 14px; }
.bb-rules li::marker { color: var(--bb-blue); }
.bb-page--navy .bb-rules li::marker { color: #6e9bf0; }

/* ---------- Обложка ---------- */
.bb-cover { justify-content: space-between; }
.bb-cover__mark { width: 72px; height: auto; color: #f5f5f5; }
.bb-cover__title { font-size: 112px; line-height: .92; font-weight: 700; letter-spacing: -0.03em; position: relative; z-index: 1; }
.bb-cover__sub { font-size: 22px; font-weight: 300; color: #a9b5cc; margin-top: 16px !important; max-width: 30ch; position: relative; z-index: 1; }
.bb-cover__meta { display: flex; gap: 48px; font-size: 14px; color: #a9b5cc; position: relative; z-index: 1; }
.bb-cover__meta b { display: block; color: #f5f5f5; font-weight: 500; font-size: 16px; }
.bb-arcs { position: absolute; right: -6%; top: 6%; width: 58%; height: auto; pointer-events: none; }
.bb-arcs .arc-1 { fill: var(--bb-navy); stroke: #6e9bf0; stroke-width: 3px; }
.bb-arcs .arc-2 { fill: var(--bb-blue); }
.bb-arcs .arc-3 { fill: var(--bb-red); }
.bb-arcs--light .arc-1 { fill: var(--bb-surface); stroke: var(--bb-blue); }

/* ---------- Содержание ---------- */
.bb-toc { list-style: none; padding: 0 !important; columns: 2; column-gap: 48px; font-size: 16px; }
.bb-toc li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--bb-line); break-inside: avoid; margin: 0 !important; }
.bb-toc span { color: var(--bb-muted); min-width: 24px; }
.bb-quote { font-size: 30px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; max-width: 30ch; }

/* ---------- Знак ---------- */
.bb-logo-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bb-logo-tile { border-radius: 16px; aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; }
.bb-logo-tile .bb-mark { height: 46%; width: auto; }
.bb-logo-tile figcaption { position: absolute; left: 16px; bottom: 12px; font-size: 12px; }
.bb-logo-tile--blue { background: var(--bb-blue); color: #f5f5f5; }
.bb-logo-tile--navy { background: var(--bb-navy); color: #f5f5f5; }
.bb-logo-tile--light { background: var(--bb-paper); color: var(--bb-blue); }
.bb-logo-tile--blue figcaption, .bb-logo-tile--navy figcaption { color: #c9d4ea; }
.bb-logo-tile--light figcaption { color: var(--bb-muted); }
.bb-clear { display: flex; gap: 32px; align-items: flex-end; }
.bb-clear__box { padding: 20px 16px; outline: 1px dashed var(--bb-blue); outline-offset: 0; color: var(--bb-blue); line-height: 0; }
.bb-clear__box .bb-mark { height: 64px; width: auto; }
.bb-sizes { display: flex; gap: 20px; align-items: flex-end; color: var(--bb-blue); }
.bb-sizes div { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--bb-muted); }
.bb-sizes .bb-mark { width: auto; color: var(--bb-blue); }
.bb-dont { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bb-dont figure { margin: 0; display: grid; gap: 6px; font-size: 12px; color: var(--bb-muted); }
.bb-dont__tile { aspect-ratio: 1; border-radius: 12px; background: var(--bb-paper); display: grid; place-items: center; color: var(--bb-blue); position: relative; overflow: hidden; }
.bb-dont__tile .bb-mark { height: 52%; width: auto; }
.bb-dont__tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1.5px), var(--bb-red) calc(50% - 1.5px), var(--bb-red) calc(50% + 1.5px), transparent calc(50% + 1.5px)); opacity: .9; }

/* ---------- Цвет ---------- */
.bb-swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.bb-swatch { border-radius: 16px; overflow: hidden; background: var(--bb-surface); outline: 1px solid var(--bb-line); outline-offset: -1px; display: flex; flex-direction: column; }
.bb-swatch__chip { height: 132px; padding: 12px 14px; display: flex; align-items: flex-end; font-size: 26px; font-weight: 700; }
.bb-swatch__body { padding: 12px 14px 14px; display: grid; gap: 2px; font-size: 12px; color: var(--bb-muted); }
.bb-swatch__body b { font-size: 15px; color: var(--bb-ink); font-weight: 500; }
.bb-swatches--sm { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bb-swatches--sm .bb-swatch__chip { height: 56px; font-size: 16px; }
.bb-share { display: flex; height: 22px; border-radius: 999px; overflow: hidden; outline: 1px solid var(--bb-line); outline-offset: -1px; }

/* ---------- Таблица токенов ---------- */
.bb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bb-table th { text-align: left; font-weight: 500; color: var(--bb-muted); padding: 0 8px 8px 0; border-bottom: 1px solid var(--bb-line); }
.bb-table td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--bb-line); vertical-align: middle; }
.bb-table code { font-family: inherit; font-weight: 500; color: var(--bb-ink); }
.bb-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(19,17,18,.2); }

/* ---------- Типографика ---------- */
.bb-type { display: grid; gap: 0; }
.bb-type__row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--bb-line); }
.bb-type__row:first-child { border-top: 1px solid var(--bb-line); }
.bb-type__meta { font-size: 12px; color: var(--bb-muted); line-height: 1.4; }
.bb-type__meta b { display: block; font-size: 14px; color: var(--bb-ink); font-weight: 500; }
.bb-type__sample { min-width: 0; }
.bb-weights { display: flex; gap: 32px; font-size: 40px; line-height: 1; }
.bb-weights span { display: grid; gap: 6px; }
.bb-weights small { font-size: 12px; color: var(--bb-muted); font-weight: 400; }
.bb-alphabet { font-size: 28px; line-height: 1.25; letter-spacing: -0.005em; }

/* ---------- Отступы, радиусы, тени ---------- */
.bb-space { display: grid; gap: 8px; }
.bb-space__row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 16px; font-size: 13px; }
.bb-space__bar { height: 14px; background: var(--bb-blue); border-radius: 3px; }
.bb-radii { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bb-radii figure { margin: 0; display: grid; gap: 8px; font-size: 13px; }
.bb-radii figure div { height: 84px; background: var(--bb-paper); border: 2px solid var(--bb-blue); }
.bb-radii small { color: var(--bb-muted); display: block; font-size: 12px; }
.bb-shadow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 24px; background: var(--bb-paper); border-radius: 16px; }
.bb-shadow div { height: 72px; border-radius: 16px; background: var(--bb-surface); display: grid; place-items: center; font-size: 13px; color: var(--bb-muted); }
.bb-shadow .is-float { box-shadow: 0 8px 24px rgba(14, 28, 57, .18); color: var(--bb-ink); }

/* ---------- Дуги ---------- */
.bb-motif { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.bb-motif__art { background: var(--bb-paper); border-radius: 24px; padding: 32px; position: relative; }
.bb-motif__art svg { display: block; width: 100%; height: auto; }
.bb-motif__labels { display: flex; gap: 16px; font-size: 12px; color: var(--bb-muted); margin-top: 12px; }
.bb-motif__labels i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }

/* ---------- Компоненты ---------- */
.bb-demo { border-radius: 16px; background: var(--bb-paper); padding: 20px; display: grid; gap: 12px; align-content: start; }
.bb-demo--navy { background: var(--bb-navy); color: #f5f5f5; }
.bb-demo__label { font-size: 12px; color: var(--bb-muted); }
.bb-demo--navy .bb-demo__label { color: #a9b5cc; }
.bb-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 28px; border-radius: 999px; border: 1px solid transparent; font-weight: 500; font-size: 15px; white-space: nowrap; }
.bb-btn--primary { background: var(--bb-blue); color: #f5f5f5; }
.bb-btn--outline { border-color: var(--bb-ink); color: var(--bb-ink); }
.bb-btn--quiet { color: var(--bb-link); text-decoration: underline; text-underline-offset: 4px; padding: 0 8px; }
.bb-btn--lg { min-height: 56px; font-size: 17px; padding: 0 40px; }
.bb-demo--navy .bb-btn--primary { background: #f5f5f5; color: #131112; }
.bb-demo--navy .bb-btn--outline { border-color: rgba(245,245,245,.6); color: #f5f5f5; }
.bb-demo--navy .bb-btn--quiet { color: #6e9bf0; }
.bb-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--bb-blue); color: var(--bb-blue); font-size: 14px; }
.bb-chip.is-on { background: var(--bb-blue); color: #f5f5f5; }
.bb-field { display: grid; gap: 6px; }
.bb-field__label { font-weight: 500; font-size: 14px; }
.bb-field__label i { color: var(--bb-red); font-style: normal; }
.bb-input { min-height: 46px; padding: 0 14px; border: 1px solid var(--bb-line); border-radius: 8px; background: var(--bb-surface); display: flex; align-items: center; font-size: 15px; color: var(--bb-muted); }
.bb-input.is-focus { outline: 2px solid var(--bb-focus); outline-offset: 1px; border-color: transparent; color: var(--bb-ink); }
.bb-input.is-error { border-color: #d1131f; color: var(--bb-ink); }
.bb-field__hint { font-size: 12px; color: var(--bb-muted); }
.bb-field__hint.is-error { color: #d1131f; }
.bb-stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--bb-line); border-radius: 999px; background: var(--bb-surface); }
.bb-stepper span { min-width: 44px; height: 44px; display: grid; place-items: center; font-size: 20px; color: var(--bb-blue); }
.bb-stepper b { min-width: 96px; text-align: center; font-weight: 500; }
.bb-icons { display: flex; gap: 12px; }
.bb-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--bb-surface); color: var(--bb-blue); font-size: 22px; }
.bb-notice { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 8px; background: var(--bb-surface); color: #1d7a46; font-weight: 500; font-size: 14px; }

.bb-card { background: var(--bb-surface); border-radius: 16px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.bb-card__title { font-size: 21px; font-weight: 500; line-height: 1.2; }
.bb-card__meta { font-size: 13px; color: var(--bb-muted); }
.bb-card .bb-btn { min-height: 40px; padding: 0 20px; font-size: 14px; }
.bb-card .bb-btn--outline { border-color: var(--bb-blue); color: var(--bb-blue); }
.bb-event { display: grid; grid-template-columns: 64px 1fr; gap: 2px 16px; }
.bb-event__date { grid-row: span 3; text-align: center; font-weight: 700; font-size: 26px; line-height: 1; }
.bb-event__date small { display: block; font-size: 12px; font-weight: 400; color: var(--bb-muted); margin-top: 4px; }
.bb-event__date.is-now { color: var(--bb-red); }
.bb-person { display: grid; justify-items: center; text-align: center; gap: 2px; }
.bb-person img, .bb-person__ph { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: inset 0 0 0 3px var(--bb-paper), 0 0 0 1px var(--bb-line); margin-bottom: 6px; background: var(--bb-blue); }
.bb-person__ph { display: grid; place-items: center; color: #f5f5f5; }
.bb-person__ph .bb-mark { height: 46%; width: auto; }
.bb-person b { font-weight: 500; font-size: 15px; }
.bb-person span { font-size: 12px; color: var(--bb-muted); }
.bb-facts { display: grid; }
.bb-facts div { padding: 10px 0; border-top: 1px solid var(--bb-line); display: grid; gap: 2px; }
.bb-facts div:last-child { border-bottom: 1px solid var(--bb-line); }
.bb-facts b { font-size: 26px; line-height: 1.1; font-weight: 700; }
.bb-facts span { font-size: 12px; color: var(--bb-muted); }
.bb-nav { display: flex; align-items: center; gap: 20px; padding: 8px 10px 8px 18px; background: var(--bb-blue); color: #f5f5f5; border-radius: 16px; box-shadow: 0 8px 24px rgba(14, 28, 57, .18); font-size: 13px; }
.bb-nav .bb-mark { height: 34px; width: auto; color: #f5f5f5; }
.bb-nav u { text-underline-offset: 5px; }
.bb-nav .bb-btn { margin-left: auto; min-height: 36px; padding: 0 18px; background: #f5f5f5; color: #131112; font-size: 13px; }

/* ---------- Фото ---------- */
.bb-photos { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.bb-photo { margin: 0; border-radius: 24px; overflow: hidden; position: relative; display: flex; align-items: flex-end; justify-content: center; height: 300px; padding-top: 40px; }
.bb-photo img { max-height: 100%; max-width: 100%; object-fit: contain; display: block; }
.bb-photo figcaption { position: absolute; left: 14px; top: 12px; font-size: 12px; }
.bb-photo--paper { background: var(--bb-paper); }
.bb-photo--paper figcaption { color: var(--bb-muted); }
.bb-photo--navy { background: var(--bb-navy); }
.bb-photo--navy figcaption { color: #a9b5cc; }
.bb-photo--round { background: var(--bb-paper); align-items: center; padding-top: 0; flex-direction: column; gap: 8px; }
.bb-photo--round img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; box-shadow: inset 0 0 0 3px var(--bb-paper), 0 0 0 1px var(--bb-line); }

/* ---------- Голос ---------- */
.bb-say { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; font-size: 14px; }
.bb-say__h { font-size: 12px; color: var(--bb-muted); padding-bottom: 6px; border-bottom: 2px solid currentColor; }
.bb-say__h--yes { color: #1d7a46; }
.bb-say__h--no { color: #d1131f; }
.bb-say p { padding: 9px 0; border-bottom: 1px solid var(--bb-line); }
.bb-say .is-no { color: var(--bb-muted); text-decoration: line-through; text-decoration-color: rgba(209, 19, 31, .6); }

/* ---------- Последний лист ---------- */
.bb-end { justify-content: space-between; }
.bb-end__big { font-size: 64px; line-height: .95; font-weight: 700; letter-spacing: -0.02em; max-width: 14ch; position: relative; z-index: 1; }

/* ---------- Телефон ---------- */
@media screen and (max-width: 991.98px) {
  .bb-page { aspect-ratio: auto; padding: 28px 20px; border-radius: 24px; gap: 24px; }
  .bb-page__title { font-size: 32px; }
  .bb-page__lead { font-size: 16px; }
  .bb-cols, .bb-cols--3, .bb-cols--wide, .bb-motif { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .bb-cover { min-height: 520px; }
  .bb-cover__title { font-size: 56px; }
  .bb-cover__meta { flex-wrap: wrap; gap: 16px 32px; }
  .bb-arcs { width: 110%; right: -40%; top: 10%; opacity: .5; }
  .bb-toc { columns: 1; }
  .bb-quote { font-size: 22px; }
  .bb-logo-tiles, .bb-swatches, .bb-swatches--sm, .bb-radii, .bb-dont { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bb-swatch__chip { height: 88px; }
  .bb-type__row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bb-type__sample { white-space: normal; }
  .bb-weights { font-size: 28px; gap: 16px; flex-wrap: wrap; }
  .bb-alphabet { font-size: 20px; }
  .bb-photos { grid-template-columns: minmax(0, 1fr); }
  .bb-photo { height: 240px; }
  .bb-say { grid-template-columns: minmax(0, 1fr); }
  .bb-say__h--no { margin-top: 16px; }
  .bb-nav { flex-wrap: wrap; }
  .bb-nav__links { display: none; }
  .bb-end__big { font-size: 40px; }
  .bb-table { font-size: 12px; }
  .bb-hide-sm { display: none; }
  .bb-clear { flex-wrap: wrap; }
}

/* ---------- Печать: один лист — одна страница A4 ---------- */
@page { size: 297mm 210mm; margin: 0; }
@media print {
  html, body { background: #fff !important; margin: 0; }
  .bb { display: block; }
  .bb-page {
    width: 297mm; height: 210mm; aspect-ratio: auto; border-radius: 0;
    padding: 14mm 16mm 10mm; break-after: page; page-break-after: always;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .bb-page:last-child { break-after: auto; page-break-after: auto; }
  .bb * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Размеры и «неправильные» варианты знака */
.bb-mark--64 { height: 64px; width: auto; }
.bb-mark--40 { height: 40px; width: auto; }
.bb-mark--32 { height: 32px; width: auto; }
.bb-mark--rot { transform: rotate(-28deg); }
.bb-mark--squash { transform: scaleX(1.6); }
.bb-end .bb-cover__mark { justify-self: end; width: 48px; margin-bottom: 8px; }
