:root {
  --blue: #1f5cf2;
  --blue-deep: #1238b5;
  --mint: #2be0b0;
  --ink: #0e1b3d;
  --muted: #55608a;
  --page: #fff;
  --tint: #eef2fe;
  --incoming: #e9ecf5;
  --line: #d6dcef;
  --on-blue: #fff;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Hiragino Sans", "Noto Sans KR", "Noto Sans JP", sans-serif;
  --display: ui-rounded, "SF Pro Rounded", var(--text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eaf0ff;
    --muted: #a3afd6;
    --page: #0b1430;
    --tint: #121d42;
    --incoming: #1d2950;
    --line: #2a3766;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 17px/1.55 var(--text); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { letter-spacing: 0; line-height: 1.25; }
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; }
:lang(ja) .bubble h1 { word-break: keep-all; }

@media (prefers-color-scheme: dark) {
  a { color: #8fb2ff; }
}

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; max-width: 1200px; margin: 0 auto; padding: 16px 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 800 1.2rem var(--display); text-decoration: none; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.top-nav { display: flex; gap: 20px; margin-left: auto; }
.top-nav a, .langs a { color: var(--muted); text-decoration: none; }
.top-nav a:hover, .langs a:hover { color: var(--ink); text-decoration: underline; }
.langs { display: flex; gap: 12px; font-size: .9rem; }
.langs a[aria-current] { color: var(--ink); font-weight: 700; }

/* Хвостик сообщения: --u это один шаг, в большом сообщении он крупнее. */
.tail { --u: 1px; position: relative; }
.tail::before, .tail::after { content: ""; position: absolute; bottom: 0; }
.tail::before { right: calc(var(--u) * -8); width: calc(var(--u) * 20); height: calc(var(--u) * 20); background: var(--tail, var(--blue)); border-bottom-left-radius: calc(var(--u) * 16) calc(var(--u) * 14); }
.tail::after { right: calc(var(--u) * -10 - 1px); width: calc(var(--u) * 10 + 1px); height: calc(var(--u) * 20 + 2px); background: var(--tail-page, var(--page)); border-bottom-left-radius: calc(var(--u) * 10); }

.bubble { --u: 2.6px; background: var(--blue); color: var(--on-blue); border-radius: clamp(30px, 4vw, 52px); padding: clamp(28px, 5vw, 64px); }
.bubble h1 { font-size: clamp(2.5rem, 5.5vw, 4.75rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
.bubble .lead { font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.4; margin-top: 20px; max-width: 34em; }
.cta-wrap { margin-top: 28px; }
.cta { display: inline-block; background: var(--mint); color: #0e1b3d; border-radius: 999px; padding: 14px 26px; font: 700 1.05rem var(--display); text-decoration: none; }
.cta:hover { background: #5cebc6; }
.cta-note { font-size: .92rem; margin-top: 10px; opacity: .88; }

.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; max-width: 1200px; margin: 0 auto; padding: 12px 24px 32px; }
.demo label { display: block; font-weight: 600; margin-bottom: 8px; }
.demo textarea { width: 100%; resize: none; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--page); color: var(--ink); font: 1rem/1.4 var(--text); }
.threads { list-style: none; margin: 16px 0 0; padding: 0; }
.threads li { padding: 12px 0; border-top: 1px solid var(--line); }
.threads li:first-child { border-top: 0; }
.to { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.out, .in { width: fit-content; max-width: 88%; border-radius: 18px; padding: 8px 14px; line-height: 1.32; overflow-wrap: anywhere; }
.out { background: var(--blue); color: var(--on-blue); margin-left: auto; margin-right: 8px; }
.in { background: var(--incoming); }
.in b { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }

/* На телефоне диалоги ниже первого экрана, анимировать там нечего. */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .threads li { animation: land .42s cubic-bezier(.2, .8, .3, 1) both; }
  .threads li:nth-child(2) { animation-delay: .34s; }
  .threads li:nth-child(3) { animation-delay: .68s; }
  @keyframes land { from { opacity: 0; transform: translateY(14px); } }
}

main > section:not(.hero) { max-width: 1200px; margin: 0 auto; padding: clamp(44px, 7vw, 84px) 24px; }

.versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 6vw, 80px); margin-top: 32px; }
.versus h3 { margin-bottom: 14px; }
.chat { display: flex; flex-direction: column; gap: 6px; min-height: 172px; margin-bottom: 16px; }
.chat .out { margin-top: 4px; }

.how, .inside { display: grid; gap: clamp(32px, 6vw, 88px); align-items: center; }
.how { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.inside { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.how img, .inside img { border-radius: 28px; }
.steps { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 56px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -4px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: var(--on-blue); font: 800 1.05rem var(--display); }
.steps p, .features p { color: var(--muted); margin-top: 4px; }
.features { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 36px; margin: 28px 0 0; padding: 0; }

main > .know { max-width: none; background: var(--tint); }
.know h2, .know ul { max-width: 1152px; margin-left: auto; margin-right: auto; }
.know ul { margin-top: 24px; padding-left: 1.2em; columns: 2; column-gap: 56px; }
.know li { break-inside: avoid; margin-bottom: 14px; }

.plans table { width: 100%; max-width: 720px; border-collapse: collapse; margin-top: 24px; }
.plans th, .plans td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: center; }
.plans tbody th { text-align: left; font-weight: 400; padding-right: 16px; }
.plans thead th { font: 700 1.1rem var(--display); }
.plans thead th, .plans td { width: 104px; }
.plans table + p { color: var(--muted); max-width: 720px; margin-top: 18px; }
.yes, .no { display: inline-block; width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
.yes { background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.4 3.4L16 8' fill='none' stroke='%230e1b3d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.no { width: 12px; height: 2px; border-radius: 0; background: var(--muted); }

.faq details { max-width: 760px; border-bottom: 1px solid var(--line); }
.faq h2 + details { margin-top: 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.faq details p { color: var(--muted); padding-bottom: 16px; }

.guides { list-style: none; margin: 20px 0 0; padding: 0; max-width: 760px; }
.guides li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.guides a { font-weight: 600; font-size: 1.1rem; }
.guides p { color: var(--muted); margin-top: 2px; }

.bottom .bubble { max-width: 860px; }
.bottom .bubble h2 { color: var(--on-blue); }

.article { max-width: 760px; margin: 0 auto; padding: 24px 24px 0; }
.article h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; }
.article .lead { font-size: 1.2rem; line-height: 1.45; margin-top: 18px; }
.article .note { margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: var(--tint); }
.article section { margin-top: 40px; }
.article section h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
.article section p, .article section ol { margin-top: 12px; }
.article section ol { padding-left: 1.3em; }
.article section li { margin-bottom: 6px; }
.article .checked { margin-top: 32px; color: var(--muted); font-size: .92rem; }
.article .bottom { padding: 8px 0 0; margin-top: 44px; }
.article .more { margin-top: 44px; }
.table { overflow-x: auto; margin-top: 24px; }
.table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .96rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
.table thead th { font-weight: 700; }
.table tbody th { font-weight: 600; }
.apps { list-style: none; padding: 0; margin: 32px 0 0; }
.app { margin-top: 36px; }
.app p { margin-top: 10px; }
.app img { max-width: 260px; border-radius: 22px; margin-top: 14px; }
.app-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .92rem; }
.legal h1 { margin-bottom: 8px; }
.legal h2 { font-size: 1.4rem; margin-top: 32px; }
.legal p, .legal ul { margin-top: 12px; }
.support form { margin-top: 28px; }
.support label { display: block; font-weight: 600; margin-top: 18px; margin-bottom: 8px; }
.support input, .support textarea { width: 100%; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--page); color: var(--ink); font: 1rem/1.4 var(--text); }
.support textarea { resize: vertical; }
.support button { border: 0; cursor: pointer; }
.support button:disabled { opacity: .6; cursor: default; }
.support #support-done, .support #support-fail { margin-top: 28px; padding: 12px 16px; border-radius: 14px; background: var(--tint); }

footer { max-width: 1200px; margin: 24px auto 0; padding: 24px; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }
footer a { color: var(--muted); }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .top { padding: 12px 16px; }
  .langs { width: 100%; justify-content: space-between; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 8px 16px 24px; }
  .bubble { --u: 1.8px; margin-right: 12px; }
  main > section:not(.hero) { padding-left: 16px; padding-right: 16px; }
  .versus, .features { grid-template-columns: minmax(0, 1fr); }
  .chat { min-height: 0; }
  .how, .inside { grid-template-columns: minmax(0, 1fr); }
  .how img, .inside img { max-width: 280px; margin: 0 auto; }
  .know ul { columns: 1; }
  .article { padding: 16px 16px 0; }
}
