/*
 * The whole site shares this one stylesheet. System fonts only and nothing
 * from other hosts: the privacy policy promises the site loads no third-party
 * resources (test/landing.test.ts keeps it that way).
 */

:root {
  color-scheme: light dark;
  --bg: #fafaf7;
  --surface: #ffffff;
  --sunken: #f1f0ea;
  --fg: #1d1d1b;
  --muted: #5e5e59;
  --line: #e3e1d9;
  --accent: #3b5bdb;
  --accent-hover: #2f4ac2;
  --on-accent: #ffffff;
  --accent-soft: #e9edfb;
  --focus: #3b5bdb;
  --shadow: 0 1px 2px rgb(29 29 27 / 5%), 0 18px 40px -18px rgb(29 29 27 / 22%);
  --radius: 16px;
  --wrap: 72rem;
  --gutter: 16px;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --surface: #1c1c1a;
    --sunken: #242422;
    --fg: #ededea;
    --muted: #a8a8a2;
    --line: #2f2f2c;
    --accent: #8ea4f5;
    --accent-hover: #a9baf8;
    --on-accent: #10131f;
    --accent-soft: #1f2542;
    --focus: #a9baf8;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 18px 40px -18px rgb(0 0 0 / 70%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    17px / 1.6 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 32px;
  }
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: none;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--sunken);
  color: var(--fg);
}

@media (min-width: 52rem) {
  .nav-link {
    display: inline-block;
  }

  .site-nav .btn {
    margin-left: 8px;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--muted);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Hero */

.hero {
  padding-block: 40px 56px;
}

.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 60rem) {
  .hero {
    padding-block: 80px 96px;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 64px;
  }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.25rem, 1.35rem + 3.8vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
}

.lead {
  max-width: 35rem;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 30rem) {
  .cta-row .btn {
    flex: 1 1 100%;
  }
}

.hero-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* The chat in the hero: a drawing of the bot, not a screenshot. */

.chat {
  width: 100%;
  max-width: 25rem;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid var(--line);
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}

.chat-avatar svg {
  width: 22px;
  height: 22px;
}

.chat-name {
  display: block;
  margin: 0;
  font-weight: 650;
  line-height: 1.25;
}

.chat-sub {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.bubble {
  width: fit-content;
  max-width: 88%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.bubble-me {
  margin-left: auto;
  border-bottom-right-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
}

.bubble-bot {
  margin-top: 12px;
  border-bottom-left-radius: 6px;
  background: var(--sunken);
}

.bubble-bot p {
  margin: 0;
}

.card-label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.bubble-bot .card-word {
  margin-top: 6px;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card-ipa {
  color: var(--muted);
  font-size: 0.875rem;
}

.bubble-bot .card-tr {
  margin-top: 8px;
  font-weight: 600;
}

.bubble-bot .card-ex {
  margin-top: 8px;
  color: var(--muted);
}

.card-ex i {
  color: var(--fg);
}

.chat-keys {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.chat-keys.keys-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step .chat-keys {
  margin-top: 16px;
}

/* The bot's line of intervals: in the message, over keys that carry only the grades. */
.step .chat-intervals {
  margin-top: 16px;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.step .chat-intervals + .chat-keys {
  margin-top: 8px;
}

@media (max-width: 30rem) {
  .step {
    padding: 20px;
  }

  .step .key {
    font-size: 0.75rem;
  }
}

.key {
  padding: 8px 2px;
  overflow-wrap: normal;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.chat-caption {
  margin: 14px 4px 2px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* Sections */

.section {
  padding-block: 56px;
}

@media (min-width: 60rem) {
  .section {
    padding-block: 88px;
  }
}

.section-alt {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.section-head {
  max-width: 42rem;
  margin-bottom: 36px;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.026em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

.steps,
.features {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 64rem) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step,
.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature {
  background: var(--bg);
}

.step-n {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.step h3,
.feature h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.step p,
.feature p {
  margin: 0;
  color: var(--muted);
}

.feature svg {
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  color: var(--accent);
}

/* Free vs Encore ИИ */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare caption {
  padding: 0;
}

.compare th,
.compare td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare tbody tr:last-child > * {
  border-bottom: 0;
}

.compare thead th {
  background: var(--sunken);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.compare thead th.col-pro {
  color: var(--accent);
}

.compare tbody th {
  width: 40%;
  font-weight: 500;
}

.compare td.col-pro {
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
  font-weight: 600;
}

@media (max-width: 30rem) {
  .compare {
    font-size: 0.875rem;
  }

  .compare th,
  .compare td {
    padding: 12px 10px;
  }
}

/* The letter table of /gruzinskiy-alfavit: the letter itself is the row's head. */

.letters tbody th {
  width: auto;
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.2;
}

.letters .ipa {
  color: var(--muted);
  white-space: nowrap;
}

.table-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Prices */

.plans {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}

@media (min-width: 48rem) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.plan-featured {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.plan h3 {
  margin: 0;
  font-size: 1.125rem;
}

.badge {
  position: absolute;
  top: -13px;
  right: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.8125rem;
  font-weight: 700;
}

.price {
  margin: 10px 0 4px;
  font-size: 2.75rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.price small {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

.plan-sub {
  margin: 0 0 20px;
  color: var(--muted);
}

.ticks {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 30px;
}

.ticks li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 4px;
  width: 12px;
  height: 7px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.plan .btn {
  margin-top: auto;
}

.pay-info {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--sunken);
  font-size: 0.9688rem;
}

@media (min-width: 48rem) {
  .pay-info {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

.pay-info h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.pay-info p {
  margin: 0;
  color: var(--muted);
}

/* FAQ */

.faq {
  display: grid;
  gap: 12px;
  max-width: 48rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.faq summary {
  position: relative;
  padding: 18px 56px 18px 20px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 24px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
}

.faq details[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.answer {
  padding: 0 20px 18px;
  color: var(--muted);
}

.answer p {
  margin: 0 0 10px;
}

.answer p:last-child {
  margin-bottom: 0;
}

/* Closing call to action */

.cta-band {
  padding: 40px 24px;
  border-radius: 24px;
  background: var(--accent);
  color: var(--on-accent);
  text-align: center;
}

.cta-band h2 {
  margin-bottom: 8px;
}

.cta-band p {
  max-width: 32rem;
  margin: 0 auto 24px;
  opacity: 0.9;
}

.cta-band .btn {
  background: var(--on-accent);
  color: var(--accent);
}

.cta-band .btn:hover {
  background: color-mix(in srgb, var(--on-accent) 88%, var(--accent));
}

.cta-band :focus-visible {
  outline-color: var(--on-accent);
}

/* Footer */

.site-footer {
  padding-block: 48px 32px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1.2fr;
  }
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--fg);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--fg);
}

.site-footer .brand {
  margin-bottom: 12px;
}

.requisites {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.requisites p {
  margin: 0 0 4px;
}

/* Legal documents */

.doc-head {
  padding-block: 40px 28px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 60rem) {
  .doc-head {
    padding-block: 56px 36px;
  }
}

.doc-head h1 {
  max-width: 48rem;
  margin-bottom: 12px;
  font-size: clamp(1.875rem, 1.35rem + 2.2vw, 2.75rem);
  line-height: 1.12;
}

.doc-meta {
  margin: 0;
  color: var(--muted);
}

.doc-byline {
  margin-top: 12px;
  font-size: 0.9375rem;
}

.doc-layout {
  display: grid;
  gap: 32px;
  padding-block: 32px 72px;
}

@media (min-width: 64rem) {
  .doc-layout {
    grid-template-columns: 17rem minmax(0, 1fr);
    gap: 56px;
    padding-top: 40px;
  }

  .toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow: auto;
  }
}

.toc {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9375rem;
}

.toc h2 {
  margin: 0 0 8px 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--fg);
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  background: var(--sunken);
}

.toc-n {
  min-width: 1.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.doc {
  /* Width of the column the clause numbers hang in. */
  --cl-w: 3rem;
  max-width: 46rem;
  min-width: 0;
}

@media (max-width: 30rem) {
  .doc {
    --cl-w: 2.6rem;
    font-size: 1rem;
  }
}

.doc section {
  margin-bottom: 44px;
}

.doc h2 {
  display: flex;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.sec-n {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.doc h3 {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.doc p {
  margin: 0 0 12px;
}

/* A paragraph that continues a numbered clause after its list. */
.cl-cont {
  padding-left: var(--cl-w);
}

/* A numbered clause: the number hangs in its own column. */
.cl {
  padding-left: var(--cl-w);
  text-indent: calc(-1 * var(--cl-w));
}

.cl-n {
  display: inline-block;
  width: var(--cl-w);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-indent: 0;
}

.doc ul,
.doc ol.list {
  margin: -4px 0 14px;
  padding-left: calc(var(--cl-w) + 1.25rem);
}

.doc li {
  margin-bottom: 6px;
}

.summary-box {
  margin-bottom: 44px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.summary-box h2 {
  display: block;
  margin-bottom: 10px;
  font-size: 1.125rem;
}

.doc .summary-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

.summary-box li:last-child {
  margin-bottom: 0;
}

.purpose {
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.purpose dl {
  display: grid;
  gap: 2px 20px;
  margin: 0;
}

@media (min-width: 40rem) {
  .purpose dl {
    grid-template-columns: 8.5rem minmax(0, 1fr);
  }
}

.purpose dt {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.75;
}

.purpose dd {
  margin: 0 0 10px;
}

.purpose dd:last-child {
  margin-bottom: 0;
}

.doc .purpose > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.formula {
  margin: 0 0 12px var(--cl-w);
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--sunken);
}

.req-list {
  display: grid;
  gap: 4px 20px;
  margin: 0 0 12px;
}

@media (min-width: 40rem) {
  .req-list {
    grid-template-columns: 11rem minmax(0, 1fr);
  }
}

.req-list dt {
  color: var(--muted);
}

.req-list dd {
  margin: 0 0 6px;
}

@media print {
  .site-header,
  .toc,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .doc-layout {
    display: block;
  }

  .site-footer,
  .summary-box,
  .purpose {
    background: none;
  }

  a {
    color: inherit;
  }
}

/* A closing banner inside a document (/gruzinskiy-alfavit): .doc h2 and .doc p
   come later in this file and would pull its heading and text to the left. */
.doc .cta-band h2 {
  display: block;
  margin: 0 0 8px;
}

.doc .cta-band p {
  margin: 0 auto 24px;
}
