:root {
  --brand: #d74e59;
  --brand-dark: #b93643;
  --ink: #171719;
  --muted: #696a74;
  --muted-light: #92939c;
  --surface: #f7f7f5;
  --card: #ffffff;
  --soft: #efeff1;
  --line: #dedfe4;
  --green: #5a9f55;
  --green-soft: #edf6eb;
  --orange: #d88332;
  --orange-soft: #fbf1dd;
  --red-soft: #fff1f2;
  color: var(--ink);
  background: var(--surface);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--surface); }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
h1, h2, h3, p, blockquote { margin-top: 0; }
[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.doc-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid rgba(222, 223, 228, .88);
  background: rgba(247, 247, 245, .92);
  backdrop-filter: blur(18px);
}
.doc-header__inner {
  width: min(1180px, calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}
.brand img { width: 168px; height: auto; display: block; }
.header-page-link {
  margin-left: auto;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(85, 86, 95, .35);
  color: #55565f;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease;
}
.header-page-link:hover,
.header-page-link:focus-visible { border-color: currentColor; color: var(--brand-dark); }

main { overflow: clip; }
.intro,
.reference-section,
.docs-shell,
.content-column,
.doc-footer {
  width: min(1180px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.intro { padding: 58px 0 34px; }
.intro__copy { max-width: 930px; }
.eyebrow {
  margin-bottom: 16px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: clamp(46px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -.052em;
}
.intro__lead {
  max-width: 850px;
  margin-bottom: 24px;
  color: #555660;
  font-size: 18px;
  line-height: 1.58;
}
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #62636d;
  background: rgba(255,255,255,.6);
  font-size: 11px;
  font-weight: 700;
}
.meta-chip--live { border-color: #cfe1ca; color: #487d43; background: var(--green-soft); }

.finder {
  margin-top: 38px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}
.search-box {
  min-height: 54px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #cfd0d6;
  border-radius: 15px;
  background: var(--surface);
}
.search-box:focus-within {
  border-color: rgba(215,78,89,.8);
  box-shadow: 0 0 0 4px rgba(215,78,89,.1);
}
.search-box__icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid #777883;
  border-radius: 50%;
}
.search-box__icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: #777883;
  content: "";
  transform: rotate(45deg);
}
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}
.search-box input::placeholder { color: #92939c; }
.search-box button {
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: #e8e8ea;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.role-filters,
.route-filters {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.role-filters button,
.route-filters button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #666771;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.role-filters button:hover,
.route-filters button:hover { border-color: #9b9ca5; color: var(--ink); }
.role-filters button[aria-pressed="true"],
.route-filters button[aria-pressed="true"] { border-color: var(--ink); color: #fff; background: var(--ink); }
.filter-result { margin: 13px 2px 0; color: var(--muted-light); font-size: 11px; }

.journey-scroll { width: 100%; }
.journey {
  margin: 0;
  padding: 0 0 4px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
}
.journey li {
  position: relative;
  grid-column: span 3;
  min-height: 275px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
}
.journey li:nth-child(n+5) { grid-column: span 4; }
.journey li:nth-child(4) { color: #fff; background: var(--ink); }
.journey li:nth-child(5) { border-color: rgba(215,78,89,.35); background: #fff6f7; }
.journey li::after,
.pipeline-card::after {
  position: absolute;
  z-index: 0;
  top: 18px;
  right: 18px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 78, 89, .24);
  border-radius: 17px 20px 15px 19px;
  color: var(--brand-dark);
  background: #fff1f2;
  box-shadow: 0 7px 16px rgba(23, 23, 25, .08);
  content: "";
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(6deg);
}
.journey li:nth-child(1)::after { content: "1–5"; font-size: 15px; transform: rotate(-7deg); }
.journey li:nth-child(2)::after { content: "REC"; font-family: Arial, sans-serif; font-size: 11px; letter-spacing: .06em; transform: rotate(5deg); }
.journey li:nth-child(3)::after { content: "≈"; font-size: 32px; transform: rotate(-5deg); }
.journey li:nth-child(4)::after { border-color: rgba(255,255,255,.2); color: var(--ink); background: #fff; content: "···"; font-size: 27px; transform: rotate(7deg); }
.journey li:nth-child(5)::after { content: "Aa"; font-size: 18px; transform: rotate(-6deg); }
.journey li:nth-child(6)::after { content: "¶"; color: #735720; background: var(--orange-soft); border-color: rgba(216,131,50,.28); transform: rotate(5deg); }
.journey li:nth-child(7)::after { content: "↗"; color: #467a41; background: var(--green-soft); border-color: rgba(90,159,85,.28); font-size: 26px; transform: rotate(-5deg); }
.journey li > span {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  margin-bottom: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 10px;
  font-weight: 850;
}
.journey li:nth-child(4) > span { color: var(--ink); background: #fff; }
.journey li strong { margin-bottom: 13px; font-size: 18px; line-height: 1.18; letter-spacing: -.02em; }
.journey li p { margin: auto 0 0; color: var(--muted); font-size: 12px; line-height: 1.52; }
.journey li:nth-child(4) p { color: #bdbdc5; }
.journey-results { margin-top: 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.journey-results article {
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.journey-results strong { align-self: center; font-size: 14px; }
.journey-results p { grid-column: 2; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.result-example {
  grid-column: 2;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #777881;
  font-size: 10px;
  line-height: 1.5;
}
.result-example b { color: var(--ink); }

.reference-section { padding: 78px 0; border-top: 1px solid var(--line); }
.section-heading { max-width: 900px; margin-bottom: 42px; }
.section-heading--row {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr);
  align-items: end;
  gap: 50px;
}
.section-heading--row > p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.55;
}
.stack-note {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.stack-note > span {
  margin-bottom: 8px;
  display: block;
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.stack-note > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
h2 {
  margin-bottom: 18px;
  font-size: clamp(36px, 4.3vw, 54px);
  line-height: 1.04;
  letter-spacing: -.048em;
}
.section-heading h2:last-child { margin-bottom: 0; }
.answer-first {
  max-width: 840px;
  margin: 0;
  padding-left: 18px;
  border-left: 3px solid var(--brand);
  color: #555660;
  font-size: 17px;
  line-height: 1.58;
}
.subheading { margin: 45px 0 20px; font-size: 24px; letter-spacing: -.025em; }

.quick-section { padding-top: 54px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.quick-grid article {
  min-height: 260px;
  padding: 27px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}
.answer-label {
  width: max-content;
  margin-bottom: 42px;
  padding: 7px 9px;
  border-radius: 999px;
  color: #6b6c75;
  background: #ededeb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.answer-label--now { color: #467a41; background: var(--green-soft); }
.answer-label--demo { color: #8b6725; background: var(--orange-soft); }
.quick-grid h3 { margin-bottom: 14px; font-size: 22px; letter-spacing: -.025em; line-height: 1.2; }
.quick-grid p { margin: auto 0 0; color: var(--muted); font-size: 14px; line-height: 1.58; }

.pipeline-section { width: min(1320px, calc(100% - 32px)); }
.pipeline-scroll { padding: 2px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #cacbd0 transparent; }
.pipeline {
  min-width: 1120px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr) 28px) minmax(0, 1fr);
  align-items: stretch;
}
.pipeline-card {
  position: relative;
  min-width: 0;
  min-height: 360px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  cursor: default;
  overflow: hidden;
  text-align: left;
}
.pipeline-card:nth-of-type(1)::after { content: "≈"; font-size: 32px; transform: rotate(-6deg); }
.pipeline-card:nth-of-type(2)::after { content: "⇥"; color: #735720; background: var(--orange-soft); border-color: rgba(216,131,50,.28); font-size: 25px; transform: rotate(6deg); }
.pipeline-card:nth-of-type(3)::after { content: "Aa"; font-size: 18px; transform: rotate(-5deg); }
.pipeline-card:nth-of-type(4)::after { border-color: rgba(255,255,255,.2); color: var(--ink); background: #fff; content: "¶"; transform: rotate(7deg); }
.pipeline-card:nth-of-type(5)::after { content: "✓"; color: #467a41; background: var(--green-soft); border-color: rgba(90,159,85,.28); font-size: 25px; transform: rotate(-6deg); }
.pipeline-card--accent { border-color: rgba(215,78,89,.35); background: #fff7f7; }
.pipeline-card--dark { border-color: var(--ink); color: #fff; background: var(--ink); }
.step-number {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  margin-bottom: 54px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 11px;
  font-weight: 850;
}
.pipeline-card--dark .step-number { color: var(--ink); background: #fff; }
.pipeline-card__body { display: block; }
.pipeline-card__body strong { margin-bottom: 16px; display: block; font-size: 22px; line-height: 1.17; letter-spacing: -.025em; }
.pipeline-card__body > span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.pipeline-card--dark .pipeline-card__body > span { color: #bebec6; }
.pipeline-card > small { margin-top: auto; color: #868790; font-size: 11px; line-height: 1.35; }
.pipeline-arrow { align-self: center; color: #a8a9b0; font-size: 22px; text-align: center; }
.pipeline-table-wrap { margin-bottom: 14px; }
.pipeline-table { min-width: 980px; }
.pipeline-table tbody th { width: 140px; }
.tech-strip {
  margin-top: 14px;
  padding: 19px 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  border-radius: 20px;
  color: #fff;
  background: var(--ink);
}
.tech-strip span {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: #d1d1d6;
  font-size: 11px;
}
.pipeline-notes { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pipeline-notes article { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.pipeline-notes article > span { margin-bottom: 20px; display: block; color: var(--brand-dark); font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.pipeline-notes strong { display: block; font-size: 13px; line-height: 1.5; }
.pipeline-notes p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.pipeline-notes code { white-space: nowrap; }

.docs-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 7vw, 90px);
}
.docs-sidebar {
  position: sticky;
  top: 92px;
  padding: 25px 0 30px;
}
.docs-sidebar > p {
  margin-bottom: 15px;
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.docs-nav { display: grid; }
.docs-nav a {
  position: relative;
  padding: 9px 0 9px 17px;
  color: #6a6b74;
  font-size: 13px;
  text-decoration: none;
}
.docs-nav a::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9cad0;
  content: "";
  transform: translateY(-50%);
}
.docs-nav a:hover,
.docs-nav a.is-active { color: var(--ink); }
.docs-nav a.is-active::before { width: 7px; height: 7px; background: var(--brand); }
.legend {
  margin-top: 26px;
  padding-top: 20px;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.legend span { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: #bbbcc3; }
.legend-dot--now { background: var(--green); }
.legend-dot--demo { background: var(--orange); }
.legend-dot--next { background: var(--brand); }
.docs-content { min-width: 0; }
.docs-content > .reference-section { width: auto; }
.content-column { display: block; }
.docs-content { display: flex; flex-direction: column; }
#rules { order: 1; }
#editorial { order: 2; }
#moderation { order: 3; }
#scenarios { order: 4; }
#engineering { order: 5; }
#data { order: 6; }
.instruction-grid {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  counter-reset: instruction;
  overflow: hidden;
}
.instruction-grid article {
  min-height: 0;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 42px minmax(250px, .82fr) minmax(360px, 1.18fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  counter-increment: instruction;
}
.instruction-grid article:nth-child(even) { background: #fbfbfa; }
.instruction-grid article:last-child { border-bottom: 0; }
.instruction-grid article::before {
  width: 34px;
  height: 34px;
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 3;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  content: counter(instruction, decimal-leading-zero);
  font-size: 9px;
  font-weight: 850;
}
.instruction-grid article > span {
  min-height: 0;
  margin: 0 0 9px;
  grid-column: 2;
  grid-row: 1;
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .09em;
  line-height: 1.45;
  text-transform: uppercase;
}
.instruction-grid h3 { margin: 0 0 10px; grid-column: 2; grid-row: 2; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.instruction-grid > article > p { margin: 0; grid-column: 2; grid-row: 3; color: var(--muted); font-size: 12px; line-height: 1.55; }
.instruction-grid dl {
  margin: 0;
  padding-left: 26px;
  display: grid;
  grid-column: 3;
  grid-row: 1 / span 3;
  align-content: center;
  gap: 8px;
  border-left: 1px solid var(--line);
}
.instruction-grid dl > div { padding: 11px 13px; display: grid; grid-template-columns: 82px 1fr; gap: 12px; border-radius: 11px; background: var(--surface); }
.instruction-grid dt { color: var(--muted-light); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.instruction-grid dd { margin: 0; color: #555660; font-size: 11px; line-height: 1.45; }
.instruction-chain {
  margin-top: 15px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1.2fr;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  color: #fff;
  background: var(--ink);
}
.instruction-chain span { font-size: 11px; line-height: 1.4; }
.instruction-chain b {
  width: 25px;
  height: 25px;
  margin-right: 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 8px;
}
.instruction-chain i { color: #777780; font-style: normal; }

.before-after {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: stretch;
  gap: 14px;
  border-radius: 27px;
  color: #fff;
  background: var(--ink);
}
.before-after article {
  min-height: 245px;
  padding: 27px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: #252528;
}
.before-after__result { background: #303033 !important; }
.before-after article > span {
  margin-bottom: 38px;
  display: block;
  color: #a2a3ab;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.before-after blockquote { margin-bottom: 0; font-size: 17px; line-height: 1.58; }
.before-after > b { align-self: center; color: #74757d; font-size: 24px; text-align: center; }
.guardrails { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.guardrails article {
  padding: 24px;
  display: flex;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fff;
}
.guardrails__mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
}
.guardrails__mark--keep { background: var(--green); }
.guardrails__mark--remove { background: var(--brand); }
.guardrails__mark--never { background: var(--ink); }
.guardrails h3 { margin: 4px 0 9px; font-size: 17px; }
.guardrails p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.caveat,
.source-note {
  margin: 18px 0 0;
  padding: 17px 19px;
  border-radius: 14px;
  color: #62636c;
  background: #ededeb;
  font-size: 12px;
  line-height: 1.55;
}
.source-note { border-left: 3px solid var(--ink); }

.route-filters { margin: 0 0 15px; align-items: center; }
.route-filters > span { margin-left: auto; color: var(--muted-light); font-size: 11px; }
.table-scroll { width: 100%; overflow-x: auto; }
.rules-table,
.api-table {
  width: 100%;
  min-width: 830px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}
.rules-table th,
.rules-table td,
.api-table th,
.api-table td {
  padding: 17px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}
.rules-table th:last-child,
.rules-table td:last-child,
.api-table th:last-child,
.api-table td:last-child { border-right: 0; }
.rules-table tbody tr:last-child th,
.rules-table tbody tr:last-child td,
.api-table tbody tr:last-child th,
.api-table tbody tr:last-child td { border-bottom: 0; }
.rules-table thead th,
.api-table thead th {
  color: #6e6f77;
  background: #efefed;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rules-table tbody th { width: 19%; font-size: 12px; }
.rules-table td { color: #5f6069; }
.route-badge {
  width: max-content;
  padding: 6px 8px;
  display: inline-flex;
  border-radius: 999px;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
  font-weight: 800;
}
.route-badge--publish { color: #477e42; background: var(--green-soft); }
.route-badge--review { color: #8a6527; background: var(--orange-soft); }
.route-badge--block { color: #a63440; background: var(--red-soft); }

.route-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.route-card {
  min-height: 390px;
  padding: 27px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top-width: 5px;
  border-radius: 24px;
  background: #fff;
}
.route-card--publish { border-top-color: var(--green); }
.route-card--review { border-top-color: var(--orange); }
.route-card--block { border-top-color: var(--brand); }
.route-card__status {
  width: max-content;
  margin-bottom: 43px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #efefed;
  font-size: 10px;
  font-weight: 800;
}
.route-card h3 { margin-bottom: 14px; font-size: 22px; letter-spacing: -.025em; }
.route-card > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.route-card dl { margin: auto 0 0; padding-top: 17px; border-top: 1px solid var(--line); }
.route-card dl div { padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; }
.route-card dt { color: var(--muted-light); font-size: 10px; }
.route-card dd { margin: 0; font-size: 10px; font-weight: 700; text-align: right; }
code {
  padding: 2px 5px;
  border-radius: 5px;
  color: #3d3e45;
  background: #ededeb;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: .92em;
}
.priority-note {
  margin-top: 15px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  border-radius: 16px;
  color: #5c4b2b;
  background: var(--orange-soft);
  font-size: 12px;
  line-height: 1.5;
}

.component-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.component-grid article {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fff;
}
.component-grid article > span {
  margin-bottom: 37px;
  display: block;
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.component-grid h3 { margin-bottom: 11px; font-size: 19px; letter-spacing: -.025em; }
.component-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.component-grid p strong { color: #42434a; }
.api-table { min-width: 700px; }
.api-table tbody th { white-space: nowrap; }
.api-table td { color: var(--muted); }
.engineering-summaries {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.engineering-summaries > article {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.engineering-summaries > article > span {
  margin-bottom: 28px;
  display: block;
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.engineering-summaries h3 { margin-bottom: 12px; font-size: 19px; letter-spacing: -.02em; }
.engineering-summaries p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.engineering-summaries > article > small { margin-top: 14px; display: block; color: var(--muted-light); font-size: 10px; line-height: 1.5; }
.details-stack { margin-top: 18px; display: grid; gap: 9px; }
.details-stack details,
.scenario-list details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.details-stack summary,
.scenario-list summary {
  cursor: pointer;
  list-style: none;
}
.details-stack summary::-webkit-details-marker,
.scenario-list summary::-webkit-details-marker { display: none; }
.details-stack summary {
  min-height: 64px;
  padding: 17px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
  font-weight: 750;
}
.details-stack summary::after { color: var(--muted); content: "+"; font-size: 20px; }
.details-stack details[open] summary::after { content: "−"; }
.details-stack details[open] summary { border-bottom: 1px solid var(--line); }
.details-stack details > div { padding: 20px 21px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.details-stack details > div p:last-child { margin-bottom: 0; }
.fine-print { color: var(--muted-light); font-size: 11px; }
.limit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.limit-grid span { padding: 15px; border-radius: 12px; background: var(--surface); text-align: center; }
.limit-grid strong { margin-bottom: 5px; display: block; color: var(--ink); font-size: 19px; }

.data-flow-scroll { width: 100%; overflow-x: auto; }
.data-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr) 24px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.data-flow article {
  min-height: 180px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.data-flow article > span {
  width: 30px;
  height: 30px;
  margin-bottom: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 9px;
  font-weight: 850;
}
.data-flow strong { margin-bottom: 7px; font-size: 16px; line-height: 1.25; }
.data-flow small { margin-top: auto; color: var(--muted); line-height: 1.4; }
.data-flow > b { color: #aaaab1; font-size: 18px; text-align: center; }
.data-table { margin-top: 17px; border: 1px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden; }
.data-row {
  min-height: 64px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: minmax(140px, .65fr) 1.5fr minmax(120px, .6fr);
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}
.data-row:last-child { border-bottom: 0; }
.data-row--head {
  min-height: 46px;
  color: var(--muted);
  background: #efefed;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.data-row strong { font-size: 12px; }
.data-row > span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.data-row > small { color: var(--muted-light); font-size: 10px; line-height: 1.4; }

.cost-focus {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 14px;
}
.cost-primary,
.cost-breakdown {
  min-height: 330px;
  padding: 34px;
  border-radius: 26px;
}
.cost-primary { color: #fff; background: var(--ink); }
.cost-primary > span,
.cost-breakdown > span {
  margin-bottom: 45px;
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.cost-primary > span { color: #a7a8af; }
.cost-primary > strong {
  margin-bottom: 7px;
  display: block;
  font-size: clamp(58px, 8vw, 92px);
  line-height: .95;
  letter-spacing: -.065em;
}
.cost-primary > p { margin: 20px 0 0; color: #b6b7bd; font-size: 13px; line-height: 1.55; }
.cost-primary > p b { color: #fff; }
.cost-primary dl { margin: 35px 0 0; border-top: 1px solid rgba(255,255,255,.14); }
.cost-primary dl div { padding-top: 17px; display: flex; justify-content: space-between; gap: 20px; }
.cost-primary dt { color: #a7a8af; font-size: 11px; }
.cost-primary dd { margin: 0; font-size: 12px; font-weight: 800; }
.cost-breakdown { border: 1px solid var(--line); background: #fff; }
.cost-breakdown > span { color: var(--brand-dark); }
.cost-breakdown ol { margin: 0; padding: 0; list-style: none; counter-reset: cost-step; }
.cost-breakdown li {
  padding: 15px 0 15px 42px;
  position: relative;
  border-top: 1px solid var(--line);
  counter-increment: cost-step;
}
.cost-breakdown li::before {
  position: absolute;
  top: 15px;
  left: 0;
  color: var(--muted-light);
  content: "0" counter(cost-step);
  font-size: 10px;
  font-weight: 850;
}
.cost-breakdown li b,
.cost-breakdown li small { display: block; }
.cost-breakdown li b { margin-bottom: 5px; font-size: 14px; }
.cost-breakdown li small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.tariff-reference {
  margin-top: 14px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.tariff-reference__heading strong { display: block; }
.tariff-reference__heading strong { font-size: 15px; line-height: 1.4; }
.tariff-table { width: 100%; min-width: 540px; border-collapse: collapse; }
.tariff-table th,
.tariff-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 11px; text-align: left; }
.tariff-table thead th { color: var(--muted-light); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.tariff-table tbody tr:last-child th,
.tariff-table tbody tr:last-child td { border-bottom: 0; }
.tariff-table tbody th { font-weight: 750; }
.tariff-table tbody td { color: var(--muted); }
.product-economy {
  margin-top: 14px;
  padding: 27px 30px;
  display: grid;
  grid-template-columns: minmax(150px, .38fr) minmax(0, 1.62fr);
  gap: 30px;
  border-radius: 22px;
  color: #244421;
  background: var(--green-soft);
}
.product-economy > span { font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.product-economy strong { display: block; font-size: 20px; letter-spacing: -.02em; }
.product-economy p { max-width: 760px; margin: 9px 0 0; color: #496047; font-size: 12px; line-height: 1.58; }

.scenario-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden; }
.scenario-table th,
.scenario-table td { padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.5; text-align: left; vertical-align: top; }
.scenario-table th:last-child,
.scenario-table td:last-child { border-right: 0; }
.scenario-table tbody tr:last-child th,
.scenario-table tbody tr:last-child td { border-bottom: 0; }
.scenario-table thead th { color: var(--muted); background: #efefed; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.scenario-table tbody th { width: 185px; color: var(--ink); }
.scenario-table tbody th span { margin-right: 7px; color: var(--brand-dark); font-size: 9px; }
.scenario-table tbody td { color: var(--muted); }
.scenario-table tbody td:last-child { color: var(--ink); font-weight: 650; }

.readiness-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.readiness-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
}
.readiness-card > span {
  width: max-content;
  margin-bottom: 33px;
  padding: 7px 9px;
  display: block;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.readiness-card--now > span { color: #497e44; background: var(--green-soft); }
.readiness-card--next > span { color: #a63440; background: var(--red-soft); }
.readiness-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.readiness-card--now li::marker { color: var(--green); }
.readiness-card--next li::marker { color: var(--brand); }
.truth-card {
  margin-top: 14px;
  padding: 24px 27px;
  display: grid;
  grid-template-columns: minmax(180px, .55fr) 1.45fr;
  align-items: center;
  gap: 30px;
  border-radius: 20px;
  color: #fff;
  background: var(--ink);
}
.truth-card strong { font-size: 17px; }
.truth-card p { margin: 0; color: #b2b3ba; font-size: 12px; line-height: 1.55; }

.empty-state {
  margin: 50px 0;
  padding: 60px 25px;
  border: 1px dashed #bfc0c6;
  border-radius: 22px;
  text-align: center;
}
.empty-state strong { margin-bottom: 8px; display: block; font-size: 22px; }
.empty-state p { margin: 0; color: var(--muted); }

.doc-footer {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.doc-footer p { margin: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(215, 78, 89, .3);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .doc-header__inner { width: calc(100% - 48px); gap: 18px; }
  .pipeline-section { width: calc(100% - 24px); }
  .docs-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 42px; }
  .guardrails,
  .component-grid { grid-template-columns: repeat(2, 1fr); }
  .guardrails article:last-child,
  .component-grid article:last-child { grid-column: 1 / -1; }
  .route-grid { grid-template-columns: 1fr; }
  .route-card { min-height: 0; }
  .route-card__status { margin-bottom: 28px; }
}

@media (max-width: 880px) {
  html { scroll-padding-top: 130px; }
  .intro, .reference-section, .docs-shell, .content-column, .doc-footer { width: min(100% - 32px, 760px); }
  .pipeline-section { width: calc(100% - 16px); }
  .section-heading--row { grid-template-columns: 1fr; gap: 5px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-grid article { min-height: 220px; }
  .answer-label { margin-bottom: 27px; }
  .docs-shell { display: block; }
  .docs-sidebar {
    position: sticky;
    z-index: 20;
    top: 66px;
    width: calc(100vw - 16px);
    margin-left: calc((100vw - min(100vw - 32px, 760px)) / -2 + 8px);
    padding: 10px 8px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(247,247,245,.95);
    backdrop-filter: blur(14px);
    overflow-x: auto;
  }
  .docs-sidebar > p,
  .legend { display: none; }
  .docs-nav { display: flex; gap: 4px; }
  .docs-nav a {
    padding: 9px 11px;
    flex: none;
    border-radius: 999px;
    background: #eaeae8;
    font-size: 11px;
  }
  .docs-nav a::before { display: none; }
  .docs-nav a.is-active { color: #fff; background: var(--ink); }
  .docs-content > .reference-section { width: auto; }
  .cost-focus,
  .tariff-reference { grid-template-columns: 1fr; }
  .pipeline-notes { grid-template-columns: 1fr; }
  .product-economy { grid-template-columns: 1fr; gap: 12px; }
  .data-flow { min-width: 780px; }
  .data-flow-scroll { scrollbar-width: thin; }
}

@media (max-width: 700px) {
  .intro { padding-top: 42px; }
  h1 { font-size: clamp(40px, 11vw, 56px); }
  .intro__lead { font-size: 16px; }
  .finder { padding: 14px; border-radius: 20px; }
  .role-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .role-filters::-webkit-scrollbar { display: none; }
  .role-filters button { flex: none; }
  .reference-section { padding: 62px 0; }
  h2 { font-size: clamp(34px, 9vw, 46px); }
  .pipeline { min-width: 1330px; grid-template-columns: repeat(4, 245px 26px) 245px; }
  .pipeline-card { min-height: 350px; scroll-snap-align: start; }
  .pipeline-scroll { scroll-snap-type: x proximity; }
  .tech-strip { justify-content: flex-start; }
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey li,
  .journey li:nth-child(n+5) { grid-column: auto; min-height: 255px; padding: 19px; }
  .journey li::after,
  .pipeline-card::after {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 15px 18px 13px 17px;
  }
  .journey-results { grid-template-columns: 1fr; }
  .before-after { grid-template-columns: 1fr; }
  .before-after > b { transform: rotate(90deg); }
  .guardrails, .component-grid, .engineering-summaries { grid-template-columns: 1fr; }
  .instruction-grid article { padding: 22px; grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; }
  .instruction-grid article::before { width: 30px; height: 30px; }
  .instruction-grid article > span,
  .instruction-grid h3,
  .instruction-grid > article > p { grid-column: 2; }
  .instruction-grid dl { margin-top: 18px; padding: 18px 0 0; grid-column: 2; grid-row: 4; border-top: 1px solid var(--line); border-left: 0; }
  .instruction-chain { grid-template-columns: 1fr; }
  .instruction-chain i { text-align: center; transform: rotate(90deg); }
  .guardrails article:last-child, .component-grid article:last-child { grid-column: auto; }
  .priority-note { grid-template-columns: 1fr; gap: 8px; }
  .limit-grid { grid-template-columns: 1fr 1fr; }
  .data-flow { min-width: 730px; overflow: visible; }
  .data-table { overflow-x: auto; }
  .data-row { min-width: 720px; }
  .scenario-table { min-width: 0; border: 0; background: transparent; overflow: visible; }
  .scenario-table thead { display: none; }
  .scenario-table tbody,
  .scenario-table tr,
  .scenario-table th,
  .scenario-table td { display: block; }
  .scenario-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
  }
  .scenario-table th,
  .scenario-table td { width: auto; padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .scenario-table tbody tr:last-child th,
  .scenario-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
  .scenario-table tbody tr td:last-child { border-bottom: 0; }
  .scenario-table td::before {
    margin-bottom: 5px;
    display: block;
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .scenario-table td:nth-child(2)::before { content: "Что происходит"; }
  .scenario-table td:nth-child(3)::before { content: "UX-сообщение"; }
  .scenario-table td:nth-child(4)::before { content: "Следующее действие"; }
  .readiness-grid { grid-template-columns: 1fr; }
  .truth-card { grid-template-columns: 1fr; gap: 12px; }
  .doc-footer { padding: 28px 0; flex-wrap: wrap; }
}

@media (max-width: 500px) {
  .doc-header__inner { width: calc(100% - 36px); min-height: 68px; }
  .brand img { width: 147px; }
  .header-page-link { font-size: 13px; }
  .intro, .reference-section, .docs-shell, .content-column, .doc-footer { width: calc(100% - 24px); }
  .journey { grid-template-columns: 1fr; }
  .docs-sidebar { top: 60px; }
  .meta-row { gap: 6px; }
  .meta-chip { font-size: 10px; }
  .search-box input { font-size: 14px; }
  .quick-grid article { padding: 23px; }
  .section-heading { margin-bottom: 32px; }
  .before-after { padding: 14px; }
  .before-after article { min-height: 220px; padding: 22px; }
  .route-card, .readiness-card, .cost-primary, .cost-breakdown { padding: 23px; }
  .cost-primary, .cost-breakdown { min-height: 300px; }
  .tariff-reference { padding: 19px; }
  .component-grid article { min-height: 190px; }
  .limit-grid { grid-template-columns: 1fr; }
  .route-filters { flex-wrap: nowrap; overflow-x: auto; }
  .route-filters button { flex: none; }
  .route-filters > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
