/* Прежняя композиция брендбука; значения приходят из Kotlin через tokens.css. */
@font-face { font-family: Manrope; src: url("assets/fonts/Manrope.ttf") format("truetype"); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --bg: var(--background);
  --line-strong: var(--lineStrong);
  --ink: var(--text);
  --muted: var(--textSecondary);
  --faint: var(--textSecondary);
  --accent-hover: var(--accent);
  --soft: var(--accentMuted);
  --on-accent: var(--onAccent);
  --on-error: var(--onError);
  --error-container: var(--errorContainer);
  --phone-frame: var(--lineStrong);
  --protein: var(--macroProtein);
  --fat: var(--macroFat);
  --carbs: var(--macroCarbs);
  /* Фиксированные образцы — тоже из Kotlin, но тема страницы их не переключает. */
  --brand-indigo: var(--day-accent);
  --brand-lavender: var(--night-accent);
  --brand-pearl: var(--day-background);
  --brand-night: var(--night-background);
  --brand-soft: var(--day-accentMuted);
  --brand-mint: var(--night-numbers);
  --brand-sea: var(--day-numbers);
  --brand-card: var(--day-card);
  --brand-ink: var(--day-text);
  --brand-white: var(--day-onAccent);
  --brand-red: var(--day-error);
  --brand-amber: var(--day-macroFat);
  --brand-forest: var(--day-macroCarbs);
  --light-image: block;
  --dark-image: none;
  --font: Manrope, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="dark"] { --light-image: none; --dark-image: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --light-image: none; --dark-image: block; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}
a { color: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--soft); color: var(--ink); }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
img, svg { display: block; max-width: 100%; }
.theme-light-image { display: var(--light-image); }
.theme-dark-image { display: var(--dark-image); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 8px; padding: 12px; background: var(--surface); transform: translateY(-180%); z-index: 40; }
.skip:focus { transform: none; }
.mark { width: 1em; height: 1em; fill: currentColor; }

/* ── Шапка ─────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding-block: 10px; }
.topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: .875rem; font-weight: 600; letter-spacing: -.01em; }
.topbar-brand .mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.topbar-brand span { display: flex; align-items: baseline; gap: 8px; }
.topbar-brand small { color: var(--muted); font-weight: 500; }
.topbar-nav { display: flex; align-items: center; gap: 22px; font-size: .8125rem; font-weight: 550; }
.topbar-nav a { text-decoration: none; color: var(--muted); }
.topbar-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.theme-control { display: flex; align-items: center; gap: 4px; }
.theme-control button { flex: none; height: 44px; color: var(--ink); cursor: pointer; }
.theme-switch { position: relative; display: flex; justify-content: space-between; align-items: center; width: 72px; padding: 10px; border: 1px solid var(--accent); border-radius: 24px; background: var(--soft); }
.theme-control svg { position: relative; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.theme-thumb { position: absolute; left: 5px; top: 5px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); transition: transform .18s ease; }
.theme-switch[aria-checked="true"] .theme-thumb { transform: translateX(28px); }
.theme-system { display: grid; place-items: center; width: 44px; padding: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; }
.theme-system[aria-pressed="true"] { color: var(--accent); background: var(--soft); }
.theme-control button:hover { border-color: var(--accent); }

/* ── Обложка ───────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; gap: 56px; padding-block: 70px 64px; }
.eyebrow { display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .13em; font-size: .6875rem; font-weight: 700; color: var(--muted); }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); flex: none; }
.hero h1 { margin-top: 22px; font-size: clamp(2.8rem, 5.4vw, 4.6rem); line-height: 1.0; letter-spacing: -.06em; font-weight: 640; }
.hero h1 span { color: var(--accent); }
.hero-lead { max-width: 47ch; margin-top: 24px; font-size: 1.0625rem; line-height: 1.65; color: var(--muted); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .75rem; color: var(--muted); }
.pill b { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 30px; }
.brand-plate { position: relative; display: grid; place-items: center; gap: 30px; min-height: 340px; padding: 52px 36px; border-radius: 32px; background: var(--card); overflow: hidden; }
.brand-plate::before { content: ""; position: absolute; inset: 10% 8%; border: 1px solid var(--line-strong); border-radius: 50%; }
.brand-plate img { position: relative; width: min(360px, 88%); }
.brand-plate figcaption { position: relative; font-size: .6875rem; color: var(--muted); letter-spacing: .02em; }

/* ── Кнопки ────────────────────────────────────────────── */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 13px 22px; border: 0; border-radius: 18px; background: var(--accent); color: var(--on-accent); text-decoration: none; font: inherit; font-size: .9375rem; font-weight: 650; cursor: pointer; }
.button:hover { background: var(--accent-hover); }
.button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line-strong); }
.button.secondary:hover { background: var(--soft); color: var(--ink); }
.button.ghost { background: transparent; color: var(--accent); padding-inline: 4px; }
.button.ghost:hover { background: transparent; color: var(--accent-hover); text-decoration: underline; text-underline-offset: 4px; }
.button.danger { background: var(--error); color: var(--on-error); }
.button.danger:hover { background: var(--error); }
.button.small { min-height: 44px; padding: 9px 16px; border-radius: 14px; font-size: .8125rem; }
.text-link { color: var(--accent); font-size: .875rem; text-underline-offset: 4px; }
.small-note { font-size: .8125rem; color: var(--muted); }

/* ── Содержание ────────────────────────────────────────── */
.toc { padding-block: 20px 64px; }
.toc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.toc-card { display: block; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; }
.toc-card:hover { border-color: var(--line-strong); background: var(--card); }
.toc-card b { display: block; font-family: var(--mono); font-size: .75rem; color: var(--accent); }
.toc-card strong { display: block; margin-top: 8px; font-size: 1rem; font-weight: 650; }
.toc-card span { display: block; margin-top: 4px; font-size: .8125rem; color: var(--muted); }

/* ── Секции ────────────────────────────────────────────── */
.section { padding-block: 76px; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 44px; align-items: end; margin-bottom: 38px; }
.section-head h2 { margin-top: 14px; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 620; }
.section-head p { max-width: 46ch; color: var(--muted); font-size: .9375rem; }
.subhead { margin: 40px 0 18px; font-size: 1.125rem; font-weight: 650; letter-spacing: -.02em; }
.subhead:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.tile h3 { font-size: 1.0625rem; font-weight: 650; letter-spacing: -.02em; }
.tile p { margin-top: 8px; font-size: .875rem; color: var(--muted); }
.tile .tag { display: inline-block; margin-bottom: 14px; font-family: var(--mono); font-size: .6875rem; color: var(--accent); letter-spacing: .04em; }
.tile ul { margin: 10px 0 0; padding-left: 18px; font-size: .875rem; color: var(--muted); }
.tile li + li { margin-top: 4px; }
.statement { display: grid; gap: 10px; margin-top: 16px; padding: 30px 32px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--card); }
.statement p { font-size: clamp(1.125rem, 1.8vw, 1.375rem); line-height: 1.45; letter-spacing: -.02em; font-weight: 550; }
.statement small { font-size: .75rem; color: var(--muted); }
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.value { padding: 24px; border-top: 2px solid var(--accent); background: var(--surface); border-radius: 0 0 16px 16px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value h3 { font-size: 1rem; font-weight: 650; }
.value p { margin-top: 6px; font-size: .875rem; color: var(--muted); }

/* ── Логотип ───────────────────────────────────────────── */
.logo-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.logo-panel { display: grid; place-items: center; gap: 20px; min-height: 190px; padding: 30px 22px; border-radius: 20px; border: 1px solid var(--line); }
.logo-panel .mark { width: 66px; height: 66px; }
.logo-panel img { width: min(230px, 88%); }
.logo-panel figcaption { font-size: .6875rem; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.on-pearl { background: var(--day-surface); color: var(--brand-ink); }
.on-indigo { background: var(--brand-indigo); color: var(--brand-white); border-color: transparent; }
.on-night { background: var(--brand-night); color: var(--night-text); border-color: var(--night-line); }
.on-soft { background: var(--brand-soft); color: var(--brand-indigo); }
.construction { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.construction svg { width: 100%; height: auto; color: var(--accent); }
.construction .notes { display: grid; gap: 14px; }
.construction .notes div { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.construction .notes div:last-child { border-bottom: 0; padding-bottom: 0; }
.construction dt { color: var(--muted); font-family: var(--mono); font-size: .75rem; }
.construction dd { margin: 0; }
.clearspace-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.app-icons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.app-icon-card { display: grid; place-items: center; gap: 14px; padding: 24px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: center; }
.app-icon { display: grid; place-items: center; width: 118px; height: 118px; border-radius: 28px; background: var(--brand-indigo); color: var(--brand-white); }
.app-icon .mark { width: 62%; height: 62%; }
.app-icon.safe { position: relative; }
.app-icon.safe::after { content: ""; position: absolute; inset: 16%; border: 1px dashed rgba(255,255,255,.65); border-radius: 50%; }
.notif { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--brand-night); color: var(--night-text); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.notif .mark { width: 18px; height: 18px; flex: none; }
.app-icon-card figcaption b { display: block; font-size: .8125rem; font-weight: 650; }
.app-icon-card figcaption span { display: block; margin-top: 2px; font-size: .6875rem; color: var(--muted); }
.clearspace { display: grid; place-items: center; gap: 14px; padding: 38px 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.clearspace .outer { padding: 26px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.clearspace .inner { display: grid; place-items: center; width: 96px; height: 96px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--accent); }
.clearspace .inner .mark { width: 48px; height: 48px; }
.clearspace figcaption { font-size: .75rem; color: var(--muted); text-align: center; }
.donts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dont { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.dont-visual { position: relative; display: grid; place-items: center; height: 118px; background: var(--card); overflow: hidden; }
.dont-visual .mark { width: 46px; height: 46px; color: var(--accent); }
.dont-visual .fake-wordmark { font-size: .875rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; text-align: center; }
.dont-visual .busy-bg { position: absolute; inset: 0; background-color: #d9c7ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Ccircle cx='9' cy='9' r='6' fill='%233b3aa6'/%3E%3Ccircle cx='27' cy='25' r='8' fill='%232a8c7a'/%3E%3Ccircle cx='30' cy='6' r='4' fill='%23b8374b'/%3E%3C/svg%3E"); }
.dont-visual .busy-bg ~ .mark { position: relative; z-index: 1; color: #fff; }
.dont-visual .dont-badge { z-index: 2; }
.dont-visual .shadowed { filter: drop-shadow(0 10px 10px rgba(0,0,0,.55)); }
.dont-badge { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--error); color: var(--on-error); font-size: .75rem; font-weight: 700; line-height: 1; }
.dont p { padding: 12px 14px; font-size: .75rem; color: var(--muted); }
.dont p b { display: block; color: var(--ink); font-size: .8125rem; font-weight: 600; margin-bottom: 2px; }

/* ── Палитра ───────────────────────────────────────────── */
.core { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.core-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.core-color { height: 92px; }
.core-body { padding: 12px 13px 14px; }
.core-body b { display: block; font-size: .8125rem; font-weight: 650; }
.core-body button { display: block; margin-top: 3px; }
.core-body span { display: block; margin-top: 6px; font-size: .6875rem; line-height: 1.4; color: var(--muted); }
.copy { border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.copy code { font-family: var(--mono); font-size: .75rem; letter-spacing: .02em; }
.copy:hover code { text-decoration: underline; text-underline-offset: 3px; color: var(--accent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .8125rem; min-width: 680px; }
th { padding: 12px 16px; text-align: left; font-size: .625rem; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); background: var(--card); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td code, th code { font-family: var(--mono); font-size: .75rem; }
.chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.chip i { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); }
.ratio { display: flex; height: 56px; margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ratio div { display: grid; place-items: center; font-size: .75rem; font-weight: 650; }
.ratio .r1 { width: 70%; background: var(--bg); color: var(--muted); border-right: 1px solid var(--line); }
.ratio .r2 { width: 20%; background: var(--ink); color: var(--bg); }
.ratio .r3 { width: 10%; background: var(--accent); color: var(--on-accent); }
.ratio-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-size: .75rem; color: var(--muted); }
.rules { display: grid; gap: 0; margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding-block: 15px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.rules b { font-weight: 600; }
.rules span { color: var(--muted); }

/* ── Типографика ───────────────────────────────────────── */
.specimen { padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.specimen .big { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.02; letter-spacing: -.06em; font-weight: 640; }
.specimen .mid { margin-top: 10px; font-size: clamp(1.25rem, 2.4vw, 1.75rem); letter-spacing: -.035em; color: var(--accent); }
.specimen .nums { margin-top: 18px; font-size: 1.125rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.specimen .mono { margin-top: 12px; font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.type-row td:first-child { white-space: nowrap; }
.type-sample { font-size: 1rem; }
.font-stack { display: grid; gap: 10px; margin-top: 16px; padding: 20px 22px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--card); font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.font-stack b { color: var(--ink); font-family: var(--font); font-size: .8125rem; }

/* ── Форма и иконки ────────────────────────────────────── */
.radius-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.radius-item { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; }
.radius-item i { display: block; height: 64px; background: var(--soft); border: 1px solid var(--line-strong); }
.radius-item b { font-size: .75rem; font-weight: 650; }
.radius-item span { font-size: .6875rem; color: var(--muted); }
.spacing { display: grid; gap: 8px; }
.spacing div { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px; font-size: .75rem; }
.spacing i { display: block; height: 10px; background: var(--accent); border-radius: 2px; }
.spacing code { font-family: var(--mono); color: var(--muted); }
.icon-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.icon-cell { display: grid; place-items: center; gap: 8px; padding: 16px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: .6875rem; color: var(--muted); }
.icon-cell svg { width: 24px; height: 24px; fill: none; stroke: var(--accentText); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fact-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fact { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.fact b { display: block; font-size: 1.25rem; letter-spacing: -.03em; }
.fact span { display: block; margin-top: 2px; font-size: .75rem; color: var(--muted); }

/* ── Компоненты ────────────────────────────────────────── */
.demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.specimen-card { display: grid; gap: 18px; align-content: start; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.specimen-card > h3 { font-size: .8125rem; font-weight: 650; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chat { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--bg); }
.msg { display: grid; gap: 4px; max-width: 86%; }
.msg .bubble { padding: 10px 14px; border-radius: 20px; font-size: .875rem; line-height: 1.45; background: var(--card); border-bottom-left-radius: 6px; }
.msg .meta { font-size: .625rem; color: var(--faint); }
.msg.user { justify-self: end; justify-items: end; }
.msg.user .bubble { background: var(--accent); color: var(--on-accent); border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.chat-input { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: .875rem; color: var(--muted); }
.chat-input i { display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border-radius: 50%; background: var(--accent); color: var(--on-accent); flex: none; }
.chat-input svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.notice { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--card); font-size: .8125rem; }
.notice svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notice.error { border-color: var(--error); background: var(--error-container); }
.notice.error svg { stroke: var(--error); }
.macro { display: grid; gap: 8px; }
.macro-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.macro-bar i { display: block; height: 100%; }
.macro-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .75rem; color: var(--muted); }
.macro-legend span { display: inline-flex; align-items: center; gap: 6px; }
.macro-legend b { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.daypill { justify-self: center; padding: 4px 12px; border-radius: 999px; background: var(--card); font-size: .6875rem; color: var(--muted); }

/* ── Соцсети ───────────────────────────────────────────── */
.social-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.social-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.artboard { position: relative; container-type: inline-size; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--brand-pearl); color: var(--brand-ink); isolation: isolate; }
.artboard.square { aspect-ratio: 1 / 1; }
.artboard.post45 { aspect-ratio: 4 / 5; }
.artboard.story { aspect-ratio: 9 / 16; }
.artboard.cover { aspect-ratio: 1200 / 630; }
.social-column { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.social-column figure { display: grid; gap: 8px; margin: 0; }
.artboard.night { background: var(--brand-night); color: var(--night-text); }
.artboard.indigo { background: var(--brand-indigo); color: var(--brand-white); }
.ab-pad { position: absolute; inset: 8.9cqw; display: flex; flex-direction: column; }
.ab-pad.between { justify-content: space-between; }
.story .ab-pad { inset: 11.1cqw; }
.cover .ab-pad { inset: 8cqw; }
.ab-top { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
.ab-mark { width: 8.5cqw; height: 8.5cqw; color: var(--brand-indigo); flex: none; }
.night .ab-mark, .indigo .ab-mark { color: var(--brand-white); }
.ab-kicker { font-size: 2.5cqw; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .72; }
.ab-title { font-size: 9.4cqw; line-height: 1.02; letter-spacing: -.055em; font-weight: 640; max-width: 13ch; }
.story .ab-title { font-size: 10.5cqw; max-width: 12ch; }
.ab-sub { margin-top: 2.6cqw; font-size: 3cqw; line-height: 1.4; max-width: 26ch; opacity: .78; }
.ab-foot { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; font-size: 2.5cqw; font-weight: 600; letter-spacing: .02em; }
.ab-foot .mono { font-family: var(--mono); font-weight: 500; opacity: .7; }
.ab-chat { display: grid; gap: 2.4cqw; width: 52cqw; align-self: flex-end; }
.ab-bubble { padding: 3cqw 3.6cqw; border-radius: 5.6cqw; font-size: 3.1cqw; line-height: 1.4; background: var(--day-surface); border-bottom-left-radius: 1.8cqw; }
.ab-bubble.user { background: var(--brand-indigo); color: var(--brand-white); border-bottom-left-radius: 5.6cqw; border-bottom-right-radius: 1.8cqw; justify-self: end; }
.indigo .ab-bubble { background: var(--day-surface); color: var(--brand-ink); }
.indigo .ab-bubble.user { background: var(--brand-soft); color: var(--brand-ink); }
.ab-mid { display: flex; flex-direction: column; justify-content: center; gap: 5cqw; flex: 1; padding-block: 4cqw; }
.ab-numbers { display: grid; gap: 2cqw; }
.ab-numbers b { font-size: 7.4cqw; line-height: 1; letter-spacing: -.04em; color: var(--brand-sea); font-variant-numeric: tabular-nums; }
.night .ab-numbers b, .indigo .ab-numbers b { color: var(--brand-mint); }
.ab-numbers span { font-size: 2.8cqw; opacity: .7; }
.ab-avatar { display: grid; place-items: center; background: var(--brand-indigo); color: var(--brand-white); }
.ab-avatar .ab-mark { width: 46cqw; height: 46cqw; }
.ab-cover { display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 3cqw; width: 100%; height: 100%; }
.ab-cover .ab-title { font-size: 4.6cqw; max-width: 18ch; }
.ab-cover .ab-sub { font-size: 1.9cqw; margin-top: 1cqw; max-width: 30ch; }
.ab-cover .ab-mark { width: 4.6cqw; height: 4.6cqw; }
.ab-cover .ab-kicker { font-size: 1.9cqw; }
.ab-domain { font-size: 1.7cqw; font-family: var(--mono); opacity: .7; }
.ab-badge { display: inline-flex; align-items: center; gap: 1.4cqw; padding: 1.4cqw 2.4cqw; border: 1px solid currentColor; border-radius: 999px; font-size: 2.2cqw; opacity: .8; }
.artboard-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: .75rem; color: var(--muted); }
.artboard-caption b { font-weight: 600; color: var(--ink); }
.guides { position: absolute; inset: 8.9%; border: 1px dashed rgba(128,128,128,.85); pointer-events: none; display: none; }
.story .guides { inset: 11.1%; }
.cover .guides { inset: 8%; }
.guides::before, .guides::after { content: ""; position: absolute; background: rgba(128,128,128,.5); }
.guides::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.guides::after { top: 50%; left: 0; right: 0; height: 1px; }
body.guides-visible .guides { display: block; }
.social-specs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.social-spec { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.social-spec b { display: block; font-size: 1rem; letter-spacing: -.02em; }
.social-spec span { display: block; margin-top: 3px; font-size: .75rem; color: var(--muted); }
.caption { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.caption p { font-size: .875rem; white-space: pre-line; }
.caption footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .6875rem; color: var(--muted); }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 26px; font-size: .875rem; color: var(--muted); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* ── Тон голоса ────────────────────────────────────────── */
.dodont { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dodont > div { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dodont h3 { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 650; }
.dodont h3 i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: .75rem; font-weight: 700; background: var(--soft); color: var(--accent); }
.dodont .no h3 i { background: var(--error-container); color: var(--error); }
.dodont ul { margin: 12px 0 0; padding-left: 18px; font-size: .875rem; color: var(--muted); }
.dodont li + li { margin-top: 7px; }
.dodont em { color: var(--ink); font-style: normal; font-weight: 550; }
.lexicon td:first-child { font-weight: 600; white-space: nowrap; }
.lexicon td:last-child { color: var(--muted); }
.disclaimer { display: grid; gap: 8px; padding: 22px 24px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--card); font-size: .875rem; }
.disclaimer b { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

/* ── Ресурсы и подвал ──────────────────────────────────── */
.assets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asset { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; }
.asset:hover { border-color: var(--line-strong); background: var(--card); }
.asset .preview { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 12px; background: var(--card); color: var(--accent); }
.asset .preview img { width: 38px; }
.asset .preview .mark { width: 30px; height: 30px; }
.asset b { display: block; font-size: .875rem; font-weight: 600; }
.asset span { display: block; margin-top: 2px; font-size: .75rem; color: var(--muted); }
.asset .arrow { margin-left: auto; color: var(--muted); font-size: 1rem; flex: none; }
.changelog td:first-child { font-family: var(--mono); white-space: nowrap; }
.footer { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding-block: 34px 48px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }
.footer img { width: 180px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; justify-content: flex-end; }
.footer a { text-underline-offset: 4px; }
.copy-status { position: fixed; left: 50%; bottom: 20px; z-index: 30; max-width: calc(100% - 32px); padding: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .75rem; text-align: center; transform: translateX(-50%); }
.copy-status:empty { display: none; }
.copy-status:not(:empty) { padding: 10px 16px; }

/* ── Принятые доработки в прежней композиции ───────────── */
.nav-sample { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(24%, 4.5rem)), 1fr)); width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); gap: 4px; }
.nav-sample-item svg { width: 24px; height: 24px; }
.nav-sample-item { display: grid; justify-items: center; gap: 6px; min-height: 60px; padding: 8px 2px; font-size: .6875rem; text-align: center; color: var(--muted); }
.nav-sample-item.selected { border-radius: 14px; background: var(--soft); color: var(--accentText); }
.icon-cell { text-decoration: none; min-height: 112px; }
.icon-cell:hover { border-color: var(--accent); }
th[scope="row"] { text-transform: none; letter-spacing: normal; font-size: .8125rem; white-space: normal; }
.fingerprint { margin-top: 18px; overflow-wrap: anywhere; }
.table-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.topbar .wrap { flex-wrap: wrap; }
.theme-control button { min-height: 48px; }

/* ── Адаптив ───────────────────────────────────────────── */
@media (max-width: 1040px) {
  .core { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .social-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { gap: 36px; }
  .topbar-nav { gap: 16px; }
}
@media (max-width: 980px) {
  .topbar-nav { display: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-block: 44px 48px; }
  .hero-visual { max-width: 520px; width: 100%; }
  .section-head { grid-template-columns: 1fr; gap: 18px; }
  .cols-3, .values, .donts, .logo-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-4, .fact-row, .social-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .construction { grid-template-columns: 1fr; }
  .construction > svg { max-width: 320px; margin-inline: auto; }
  .demo { grid-template-columns: 1fr; }
  .radius-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .icon-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .topbar-nav { display: none; }
  .topbar-brand small { display: none; }
  .topbar .wrap { min-height: 64px; }
  .section { padding-block: 52px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
  .brand-plate { min-height: 280px; padding: 38px 24px; }
  .core { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-2, .cols-3, .values, .donts, .logo-panels, .clearspace-row, .app-icons, .social-grid, .checklist, .dodont, .assets { grid-template-columns: 1fr; }
  .social-grid .artboard.cover { grid-column: auto; }
  .rules li { grid-template-columns: 1fr; gap: 2px; }
  .footer { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .social-specs, .fact-row, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specimen { padding: 22px; }
}
@media (max-width: 420px) {
  .topbar-brand { font-size: .8125rem; }
  .core, .social-specs, .fact-row, .radius-grid, .icon-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc-grid { grid-template-columns: 1fr; }
  .brand-plate img { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .theme-thumb { transition: none; } }
@media print {
  :root:not([data-theme]), :root[data-theme] {
    color-scheme: light;
    --bg: var(--day-surface);
    --surface: var(--day-surface);
    --card: var(--day-background);
    --line: var(--day-line);
    --line-strong: var(--day-lineStrong);
    --ink: var(--day-text);
    --muted: var(--day-textSecondary);
    --faint: var(--day-textSecondary);
    --accent: var(--day-accent);
    --on-accent: var(--day-onAccent);
    --soft: var(--day-accentMuted);
    --numbers: var(--day-numbers);
    --error: var(--day-error);
    --on-error: var(--day-onError);
    --error-container: var(--day-errorContainer);
    --light-image: block;
    --dark-image: none;
  }
  body { background: var(--day-surface); }
  .topbar, .theme-control, .social-tools, .copy-status, .skip { display: none; }
  .section { break-before: page; }
  .hero { break-after: page; }
  a { text-decoration: none; }
}
