/* ==========================================================================
   Documentation
   ========================================================================== */

.docs-page {
  background:
    radial-gradient(900px 420px at 82% 0%, rgba(87, 118, 238, 0.07), transparent 62%),
    var(--bg);
}

.docs-main {
  padding-top: var(--header-h);
}

.docs-hero {
  position: relative;
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(700px 340px at 20% 10%, rgba(18, 179, 160, 0.05), transparent 60%);
  overflow: hidden;
}

.docs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(40, 70, 130, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 70, 130, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
  pointer-events: none;
}

[data-theme="dark"] .docs-hero {
  background:
    linear-gradient(180deg, rgba(8, 17, 33, 0.4), transparent),
    radial-gradient(700px 340px at 20% 10%, rgba(18, 179, 160, 0.07), transparent 60%);
}

[data-theme="dark"] .docs-hero::before {
  background-image:
    linear-gradient(rgba(150, 180, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 180, 255, 0.05) 1px, transparent 1px);
}

.docs-hero .container {
  position: relative;
  z-index: 1;
}

.docs-back {
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
  transition: color 0.2s;
}

.docs-back .icon {
  width: 12px;
  height: 12px;
  transform: rotate(180deg);
}

.docs-back:hover {
  color: var(--primary);
}

.docs-hero .eyebrow {
  margin-bottom: 12px;
}

.docs-hero h1 {
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ink-strong);
}

.docs-hero p {
  max-width: 700px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted-strong);
}

.docs-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.docs-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--muted-strong);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.docs-layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 58px;
  padding: 46px 0 100px;
}

.docs-toc {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  align-self: start;
  max-height: calc(100dvh - var(--header-h) - 44px);
  padding: 4px 0 8px;
  overflow: auto;
  scrollbar-width: thin;
}

.docs-toc-label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.docs-toc-group {
  margin-bottom: 16px;
}

.docs-toc-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  margin-bottom: 4px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--faint);
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.docs-toc-group > summary::-webkit-details-marker {
  display: none;
}

.docs-toc-group > summary::after {
  content: "+";
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
}

.docs-toc-group[open] > summary::after {
  content: "−";
}

.docs-toc-group > summary:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.docs-toc-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.docs-toc a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-strong);
  transition: color 0.2s, background-color 0.2s;
}

.docs-toc a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}

.docs-toc a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.docs-toc a.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.docs-toc a.is-active::before {
  background: var(--primary);
}

.docs-toc-lab {
  gap: 6px;
  margin-top: 6px;
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
}

.docs-toc-lab .icon {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */

.doc-content {
  min-width: 0;
  max-width: 900px;
}

.doc-content h2 {
  font-size: clamp(27px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--ink-strong);
}

.doc-content h3 {
  margin-top: 30px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}

.doc-content p {
  max-width: 790px;
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted-strong);
}

.doc-content p a,
.doc-content li a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.doc-content code {
  padding: 1.5px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.86em;
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--surface-soft);
  overflow-wrap: anywhere;
}

.doc-content pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.doc-kicker {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.doc-section {
  padding-top: 42px;
  margin-top: 46px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 22px);
}

.doc-section:first-of-type {
  border-top: 0;
}

.doc-section-head {
  margin-bottom: 20px;
}

.doc-section-head p {
  max-width: 720px;
}

/* Callouts */

.doc-callout {
  display: flex;
  gap: 12px;
  padding: 15px 17px;
  margin: 20px 0;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-left: 3px solid var(--primary);
  border-radius: 9px;
  background: color-mix(in srgb, var(--primary-soft) 44%, var(--surface));
}

.doc-callout > .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--primary);
}

.doc-callout strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12.5px;
  color: var(--ink-strong);
}

.doc-callout p {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted-strong);
}

.doc-callout p code {
  font-size: 0.84em;
}

.doc-callout--warning {
  border-color: color-mix(in srgb, var(--amber) 30%, var(--line));
  border-left-color: var(--amber);
  background: color-mix(in srgb, var(--amber-soft) 62%, var(--surface));
}

.doc-callout--warning > .icon {
  color: #a96b12;
}

[data-theme="dark"] .doc-callout--warning > .icon {
  color: var(--amber);
}

.doc-callout--danger {
  border-color: color-mix(in srgb, #e05a6e 26%, var(--line));
  border-left-color: #d95566;
  background: color-mix(in srgb, #ffe9ec 48%, var(--surface));
}

[data-theme="dark"] .doc-callout--danger {
  background: color-mix(in srgb, #4b1a24 32%, var(--surface));
}

.doc-callout--danger > .icon {
  color: #c44658;
}

/* Code blocks */

.doc-code {
  margin: 16px 0 24px;
  border: 1px solid rgba(140, 165, 220, 0.16);
  border-radius: 12px;
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(8, 17, 38, 0.12);
}

.doc-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--code-line);
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--code-muted);
}

.doc-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(140, 165, 220, 0.18);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--code-muted);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.doc-copy:hover {
  color: var(--code-text);
  border-color: rgba(140, 165, 220, 0.34);
  background: rgba(140, 165, 220, 0.08);
}

.doc-copy .icon {
  width: 10px;
  height: 10px;
}

.doc-code pre {
  margin: 0;
  padding: 14px 17px 18px;
  max-height: 500px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.8;
  color: var(--code-text);
  white-space: pre;
  scrollbar-width: thin;
  scrollbar-color: #2b3b58 transparent;
}

.doc-code--plain {
  margin-top: 12px;
}

.doc-code--plain pre {
  padding: 13px 17px;
  max-height: none;
  color: #9fb4d6;
}

/* Lists */

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 11px;
  padding-left: 0;
}

.doc-list li {
  position: relative;
  padding-left: 17px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted-strong);
}

.doc-list li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.7;
}

.doc-list--compact {
  gap: 5px;
  margin-top: 7px;
}

.doc-list--compact li {
  font-size: 12px;
}

.doc-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-top: 8px;
}

.doc-split h3 {
  margin-top: 18px;
}

/* Tables */

.doc-table-wrap {
  margin: 16px 0 24px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: auto;
  background: var(--surface);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  line-height: 1.7;
}

.doc-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
  color: var(--faint);
  background: var(--surface-soft);
  white-space: nowrap;
}

.doc-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--muted-strong);
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table td:first-child {
  min-width: 170px;
  color: var(--ink-soft);
}

.doc-table code {
  font-size: 0.86em;
  white-space: normal;
  overflow-wrap: anywhere;
}

.doc-table--props td:nth-child(2) code {
  font-size: 8.5px;
}

.doc-table--props {
  table-layout: fixed;
  min-width: 620px;
}

.doc-table--props th:nth-child(1),
.doc-table--props td:nth-child(1) {
  width: 20%;
  min-width: 0;
}

.doc-table--props th:nth-child(2),
.doc-table--props td:nth-child(2) {
  width: 24%;
}

.doc-table--props th:nth-child(3),
.doc-table--props td:nth-child(3) {
  width: 20%;
}

.doc-table--props th:nth-child(4),
.doc-table--props td:nth-child(4) {
  width: 36%;
}

.doc-table--props td:nth-child(2) code {
  font-size: 8.5px;
}

.doc-table--api {
  table-layout: fixed;
  min-width: 620px;
}

.doc-table--api th:nth-child(1),
.doc-table--api td:nth-child(1) {
  width: 20%;
  min-width: 0;
}

.doc-table--api th:nth-child(2),
.doc-table--api td:nth-child(2) {
  width: 27%;
}

.doc-table--api th:nth-child(3),
.doc-table--api td:nth-child(3) {
  width: 18%;
}

.doc-table--api th:nth-child(4),
.doc-table--api td:nth-child(4) {
  width: 35%;
}

.doc-table--api td:nth-child(3) code {
  padding: 0;
  font-size: 8.5px;
}

.doc-note {
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
  font-size: 11.5px !important;
  line-height: 1.8 !important;
  color: var(--faint) !important;
}

/* Pipeline */

.doc-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0 24px;
}

.doc-pipeline-step {
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.doc-pipeline-step > span {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--primary);
}

.doc-pipeline-step h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.doc-pipeline-step p {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* Stats */

.doc-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0 22px;
}

.doc-stat {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.doc-stat strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
}

.doc-stat span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}

/* Feature list */

.doc-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0;
}

.doc-feature-list > div {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.doc-feature-list > div > .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--primary);
}

.doc-feature-list strong {
  display: block;
  font-size: 12px;
  color: var(--ink-strong);
}

.doc-feature-list span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* Limits */

.doc-limit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0 24px;
}

.doc-limit {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.doc-limit-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  margin-bottom: 9px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--muted-strong);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.doc-limit h3 {
  margin: 0;
  font-size: 13px;
}

.doc-limit p {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}

/* Status */

.doc-status-list {
  margin: 20px 0 24px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  overflow: hidden;
}

.doc-status-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.doc-status-row:last-child {
  border-bottom: 0;
}

.doc-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 14%, transparent);
}

.doc-status-dot.is-ok {
  background: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 14%, transparent);
}

.doc-status-row > div {
  min-width: 0;
}

.doc-status-row strong {
  display: inline-block;
  margin-right: 8px;
  font-size: 12px;
  color: var(--ink-strong);
}

.doc-status-row span {
  font-size: 11px;
  color: var(--muted);
}

.doc-status-tag {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 7.5px !important;
  letter-spacing: 0.04em;
  color: var(--muted-strong) !important;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

/* FAQ */

.doc-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.doc-faq details {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  overflow: hidden;
}

.doc-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-strong);
  cursor: pointer;
  list-style: none;
}

.doc-faq summary::-webkit-details-marker {
  display: none;
}

.doc-faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  color: var(--faint);
  transition: transform 0.2s;
}

.doc-faq details[open] summary::after {
  content: "−";
}

.doc-faq details p {
  padding: 0 16px 15px;
  margin: 0;
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
}

/* End CTA */

.doc-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 54px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(500px 200px at 80% 20%, rgba(87, 118, 238, 0.12), transparent 60%),
    var(--surface);
}

.doc-end strong {
  display: block;
  font-size: 16px;
  color: var(--ink-strong);
}

.doc-end p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* Footer */

.docs-page .site-footer {
  padding-top: 26px;
}

.footer-bottom .legal a {
  font-size: 11px;
  color: var(--muted-strong);
  transition: color 0.2s;
}

.footer-bottom .legal a:hover {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Live documentation preview (three-column docs layout)
   -------------------------------------------------------------------------- */

.docs-layout--live {
  grid-template-columns: 184px minmax(0, 1fr) 334px;
  grid-template-areas: "toc content live";
  gap: 24px;
  align-items: start;
}

.docs-layout--live .docs-toc {
  grid-area: toc;
}

.docs-layout--live .doc-content {
  grid-area: content;
  max-width: none;
}

.docs-live {
  grid-area: live;
  position: sticky;
  top: calc(var(--header-h) + 18px);
  align-self: start;
  width: 100%;
  max-height: calc(100dvh - var(--header-h) - 36px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: auto;
  scrollbar-width: thin;
  z-index: 2;
}

.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 0 2px 7px;
}

.live-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.live-title strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-strong);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--teal) 28%, var(--line));
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--teal-strong);
  background: var(--teal-soft);
}

.live-badge i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.live-expand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--muted);
  transition: color 0.2s;
}

.live-expand:hover {
  color: var(--primary);
}

.live-expand .icon {
  width: 10px;
  height: 10px;
}

.live-chart-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(240px 190px at 50% 40%, #fff, #f3f7ff);
}

[data-theme="dark"] .live-chart-wrap {
  background:
    radial-gradient(240px 190px at 50% 40%, #16243b, #0b1526);
}

.live-chart-wrap .chart-frame {
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 48, 110, 0.12);
}

.live-chart-wrap .chart-canvas {
  background: #fff;
}

.live-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 2px;
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--faint);
}

.live-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}

.live-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 4px;
  margin-top: 2px;
}

.live-select {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.live-select > span {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--faint);
}

.live-select select {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 10px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.live-btn {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted-strong);
  background: var(--surface);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.live-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.live-btn--run {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 25%, var(--line));
  background: var(--primary-soft);
}

.live-editor {
  position: relative;
  height: 160px;
  margin-top: 7px;
  border: 1px solid rgba(140, 165, 220, 0.16);
  border-radius: 8px;
  background: #0b1426;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.live-editor:focus-within {
  border-color: rgba(125, 140, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(125, 140, 255, 0.1);
}

.live-highlight {
  position: absolute;
  z-index: 1;
  inset: 0;
  margin: 0;
  padding: 9px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--code-text);
  overflow: hidden;
  pointer-events: none;
}

.live-highlight code {
  font: inherit;
  white-space: inherit;
}

#docs-live-code {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  outline: 0;
  resize: none;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.65;
  white-space: pre;
  
  tab-size: 2;
  color: transparent;
  caret-color: #ffffff;
  background: transparent;
  -webkit-text-fill-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: #2b3b58 transparent;
}

#docs-live-code::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#docs-live-code::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #2b3b58;
}

#docs-live-code::-webkit-scrollbar-track {
  background: transparent;
}

#docs-live-code::selection {
  color: transparent;
  background: rgba(101, 130, 255, 0.34);
  -webkit-text-fill-color: transparent;
}

.live-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px 0;
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--faint);
}

#docs-live-status {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.live-status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  flex: 0 0 auto;
}

#docs-live-status.is-error {
  color: #d95566;
}

#docs-live-status.is-error .live-status-dot {
  background: #d95566;
}

/* Docs hero shortcut */

.docs-hero-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--muted-strong);
  background: var(--surface);
  transition: color 0.2s, border-color 0.2s;
}

.docs-hero-live:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

.docs-hero-live .icon {
  width: 11px;
  height: 11px;
}

/* Detailed docs content */

.doc-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0 24px;
}

.doc-component-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.doc-component-tag {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--muted);
  background: var(--surface-soft);
}

.doc-component-card h3 {
  margin: 0;
  font-size: 14px;
}

.doc-component-card p {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

.doc-component-card a {
  align-self: flex-end;
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--primary);
}

.doc-table--props td:first-child {
  min-width: 125px;
}

.doc-table--props td:nth-child(2) {
  min-width: 104px;
}

.doc-table--props td:nth-child(3) {
  min-width: 98px;
}

.doc-table--props code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.doc-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0 16px;
}

.doc-tag-list code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 8px;
  color: var(--muted-strong);
  background: var(--surface-soft);
}

.doc-content h3[id] {
  scroll-margin-top: calc(var(--header-h) + 22px);
}

@media (max-width: 1380px) {
  .docs-layout--live {
    grid-template-columns: 176px minmax(0, 1fr) 316px;
    gap: 20px;
  }

  .docs-live {
    padding: 9px;
  }

  .live-editor {
    height: 150px;
  }
}

@media (max-width: 1100px) {
  .docs-layout--live {
    grid-template-columns: 1fr;
    grid-template-areas:
      "toc"
      "live"
      "content";
    gap: 18px;
  }

  .docs-live {
    position: static;
    max-height: none;
    width: 100%;
    padding: 12px;
  }

  .live-chart-wrap {
    min-height: 0;
  }

  .live-editor {
    height: 180px;
  }
}

@media (max-width: 760px) {
  .doc-component-grid {
    grid-template-columns: 1fr;
  }

  .doc-table--props td:first-child,
  .doc-table--props td:nth-child(2),
  .doc-table--props td:nth-child(3) {
    min-width: 0;
  }

  .docs-live {
    border-radius: 11px;
  }

  .live-editor {
    height: 170px;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */


@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 24px;
  }

  .docs-toc {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    max-height: none;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .docs-toc::-webkit-scrollbar {
    display: none;
  }

  .docs-toc-label {
    display: none;
  }

  .docs-toc-group {
    display: flex;
    flex-direction: row;
    gap: 2px;
    margin: 0;
  }

  .docs-toc a {
    min-height: 28px;
    padding: 4px 9px;
    white-space: nowrap;
  }

  .docs-toc a::before {
    display: none;
  }

  .docs-toc-lab {
    margin-left: auto;
    white-space: nowrap;
  }

  .doc-content {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .docs-hero {
    padding: 34px 0 24px;
  }

  .docs-hero h1 {
    font-size: 36px;
  }

  .docs-hero p {
    font-size: 13px;
  }

  .docs-layout {
    padding-bottom: 64px;
  }

  .doc-section {
    padding-top: 30px;
    margin-top: 34px;
  }

  .doc-content h2 {
    font-size: 26px;
  }

  .doc-content h3 {
    font-size: 15px;
  }

  .doc-content p {
    font-size: 12.5px;
  }

  .doc-pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-split,
  .doc-feature-list,
  .doc-limit-grid {
    grid-template-columns: 1fr;
  }

  .doc-table {
    font-size: 10.5px;
  }

  .doc-table td:first-child {
    min-width: 135px;
  }

  .doc-table th,
  .doc-table td {
    padding: 8px 10px;
  }

  .doc-code pre {
    font-size: 10px;
    padding: 12px 13px 15px;
  }

  .doc-status-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .doc-status-row > div {
    flex: 1;
  }

  .doc-status-tag {
    margin-left: 18px;
  }

  .doc-end {
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-page .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .docs-toc {
    border-radius: 9px;
  }

  .doc-pipeline {
    grid-template-columns: 1fr;
  }

  .doc-stat-grid {
    grid-template-columns: 1fr;
  }

  .doc-callout {
    padding: 12px 13px;
  }

  .doc-code-head {
    min-height: 32px;
  }

  .doc-code pre {
    max-height: 360px;
  }

  .doc-end .btn {
    width: 100%;
  }
}


/* ==========================================================================
   Component-scoped docs, full-width layout, larger type
   ========================================================================== */

.docs-page .container {
  width: 100%;
  max-width: none;
  padding-inline: clamp(22px, 3.2vw, 56px);
}

.docs-hero {
  padding: 70px 0 46px;
}

.docs-hero h1 {
  font-size: clamp(42px, 4.6vw, 68px);
}

.docs-hero p {
  max-width: 900px;
  font-size: 17px;
  line-height: 1.75;
}

.docs-back {
  font-size: 11px;
}

.docs-badge {
  height: 30px;
  padding: 0 11px;
  font-size: 10px;
}

.docs-hero-live {
  margin-top: 18px;
  padding: 8px 12px;
  font-size: 10px;
}

.docs-components {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
}

.docs-components-inner {
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.docs-components-inner::-webkit-scrollbar {
  display: none;
}

.docs-component-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
  min-width: 170px;
  padding: 14px 18px 13px;
  border-bottom: 2px solid transparent;
  color: var(--muted-strong);
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.docs-component-tab span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.docs-component-tab small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
}

.docs-component-tab:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.docs-component-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-soft);
}

.docs-component-tab.is-active small {
  color: color-mix(in srgb, var(--primary) 68%, var(--muted));
}

.docs-layout--live {
  grid-template-columns: 220px minmax(0, 1fr) 480px;
  grid-template-areas: "toc content live";
  gap: 28px;
  padding: 38px 0 100px;
  align-items: start;
}

.docs-toc {
  top: calc(var(--header-h) + 20px);
  max-height: calc(100dvh - var(--header-h) - 40px);
}

.docs-toc-label {
  font-size: 9.5px;
}

.docs-toc-group > span {
  font-size: 9.5px;
}

.docs-toc a {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13.5px;
}

.docs-toc-lab {
  font-size: 11px;
}

.doc-content {
  max-width: none;
  font-size: 15.5px;
}

.doc-content h2 {
  font-size: clamp(31px, 2.6vw, 42px);
}

.doc-content h3 {
  margin-top: 36px;
  font-size: 21px;
}

.doc-content p {
  max-width: 1000px;
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.9;
}

.doc-content li {
  font-size: 15px;
  line-height: 1.9;
}

.doc-content code {
  font-size: 0.88em;
}

.doc-kicker {
  font-size: 10px;
}

.doc-callout p {
  font-size: 14.5px;
  line-height: 1.8;
}

.doc-callout strong {
  font-size: 15px;
}

.doc-list {
  font-size: 15px;
}

.doc-note {
  font-size: 14px;
}

.doc-table {
  font-size: 14px;
}

.doc-table th {
  font-size: 13px;
}

.doc-table td {
  font-size: 14px;
  line-height: 1.7;
}

.doc-table code {
  font-size: 0.88em;
}

.doc-table--props {
  min-width: 620px;
}

.doc-table--props td:nth-child(2) code {
  font-size: 10.5px;
}

.doc-table--api td:nth-child(3) code {
  font-size: 10px;
}

.doc-code-head {
  font-size: 11.5px;
}

.doc-code pre {
  font-size: 14px;
  line-height: 1.8;
}

.doc-faq summary {
  font-size: 15px;
}

.doc-faq p {
  font-size: 14.5px;
}

.doc-stat strong {
  font-size: 24px;
}

.doc-stat span {
  font-size: 12px;
}

.doc-component-card h3 {
  font-size: 17px;
}

.doc-component-card p {
  font-size: 13.5px;
  line-height: 1.75;
}

.doc-component-tag {
  font-size: 9px;
}

.doc-component-link {
  font-size: 10px;
}

.docs-live {
  width: 480px;
  max-height: calc(100dvh - var(--header-h) - 24px);
  padding: 14px;
  border-radius: 16px;
}

.live-head {
  min-height: 32px;
  padding-bottom: 9px;
}

.live-title strong {
  font-size: 15px;
}

.live-badge {
  height: 21px;
  padding: 0 7px;
  font-size: 8.5px;
}

.live-expand {
  font-size: 10px;
}

.live-chart-wrap {
  padding: 10px;
  border-radius: 12px;
}

.live-meta {
  padding: 7px 2px;
  font-size: 10px;
}

.live-controls {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 5px;
}

.live-select {
  height: 34px;
  padding: 0 8px;
}

.live-select > span {
  font-size: 9px;
}

.live-select select {
  font-size: 12px;
}

.live-btn {
  height: 34px;
  padding: 0 10px;
  font-size: 10.5px;
}

.live-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}

.live-action {
  height: 32px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-strong);
  background: var(--surface-soft);
  transition: color 0.2s, border-color 0.2s;
}

.live-action:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
}

.live-editor {
  height: 380px;
  margin-top: 8px;
  border-radius: 9px;
}

.live-highlight,
#docs-live-code {
  padding: 11px 12px;
  font-size: 12.5px;
  line-height: 1.7;
}

.live-foot {
  padding-top: 7px;
  font-size: 10px;
}

/* Two-column full-width docs: horizontal component TOC, article + live pane */
@media (max-width: 1500px) {
  .docs-layout--live {
    grid-template-columns: minmax(0, 1fr) 480px;
    grid-template-areas:
      "toc toc"
      "content live";
    gap: 22px;
  }

  .docs-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 2px;
    max-height: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow: visible;
  }

  .docs-toc::-webkit-scrollbar {
    display: none;
  }

  .docs-toc-label {
    display: none;
  }

  .docs-toc-group {
    margin: 0;
  }

  .docs-toc-group > summary {
    height: 34px;
    padding: 7px 10px;
    margin: 0;
    white-space: nowrap;
  }

  .docs-toc-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
  }

  .docs-toc a {
    min-height: 34px;
    padding: 7px 11px;
    white-space: nowrap;
  }

  .docs-toc-lab {
    flex: 0 0 auto;
    margin: 0 0 0 4px;
    white-space: nowrap;
  }

  .docs-live {
    top: calc(var(--header-h) + 16px);
  }
}

/* Mobile / narrow: component TOC, live preview, then the long article */
@media (max-width: 1100px) {
  .docs-layout--live {
    grid-template-columns: 1fr;
    grid-template-areas:
      "toc"
      "live"
      "content";
    gap: 18px;
  }

  .docs-live {
    position: static;
    width: 100%;
    max-height: none;
  }

  .docs-hero {
    padding: 48px 0 34px;
  }

  .docs-hero h1 {
    font-size: clamp(26px, 7.2vw, 42px);
    overflow-wrap: anywhere;
  }

  .docs-hero p {
    font-size: 16px;
  }

  .docs-live {
    padding: 12px;
  }

  .live-editor {
    height: 380px;
  }
}

@media (max-width: 760px) {
  .docs-page .container {
    box-sizing: border-box;
    padding-inline: 18px;
  }

  .docs-page .nav-actions > .btn-primary {
    display: none;
  }

  .docs-page .nav-actions {
    gap: 6px;
  }

  .docs-hero-grid,
  .docs-hero-copy,
  .docs-hero-facts {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .docs-facts-list > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .docs-facts-list dd {
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .docs-hero p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .docs-components {
    margin-inline: -18px;
  }

  .docs-components-inner {
    padding-inline: 18px;
  }

  .docs-component-tab {
    min-width: 150px;
    padding: 12px 14px;
  }

  .doc-content h2 {
    font-size: 34px;
  }

  .doc-content h3 {
    font-size: 20px;
  }

  .doc-content p,
  .doc-content li {
    font-size: 15px;
  }

  .doc-table {
    font-size: 13px;
  }

  .doc-table td {
    font-size: 13px;
  }

  .live-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Component hero: copy + at-a-glance card */
.docs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(36px, 5vw, 88px);
  align-items: end;
}

.docs-hero-copy {
  min-width: 0;
}

.docs-hero-facts {
  padding: 20px 20px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.docs-facts-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.docs-facts-list {
  display: grid;
  gap: 1px;
}

.docs-facts-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.docs-facts-list > div:first-child {
  border-top: 1px solid var(--line);
}

.docs-facts-list dt {
  font-size: 13.5px;
  color: var(--muted);
}

.docs-facts-list dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  text-align: right;
}

.docs-facts-note {
  display: block;
  margin-top: 11px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}

/* Fill the tab strip and data grids on wide screens */
.docs-component-tab {
  flex: 1 1 0;
}

.doc-content .doc-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.doc-content .doc-component-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 1100px) {
  .docs-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .docs-hero-facts {
    max-width: 620px;
  }

  .docs-facts-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }

  .docs-facts-list > div:nth-child(2) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .docs-component-tab {
    flex: 0 0 auto;
  }

  .doc-content .doc-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-hero-facts {
    padding: 16px;
  }

  .docs-facts-list {
    grid-template-columns: 1fr;
  }

  .docs-facts-list > div:nth-child(2) {
    border-top: 0;
  }
}


/* 3.0 release markers and changelog */
.new-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line));
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: var(--primary-soft);
  vertical-align: middle;
}

.docs-badge--new {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
  background: var(--primary-soft);
}

.docs-badge--compat {
  color: var(--teal-strong);
  border-color: color-mix(in srgb, var(--teal) 24%, var(--line));
  background: var(--teal-soft);
}

.docs-version-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted-strong);
}

.docs-version-note strong {
  color: var(--ink-strong);
}

.docs-version-note code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-soft);
}

.docs-version-note a {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  white-space: nowrap;
}

.changelog-main {
  padding: 44px 0 100px;
}

.changelog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.release-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.release-card--current {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 18px 50px rgba(60, 88, 180, 0.1);
}

.release-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.release-version {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.release-version h2 {
  margin: 0;
  font-size: 38px;
  letter-spacing: -0.04em;
  color: var(--ink-strong);
}

.release-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}

.release-status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--teal-strong);
  background: var(--teal-soft);
  white-space: nowrap;
}

.release-card--current .release-status {
  color: var(--primary);
  background: var(--primary-soft);
}

.release-summary {
  max-width: 980px;
  margin-top: 18px;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--muted-strong);
}

.change-list {
  display: grid;
  gap: 2px;
  margin-top: 18px;
}

.change-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.change-item:last-child {
  border-bottom: 0;
}

.change-tag {
  display: inline-flex;
  justify-content: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
}

.change-tag--change {
  color: var(--teal-strong);
  background: var(--teal-soft);
}

.change-tag--compat {
  color: var(--muted-strong);
  background: var(--surface-soft);
}

.change-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  color: var(--ink-strong);
}

.change-item p {
  margin: 0;
  max-width: 900px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted-strong);
}

.change-item code {
  font-size: 0.88em;
}

.release-code {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--code-bg);
  overflow: hidden;
}

.release-code pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--code-text);
}

.release-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.release-aside h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ink-strong);
}

.release-aside p,
.release-aside li {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted-strong);
}

.release-aside ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.release-aside a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.version-compare {
  margin-top: 18px;
}

.version-compare td:first-child {
  width: 180px;
  color: var(--muted);
}

.release-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.release-footer a {
  color: var(--primary);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .changelog-grid {
    grid-template-columns: 1fr;
  }

  .release-aside {
    position: static;
  }
}

@media (max-width: 760px) {
  .docs-version-note {
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 12px;
  }

  .docs-version-note a {
    width: 100%;
    margin-left: 0;
  }

  .release-card {
    padding: 18px;
  }

  .release-head {
    flex-direction: column;
    gap: 10px;
  }

  .release-version h2 {
    font-size: 32px;
  }

  .change-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 9px;
  }

  .version-compare td:first-child {
    width: auto;
  }
}


/* Chart option reference */
.options-page .live-select {
  display: none;
}

.options-page .live-controls {
  display: flex;
  justify-content: flex-end;
}

.options-page .live-controls .live-btn--run {
  margin-left: auto;
}

.options-page .doc-content {
  max-width: none;
}

.options-page .option-intro {
  padding: 16px 18px;
  margin-bottom: 8px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 12px;
  background: var(--primary-soft);
}

.options-page .option-intro .new-tag {
  margin-right: 8px;
}

.options-page .option-intro p {
  display: inline;
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted-strong);
}

.options-page .option-loading {
  padding: 40px 0;
  font-size: 14px;
  color: var(--muted);
}

.option-section {
  margin-top: 38px;
}

.option-section .doc-section-head {
  margin-bottom: 14px;
}

.option-table {
  min-width: 680px;
  table-layout: fixed;
}

.option-table th:nth-child(1),
.option-table td:nth-child(1) {
  width: 24%;
}

.option-table th:nth-child(2),
.option-table td:nth-child(2) {
  width: 16%;
}

.option-table th:nth-child(3),
.option-table td:nth-child(3) {
  width: 7%;
}

.option-table th:nth-child(4),
.option-table td:nth-child(4) {
  width: 41%;
}

.option-table th:nth-child(5),
.option-table td:nth-child(5) {
  width: 12%;
  text-align: right;
}

.option-table td {
  vertical-align: top;
  font-size: 13.5px;
}

.option-table td code {
  font-size: 0.88em;
}

.option-table .option-default {
  display: inline-block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}

.option-table .option-note {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--faint);
}

.option-required,
.option-optional {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 9px;
  white-space: nowrap;
}

.option-required {
  color: var(--primary);
  background: var(--primary-soft);
}

.option-optional {
  color: var(--muted);
  background: var(--surface-soft);
}

.prop-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 25px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--primary);
  background: var(--primary-soft);
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.prop-add:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.option-anchor-note {
  margin-top: 4px;
  margin-bottom: 0;
}

.option-axis-grid {
  display: block;
}

@media (max-width: 760px) {
  .options-page .docs-layout--live {
    grid-template-columns: 1fr;
  }

  .option-table {
    min-width: 680px;
  }

  .options-page .live-editor {
    height: 340px;
  }

  .prop-add {
    height: 28px;
  }
}


/* Compact chart option hero: get to the property tables sooner */
.options-page .docs-hero {
  padding-top: 34px;
  padding-bottom: 32px;
}

.options-page .docs-hero h1 {
  font-size: clamp(44px, 5vw, 58px);
}

.options-page .docs-hero p {
  max-width: 820px;
}

.options-page .docs-back {
  margin-bottom: 16px;
}


/* The overlay must not wrap differently from the textarea (wrap="off"). */
.live-highlight,
#docs-live-code {
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.live-highlight code {
  white-space: pre;
}
