/* Путь для владельцев бизнеса. Одна колонка, сначала телефон.
   Цвета — те же, что на всём сайте (refinement.css): один синий акцент для
   действий, всё остальное нейтральное. Отличие от рабочей панели — масштаб:
   текст от 16 px, цели касания от 44 px, карточки и пузыри скруглены, как в
   мессенджере и банковском приложении, которыми владелец пользуется каждый день. */

.owner {
  --bg: #f5f6f7;
  --panel: #ffffff;
  --ink: #252b2f;
  --muted: #5f6b73;
  --line: #e2e7eb;
  --accent: #2484a6;
  --accent-ink: #ffffff;
  --accent-soft: #eaf4f8;
  --me: #dcebf2;
  --ok: #2f6b3f;
  --bad: #b42318;
  --warn-bg: #fff4e5;
  --warn-line: #f2c98a;
  --warn-ink: #6e3500;
  --o-radius: 16px;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Старые страницы набирают заголовки своей переменной — пусть тем же
     гротеском: одна гарнитура на весь сайт. */
  --font-head: var(--font);
  --font-body: var(--font);
  color-scheme: light;
}
:root[data-theme="dark"] .owner {
  --bg: #0f1113;
  --panel: #16191d;
  --ink: #e8eaec;
  --muted: #a3a9b0;
  --line: #2a2f35;
  --accent: #6fb0ea;
  --accent-ink: #0f1113;
  --accent-soft: #15222e;
  --me: #1b2d3b;
  --ok: #7cc48d;
  --bad: #ff8a80;
  --warn-bg: #2d2211;
  --warn-line: #6b4a1a;
  --warn-ink: #f5d3a1;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.owner {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.owner a { color: var(--accent); }
.owner button, .owner input, .owner textarea, .owner select { font: inherit; color: inherit; }
.owner :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.owner h1 { font-size: clamp(28px, 7vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 700; }
.owner h2 { font-size: 20px; line-height: 1.25; margin: 0 0 10px; font-weight: 700; }
.owner .lede { margin: 0; color: var(--muted); font-size: 17px; }
.owner .muted { color: var(--muted); }
.owner .small { font-size: 15px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Шапка и колонка */
.o-top {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.o-brand { display: flex; align-items: center; gap: 8px; color: var(--ink) !important; text-decoration: none; }
.o-brand svg { width: 22px; height: 22px; }
.o-brand b { font-size: 18px; letter-spacing: -.01em; }
.o-top-nav { display: flex; gap: 16px; }
.o-top-nav a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; font-size: 16px; text-decoration: none; }
.o-top-nav .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-left: 6px; display: inline-block; }
.o-main { width: 100%; max-width: 640px; margin: 0 auto; padding: 28px 16px 32px; flex: 1; }
/* Старые страницы — инструменты, кабинет, документы, админка — шире: там
   таблицы, конструктор с превью и длинные формы. */
.o-wide .o-main { max-width: 1040px; }
.o-wide .o-main > .intro { max-width: 720px; margin-bottom: 28px; }
.o-wide .o-main > .back { display: inline-block; margin: 0 0 24px; }
.o-skip { position: absolute; left: -9999px; top: 8px; z-index: 60; padding: 8px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.o-skip:focus { left: 12px; }

/* Кнопки */
.o-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--accent-ink) !important; font-weight: 600; font-size: 17px;
  text-decoration: none; cursor: pointer;
}
.o-btn.ghost { background: transparent; color: var(--accent) !important; }
.o-btn.plain { background: transparent; border-color: var(--line); color: var(--ink) !important; }
.o-btn.wide { width: 100%; }
.o-btn:disabled { opacity: .6; cursor: default; }
.o-link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Главная: задачи */
.o-hero { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.o-cards { display: flex; flex-direction: column; gap: 12px; }
.o-card {
  display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px 12px 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--o-radius);
  color: var(--ink) !important; text-decoration: none;
}
.o-card:hover { border-color: var(--accent); }
.o-card-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; background: var(--accent-soft);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.o-card-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.o-card-text b { font-size: 17px; line-height: 1.3; }
.o-card-text span { font-size: 15px; color: var(--muted); line-height: 1.4; }
.o-card > svg:last-child { color: var(--muted); flex-shrink: 0; }

.o-section { margin-top: 28px; }
.o-section > h2 { font-size: 15px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.o-mine { display: flex; flex-direction: column; gap: 8px; }
.o-mine a {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 56px;
  padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink) !important; text-decoration: none;
}
.o-mine a > span { flex: 1; min-width: 0; }
.o-mine small { color: var(--muted); font-size: 14px; white-space: nowrap; }
.o-mine a > small { flex-shrink: 0; }

.o-trust {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--o-radius);
}
.o-trust img { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.o-trust p { margin: 0; font-size: 16px; }
.o-trust a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

.o-quota { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 15px; }
.o-quota svg { color: var(--ok); }
.o-tools { margin-top: 8px; color: var(--muted); font-size: 15px; }
.o-tools summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.o-tools ul { list-style: none; padding: 0; margin: 0 0 8px; }
.o-tools li { padding: 6px 0; }

.o-foot { border-top: 1px solid var(--line); padding: 20px 16px 32px; color: var(--muted); font-size: 14px; }
.o-foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; max-width: 640px; margin: 0 auto 8px; }
.o-foot nav a { color: var(--muted); min-height: 36px; display: inline-flex; align-items: center; }
.o-foot p { max-width: 640px; margin: 0 auto; }
.o-wide .o-foot nav, .o-wide .o-foot p { max-width: 1040px; }
.o-theme { background: none; border: 0; padding: 0; min-height: 36px; color: var(--muted);
  font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
[data-theme-icon="dark"] { display: none; }
:root[data-theme="dark"] [data-theme-icon="light"] { display: none; }
:root[data-theme="dark"] [data-theme-icon="dark"] { display: inline; }

/* Шаг 1 */
.o-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.o-form label { font-weight: 600; font-size: 16px; display: block; margin-bottom: 6px; }
.o-form textarea, .o-form input[type=text], .o-form input[type=url] {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); font-size: 17px;
}
.o-form textarea { min-height: 140px; resize: vertical; }
.o-or { text-align: center; color: var(--muted); font-size: 15px; }
.o-seg { display: flex; gap: 4px; padding: 4px; background: var(--line); border-radius: 14px; }
.o-seg label { flex: 1; margin: 0; }
.o-seg input { position: absolute; opacity: 0; }
.o-seg span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px;
  font-weight: 500; cursor: pointer; color: var(--muted);
}
.o-seg input:checked + span { background: var(--panel); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.o-seg input:focus-visible + span { outline: 3px solid var(--accent); }
.o-actions { display: flex; flex-direction: column; gap: 10px; }
.o-error {
  padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line);
  color: var(--warn-ink); font-size: 16px;
}

/* Разговор */
.o-bar {
  position: sticky; top: 0; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line);
}
.o-bar-row { display: flex; align-items: center; gap: 4px; max-width: 640px; margin: 0 auto; height: 60px; padding: 0 14px 0 4px; }
.o-bar-row > a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.o-bar-title { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.o-bar-title b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-bar-title span { font-size: 14px; color: var(--muted); }
.o-saved { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ok); }
.o-progress { height: 4px; background: var(--line); }
.o-progress i { display: block; height: 4px; background: var(--accent); transition: width .3s; }

.o-thread { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.bubble {
  max-width: 88%; padding: 12px 14px; font-size: 16px; line-height: 1.45; border-radius: 6px 18px 18px 18px;
  background: var(--panel); border: 1px solid var(--line); align-self: flex-start;
}
.bubble.me { align-self: flex-end; background: var(--me); border-color: transparent; border-radius: 18px 6px 18px 18px; white-space: pre-line; }
.bubble.me.skip { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.bubble .ex { display: block; margin-top: 6px; font-size: 15px; color: var(--muted); }
.bubble b.head { display: block; margin-bottom: 4px; }
.bubble .finding { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.bubble .finding:first-of-type { border-top: 0; padding-top: 0; }
.bubble .finding p { margin: 4px 0; }
.bubble .quote { font-style: italic; }
.bubble details summary { min-height: 44px; display: flex; align-items: center; color: var(--accent); font-weight: 600; cursor: pointer; }
.bubble.note { font-size: 15px; color: var(--muted); }
.bubble.alert { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.typing { display: inline-flex; gap: 4px; align-items: center; min-height: 20px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.typing + span { margin-left: 8px; color: var(--muted); }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .6; } }

.o-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.o-quick button {
  min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid var(--accent);
  background: var(--panel); color: var(--accent); font-weight: 600; font-size: 16px; cursor: pointer;
}
.o-quick button.idk { border-color: var(--line); color: var(--muted); }

.o-compose {
  position: sticky; bottom: 0; background: var(--panel); border-top: 1px solid var(--line);
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
}
.o-compose-row { display: flex; align-items: flex-end; gap: 8px; max-width: 640px; margin: 0 auto; }
.o-compose textarea {
  flex: 1; min-width: 0; min-height: 48px; max-height: 180px; padding: 12px 16px; resize: none;
  border: 1px solid var(--line); border-radius: 22px; background: var(--bg); font-size: 16px; line-height: 1.4;
  overflow-y: hidden;
}
.o-round {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; border: 0; display: flex;
  align-items: center; justify-content: center; cursor: pointer; background: transparent; color: var(--muted);
}
.o-round.send { background: var(--accent); color: var(--accent-ink); }
.o-round.mic { background: var(--accent); color: var(--accent-ink); }
.o-round.mic.rec { background: var(--bad); color: #fff; animation: pulse 1.2s infinite; }
.o-round[hidden] { display: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .45); } 50% { box-shadow: 0 0 0 8px rgba(180, 35, 24, 0); } }
@media (prefers-reduced-motion: reduce) { .o-round.mic.rec { animation: none; } }
.o-voice-status { max-width: 640px; margin: 8px auto 0; font-size: 15px; color: var(--muted); }
.o-offer { margin-top: 10px; }
.o-offer summary { list-style: none; min-height: 44px; }
.o-offer summary::-webkit-details-marker { display: none; }
.o-offer[open] summary { display: none; }
.o-offer form { display: flex; flex-direction: column; gap: 8px; }
.o-offer textarea { width: 100%; min-height: 120px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg); font-size: 16px; line-height: 1.4; }
.o-offer-no { margin-top: 4px; }
.o-offer-no .o-link { font-size: 15px; color: var(--muted); }
.o-finish { max-width: 640px; margin: 4px auto 0; text-align: center; }
.o-finish .o-link { font-size: 15px; }

/* Результат */
.o-tabs { display: flex; gap: 4px; padding: 4px; background: var(--line); border-radius: 14px; margin: 18px 0; }
.o-tabs button {
  flex: 1 1 0; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  font-size: 15px; font-weight: 500; cursor: pointer; padding: 0 6px; line-height: 1.2;
}
.o-tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.o-variant { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.o-variant[hidden] { display: none; }
.o-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 0; }
.o-preview { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--o-radius); display: flex; flex-direction: column; gap: 6px; }
.o-preview .ad-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.o-preview .ad-meta em { font-style: normal; padding: 2px 6px; border-radius: 6px; background: var(--bg); color: var(--muted); font-weight: 600; }
.o-preview .ad-meta span { color: var(--ok); }
.o-preview .ad-title { font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--accent); }
.o-preview .ad-text { font-size: 15px; }
.o-insta { padding: 0; overflow: hidden; }
.o-insta .ig-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.o-insta .ig-head i { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); display: block; }
.o-insta .ig-visual { aspect-ratio: 4 / 3; background: var(--accent-soft); color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; font-size: 15px; }
.o-insta .ig-cta { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.o-insta .ig-text { padding: 10px 12px 14px; font-size: 15px; }
.o-insta .ig-text .more { color: var(--muted); }
.chip { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 600; }
.o-warn {
  display: flex; gap: 10px; padding: 12px 14px; background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: 12px; color: var(--warn-ink); font-size: 15px; line-height: 1.45;
}
.o-warn svg { flex-shrink: 0; margin-top: 1px; }
.o-warn ul { margin: 4px 0 0; padding-left: 18px; }
.o-field { padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.o-field.over { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.o-field-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.o-field-head span:first-child { color: var(--muted); font-weight: 600; }
.o-count { font-weight: 600; white-space: nowrap; color: var(--ok); }
.o-field.over .o-count { color: var(--bad); }
.o-field-value { font-size: 17px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.o-field .o-over-note { color: var(--bad); font-size: 14px; margin: 0; }
.o-copy {
  align-self: flex-start; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 15px; font-weight: 600; cursor: pointer;
}
.o-next { padding: 18px 16px; background: var(--accent-soft); border-radius: var(--o-radius); display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.o-next p { margin: 0; }
.o-turnkey { padding: 18px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--o-radius); display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.o-turnkey .who { display: flex; gap: 12px; align-items: center; }
.o-turnkey img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.o-turnkey p { margin: 0; }
.o-turnkey .row { display: flex; flex-wrap: wrap; gap: 10px; }
.o-line { font-size: 15px; color: var(--muted); }
.o-more { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.o-reason { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--o-radius); display: flex; flex-direction: column; gap: 8px; }
.o-reason h2 { margin: 0; font-size: 18px; }
.o-reason p { margin: 0; }
.o-first { padding: 18px 16px; border: 2px solid var(--accent); border-radius: var(--o-radius); background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.o-first p { margin: 0; }
.o-login { font-size: 15px; color: var(--muted); margin-top: 16px; }

.o-remind { margin: 0; }
.o-remind .o-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.o-remind .o-line svg { color: var(--ok); }
.o-remind .o-btn { margin-bottom: 6px; }

/* «Вернитесь с цифрами» */
.o-numbers { margin-top: 20px; padding: 18px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--o-radius); }
.o-numbers .o-form { margin-top: 12px; }
.o-nums { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.o-nums legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.o-nums label { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0; }
.o-nums input { width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 17px; }
.o-verdict { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.o-verdict h3 { font-size: 17px; margin: 16px 0 6px; }
.o-verdict ul { margin: 0; padding-left: 20px; }
.o-verdict li { margin: 4px 0; }
.o-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.o-table th, .o-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.o-table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.o-table tr.best td { font-weight: 700; color: var(--ok); }

@media (min-width: 720px) {
  .o-main { padding-top: 40px; }
  .o-actions { flex-direction: row; }
}
