/* WhatGuestSays v3: раскладка первой версии (узкая центральная колонка, карточка бренда по центру,
   три флеш-карточки под ней) в языке pentagram.com: один гротеск Geist обычной насыщенности,
   серые поля вместо рамок и теней, прямые углы с радиусом 4px, чёрно-белая палитра. */
:root {
  --paper: #ffffff;      /* фон страницы */
  --ink: #000000;        /* текст, звёзды, инверсия */
  --grey: #767676;       /* вторичный текст (4.5:1 на белом) */
  --tile: #efefef;       /* поле плитки, контролы */
  --tile-2: #e4e4e4;     /* наведение на контрол */
  --band: #222222;       /* тёмная полоса-подборка */
  --band-ink: #ffffff;
  --band-grey: #a3a3a3;
  --star-off: #cfcfcf;
  --font: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mark: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --gap: 10px;
  --s-cap: 13px;   /* подписи */
  --s-body: 15px;  /* текст */
  --s-lead: 20px;  /* вводные, цитаты в списках */
  --s-h2: 32px;
  --s-h1: clamp(40px, 6vw, 72px);
  --s-num: clamp(96px, 14vw, 168px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141414; --ink: #ffffff; --grey: #9a9a9a; --tile: #262626; --tile-2: #303030;
    --band: #000000; --band-ink: #ffffff; --band-grey: #8f8f8f; --star-off: #444444;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141414; --ink: #ffffff; --grey: #9a9a9a; --tile: #262626; --tile-2: #303030;
  --band: #000000; --band-ink: #ffffff; --band-grey: #8f8f8f; --star-off: #444444;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font);
  font-size: var(--s-body); line-height: 1.4; letter-spacing: -0.005em; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }
.grey { color: var(--grey); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { padding-inline: var(--gutter); max-width: 1600px; margin: 0 auto; }
.narrow { max-width: 720px; }

/* ---- шапка: значок + надпись слева, текстовая навигация справа ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter); max-width: 1600px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.wordmark { font-family: var(--font-mark); font-weight: 800; font-style: italic; font-size: 21px;
  letter-spacing: -0.035em; line-height: 1; }
.nav { display: flex; align-items: baseline; gap: 22px; font-size: var(--s-body); }
.nav a:hover, .nav button:hover, .link:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav button { background: none; border: 0; padding: 0; cursor: pointer; }
.nav form { display: contents; }

/* ---- звёзды: маска со звездой, дробная заливка ---- */
.stars {
  --pct: 0%; --size: 14px; display: inline-block; flex: none; width: calc(var(--size) * 5); height: var(--size);
  background: linear-gradient(90deg, currentColor var(--pct), var(--star-off) var(--pct));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.95 6.3 6.85.8-5.1 4.7 1.35 6.8L12 17.4l-6.05 3.4 1.35-6.8-5.1-4.7 6.85-.8z'/%3E%3C/svg%3E") left / var(--size) var(--size) repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.95 6.3 6.85.8-5.1 4.7 1.35 6.8L12 17.4l-6.05 3.4 1.35-6.8-5.1-4.7 6.85-.8z'/%3E%3C/svg%3E") left / var(--size) var(--size) repeat-x;
}
.stars-lg { --size: 26px; }
.stars-md { --size: 18px; }

/* ---- кнопки: серые плашки, как переключатели Pentagram ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 18px; border: 0; border-radius: 4px; background: var(--tile); font-size: var(--s-body);
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.btn:hover { background: var(--tile-2); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink); opacity: .85; }
.btn-block { width: 100%; }
.link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---- колонки ---- */
.col { width: 100%; max-width: 680px; margin: 0 auto; padding-inline: var(--gutter); }
.col-wide { width: 100%; max-width: 1000px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---- главная: фраза-фильтр как заголовок, поиск, список строками ---- */
.hero { padding: clamp(40px, 8vw, 88px) 0 28px; }
.sentence { font-size: clamp(26px, 4.4vw, 38px); line-height: 1.32; letter-spacing: -0.025em; }
.sentence select {
  -webkit-appearance: none; appearance: none; border: 0; border-radius: 4px; background: var(--tile);
  font-size: inherit; letter-spacing: inherit; line-height: 1.1; padding: 0.04em 1.05em 0.08em 0.28em; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.25em center; background-size: 0.55em;
  max-width: 100%; vertical-align: baseline;
}
.sentence select:hover { background-color: var(--tile-2); }
.search { margin-top: 24px; display: flex; border-bottom: 1px solid var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; font-size: var(--s-lead);
  outline-offset: 6px; }
.search input::placeholder { color: var(--grey); }
.count { font-size: var(--s-cap); color: var(--grey); margin: 28px 0 8px; }

.list { border-top: 1px solid var(--tile-2); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--tile-2); }
.row:hover .row-name { text-decoration: underline; text-underline-offset: 3px; }
.row-main { flex: 1; min-width: 0; }
.row-name { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.row-sub { color: var(--grey); font-size: var(--s-cap); margin-top: 2px; }
.row-score { text-align: right; flex: none; display: grid; justify-items: end; gap: 4px; }
.row-score b { font-weight: 400; font-size: 24px; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }

/* монограмма вместо логотипа */
.mono { display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--font-mark);
  font-weight: 800; font-style: italic; letter-spacing: -0.04em; }
.logo-sm { width: 28px; height: 28px; font-size: 15px; border-radius: 4px; object-fit: contain; flex: none; }
.logo-md { width: 48px; height: 48px; font-size: 24px; border-radius: 4px; object-fit: contain; flex: none; }
.logo-lg { width: 96px; height: 96px; font-size: 52px; border-radius: 8px; object-fit: contain; margin: 0 auto; }
img.logo-sm, img.logo-md, img.logo-lg { background: #fff; }

/* ---- карточка бренда: серое поле по центру ---- */
.brand-wrap { padding-top: clamp(28px, 6vw, 64px); }
.brand-card { background: var(--tile); border-radius: 4px; padding: clamp(28px, 6vw, 48px) clamp(20px, 5vw, 40px);
  text-align: center; display: flex; flex-direction: column; align-items: center; }
.brand-card h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.03em; line-height: 1.05; margin-top: 22px; }
.brand-card .where { color: var(--grey); margin-top: 8px; }
.brand-card .where a { color: var(--grey); }
.score-num { font-size: clamp(88px, 16vw, 128px); line-height: .9; letter-spacing: -0.06em; margin-top: 28px;
  font-variant-numeric: tabular-nums; }
.score-stars { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--grey); }
.score-stars .stars { color: var(--ink); }
.dist { margin-top: 26px; width: 100%; max-width: 280px; display: grid; gap: 7px; font-size: var(--s-cap);
  font-variant-numeric: tabular-nums; }
.dist-row { display: grid; grid-template-columns: 12px 1fr 24px; align-items: center; gap: 10px; color: var(--grey); }
.dist-row span:last-child { text-align: right; }
.dist-bar { height: 2px; background: var(--star-off); }
.dist-bar span { display: block; height: 100%; background: var(--ink); }
.card-actions { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.card-actions .btn { background: var(--paper); min-width: 220px; }
.card-actions .btn:hover { background: var(--tile-2); }
.card-actions .grey { font-size: var(--s-cap); }

/* ---- «Похожие для вас»: три флеш-карточки ---- */
.section { margin-top: clamp(56px, 8vw, 88px); }
.section-title { font-size: var(--s-lead); letter-spacing: -0.015em; text-align: center; margin-bottom: 18px; }
.flash-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.flash { display: flex; flex-direction: column; gap: 14px; min-height: 260px; padding: 18px; border-radius: 4px;
  background: var(--tile); transition: background .15s; }
.flash:hover { background: var(--tile-2); }
.flash-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.flash-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash-quote { flex: 1; font-size: 18px; line-height: 1.3; letter-spacing: -0.015em;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.flash-foot { display: flex; justify-content: space-between; gap: 8px; font-size: var(--s-cap); color: var(--grey); }
.flash.neg { background: var(--ink); color: var(--paper); }
.flash.neg .flash-foot { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.flash.neg .stars { --star-off: color-mix(in srgb, var(--paper) 30%, transparent); }
.flash.neg .mono { background: var(--paper); color: var(--ink); }
.flash.neg:hover { background: var(--ink); opacity: .9; }

/* ---- шапка страниц отзыва и ленты ---- */
.page-head { display: flex; align-items: center; gap: 14px; padding: clamp(28px, 5vw, 48px) 0 20px; }
.page-head h1 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; }
.page-head .grey { font-size: var(--s-cap); margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.page-head .grey .stars { color: var(--ink); }
.page-head .btn { margin-left: auto; }
.langs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 20px; }
.langs a { padding: 7px 11px; border-radius: 4px; background: var(--tile); font-size: var(--s-cap); }
.langs a[aria-current="true"] { background: var(--ink); color: var(--paper); }

.review { padding: 24px 0 26px; border-top: 1px solid var(--tile-2); }
.review-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--s-cap); color: var(--grey); }
.review-meta b { color: var(--ink); font-weight: 500; font-size: var(--s-body); }
.review-meta .stars { color: var(--ink); }
.review-body { font-size: 18px; line-height: 1.42; letter-spacing: -0.01em; margin-top: 10px;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.review-full { font-size: clamp(22px, 3.2vw, 28px); line-height: 1.28; letter-spacing: -0.02em; margin-top: 16px; }
.review-foot { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.vote { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--grey); font-size: var(--s-cap);
  display: inline-flex; gap: 6px; font-variant-numeric: tabular-nums; }
.vote:hover { color: var(--ink); }
.vote[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.more { margin-top: 8px; display: inline-block; font-size: var(--s-cap); }
.pager { display: flex; justify-content: space-between; gap: 12px; padding-top: 28px; }
.note { background: var(--tile); padding: 14px 16px; border-radius: 4px; margin-bottom: 16px; }
.empty { padding: 48px 0; text-align: center; }
.empty p { margin-bottom: 18px; color: var(--grey); font-size: var(--s-lead); }

/* ---- формы ---- */
.form-head { padding: clamp(32px, 6vw, 56px) 0 24px; }
.form-head h1 { font-size: 32px; letter-spacing: -0.025em; line-height: 1.05; }
.form-head .intro { color: var(--grey); margin-top: 10px; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .field legend { font-size: var(--s-cap); color: var(--grey); padding: 0; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 0; border-radius: 4px; background: var(--tile); font-size: var(--s-body);
}
.field select { -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.field textarea { min-height: 200px; resize: vertical; font-size: 17px; line-height: 1.42; }
.field input[type="file"] { padding: 11px 14px; }
.field .hint { font-size: var(--s-cap); color: var(--grey); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.star-pick { display: flex; gap: 2px; flex-direction: row-reverse; justify-content: flex-end; }
.star-pick input { position: absolute; opacity: 0; pointer-events: none; }
.star-pick label { cursor: pointer; width: 48px; height: 48px; display: grid; place-items: center; }
.star-pick label svg { width: 40px; height: 40px; fill: var(--star-off); transition: fill .1s; }
.star-pick label:hover svg, .star-pick label:hover ~ label svg, .star-pick input:checked ~ label svg { fill: var(--ink); }
.star-pick input:focus-visible + label { outline: 2px solid var(--ink); }
.errors { background: var(--ink); color: var(--paper); padding: 14px 16px; border-radius: 4px; }
.errors ul { margin: 0; padding-left: 18px; }
.counter { font-size: var(--s-cap); color: var(--grey); text-align: right; font-variant-numeric: tabular-nums; }
.choice { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--tile); border-radius: 4px;
  cursor: pointer; }
.choice:has(input:checked) { background: var(--ink); color: var(--paper); }
.choice:has(input:checked) .grey { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.choice:has(input:checked) .mono { background: var(--paper); color: var(--ink); }
.choice input { accent-color: var(--ink); }
.choice b { font-weight: 500; }
.choice .grey { display: block; font-size: var(--s-cap); }

/* ---- вход ---- */
.login { padding-block: clamp(56px, 10vw, 120px) 0; max-width: 380px; margin: 0 auto; text-align: center; }
.login .brand-mark { width: 56px; height: 56px; margin: 0 auto; }
.login h1 { font-size: 32px; letter-spacing: -0.025em; margin-top: 20px; }
.login p { color: var(--grey); margin: 10px 0 28px; }
.login .btn { width: 100%; margin-bottom: 10px; }
.tg-widget { min-height: 44px; margin-bottom: 10px; display: flex; justify-content: center; }

.flash-msg { background: var(--ink); color: var(--paper); padding: 12px var(--gutter); text-align: center; }
.foot { margin-top: clamp(72px, 10vw, 120px); padding: 20px var(--gutter) 28px; display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: var(--s-cap); color: var(--grey); max-width: 1600px; margin-inline: auto; }
.foot select { border: 0; background: var(--tile); border-radius: 4px; padding: 4px 6px; font-size: var(--s-cap); }

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .flash-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; overflow-x: auto;
    scroll-snap-type: x mandatory; scrollbar-width: none; }
  .flash-row::-webkit-scrollbar { display: none; }
  .flash { scroll-snap-align: start; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .nav { gap: 16px; }
  .wordmark { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- SEO-блоки: мнение о бренде, «О компании», методика ---- */
.opinion { margin-top: 30px; width: 100%; max-width: 460px; text-align: left; background: var(--paper);
  border-radius: 4px; padding: 18px 20px; }
.opinion h2 { font-size: var(--s-body); font-weight: 500; }
.opinion p { margin-top: 8px; line-height: 1.5; }
.opinion .pc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.opinion h3 { font-size: var(--s-cap); color: var(--grey); font-weight: 400; }
.opinion ul { margin: 6px 0 0; padding-left: 16px; display: grid; gap: 4px; }
.opinion .opinion-src { font-size: var(--s-cap); color: var(--grey); margin-top: 14px; }
.about-line { margin-top: 18px; color: var(--grey); max-width: 420px; }
.about { background: var(--tile); border-radius: 4px; padding: 20px; margin-top: 8px; display: grid; gap: 12px; }
.about h2 { font-size: var(--s-body); font-weight: 500; }
.about dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: var(--s-cap); }
.about dt { color: var(--grey); }
.about dd { margin: 0; }
.about p { line-height: 1.5; }
.hub-title { font-size: var(--s-body); color: var(--grey); margin-bottom: 14px; }
.prose { display: grid; gap: 12px; line-height: 1.55; max-width: 36em; }
.prose h2 { font-size: var(--s-lead); letter-spacing: -0.015em; margin-top: 16px; }
@media (max-width: 520px) { .opinion .pc { grid-template-columns: 1fr; } }

/* ---- направления отзывов ---- */
.topics { margin-top: 26px; width: 100%; max-width: 320px; display: grid; gap: 2px; font-size: var(--s-cap); }
.topic-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--tile-2); }
.topic-row:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.topic-tag { color: var(--ink); background: var(--tile); padding: 2px 7px; border-radius: 4px; }
.topic-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip { position: relative; cursor: pointer; }
.topic-chip input { position: absolute; opacity: 0; pointer-events: none; }
.topic-chip span { display: inline-block; padding: 9px 13px; border-radius: 4px; background: var(--tile); }
.topic-chip input:checked + span { background: var(--ink); color: var(--paper); }
.topic-chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.topic-chip input:disabled + span { opacity: .75; cursor: default; }
.draft-head { display: flex; align-items: center; gap: 16px; }
.draft-head .logo-lg { margin: 0; }
.note p + p { margin-top: 6px; }

/* ---- черновик закрытого сайта: что дописать руками ---- */
.blocked-note { background: var(--ink); color: var(--paper); border-radius: 4px; padding: 16px 18px; margin-bottom: 20px;
  display: grid; gap: 8px; line-height: 1.5; }
.blocked-note b { font-weight: 500; }
.field.need label { color: var(--ink); }
.field.need label::after { content: " — заполните"; color: var(--grey); }
.field.need input, .field.need select { box-shadow: inset 0 0 0 1.5px var(--ink); }
.draft-head { align-items: flex-start; }

/* вход через Telegram */
.tg-status { color: var(--ink); font-size: 15px; margin: 4px 0 14px; }
.login p.tg-status { color: var(--ink); margin: 4px 0 14px; }
.tg-qr { margin: 18px 0 26px; }
.tg-qr-code { width: 168px; height: 168px; margin: 0 auto; padding: 14px; background: var(--tile); border-radius: 4px; color: var(--ink); }
.tg-qr-code svg { width: 100%; height: 100%; display: block; }
.tg-qr figcaption { color: var(--grey); font-size: 14px; margin-top: 10px; }
