/* Публичный сайт (internal/web/public) — вёрстка по docs/design/home.dc.html,
   pricing.dc.html, legal.dc.html, 404.dc.html. Цвета и радиусы берутся только
   из tokens.css: второго дизайн-языка рядом с кабинетом быть не должно.
   Страницы открываются без JS, поэтому здесь нет ни одного состояния,
   которое нельзя выразить ссылкой, :hover или <details>. */

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }

/* Фокус обязан быть виден: страницы проходят с клавиатуры (PUBLIC §1.10). */
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.wrap--narrow { max-width: 1100px; }

/* ---- шапка ---- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}

.site-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--mint);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
}

.site-brand-name { font-weight: 700; font-size: 18px; }

.site-nav { display: flex; gap: 4px; font-size: 13px; flex-wrap: wrap; }

.site-nav a {
  padding: 10px 14px;
  border-radius: var(--r-pill);
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover { background: var(--hover-bg); }
.site-nav a[aria-current="page"] { background: var(--white); }

.site-auth { display: flex; gap: 8px; font-size: 13px; flex: none; }

/* ---- кнопки ---- */

.btn-line, .btn-ink, .btn-mint, .btn-plain {
  border-radius: var(--r-pill);
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  font-size: 13px;
  padding: 12px 20px;
}

.btn-line { color: var(--ink); border: 1.5px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--on-dark); }

.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--mint); color: var(--ink); }

.btn-mint {
  background: var(--mint);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  padding: 18px 28px;
}
.btn-mint:hover { background: var(--ink); color: var(--on-dark); }

.btn-plain { color: var(--ink); }
.btn-plain:hover { background: var(--hover-bg); }

.btn-l { font-size: 15px; padding: 18px 28px; }

/* ---- подвал ---- */

.site-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 12px;
  color: var(--muted);
}

.site-foot--ruled { border-top: 1px solid var(--outline); }
.site-foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ---- главная: первый экран ---- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 40px;
}

.hero-text { display: flex; flex-direction: column; gap: 28px; }

.hero-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--mint-tint);
  font-size: 12px;
  color: var(--mint-deep);
  text-decoration: none;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
  animation: blink 1.6s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
}

.hero-title {
  margin: 0;
  font-size: 78px;
  line-height: .98;
  letter-spacing: -.04em;
  font-weight: 800;
  text-wrap: pretty;
}

.hero-title span { color: var(--mint-text); }

.hero-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 520px;
  font-weight: 300;
}

.hero-cta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.code-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 13px;
  color: var(--text-2);
  border: 1px dashed var(--outline);
  overflow-x: auto;
  max-width: 100%;
}

.code-chip .prompt { color: var(--ink); }

.metrics { display: flex; gap: 28px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.metrics b { display: block; font-size: 22px; color: var(--ink); font-weight: 700; }

/* The mockup gives the socket column 200px, which leaves the card exactly
   as wide as /v1/chat/completions at 20px — and a scrollbar is enough to
   break the last character onto its own line. Twenty pixels come back to
   the card; the pills are short words and never needed them. */
.hero-art {
  display: grid;
  grid-template-columns: 180px 60px 1fr;
  align-items: center;
  min-height: 520px;
}

.plugs { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }

.plug {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--white);
}

.plug span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  opacity: .85;
  flex: none;
}

.plug--mint { background: var(--mint-tint); }
.plug--lavender { background: var(--lavender); }
.plug--peach { background: var(--peach); }

/* The socket bows outwards: the middle pills sit further from the wire than
   the ones at the ends, exactly as home.dc.html staggers them. */
.plug:nth-child(2), .plug:nth-child(5) { transform: translateX(-18px); }
.plug:nth-child(3), .plug:nth-child(4) { transform: translateX(-30px); }

.wire {
  height: 78%;
  width: 0;
  border-left: 2px dashed var(--outline);
  justify-self: center;
  position: relative;
}

.wire::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -1px;
  width: 60px;
  height: 2px;
  background: var(--mint);
  transform: translateY(-50%);
}

.endpoint {
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 44px;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 30px 60px -30px rgba(22, 32, 28, .5);
}

.endpoint-top { display: flex; justify-content: space-between; align-items: center; }
.endpoint-pins { display: flex; gap: 6px; }
.endpoint-pins span { width: 16px; height: 32px; border-radius: 6px; background: var(--mint); }
.endpoint-verb { font-size: 11px; color: var(--on-dark-2); }

.endpoint-url { font-size: 20px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.endpoint-url span { color: var(--mint); }

.endpoint-body {
  font-size: 12px;
  line-height: 1.7;
  color: var(--on-dark-3);
  background: var(--dark-surface);
  border-radius: 20px;
  padding: 16px 18px;
  overflow-x: auto;
}

.endpoint-body .str { color: var(--mint); }
.endpoint-note { font-size: 12px; color: var(--on-dark-2); }

/* ---- главная: плитки ---- */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 40px;
}

.tile {
  text-decoration: none;
  color: var(--ink);
  border-radius: 40px;
  padding: 36px 34px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--white);
}

.tile--mint { background: var(--mint-tint); }
.tile--lavender { background: var(--lavender); }
.tile--peach { background: var(--peach); }

.tile-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.tile-text { font-size: 14px; line-height: 1.55; font-weight: 300; }
.tile--mint .tile-text { color: var(--mint-ink); }
.tile--lavender .tile-text { color: var(--lavender-ink); }
.tile--peach .tile-text { color: var(--peach-ink); }

.icon-square { width: 64px; height: 64px; border-radius: 24px; background: var(--mint); }
.icon-ring { width: 64px; height: 64px; border-radius: 50%; border: 14px solid var(--violet); }
.icon-bars { display: flex; gap: 6px; align-items: flex-end; height: 64px; }
.icon-bars span { width: 20px; border-radius: 10px; background: var(--orange); }
.icon-bars span:nth-child(1) { height: 64px; }
.icon-bars span:nth-child(2) { height: 44px; }
.icon-bars span:nth-child(3) { height: 28px; }

/* ---- главная: «замените одну строку» ---- */

.swap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 72px;
}

.swap-text { display: flex; flex-direction: column; gap: 20px; }

.swap-title { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.swap-lead { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); font-weight: 300; }
.swap-text .btn-line { align-self: flex-start; padding: 16px 26px; font-size: 14px; }

.code-window {
  background: var(--ink);
  color: var(--on-dark-3);
  border-radius: 36px;
  padding: 30px 32px;
  font-size: 14px;
  line-height: 1.85;
  overflow-x: auto;
}

.code-window .lights { display: flex; gap: 8px; margin-bottom: 18px; }
.code-window .lights span { width: 12px; height: 12px; border-radius: 50%; background: var(--dark-outline); }
.code-window .lights span:last-child { background: var(--mint); }
.code-window pre { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-window .kw { color: var(--on-dark-2); }
.code-window .str { color: var(--mint); }

/* ---- главная: мятная плашка ---- */

.band {
  background: var(--mint);
  border-radius: 48px;
  padding: 64px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.band-title {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  max-width: 640px;
  margin: 0;
}

.band .btn-ink { padding: 22px 34px; font-size: 16px; font-weight: 700; }
.band .btn-ink:hover { background: var(--white); color: var(--ink); }

/* ---- тарифы ---- */

.pricing { display: flex; flex-direction: column; gap: 40px; padding-top: 44px; padding-bottom: 80px; }

.pricing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}

.pricing-title { margin: 0; font-size: 64px; line-height: .95; letter-spacing: -.04em; font-weight: 800; }
.pricing-title span { color: var(--mint-text); }
.pricing-lead { font-size: 16px; line-height: 1.6; color: var(--text-2); font-weight: 300; max-width: 640px; }
.pricing-intro { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }

.period { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--white); font-size: 13px; }
.period a { padding: 10px 18px; border-radius: var(--r-pill); color: var(--ink); text-decoration: none; }
.period a[aria-current="true"] { background: var(--ink); color: var(--white); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }

.plan {
  background: var(--white);
  color: var(--ink);
  border-radius: 40px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.plan--ink { background: var(--ink); color: var(--on-dark); }
.plan--lavender { background: var(--lavender); }

.plan-hot {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--mint);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.plan-name { font-size: 14px; font-weight: 700; }
.plan-for { font-size: 13px; line-height: 1.5; opacity: .7; font-weight: 300; }
.plan-head { display: flex; flex-direction: column; gap: 8px; padding-right: 110px; }
.plan-price { font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.plan-per { font-size: 12px; opacity: .6; margin-top: 6px; }

.plan-cta {
  padding: 16px 22px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  background: var(--ink);
  color: var(--white);
}
.plan-cta:hover { background: var(--mint); color: var(--ink); }
.plan--ink .plan-cta { background: var(--mint); color: var(--ink); }
.plan--ink .plan-cta:hover { background: var(--white); }
.plan--lavender .plan-cta:hover { background: var(--violet); color: var(--white); }

.plan-items { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; }
.plan-item { display: flex; gap: 10px; align-items: flex-start; }
.plan-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
  margin-top: 6px;
}
.plan--lavender .plan-item::before { background: var(--violet); }

.compare {
  background: var(--white);
  border-radius: 40px;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-x: auto;
}

.compare-top { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 16px; }
.compare-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.compare-note { font-size: 12px; color: var(--muted); }

.compare-head, .compare-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.compare-head { padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 11px; color: var(--muted); }
.compare-row { padding: 14px 0; border-bottom: 1px solid var(--divider-weak); font-size: 13px; }
.compare-head span + span, .compare-row span + span { text-align: center; }
.compare-row .none { color: var(--outline); }

.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.note { border-radius: 36px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.note--mint { background: var(--mint-tint); }
.note--peach { background: var(--peach); }
.note-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.note-text { font-size: 14px; line-height: 1.6; font-weight: 300; }
.note--mint .note-text { color: var(--mint-ink); }
.note--peach .note-text { color: var(--peach-ink); }

.faq-title { font-size: 28px; font-weight: 800; letter-spacing: -.03em; padding: 8px 0 20px; }

.faq {
  background: var(--white);
  border-radius: var(--r-card-s);
  padding: 22px 28px;
  margin-bottom: 6px;
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; font-weight: 300; flex: none; }
.faq[open] summary::after { content: "\2212"; }
.faq-answer { font-size: 14px; line-height: 1.65; color: var(--text-2); font-weight: 300; padding-top: 12px; max-width: 760px; }

/* ---- документы ---- */

.legal {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 64px;
}

.legal-side {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--white);
  border-radius: var(--r-card-l);
  padding: 16px;
}

.legal-side-label { font-size: 11px; color: var(--muted); padding: 8px 14px 10px; }

.legal-tab {
  padding: 12px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}
.legal-tab:hover { background: var(--hover-bg); }
.legal-tab[aria-current="page"] { background: var(--ink); color: var(--white); }
.legal-tab[aria-current="page"]:hover { background: var(--ink); }

.legal-draft {
  margin-top: 12px;
  padding: 16px 14px;
  border-radius: var(--r-card-s);
  background: var(--peach);
  font-size: 12px;
  line-height: 1.5;
  color: var(--peach-ink);
}

.legal-main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.legal-updated { font-size: 12px; color: var(--muted); }
.legal-title { margin: 0; font-size: 48px; line-height: 1; letter-spacing: -.04em; font-weight: 800; }
.legal-head { display: flex; flex-direction: column; gap: 12px; }

.legal-body { background: var(--white); border-radius: var(--r-card-xl); padding: 12px 36px; }

.doc-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--divider);
}

.doc-section:first-child { border-top: none; }

/* A preamble before the first «## » has no heading, so it takes the full
   width instead of leaving an empty column — and no empty <h2> is emitted. */
.doc-section--lead { grid-template-columns: 1fr; }
.doc-section h2 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; }
.doc-text { font-size: 14px; line-height: 1.7; color: var(--text-2); font-weight: 300; min-width: 0; }
.doc-text > :first-child { margin-top: 0; }
.doc-text > :last-child { margin-bottom: 0; }
.doc-text p { margin: 0 0 12px; }
.doc-text h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 16px 0 8px; }
.doc-text ul, .doc-text ol { margin: 0 0 12px; padding-left: 20px; }
.doc-text li { margin-bottom: 6px; }
.doc-text code { background: var(--paper); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.doc-text strong { font-weight: 700; color: var(--ink); }

.req { display: grid; grid-template-columns: 200px 1fr; gap: 10px 24px; font-size: 14px; }
.req dt { color: var(--muted); }
.req dd { margin: 0; overflow-wrap: anywhere; }

.legal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.legal-actions a { font-size: 13px; padding: 14px 22px; }

/* ---- 404 ---- */

.nf { position: relative; overflow: hidden; }

.nf-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.nf-blob--lavender { top: -200px; right: -120px; width: 560px; height: 560px; background: var(--lavender); }
.nf-blob--mint { bottom: -160px; left: -120px; width: 420px; height: 420px; background: var(--mint-tint); }

.nf > .wrap, .nf > .site-foot { position: relative; }

.nf-hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
  padding: 40px;
}

.nf-digits { display: flex; gap: 12px; align-items: center; }

.nf-digit {
  width: 150px;
  height: 190px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--on-dark);
  display: grid;
  place-items: center;
  font-size: 96px;
  font-weight: 800;
  letter-spacing: -.06em;
}

.nf-o { width: 190px; height: 190px; border-radius: 50%; border: 44px solid var(--mint); }

.nf-title { margin: 0; font-size: 44px; line-height: 1.05; letter-spacing: -.03em; font-weight: 800; max-width: 720px; text-wrap: pretty; }
.nf-title span { color: var(--mint-text); }
.nf-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); font-weight: 300; max-width: 480px; }
.nf-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.nf-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 12px;
  color: var(--mint-deep);
  text-decoration: none;
}

/* ---- узкие экраны ----
   Макеты нарисованы под 1180px и шире; телефон обязан остаться читаемым,
   поэтому сетки схлопываются, а кегль заголовков падает. */

@media (max-width: 1180px) {
  .hero, .swap, .legal { grid-template-columns: 1fr; }
  /* Cards keep as many columns as fit: three tiles stacked into one
     full-width strip is a page nobody scrolls to the end of. */
  .tiles, .plans, .notes { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .tile { min-height: 240px; }
  .hero-art { display: none; }
  .hero-title { font-size: 54px; }
  .pricing-title { font-size: 44px; }
  .band-title { font-size: 38px; }
  .swap-title { font-size: 34px; }
  .legal-side { position: static; }
  .doc-section { grid-template-columns: 1fr; gap: 10px; }
  .req { grid-template-columns: 1fr; gap: 2px 0; }
  .req dd { margin-bottom: 10px; }
  .plan-head { padding-right: 0; }
  .plan-hot { position: static; align-self: flex-start; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .site-head { flex-wrap: wrap; gap: 12px; }
  .hero-title { font-size: 40px; }
  .nf-digit { width: 92px; height: 120px; font-size: 60px; }
  .nf-o { width: 120px; height: 120px; border-width: 28px; }
  .compare-head, .compare-row { grid-template-columns: 1.6fr 1fr 1fr 1fr; font-size: 12px; }
  .legal-body { padding: 12px 20px; }
  .band { padding: 36px 28px; }
}

/* ---- табло моделей (/models), S13.2 ----
   Приписано в конец файла, после медиазапросов S13.1: свои узкие экраны
   эти блоки объявляют сами, внизу. */

.board { display: flex; flex-direction: column; gap: 24px; padding-top: 44px; padding-bottom: 80px; }

.board-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.board-title { margin: 0; font-size: 56px; line-height: .98; letter-spacing: -.04em; font-weight: 800; }
.board-lead { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-2); font-weight: 300; }
.board-rate { margin: 0; font-size: 12px; color: var(--muted); }

.board-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  border: 1.5px solid transparent;
}
.chip:hover { border-color: var(--outline); }
.chip[aria-current="true"] { background: var(--ink); color: var(--on-dark); }
.chip--s { padding: 6px 12px; font-size: 11px; background: var(--paper); }

.board-count { margin: 0; font-size: 12px; color: var(--muted); }

.board-empty {
  margin: 0;
  padding: 32px;
  border-radius: var(--r-card);
  background: var(--white);
  font-size: 14px;
  color: var(--text-2);
  font-weight: 300;
}

.m-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.m-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: var(--r-card);
  background: var(--white);
  min-width: 0;
}
.m-card--mint { background: var(--mint-tint); }
.m-card--lavender { background: var(--lavender); }
.m-card--peach { background: var(--peach); }

.m-card-head { display: flex; flex-direction: column; gap: 4px; }
.m-card-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.m-card-vendor { margin: 0; font-size: 12px; color: var(--muted); }

.m-card-alias {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--paper);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.m-card--mint .m-card-alias,
.m-card--lavender .m-card-alias,
.m-card--peach .m-card-alias { background: rgba(255, 255, 255, .6); }

.m-card-rows { display: flex; flex-direction: column; gap: 8px; margin: 0; font-size: 13px; }
.m-card-rows > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--divider); }
.m-card-rows > div:last-child { border-bottom: none; padding-bottom: 0; }
.m-card-rows dt { color: var(--muted); }
.m-card-rows dd { margin: 0; font-weight: 700; white-space: nowrap; }

.m-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.board-notes { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); max-width: 760px; }
.board-notes p { margin: 0; line-height: 1.6; }

/* ---- статус (/status), S13.2 ---- */

.status { display: flex; flex-direction: column; gap: 24px; padding-top: 44px; padding-bottom: 80px; }

.status-head {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 36px;
  border-radius: var(--r-card-xl);
  background: var(--mint-tint);
}
.status-head--bad { background: var(--peach); }
.status-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--mint); flex: none; }
.status-head--bad .status-dot { background: var(--orange); }
.status-title { margin: 0; font-size: 40px; line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.status-sub { margin: 6px 0 0; font-size: 14px; font-weight: 300; color: var(--mint-ink); }
.status-head--bad .status-sub { color: var(--peach-ink); }

.status-metrics { padding: 0 4px; }

.incidents { display: flex; flex-direction: column; gap: 12px; }

.incident {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 28px;
  border-radius: var(--r-card);
  background: var(--white);
  border-left: 6px solid var(--outline);
}
.incident--open.sev--minor { border-left-color: var(--orange); }
.incident--open.sev--major { border-left-color: var(--orange); }
.incident--open.sev--outage { border-left-color: var(--red); }
.incident-top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.incident-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.incident-badge { font-size: 11px; color: var(--muted); white-space: nowrap; }
.incident-when { margin: 0; font-size: 12px; color: var(--muted); }
.incident-body { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); font-weight: 300; white-space: pre-wrap; overflow-wrap: anywhere; }

.wall { display: flex; flex-direction: column; gap: 16px; padding: 32px; border-radius: var(--r-card-xl); background: var(--white); }
.wall-top { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.wall-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.wall-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend { display: inline-flex; align-items: center; gap: 6px; }

.wall-row { display: grid; grid-template-columns: 180px 1fr 72px; gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--divider-weak); }
.wall-row:first-of-type { border-top: none; }
.wall-name { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.wall-days { display: flex; gap: 2px; min-width: 0; }
.wall-uptime { font-size: 13px; text-align: right; color: var(--muted); white-space: nowrap; }

.cell { display: block; flex: 1 1 0; min-width: 2px; height: 30px; border-radius: 3px; background: var(--divider); }
.legend .cell { flex: none; width: 10px; height: 10px; border-radius: 2px; }
.cell--ok { background: var(--mint); }
.cell--warn { background: var(--orange); }
.cell--bad { background: var(--red); }
.cell--none { background: var(--divider); }

.wall-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

@media (max-width: 1180px) {
  .board-title { font-size: 44px; }
  .wall-row { grid-template-columns: 140px 1fr 64px; }
}

@media (max-width: 720px) {
  .board-title { font-size: 36px; }
  .status-title { font-size: 30px; }
  .status-head { padding: 24px; }
  .wall { padding: 20px; }
  /* Ninety columns do not fit a phone: the name and the uptime share the
     first line and the wall scrolls sideways on its own, so the page never
     scrolls horizontally as a whole. */
  .wall-row { grid-template-columns: 1fr auto; }
  .wall-days { grid-column: 1 / -1; overflow-x: auto; }
  .cell { min-width: 3px; }
}

/* ---- документация (/docs, S13.3) ----
   Вкладки языков — радиокнопки и :checked, а не JS: страница обязана
   открываться без скриптов, а все три примера обязаны лежать в HTML —
   их читает и поисковик, и e2e, который прогоняет curl-вариант. */

.docs {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 64px;
}

.doc-side {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--white);
  border-radius: var(--r-card-xl);
  padding: 16px;
}

.doc-side-title { margin: 0; font-size: 11px; color: var(--muted); padding: 8px 14px 10px; }

.doc-nav { display: flex; flex-direction: column; gap: 2px; }
.doc-nav a {
  padding: 12px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}
.doc-nav a:hover { background: var(--hover-bg); }
.doc-nav a[aria-current="page"] { background: var(--ink); color: var(--on-dark); }

.doc-side-note {
  margin: 12px 0 0;
  padding: 16px 14px;
  border-radius: var(--r-card-s);
  background: var(--mint-tint);
  color: var(--mint-deep);
  font-size: 12px;
  line-height: 1.5;
}

.doc-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.doc-head { display: flex; flex-direction: column; gap: 14px; }
.doc-crumb { margin: 0; font-size: 12px; color: var(--muted); }
.doc-title { margin: 0; font-size: 48px; line-height: 1.04; letter-spacing: -.04em; font-weight: 800; }
.doc-lead { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-2); max-width: 660px; font-weight: 300; }

.doc-h2 { margin: 16px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.doc-text { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-2); max-width: 720px; font-weight: 300; }
.doc-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; color: var(--text-2); max-width: 720px; font-weight: 300; }
.doc-list li { margin-bottom: 6px; }

.doc-code {
  background: var(--ink);
  color: var(--on-dark-3);
  border-radius: var(--r-card-xl);
  overflow: hidden;
}

/* Сами радиокнопки не видны — их роль играют подписи. Убирать их из потока
   через display:none нельзя: тогда до вкладки не добраться с клавиатуры. */
.doc-tab-in {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.doc-tabs { display: flex; gap: 4px; padding: 14px 16px 0 24px; flex-wrap: wrap; }
.doc-tab {
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--on-dark-2);
  cursor: pointer;
}
.doc-tab:hover { color: var(--on-dark); }

.doc-pre {
  margin: 0;
  padding: 20px 28px 28px;
  font: inherit;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: none;
}

.doc-code input:nth-of-type(1):checked ~ .doc-tabs .doc-tab:nth-child(1),
.doc-code input:nth-of-type(2):checked ~ .doc-tabs .doc-tab:nth-child(2),
.doc-code input:nth-of-type(3):checked ~ .doc-tabs .doc-tab:nth-child(3) {
  background: var(--mint);
  color: var(--ink);
}

.doc-code input:nth-of-type(1):checked ~ .doc-pre:nth-of-type(1),
.doc-code input:nth-of-type(2):checked ~ .doc-pre:nth-of-type(2),
.doc-code input:nth-of-type(3):checked ~ .doc-pre:nth-of-type(3) {
  display: block;
}

.doc-code input:focus-visible ~ .doc-tabs .doc-tab { outline: 2px solid var(--mint); outline-offset: 2px; }

.doc-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.doc-note { border-radius: var(--r-card-l); padding: 26px; background: var(--white); }
.note--mint { background: var(--mint-tint); }
.note--lavender { background: var(--lavender); }
.note--peach { background: var(--peach); }
.doc-note-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.doc-note-body { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-2); font-weight: 300; }
.note--mint .doc-note-body { color: var(--mint-ink); }
.note--lavender .doc-note-body { color: var(--lavender-ink); }
.note--peach .doc-note-body { color: var(--peach-ink); }

.doc-params {
  margin: 0;
  background: var(--white);
  border-radius: var(--r-card-l);
  padding: 12px 28px 20px;
}
.doc-param {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(90px, 130px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  align-items: baseline;
}
.doc-param:first-child { border-top: none; }
.doc-param-name { font-weight: 700; overflow-wrap: anywhere; }
.doc-param-type { margin: 0; color: var(--link); overflow-wrap: anywhere; }
.doc-param-desc { margin: 0; color: var(--text-2); line-height: 1.55; font-weight: 300; }

.doc-move { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; }

/* ---- витрина чата (/chat, S13.3) ---- */

.cs-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding-top: 48px; }
.cs-title { margin: 0; font-size: 56px; line-height: 1.03; letter-spacing: -.04em; font-weight: 800; max-width: 900px; }
.cs-title span { color: var(--mint-text); }
.cs-lead { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 620px; font-weight: 300; }

.cs {
  margin: 28px auto 0;
  width: 900px;
  max-width: calc(100% - 80px);
  background: var(--white);
  border-radius: 40px;
  box-shadow: 0 40px 80px -40px rgba(22, 32, 28, .35);
  padding: 26px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cs-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.cs-top-left { display: inline-flex; align-items: center; gap: 8px; }

/* Подпись поля нужна программе чтения с экрана, а глазу её заменяет
   placeholder: прятать её display:none нельзя — она пропадёт и оттуда. */
.cs-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cs-text {
  font: inherit;
  font-size: 20px;
  line-height: 1.45;
  min-height: 92px;
  font-weight: 300;
  letter-spacing: -.01em;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: var(--ink);
  width: 100%;
  padding: 0;
}
.cs-text:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 8px; }

.cs-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--paper);
}
.cs-chip:hover { border-color: var(--ink); }
.cs-chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.cs-chip-price { opacity: .55; font-size: 12px; white-space: nowrap; }
.cs-chip--more { background: transparent; border: 1.5px dashed var(--outline); color: var(--muted); }
.cs-chip--more:hover { color: var(--ink); border-color: var(--ink); }

.cs-legend { margin: 0; font-size: 11px; color: var(--muted); }
.cs-empty { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.6; }

.cs-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  flex-wrap: wrap;
}
.cs-est { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.6; max-width: 520px; }
.cs-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-actions button { font: inherit; cursor: pointer; }

.cs-note { margin: 18px auto 40px; text-align: center; font-size: 12px; color: var(--muted); max-width: 720px; line-height: 1.6; padding: 0 40px; }

.cs-compare { background: var(--white); border-radius: var(--r-card-xl); padding: 24px 28px; margin-bottom: 40px; }
.cs-compare > summary { cursor: pointer; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.cs-compare-q { margin: 18px 0 0; font-size: 14px; color: var(--text-2); font-weight: 300; }
.cs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.cs-card { border-radius: var(--r-card-l); padding: 24px; display: flex; flex-direction: column; gap: 12px; background: var(--paper); }
.cmp--mint { background: var(--mint-tint); }
.cmp--lavender { background: var(--lavender); }
.cmp--peach { background: var(--peach); }
.cs-card-badge { margin: 0; font-size: 11px; color: var(--muted); }
.cs-card-answer { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); font-weight: 300; }
.cs-compare-note { margin: 16px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .doc-side { position: static; }
  .doc-title { font-size: 36px; }
  .doc-param { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cs-title { font-size: 38px; }
  .cs { max-width: calc(100% - 40px); border-radius: var(--r-card-xl); }
  .cs-note { padding: 0 20px; }
}
