/* Направление: «верстак» PostHog — светлый холст, инженерная типографика IBM Plex Sans,
   цвет функционален: жёлтый = действие, синий = активное состояние и ссылки, зелёный = успех,
   оранжевый = требует внимания. Плюс жёлтый хайлайт под ключевым словом (Say Briefly).
   Площадки помечены своими цветами: WB — пурпур, Ozon — синий. */
@import url('/static/fonts/fonts.css');

:root {
  --ink: #111827;          /* заголовки и основной текст */
  --body: #374151;         /* вторичный текст */
  --muted: #65675e;        /* третичный текст */
  --canvas: #ffffff;       /* карточки и основной фон */
  --sand: #eeefe9;         /* песочные секции и панели */
  --granite: #e5e7e0;      /* разделители и границы */
  --line: #d3d5cb;         /* границы полей */

  --yellow: #f1a82c;       /* главное действие */
  --yellow-soft: #fdf0d8;
  --blue: #2f80fa;         /* ссылки, активные состояния, фокус */
  --blue-soft: #e4eeff;
  --green: #4f8a3d;        /* успех */
  --green-soft: #e4f2de;
  --orange: #c9761a;       /* требует внимания */
  --orange-soft: #fbead4;
  --red: #b4342c;          /* ошибка */
  --red-soft: #fbe6e4;
  --wb: #9c1a8f;           /* Wildberries */
  --ozon: #0057d9;         /* Ozon */

  --r: 8px;                /* базовый радиус */
  --r-lg: 14px;            /* карточки и панели */
  --shadow: rgba(17, 24, 39, .06) 0 2px 6px, rgba(17, 24, 39, .04) 0 8px 24px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.5; letter-spacing: -0.015em;
  color: var(--body); background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- шапка и подвал */
.top { position: sticky; top: 0; z-index: 20; background: var(--canvas);
  border-bottom: 1px solid var(--granite); }
.top-in { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 20px; }
.brand { font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; }
.brand b { background: var(--yellow); color: #000; padding: 0 5px; border-radius: 4px;
  font-weight: 700; }
.top nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.top nav a, .top nav button { font: inherit; font-size: 14px; color: var(--body); padding: 6px 10px;
  border-radius: var(--r); border: 0; background: none; cursor: pointer; }
.top nav a:hover, .top nav button:hover { background: var(--sand); color: var(--ink);
  text-decoration: none; }
.top nav a.on { background: var(--sand); color: var(--ink); font-weight: 600; }
.top nav a.btn { color: #000; }
footer { border-top: 1px solid var(--granite); margin-top: 80px; background: var(--sand); }
footer .top-in { color: var(--muted); font-size: 13px; gap: 18px; padding: 24px 20px 40px;
  flex-wrap: wrap; }
footer a { color: var(--body); }

main { max-width: var(--maxw); margin: 0 auto; padding: 32px 20px 0; }

/* ---------------------------------------------------------------- типографика */
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 700;
  color: var(--ink); margin: 0 0 8px; text-wrap: balance; }
h2 { font-size: 21px; line-height: 1.25; letter-spacing: -0.025em; font-weight: 600;
  color: var(--ink); margin: 36px 0 12px; }
h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
p { margin: 0 0 12px; }
.lead { font-size: 16px; color: var(--body); max-width: 62ch; }
.muted { color: var(--muted); font-size: 14px; }
.caption { font-size: 13px; color: var(--muted); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink);
  background: var(--sand); border-radius: 999px; padding: 4px 10px; margin-bottom: 14px;
  letter-spacing: 0; }
.hl { background: var(--yellow); color: #000; padding: 0 6px; border-radius: 4px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--yellow); color: #000; border: 1px solid var(--yellow);
  border-radius: var(--r); padding: 9px 16px; font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: filter .15s ease, transform .08s ease;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--granite); border-color: var(--granite); color: var(--muted);
  cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--sand); filter: none; }
.btn.lg { padding: 12px 22px; font-size: 16px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: #1a63d6; }
.link.danger { color: var(--red); }
.link[disabled] { color: var(--muted); cursor: not-allowed; text-decoration: none; }
.inline { display: inline; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- поверхности */
.card { background: var(--canvas); border: 1px solid var(--granite); border-radius: var(--r-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card + .card { margin-top: 12px; }
.card.sand { background: var(--sand); border-color: transparent; }
.panel { border: 1px solid var(--granite); border-radius: var(--r-lg); overflow: hidden;
  background: var(--canvas); }
.panel-head { padding: 13px 18px; border-bottom: 1px solid var(--granite); background: var(--sand);
  font-weight: 600; color: var(--ink); }
.panel-body { padding: 18px; }

/* ---------------------------------------------------------------- формы */
form.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500;
  color: var(--ink); }
label > span.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400;
  line-height: 1.45; color: var(--body); }
label.check input { width: auto; margin-top: 3px; accent-color: var(--blue); }
input, select, textarea {
  font: inherit; width: 100%; padding: 9px 12px; color: var(--ink); background: var(--canvas);
  border: 1px solid var(--line); border-radius: var(--r);
}
select { appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, var(--body) 50%),
  linear-gradient(135deg, var(--body) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.form-narrow { max-width: 460px; margin: 0 auto; }

/* ---------------------------------------------------------------- сообщения */
.alert { border-radius: var(--r); padding: 12px 14px; margin: 0 0 16px; font-size: 14px;
  background: var(--sand); color: var(--ink); border-left: 4px solid var(--muted); }
.alert.error { background: var(--red-soft); border-left-color: var(--red); color: #7d2721; }
.alert.warn { background: var(--orange-soft); border-left-color: var(--orange); color: #8a5313; }
.alert.notice { background: var(--blue-soft); border-left-color: var(--blue); color: #1a4fa8; }

/* ---------------------------------------------------------------- таблицы */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--granite);
  vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; background: var(--sand); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfbf8; }
td.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- статистика */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--granite); border-radius: var(--r-lg); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 2px; background: var(--canvas); }
.stat b { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat .trend { font-size: 13px; }
.stat.accent { background: var(--yellow-soft); border-color: #f3ddb4; }

/* ---------------------------------------------------------------- лендинг */
.hero { padding: 56px 0 44px; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 44px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.1; letter-spacing: -0.035em; }
.hero .lead { font-size: 17px; margin-top: 16px; }
.hero .actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero .fine { margin-top: 14px; color: var(--muted); font-size: 13px; }

/* демо-карточка вместо скриншота: интерфейс показывает сам себя */
.demo { background: var(--canvas); border: 1px solid var(--granite); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden; }
.demo .bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  border-bottom: 1px solid var(--granite); background: var(--sand); }
.demo .bar i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.demo .bar i:nth-child(1) { background: #e06c5c; }
.demo .bar i:nth-child(2) { background: var(--yellow); }
.demo .bar i:nth-child(3) { background: #7fb069; }
.demo .bar em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 6px; }
.demo .msg { padding: 16px 18px; }
.demo .msg + .msg { border-top: 1px solid var(--granite); }
.demo .reply { background: var(--yellow-soft); }
.demo .who { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.demo .stars { letter-spacing: .1em; color: var(--yellow); font-size: 14px; }
.demo p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--body); }
.demo .tag { display: inline-block; font-size: 11px; font-weight: 600; color: #000;
  background: var(--yellow); border-radius: 999px; padding: 3px 9px; margin-bottom: 8px; }

.band { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--granite); }
.band.sand { background: var(--sand); border-top: 0; border-radius: var(--r-lg);
  padding: 36px 32px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.step { background: var(--canvas); border: 1px solid var(--granite); border-radius: var(--r-lg);
  padding: 20px; }
.step b { display: inline-flex; align-items: center; justify-content: center; width: 26px;
  height: 26px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px;
  font-weight: 600; margin-bottom: 10px; }
.step:nth-child(2) b { background: var(--blue); }
.step:nth-child(3) b { background: var(--green); }
.rules { list-style: none; padding: 0; margin: 20px 0 0; display: grid;
  grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.rules li { background: var(--canvas); border: 1px solid var(--granite); border-radius: var(--r);
  padding: 12px 14px; font-size: 14px; color: var(--body); }
.rules li b { color: var(--ink); font-weight: 600; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.plan { border: 1px solid var(--granite); border-radius: var(--r-lg); padding: 18px;
  display: flex; flex-direction: column; gap: 6px; background: var(--canvas); }
.plan.featured { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.plan.free { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 18px;
  background: var(--yellow-soft); border-color: #f3ddb4; flex-wrap: wrap; }
.plan.free .limit, .plan.free .caption { margin-right: auto; }
.plan .price { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; }
.plan .limit { color: var(--body); font-size: 14px; }
.plan .badge { align-self: flex-start; font-size: 12px; font-weight: 600; border-radius: 999px;
  padding: 3px 10px; color: var(--ink); background: var(--sand); }
.plan .badge.on { background: var(--yellow); color: #000; }

/* ---------------------------------------------------------------- кабинет */
.page-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.empty { border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 40px 24px;
  text-align: center; color: var(--muted); background: var(--sand); }
.empty h3 { color: var(--ink); }
.empty .btn { margin: 8px auto 0; }

/* лента отзывов */
.feed { display: flex; flex-direction: column; gap: 14px; }
.item { border: 1px solid var(--granite); border-radius: var(--r-lg); overflow: hidden;
  background: var(--canvas); }
.item > header { display: flex; align-items: baseline; gap: 12px; padding: 13px 18px;
  border-bottom: 1px solid var(--granite); flex-wrap: wrap; background: var(--sand); }
.item .stars { letter-spacing: .12em; font-size: 15px; color: var(--yellow); }
.item .stars .off { color: #c9cabf; }
.item .product { font-weight: 600; color: var(--ink); }
.item .meta { margin-left: auto; color: var(--muted); font-size: 13px; display: flex;
  gap: 10px; align-items: center; }
.item .body { padding: 16px 18px; font-size: 15px; line-height: 1.6; }
.item .body .quote { color: var(--ink); }
.item .body .pc { margin-top: 8px; font-size: 14px; color: var(--muted); }
.item .draft { border-top: 1px solid var(--granite); background: #fbfbf8; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px; }
.item .draft-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px;
  color: var(--muted); font-variant-numeric: tabular-nums; }

.chip { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px;
  white-space: nowrap; background: var(--sand); color: var(--body); }
.chip.wait { background: var(--sand); color: var(--muted); }
.chip.ready { background: var(--yellow-soft); color: #8a5313; }
.chip.sent { background: var(--green-soft); color: var(--green); }
.chip.hold { background: var(--orange-soft); color: var(--orange); }
.chip.wb { background: #f6e3f4; color: var(--wb); }
.chip.ozon { background: var(--blue-soft); color: var(--ozon); }

.sidebar-layout { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: start; }
.side { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 2px; }
.side a { padding: 8px 12px; border-radius: var(--r); color: var(--body); font-size: 14px;
  display: flex; justify-content: space-between; gap: 8px; }
.side a:hover { background: var(--sand); color: var(--ink); text-decoration: none; }
.side a.on { background: var(--ink); color: #fff; font-weight: 600; }
.side .sep { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 0 12px; font-weight: 600; }

.progress { height: 6px; background: var(--granite); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); }
.progress i.over { background: var(--orange); }

.doc { max-width: 68ch; margin: 0 auto; }
.doc h2 { margin-top: 30px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 32px 0; }
  .hero h1 { font-size: 32px; }
  .steps, .plans, .rules { grid-template-columns: 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; overflow-x: auto; gap: 6px; }
  .side .sep { display: none; }
  .band.sand { padding: 24px 18px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f3ec; --body: #c7c9bd; --muted: #93958a;
    --canvas: #1a1b16; --sand: #23241d; --granite: #333428; --line: #464738;
    --yellow-soft: #3a2f16; --blue-soft: #16243d; --green-soft: #1c2d18;
    --orange-soft: #382712; --red-soft: #3a1c19;
    --blue: #74a8ff; --green: #86c46f; --orange: #e7a054;
    --red: #e8837a; --wb: #e88ade; --ozon: #7fb0ff;
  }
  body { background: var(--canvas); }
  tbody tr:hover td { background: var(--sand); }
  .item .draft { background: var(--sand); }
  .alert.error { color: #f0b3ad; } .alert.warn { color: #efc48c; } .alert.notice { color: #a9c8ff; }
  .chip.wb { background: #3a1f37; } .chip.ozon { background: var(--blue-soft); }
  .chip.ready { color: #e8b866; }
  .demo .reply { background: var(--yellow-soft); }
  .side a.on { background: var(--yellow); color: #000; }
  .step b { background: var(--yellow); color: #000; }
  .stat.accent { background: var(--yellow-soft); border-color: #4a3c1d; }
  .plan.free { background: var(--yellow-soft); border-color: #4a3c1d; }
}
