.doc {
  min-width: 0;
  color: var(--fg);
  font: 400 16px/1.6 var(--ui);
  overflow-wrap: anywhere;
}
.doc > :first-child { margin-top: 0; }
.doc :is(h1, h2, h3, h4) {
  color: var(--fg);
  line-height: 1.14;
}
.doc h1 { margin: 0 0 20px; font-size: clamp(37px, 4.4vw, 64px); font-weight: 560; letter-spacing: -.063em; }
.doc h2 { margin: 44px 0 14px; font-size: clamp(25px, 2.3vw, 35px); font-weight: 570; letter-spacing: -.045em; }
.doc h3 { margin: 27px 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -.032em; }
.doc h4 { margin: 20px 0 8px; font-size: 17px; }
.doc p, .doc li { color: var(--ink-2, var(--fg)); }
.doc p { margin: 12px 0; }
.doc > h1 + p { color: var(--muted); font-size: clamp(17px, 1.25vw, 19px); line-height: 1.55; }
.doc strong { font-weight: 640; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: .17em; text-decoration-thickness: .07em; }
.doc a:hover { text-decoration-thickness: .13em; }
.doc :is(ul, ol) { margin: 12px 0; padding-inline-start: 1.4em; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--accent); }
.doc li > p { margin-block: 5px; }
.doc :is(ul, ol) :is(ul, ol) { margin-block: 4px; }
.doc p.note, .doc blockquote {
  margin: 16px 0;
  padding: 6px 0 6px 15px;
  border-inline-start: 3px solid var(--line);
  color: var(--muted);
}
.doc blockquote p { margin-block: 0; }
.doc hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line); }
.doc :not(pre) > code {
  padding: .1em .32em;
  border-radius: 4px;
  background: var(--soft);
  color: var(--fg);
  font: 400 .86em/1.5 var(--mono);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.doc a > code { color: inherit; }
.doc pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  margin: 18px 0 24px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  font: 400 13px/1.7 var(--mono);
  tab-size: 2;
}
.doc pre code { font: inherit; color: inherit; white-space: pre; overflow-wrap: normal; }
.doc :is(img, video) { max-width: 100%; height: auto; }
.doc .tw {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  margin: 20px 0 26px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.doc table {
  width: 100%;
  margin: 18px 0;
  border-spacing: 0;
  font: 400 14px/1.45 var(--ui);
  /* Words and API identifiers determine each column's minimum. Overflow stays inside .tw. */
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.doc .tw table { margin: 0; }
.doc :is(th, td) { padding: 11px 14px; text-align: start; vertical-align: top; }
.doc thead th { background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.doc thead + tbody tr:first-child > *, .doc tr + tr > * { border-top: 1px solid var(--line); }
.doc td { color: var(--ink-2, var(--fg)); }
.doc tr[hidden], .doc [hidden] { display: none !important; }
.doc .tw:has(th:nth-child(4)) table { min-width: 44rem; }
.doc .tw:has(th:nth-child(6)) table { min-width: 56rem; }
.doc .params-table :is(th, td):is(:first-child, :nth-child(2), :nth-child(3)) { width: 1%; white-space: nowrap; }
.doc .params-table :is(th, td):nth-child(4) { min-width: 9ch; }
.doc .params-table :is(th, td):nth-child(5) { min-width: 17ch; }
.doc .params-table :is(th, td):last-child { width: 39%; min-width: 32ch; }
.doc > table.model-facts { table-layout: fixed; margin: 20px 0 26px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.doc .model-facts td:first-child { width: 8.5rem; white-space: nowrap; color: var(--muted); font-weight: 600; }

.docs-home { container-type: inline-size; }
.docs-home .doc > h1 { margin: 0; font-size: clamp(46px, 5.4vw, 76px); line-height: .98; letter-spacing: -.071em; }
.docs-home .doc .home-lead { margin: 16px 0 0; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.44; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 24px 0 0; }
.doc .home-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding-block: 4px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 640;
  text-decoration: none;
}
.doc .home-actions a:first-child { padding-inline: 15px; border-radius: 7px; background: var(--lime); color: #171a16; }
.doc .home-actions a:first-child:hover { background: #c8e837; }
.doc .home-actions a + a:hover { text-decoration: underline; }
.doc .home-actions span { font-size: 18px; font-weight: 500; }
.request-demo { min-width: 0; margin: 24px 0 0; overflow: hidden; border: 1px solid #383f34; border-radius: 13px; background: #1b201b; color: #eff2e9; color-scheme: dark; }
.request-demo figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 16px;
  border-bottom: 1px solid #3d443a;
  color: #dce1d6;
  font-size: 13px;
  font-weight: 550;
}
.request-language { padding: 2px 7px; border-radius: 4px; background: #343d27; color: #d1ec75; font: 600 12px/1.45 var(--mono); }
.doc .request-demo pre { margin: 0; padding: 20px 16px 23px; border: 0; border-radius: 0; background: transparent; color: #f2f4ee; font-size: 12px; line-height: 1.85; }
.request-example { min-width: 0; margin-block: 18px 24px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.example-tabs { display: flex; gap: 4px; align-items: center; min-width: 0; padding: 0 10px; overflow-x: auto; background: var(--soft); }
.example-tabs [role="tab"] { flex: none; min-height: 42px; padding: 5px 11px 3px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: 550 13px/1.25 var(--ui); cursor: pointer; }
.example-tabs [role="tab"][aria-selected="true"] { border-color: var(--accent); color: var(--fg); }
.example-tabs [role="tab"]:focus-visible { outline-offset: -3px; }
.example-panel { min-width: 0; }
.doc .example-panel pre { margin: 0; border: 0; border-radius: 0; }
.example-panel .code-sample { margin: 0; border: 0; border-radius: 0; }
.request-demo .request-example { margin: 0; border: 0; border-radius: 0; background: transparent; }
.request-demo .example-tabs { background: #242b23; }
.request-demo .example-tabs [role="tab"] { color: #bac3b7; }
.request-demo .example-tabs [role="tab"][aria-selected="true"] { color: #f2f4ee; border-color: var(--lime); }
.request-demo .example-tabs [role="tab"]:focus-visible { outline-color: var(--lime); }
.request-demo .example-panel .code-sample { background: transparent; }
.docs-home .doc > section { min-width: 0; margin-top: 43px; }
.docs-home .doc section > h2 { margin: 0 0 18px; }
.home-start ol, .home-guides ul { list-style: none; }
.doc .home-start ol { display: grid; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: step; }
.doc .home-start li { position: relative; margin: 0; padding: 15px 0 0 34px; counter-increment: step; }
.home-start li::before { position: absolute; top: 17px; left: 0; display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); content: counter(step) / ""; font: 600 12px/1 var(--mono); }
.doc .home-start h3 { margin: 2px 0 5px; font-size: 18px; }
.doc .home-start p, .doc .home-guides a span { font-size: 14px; line-height: 1.5; }
.doc .home-start p { margin: 0; }
.doc .home-guides ul { display: grid; gap: 0 26px; margin: 0; padding: 0; }
.doc .home-guides li { margin: 0; border-top: 1px solid var(--line); }
.doc .home-guides a { position: relative; display: block; height: 100%; padding: 14px 21px 15px 0; color: var(--fg); text-decoration: none; }
.doc .home-guides a::after { position: absolute; right: 2px; top: 15px; color: var(--accent); content: "→" / ""; font-size: 18px; line-height: 1; }
.doc .home-guides a:hover strong { color: var(--accent); text-decoration: underline; text-underline-offset: .16em; }
.doc .home-guides a strong { display: block; margin-bottom: 3px; font-size: 16px; letter-spacing: -.024em; }
.doc .home-guides a span { display: block; color: var(--muted); }
.doc .home-policy { border-top: 1px solid var(--line); padding-top: 24px; }
.doc .home-policy p { font-size: 15px; }
@container (min-width: 555px) {
  .home-start ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .home-guides ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 840px) {
  .docs-home .doc { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); column-gap: clamp(22px, 3vw, 48px); align-items: start; }
  .docs-home .doc > h1 { grid-area: 1 / 1; }
  .docs-home .home-lead { grid-area: 2 / 1; }
  .docs-home .home-actions { grid-area: 3 / 1; }
  .docs-home .request-demo { grid-area: 1 / 2 / 4 / 3; align-self: center; margin: 0; }
  .docs-home .doc > section { grid-column: 1 / -1; }
  .docs-home .doc .home-guides ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.docs-catalogue .doc > h1 { margin-bottom: 12px; }
.catalogue-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 20px; margin: 24px 0 12px; }
.cat-filter { display: grid; gap: 5px; width: min(100%, 25rem); color: var(--fg); font-size: 13px; font-weight: 600; }
.cat-filter input, .cat-kind select {
  width: 100%;
  min-height: 43px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--fg);
  font: 400 15px var(--ui);
}
.cat-kind { display: grid; gap: 5px; color: var(--fg); font-size: 13px; font-weight: 600; }
.cat-upscale { display: inline-flex; min-height: 43px; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.cat-upscale input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.operation-tag { display: inline-block; padding: 1px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--fg); background: var(--soft); font: 500 12px/1.5 var(--ui); }
.cat-filter input::placeholder { color: var(--muted); opacity: 1; }
.doc .cat-count { margin: 0 0 9px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.doc .catalogue-table { margin-top: 0; }
.catalogue-table th:first-child { width: 62%; }
.catalogue-table :is(th, td):nth-child(n+2) { white-space: nowrap; }
.doc .catalogue-table td:first-child a { color: var(--fg); font: 500 13px/1.5 var(--mono); text-decoration: none; }
.doc .catalogue-table a:hover { color: var(--accent); text-decoration: underline; }
.doc .catalogue-table tr:focus-within, .doc .catalogue-table tr:hover { background: var(--soft); }
@media (max-width: 650px) {
  .doc { font-size: 15.5px; }
  .doc h1 { margin-bottom: 15px; font-size: clamp(35px, 8.7vw, 48px); }
  .doc h2 { margin-top: 32px; }
  .doc pre { padding: 13px; font-size: 12px; }
  .doc :is(th, td) { padding: 9px 8px; }
  .doc > table.model-facts { display: block; overflow-x: auto; }
  .doc .model-facts tbody { display: table; width: 100%; }
  .doc .model-facts td:first-child { width: 6rem; }
  .docs-home .doc > h1 { font-size: clamp(42px, 9.5vw, 55px); }
  .docs-home .doc > section { margin-top: 32px; }
  .doc .cat-count { margin-bottom: 0; }
  .catalogue-table th:first-child { width: auto; }
  .doc .catalogue-table td:first-child a { font-size: 12px; }
}

.doc :is(pre, .tw, .model-facts):focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
