/* VibeCodedIndex, вторая версия оформления. Белый лист, тёмно-синие чернила и один цвет
   со смыслом: зелёный значит «живой продукт». Он встречается только там, где речь о продуктах:
   в поле точек, в метках строк, в полосках, в знаке. Кнопки и ссылки зелёным не красим. */
:root {
  --bg: #ffffff;
  --surface: #f4f6f9;
  --ink: #0e1730;
  --soft: #5a6478;
  --line: #e2e6ee;
  --live: #0bb56b;
  --live-soft: #e3f7ec;
  --live-ink: #06603a;
  --dot: #d5dae4;
  --action: #0e1730;
  --on-action: #ffffff;
  --bad: #b3261e;
  --font: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1c;
    --surface: #121a2b;
    --ink: #eef1f6;
    --soft: #9aa5b8;
    --line: #222c40;
    --live: #2ee08a;
    --live-soft: #0f2a1f;
    --live-ink: #7df0b6;
    --dot: #2a3449;
    --action: #eef1f6;
    --on-action: #0a0f1c;
    --bad: #ff9a8c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* иначе .card с display:flex показывает скрытые блоки */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--live); outline-offset: 2px;
}
h1, h2, h3 { font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.75rem); line-height: 1.04; letter-spacing: -0.038em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.12; letter-spacing: -0.028em; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; max-width: 62ch; }
.lead { font-size: 1.2rem; line-height: 1.5; color: var(--soft); }
.soft { color: var(--soft); }

.wrap { max-width: 72rem; margin: 0 auto; padding-inline: 1.25rem; }

/* Шапка и подвал */
.head { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.head .wrap { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem 2rem;
  flex-wrap: wrap; padding-block: 0.8rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.025em; }
.brand svg { width: 1.55rem; height: 1.55rem; flex: none; }
.brand .thin { font-weight: 400; }
.mark .d { fill: var(--dot); }
.mark .p { fill: var(--live); }
.nav { display: flex; gap: 0.2rem 1.5rem; flex-wrap: wrap; align-items: center; font-size: 1rem; }
.nav a { color: var(--soft); text-decoration: none; padding-block: 0.2rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a.go { color: var(--on-action); background: var(--action); padding: 0.42rem 0.9rem; border-radius: var(--r);
  font-weight: 600; }
.nav a.go:hover { opacity: 0.86; }
.foot { border-top: 1px solid var(--line); margin-top: 6rem; background: var(--surface); }
.foot .wrap { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; padding-block: 3rem; }
.foot .brand { margin-bottom: 0.8rem; }
.foot h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.7rem; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.foot a, .foot p { color: var(--soft); font-size: 0.97rem; }
.foot p { max-width: 34ch; }
.foot li a { text-decoration: none; }
.foot li a:hover { color: var(--ink); text-decoration: underline; }

/* Блоки */
main { display: flex; flex-direction: column; gap: 5.5rem; padding-block: 4rem 0; }
.block { display: flex; flex-direction: column; gap: 1.6rem; }
.block > .lead { margin-top: -0.6rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.split.top { align-items: start; }
.stack { display: flex; flex-direction: column; gap: 1.3rem; min-width: 0; }
.crumbs { font-size: 0.95rem; color: var(--soft); margin-bottom: -4rem; }
.crumbs a { color: var(--soft); }
.pay .crumbs { margin-bottom: 0; }

.actions { display: flex; gap: 0.8rem 1.2rem; align-items: center; flex-wrap: wrap; }
.button, button.button { display: inline-block; font: 600 1.02rem var(--font); background: var(--action);
  color: var(--on-action); border: 0; padding: 0.8rem 1.35rem; border-radius: var(--r); text-decoration: none;
  cursor: pointer; }
.button:hover { opacity: 0.86; }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button[disabled] { opacity: 0.5; cursor: default; }

/* Поле точек: каждая точка — группа проверенных сайтов, зелёные — продукты.
   Единственное движение на сайте: при загрузке зелёные точки загораются по очереди. */
.field { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; margin: 0; }
.field svg { display: block; width: 100%; height: auto; }
.field .d { fill: var(--dot); }
.field .p { fill: var(--live); }
.field figcaption { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 1.5rem;
  color: var(--soft); font-size: 0.97rem; line-height: 1.4; }
.field .key { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 0.55rem; align-items: baseline; }
.field .key i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--dot); display: block; }
.field .key.live i { background: var(--live); }
.field .key b { color: var(--ink); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; line-height: 1.15; }
.field .key span { grid-column: 2; }
.field .unit { grid-column: 1 / -1; margin-top: 0.5rem; font-size: 0.9rem; }

/* Три пункта */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.trio > div { border-top: 1px solid var(--line); padding-top: 1.1rem; display: flex; flex-direction: column;
  gap: 0.5rem; min-width: 0; }
.trio p { color: var(--soft); }

/* Таблица-предпросмотр */
.preview { display: flex; flex-direction: column; gap: 1rem; }
.filters { display: flex; gap: 0.75rem 1rem; flex-wrap: wrap; align-items: end; }
.filters label { font-weight: 500; font-size: 0.95rem; color: var(--soft); gap: 0.3rem; min-width: 12rem;
  flex: 1 1 12rem; max-width: 20rem; }
.filters label.check { flex-direction: row; align-items: center; gap: 0.5rem; min-width: 0; flex: 0 0 auto;
  color: var(--ink); padding-bottom: 0.75rem; cursor: pointer; }
.filters input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--live); margin: 0; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
.scroll table { min-width: 46rem; }
.scroll table.plain { min-width: 38rem; }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { background: var(--surface); font-weight: 600; font-size: 0.9rem; color: var(--soft); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.dom { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.dom .hid { display: inline-block; width: 4.6em; height: 0.72em; margin-inline: 0.12em; border-radius: 4px;
  background: var(--dot); vertical-align: baseline; }
.tags { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.tag { background: var(--surface); border-radius: 6px; padding: 0.05rem 0.45rem; font-size: 0.86rem; color: var(--soft);
  white-space: nowrap; }
.yes { color: var(--live-ink); background: var(--live-soft); border-radius: 6px; padding: 0.05rem 0.45rem;
  font-size: 0.86rem; font-weight: 600; white-space: nowrap; }
.no { color: var(--soft); }
.preview-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap;
  background: var(--surface); border-radius: 14px; padding: 1.1rem 1.3rem; }
.preview-foot p { max-width: 50ch; }
.count { font-weight: 700; font-variant-numeric: tabular-nums; }
.empty td { color: var(--soft); padding-block: 2rem; }

/* Полоски распределения: длина — число продуктов */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; max-width: 50rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 3.5rem; gap: 1rem; align-items: center;
  padding-block: 0.4rem; }
.bars a { color: var(--ink); text-decoration: none; }
.bars a:hover { text-decoration: underline; }
.bars .track { background: var(--surface); border-radius: 999px; height: 0.6rem; overflow: hidden; }
.bars .fill { display: block; background: var(--live); height: 100%; border-radius: 999px; min-width: 0.6rem; }
.bars .n { text-align: right; color: var(--soft); font-variant-numeric: tabular-nums; }

/* Списки на продажу */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.tier { border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; display: flex; flex-direction: column;
  gap: 0.85rem; min-width: 0; }
.tier.pick { border: 2px solid var(--ink); padding: calc(1.6rem - 1px); }
.tier { position: relative; }
.tier .flag { position: absolute; top: -0.85rem; left: 1.35rem; background: var(--live-soft); color: var(--live-ink);
  font-weight: 600; font-size: 0.86rem; padding: 0.15rem 0.7rem; border-radius: 999px; }
.tier .when { color: var(--soft); font-size: 0.95rem; }
.price { font-weight: 700; font-size: 2.6rem; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.price small { font-weight: 400; font-size: 1rem; color: var(--soft); letter-spacing: 0; }
.tier ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; color: var(--soft);
  flex: 1; }
.tier li { padding-left: 1.3rem; position: relative; }
.tier li::before { content: ""; position: absolute; left: 0.15rem; top: 0.6em; width: 0.45rem; height: 0.45rem;
  border-radius: 50%; background: var(--dot); }
.tier .button { text-align: center; }

/* Формы */
form.card, .card { background: var(--surface); border-radius: 16px; padding: 1.6rem; display: flex;
  flex-direction: column; gap: 1.05rem; min-width: 0; max-width: 34rem; }
label { font-weight: 600; display: flex; flex-direction: column; gap: 0.4rem; }
label .hint { font-weight: 400; color: var(--soft); font-size: 0.95rem; }
input[type="email"], input[type="text"], select { font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); padding: 0.7rem 0.8rem; width: 100%; border-radius: var(--r); }
.msg { margin: 0; }
.msg.err { color: var(--bad); font-weight: 600; }
.msg.ok { font-weight: 600; }
.copy { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.copy code { font: 600 1.05rem var(--font); overflow-wrap: anywhere; min-width: 0; flex: 1 1 14rem; user-select: all; }
.copy button { font: 600 0.92rem var(--font); background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 0.4rem 0.8rem; cursor: pointer; }
.copy button:hover { border-color: var(--ink); }
.pay dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.7rem 1.4rem; }
.pay dt { color: var(--soft); }
.pay dd { margin: 0; min-width: 0; }
.pay .card { max-width: 42rem; }
.state { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }

/* Вопросы и длинный текст */
.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 3rem; }
.qa > div { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.qa p { color: var(--soft); }
.prose { display: flex; flex-direction: column; gap: 1rem; max-width: 44rem; }
.prose h2 { margin-top: 1.6rem; font-size: 1.45rem; }
.prose ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }

.band { background: var(--action); color: var(--on-action); border-radius: 20px; padding: 2.5rem; display: flex;
  justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.band p { color: var(--on-action); opacity: 0.72; }
.band .button { background: var(--on-action); color: var(--action); }

@media (max-width: 56rem) {
  .split, .trio, .tiers, .qa { grid-template-columns: minmax(0, 1fr); }
  .split { gap: 2.2rem; }
  .trio { gap: 1.6rem; }
  .foot .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { gap: 3.75rem; padding-block: 2.25rem 0; }
  .crumbs { margin-bottom: -2.6rem; }
  .pay dl { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .pay dd { margin-bottom: 0.8rem; }
  .head { position: static; }
  .nav { gap: 0.1rem 1.1rem; font-size: 0.97rem; }
  .bars li { grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr) 2.8rem; gap: 0.7rem; }
  .band { padding: 1.75rem; }
  .filters label { max-width: none; }
}
@media (max-width: 30rem) {
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .field .p { animation: light-up 0.5s ease-out both; animation-delay: calc(var(--t, 0) * 1ms); }
  @keyframes light-up { from { fill: var(--dot); } }
}
