/* ColorTag — единственная таблица стилей сайта.
   Раньше здесь висел Tailwind Play CDN: ~3 МБ JavaScript, который собирал
   классы прямо в браузере и блокировал первую отрисовку. */

/* ------------------------------------------------------------------ токены */
:root {
  color-scheme: light;

  --bg:          #f7f7f8;
  --bg-elev:     #ffffff;
  --bg-sunken:   #ececed;
  --bg-hover:    #f0f0f2;
  --text:        #16161a;
  --text-dim:    #5f6069;
  --text-faint:  #8b8c95;
  --border:      #e2e2e6;
  --border-soft: #ededf0;

  --accent:      #3355ff;
  --accent-ink:  #ffffff;
  --accent-soft: rgba(51, 85, 255, .10);

  --ok:   #1a7f4b;
  --warn: #a15c00;
  --bad:  #b3261e;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --shadow-1: 0 1px 2px rgba(16, 16, 24, .05), 0 1px 3px rgba(16, 16, 24, .04);
  --shadow-2: 0 4px 10px rgba(16, 16, 24, .07), 0 12px 28px rgba(16, 16, 24, .07);

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 60px;
  --maxw: 1180px;
}

:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  /* значения ниже переопределяются медиазапросом — см. конец блока */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:          #0f1012;
    --bg-elev:     #17181c;
    --bg-sunken:   #0a0b0c;
    --bg-hover:    #1e2026;
    --text:        #f2f2f4;
    --text-dim:    #a7a8b2;
    --text-faint:  #75767f;
    --border:      #2a2c33;
    --border-soft: #212228;
    --accent:      #7d93ff;
    --accent-ink:  #10121a;
    --accent-soft: rgba(125, 147, 255, .14);
    --ok:   #48c98a;
    --warn: #e0a33c;
    --bad:  #ff6b61;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 6px 14px rgba(0, 0, 0, .45), 0 18px 40px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:          #0f1012;
  --bg-elev:     #17181c;
  --bg-sunken:   #0a0b0c;
  --bg-hover:    #1e2026;
  --text:        #f2f2f4;
  --text-dim:    #a7a8b2;
  --text-faint:  #75767f;
  --border:      #2a2c33;
  --border-soft: #212228;
  --accent:      #7d93ff;
  --accent-ink:  #10121a;
  --accent-soft: rgba(125, 147, 255, .14);
  --ok:   #48c98a;
  --warn: #e0a33c;
  --bad:  #ff6b61;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 6px 14px rgba(0, 0, 0, .45), 0 18px 40px rgba(0, 0, 0, .35);
}

/* ------------------------------------------------------------------- база */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Атрибут hidden должен побеждать любой display из наших правил: у класса
   специфичность выше, чем у браузерного [hidden]{display:none}, и элемент
   вроде .consent с display:flex иначе не спрячется никогда. */
[hidden] { display: none !important; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.22; margin: 0; letter-spacing: -.018em; font-weight: 680; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.7rem); }
h3 { font-size: 1.05rem; font-weight: 640; }
p  { margin: 0 0 1em; }

code, kbd, samp, .mono { font-family: var(--mono); font-size: .92em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--radius-sm); transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ----------------------------------------------------------------- шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 720; font-size: 1.05rem; letter-spacing: -.02em;
  color: var(--text); text-decoration: none; flex: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: conic-gradient(from 210deg, #ff5f6d, #ffc371, #47e5bc, #3355ff, #b06ab3, #ff5f6d);
}

.nav { display: flex; gap: 2px; margin-inline-start: 6px; }
.nav a {
  color: var(--text-dim); font-size: .92rem; font-weight: 520;
  padding: 7px 11px; border-radius: var(--radius-sm);
}
.nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--bg-hover); }

.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }

.search { position: relative; margin-inline-start: auto; flex: 0 1 320px; }
.search input {
  width: 100%; font: inherit; font-size: .92rem;
  padding: 8px 12px 8px 34px;
  color: var(--text); background: var(--bg-sunken);
  border: 1px solid var(--border); border-radius: 999px;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { background: var(--bg-elev); border-color: var(--accent); outline: none; }
.search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-faint); pointer-events: none;
}
.search-results {
  position: absolute; inset-inline: 0; top: calc(100% + 6px);
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  max-height: min(60vh, 420px); overflow-y: auto; padding: 6px; z-index: 60;
}
.search-results a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px; border-radius: var(--radius-sm); color: var(--text);
}
.search-results a:hover, .search-results a.is-active { background: var(--bg-hover); text-decoration: none; }
.search-results .dot { width: 20px; height: 20px; border-radius: 6px; flex: none; border: 1px solid var(--border); }
.search-results .nm { flex: 1; font-size: .9rem; }
.search-results .hx { font-family: var(--mono); font-size: .78rem; color: var(--text-faint); }
.search-results .empty { padding: 12px; color: var(--text-dim); font-size: .9rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }

.lang { display: flex; gap: 1px; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; }
.lang a {
  font-size: .76rem; font-weight: 620; letter-spacing: .03em;
  color: var(--text-faint); padding: 4px 8px; border-radius: 6px;
}
.lang a:hover { color: var(--text); text-decoration: none; }
.lang a[aria-current] { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-1); }

/* --------------------------------------------------------------- разметка */
main { padding-bottom: 72px; }

.crumbs { font-size: .84rem; color: var(--text-faint); padding: 16px 0 4px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li::after { content: "/"; margin-inline-start: 6px; color: var(--border); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--text-dim); }

.section { margin-top: 52px; }
.section-head { margin-bottom: 18px; }
.section-head p { color: var(--text-dim); font-size: .95rem; margin: 6px 0 0; max-width: 62ch; }
.section-head .head-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.section-head .count { color: var(--text-faint); font-size: .95rem; font-variant-numeric: tabular-nums; }

.lead { font-size: 1.06rem; color: var(--text-dim); max-width: 68ch; }

.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}

/* ------------------------------------------------------------ сетка цветов */
.grid { display: grid; gap: 14px; }
.grid-colors  { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
.grid-gradients { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.grid-tags    { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-values  { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }

.swatch-card {
  display: block; overflow: hidden; color: inherit;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.swatch-card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--text) 18%, var(--border));
}
.swatch-card .chip { height: 92px; }
.swatch-card .meta { padding: 10px 12px 12px; }
.swatch-card .nm {
  font-size: .9rem; font-weight: 560; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.swatch-card .hx { font-family: var(--mono); font-size: .78rem; color: var(--text-faint); margin-top: 3px; }

.gradient-card {
  display: block; overflow: hidden; color: inherit;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); box-shadow: var(--shadow-1);
  transition: transform .16s ease, box-shadow .16s ease;
}
.gradient-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-2); }
.gradient-card .chip { height: 128px; }
.gradient-card .meta { padding: 11px 13px 13px; display: flex; align-items: baseline; gap: 8px; }
.gradient-card .nm { font-size: .9rem; font-weight: 560; }
.gradient-card .sub { margin-inline-start: auto; font-size: .78rem; color: var(--text-faint); font-family: var(--mono); }

.tag-card {
  display: flex; gap: 12px; align-items: center; padding: 12px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); color: inherit; box-shadow: var(--shadow-1);
  transition: transform .16s ease, box-shadow .16s ease;
}
.tag-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tag-card .dot { width: 40px; height: 40px; border-radius: 11px; flex: none; border: 1px solid rgba(0,0,0,.08); }
.tag-card .nm { font-size: .93rem; font-weight: 580; line-height: 1.3; }
.tag-card .ct { font-size: .8rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 6px; font-size: .85rem; font-weight: 520;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
}
.chip-link:hover { text-decoration: none; background: var(--bg-hover); }
.chip-link .dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }

/* ------------------------------------------------------------ герой цвета */
.color-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px; align-items: stretch; margin-top: 20px;
}
@media (max-width: 780px) { .color-hero { grid-template-columns: 1fr; } }

.hero-swatch {
  border-radius: var(--radius-lg); min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px; border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.hero-swatch .big {
  font-family: var(--mono); font-size: clamp(1.6rem, 1rem + 3vw, 2.5rem);
  font-weight: 700; letter-spacing: -.02em;
}
.hero-swatch .sm { font-size: .95rem; opacity: .82; margin-top: 4px; }

.value-card {
  display: flex; flex-direction: column; gap: 3px; width: 100%;
  padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; transition: border-color .15s, background .15s;
}
.value-card:hover { background: var(--bg-hover); border-color: color-mix(in srgb, var(--text) 20%, var(--border)); }
.value-card .k { font-size: .73rem; font-weight: 640; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.value-card .v { font-family: var(--mono); font-size: .95rem; word-break: break-all; }
.value-card.is-copied { border-color: var(--ok); }
.value-card.is-copied .k { color: var(--ok); }

/* ------------------------------------------------------------- палитры */
.palette-strip {
  display: flex; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.palette-strip > button {
  flex: 1 1 0; min-width: 0; border: 0; cursor: pointer;
  height: 104px; padding: 0 0 9px; font: inherit;
  display: flex; align-items: flex-end; justify-content: center;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .01em;
  transition: flex-basis .18s ease;
}
.palette-strip > button:hover { flex-basis: 130%; }
.palette-strip.is-tall > button { height: 150px; }

.palette-block { margin-bottom: 22px; }
.palette-block .ttl { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.palette-block .ttl h3 { font-size: .98rem; }
.palette-block .ttl a { font-size: .83rem; color: var(--text-dim); }
.palette-block p { font-size: .9rem; color: var(--text-dim); margin: 9px 0 0; max-width: 70ch; }

/* -------------------------------------------------------------- контраст */
.contrast-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.contrast-tile {
  border-radius: var(--radius); border: 1px solid var(--border);
  padding: 18px; box-shadow: var(--shadow-1);
}
.contrast-tile .sample { font-size: 1.05rem; font-weight: 600; }
.contrast-tile .ratio { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; margin-top: 10px; }
.badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.badge {
  font-size: .74rem; font-weight: 640; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid currentColor;
}
.badge.pass { color: var(--ok); }
.badge.fail { color: var(--bad); opacity: .75; }

/* ----------------------------------------------------------------- код */
.code {
  position: relative; background: var(--bg-sunken);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 46px 13px 15px; margin: 0;
  font-family: var(--mono); font-size: .85rem; line-height: 1.55;
  overflow-x: auto; white-space: pre;
}
.code-copy {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--bg-elev); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.code-copy:hover { color: var(--text); }
.code-copy svg { width: 14px; height: 14px; }
.code-copy.is-copied { color: var(--ok); border-color: var(--ok); }

/* -------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; font: inherit; font-size: .92rem; font-weight: 560;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); cursor: pointer;
}
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.pager .status { color: var(--text-dim); font-size: .9rem; font-variant-numeric: tabular-nums; }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
@media (max-width: 560px) { .prevnext { grid-template-columns: 1fr; } }
.prevnext a {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); color: inherit;
}
.prevnext a:hover { background: var(--bg-hover); text-decoration: none; }
.prevnext .dot { width: 30px; height: 30px; border-radius: 9px; flex: none; border: 1px solid var(--border); }
.prevnext .k { font-size: .74rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }
.prevnext .n { font-size: .9rem; font-weight: 550; }
.prevnext .next { justify-content: flex-end; text-align: right; }
.prevnext .next .dot { order: 2; }

/* ---------------------------------------------------------------- главная */
.hero { padding: 46px 0 8px; }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 14px; }
.hero .btn-row { margin-top: 24px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 34px; }
.stat { padding: 15px 17px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.stat .n { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .84rem; color: var(--text-dim); margin-top: 1px; }

/* ------------------------------------------------------------- комбинация */
.combo-hero { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-1); }
@media (max-width: 640px) { .combo-hero { grid-template-columns: 1fr; } }
.combo-hero > div { padding: 36px 26px; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; }
.combo-hero .nm { font-size: 1.15rem; font-weight: 620; }
.combo-hero .hx { font-family: var(--mono); font-size: .9rem; opacity: .8; margin-top: 2px; }

/* ---------------------------------------------------------------- подвал */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-elev);
  padding: 34px 0; margin-top: 60px;
  color: var(--text-dim); font-size: .88rem;
}
.footer-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.footer-row p { margin: 0; max-width: 56ch; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------- мелочи */
.notice {
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: .92rem;
}
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }

/* На узком экране шапка в две строки: бренд и кнопки сверху, поиск —
   отдельной строкой во всю ширину, иначе плейсхолдер обрезается. */
@media (max-width: 860px) {
  .nav { order: 4; flex: 1 0 100%; margin-inline-start: -8px; overflow-x: auto; }
  .header-row { flex-wrap: wrap; row-gap: 10px; padding-block: 10px; gap: 12px; }
  .header-tools { margin-inline-start: auto; }
  .search { order: 3; flex: 1 0 100%; max-width: none; margin-inline-start: 0; }
}

/* ------------------------------------------------------- согласие на cookie */
.consent {
  position: fixed; inset-inline: 12px; bottom: 12px; z-index: 80;
  max-width: 640px; margin-inline: auto;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 14px 16px; font-size: .88rem;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}
.consent p { margin: 0; flex: 1 1 260px; color: var(--text-dim); }
.consent-actions { display: flex; gap: 8px; margin-inline-start: auto; }
.consent .btn { padding: 8px 14px; font-size: .86rem; }

/* ------------------------------------------------------ уведомление о копии */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px; max-width: min(92vw, 460px);
  font-size: .9rem; font-weight: 520;
  background: var(--text); color: var(--bg);
  border-radius: 999px; box-shadow: var(--shadow-2);
  /* Видимое состояние — по умолчанию, а выезд снизу лишь украшение.
     Если анимация не проиграется (фоновая вкладка, экономия ресурсов),
     тост всё равно окажется на экране, а не останется прозрачным. */
  transform: translate(-50%, 0); opacity: 1;
  animation: toast-in .18s ease both;
  pointer-events: none;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.toast svg { width: 16px; height: 16px; flex: none; color: var(--ok); }
.toast.is-error svg { display: none; }
.toast.is-error { background: var(--bad); color: #fff; }
.toast-text { font-family: var(--mono); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Образец в палитре: подсветка самого элемента под курсором не видна,
   поэтому отмечаем рамкой внутрь — она читается на любом фоне. */
.palette-strip > button.is-copied { box-shadow: inset 0 0 0 3px var(--bg-elev), inset 0 0 0 5px var(--ok); }
.btn.is-copied { border-color: var(--ok); color: var(--ok); }
.btn-primary.is-copied { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Рекламный блок: место резервируется заранее, чтобы вставка объявления
   не дёргала вёрстку (CLS). Фон прозрачный — пока объявление грузится
   или не пришло, на месте блока просто фон страницы, без белой плашки. */
.ad {
  margin: 40px auto; text-align: center; background: transparent;
  min-height: 280px; display: flex; align-items: center; justify-content: center;
}
.ad ins, .ad iframe { display: block; width: 100%; background: transparent !important; }
.ad-inline { min-height: 100px; }
@media (max-width: 560px) { .ad { min-height: 260px; } }

/* ------------------------------------------------------ редакционный текст */
.sw {
  display: inline-block; width: .9em; height: .9em; border-radius: 50%;
  vertical-align: -.08em; margin-inline-end: .3em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14);
}
.cref { white-space: nowrap; font-weight: 520; }
.describe p { color: var(--text); line-height: 1.7; }
.describe h2 { margin-top: 0; }

.prose { line-height: 1.7; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin: .35em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .94rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 600; }
.prose blockquote {
  margin: 1.2em 0; padding: 12px 16px; border-inline-start: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose pre {
  background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; overflow-x: auto; font-size: .88rem; line-height: 1.55;
}
.prose .swatches { display: flex; gap: 6px; margin: 1em 0; height: 56px; }
.prose .swatches span { flex: 1; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.doc-meta { color: var(--text-faint); font-size: .9rem; }
.article-cover { height: clamp(120px, 20vw, 200px); border-radius: var(--radius-lg); margin-bottom: 22px; }
.article.prose { max-width: 74ch; }

.hero-sm { padding-block: 18px 6px; }

.grid-articles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.article-card {
  display: flex; flex-direction: column; overflow: hidden; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-1); transition: transform .15s, border-color .15s;
}
.article-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); }
.article-card .cover { height: 84px; }
.article-card .body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.article-card .ttl { font-weight: 650; line-height: 1.3; }
.article-card .dsc { color: var(--text-dim); font-size: .9rem; line-height: 1.5; }
.article-card .meta { color: var(--text-faint); font-size: .8rem; margin-top: auto; }

.footer-row { align-items: flex-start; }
