:root {
  --color-ivory: #fffaf2;
  --color-cream: #f4ecdf;
  --color-burgundy: #7a1f2b;
  --color-burgundy-dark: #57131d;
  --color-graphite: #262321;
  --color-gold-muted: #b89555;
  --content-wide: 1280px;
  --content-reading: 760px;
  --radius-card: 14px;
  --shadow-soft: 0 16px 44px rgb(87 19 29 / 9%);
  --focus-ring: 0 0 0 3px var(--color-ivory), 0 0 0 6px var(--color-burgundy);
}

/*
 * Палитра Blocksy по умолчанию холодная: синий акцент #2872fa (белый текст на нём
 * даёт 4.31:1 при норме WCAG AA 4.5:1, pa11y 24.09.2026), текст #3A4F66, рамки
 * #E1E8ED, фон #FAFBFC. Все восемь цветов и связанные переменные темы берутся из
 * фирменных. Инлайн-стили Blocksy подключаются ПОСЛЕ этого файла, поэтому селектор
 * удвоен. Рамки полей — тёплый бежевый ≥ 3:1 к слоновой кости и к крему.
 */
:root:root {
  --color-border: #e4d9cc;
  --color-border-field: #968062;
  --decanter-gutter: clamp(1rem, 3vw, 2rem);
  --theme-palette-color-1: var(--color-burgundy);
  --theme-palette-color-2: var(--color-burgundy-dark);
  --theme-palette-color-3: var(--color-graphite);
  --theme-palette-color-4: var(--color-graphite);
  --theme-palette-color-5: var(--color-border);
  --theme-palette-color-6: var(--color-cream);
  --theme-palette-color-7: var(--color-ivory);
  --theme-palette-color-8: #fff;
  --theme-text-color: var(--color-graphite);
  --theme-headings-color: var(--color-graphite);
  --theme-border-color: var(--color-border);
  --theme-link-initial-color: var(--color-burgundy);
  --theme-link-hover-color: var(--color-burgundy-dark);
  --theme-form-field-border-initial-color: var(--color-border-field);
  --theme-form-field-border-focus-color: var(--color-burgundy);
  --theme-form-selection-field-initial-color: var(--color-border-field);
  --theme-form-selection-field-active-color: var(--color-burgundy);
  --theme-selection-background-color: var(--color-burgundy);

  /* Контейнер Blocksy выровнен по шапке: та же ширина и те же поля, что у .decanter-container. */
  --theme-container-edge-spacing: calc(100vw - 2 * var(--decanter-gutter));
  --theme-normal-container-max-width: calc(var(--content-wide) - 2 * var(--decanter-gutter));
}

/*
 * 100vw включает классическую полосу прокрутки, а шапка меряется по ширине body без неё:
 * body — контейнер запросов, и 100cqw — ровно ширина, от которой считает .decanter-container.
 */
@supports (width: 1cqw) {
  body {
    container-type: inline-size;
  }

  :root:root {
    --theme-container-edge-spacing: calc(100cqw - 2 * var(--decanter-gutter));
  }
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-ivory);
  color: var(--color-graphite);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-graphite);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  text-wrap: balance;
}

h1,
#decanter-age-title {
  font-size: clamp(2.25rem, 6vw, 5.25rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  letter-spacing: -0.025em;
}

a {
  color: var(--color-burgundy);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-burgundy-dark);
}

.decanter-consent a {
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
}

.decanter-age-gate .decanter-age-gate__actions .button {
  background: var(--color-burgundy-dark);
  border-color: var(--color-burgundy-dark);
  color: #fff;
  font-weight: 700;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  border-radius: 4px;
  box-shadow: var(--focus-ring);
  outline: 0;
}

button,
.button,
.wp-element-button,
input[type="submit"] {
  align-items: center;
  background: var(--color-burgundy);
  border: 1px solid var(--color-burgundy);
  border-radius: var(--radius-card);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.25rem;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

button:hover,
.button:hover,
.wp-element-button:hover,
input[type="submit"]:hover {
  background: var(--color-burgundy-dark);
  border-color: var(--color-burgundy-dark);
  color: #fff;
}

img,
svg {
  height: auto;
  max-width: 100%;
}

.decanter-container {
  margin-inline: auto;
  max-width: var(--content-wide);
  padding-inline: var(--decanter-gutter);
  width: 100%;
}

.decanter-reading-width {
  margin-inline: auto;
  max-width: var(--content-reading);
}

/* Текст контентных страниц — колонкой чтения у левого края контейнера. */
.decanter-content-page article > .entry-content {
  --theme-block-width: 100%;
  --theme-block-max-width: 100%;
  --wp--style--global--content-size: 100%;
  margin-left: calc((100% - min(var(--theme-container-width), var(--theme-normal-container-max-width))) / 2);
  margin-right: 0;
  max-width: var(--content-reading);
  width: min(var(--theme-container-width), var(--theme-normal-container-max-width));
}

/* Индекс брендов /brendy/: буквы-якоря и колонки ссылок. */
.decanter-brand-index__letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 1.5rem;
}

.decanter-brand-index__letters a {
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  line-height: 44px;
  text-align: center;
}

.decanter-brand-index__list {
  columns: 16rem auto;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.decanter-brand-index__item {
  break-inside: avoid;
  padding: 0.25rem 0;
}

.decanter-brand-index__count {
  color: var(--color-graphite);
  font-size: 0.875rem;
  white-space: nowrap;
}

.screen-reader-text:focus {
  background: #fff;
  color: var(--color-burgundy-dark);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* UI-4: форма поиска Blocksy (404): кнопка-иконка с min-height 46px была выше поля в 40px и торчала за
   его рамку. Кнопка тянется по высоте поля, верх и низ совпадают с ним. */
.ct-search-form .ct-search-form-inner > button {
  align-self: stretch;
  height: auto;
  min-height: 0;
}

/* SITE-1: обозначения вроде «TRC-20» не переносятся по дефису (span из inc/nowrap.php). */
.decanter-nowrap {
  white-space: nowrap;
}

/* SITE-1: вопросы и ответы (<details>) — карточки в стиле темы: крем, бордовый маркер, 44 px под палец. */
.entry-content details {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  margin: 0 0 0.75rem;
  transition: border-color 0.2s ease;
}

.entry-content details[open] {
  background: var(--color-ivory);
  border-color: var(--color-gold-muted);
}

.entry-content details > summary {
  align-items: center;
  color: var(--color-graphite);
  cursor: pointer;
  display: flex;
  font-weight: 700;
  gap: 0.75rem;
  justify-content: space-between;
  list-style: none;
  min-height: 44px;
  padding: 0.75rem 1rem;
}

.entry-content details > summary::-webkit-details-marker {
  display: none;
}

.entry-content details > summary::after {
  color: var(--color-burgundy);
  content: "+";
  flex: none;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}

.entry-content details[open] > summary::after {
  content: "−";
}

.entry-content details > :not(summary) {
  margin: 0;
  padding: 0 1rem 1rem;
}
