/* /developers/: the Integration API's documentation, inside the app's shell. Every colour and face is an app role token (tokens.mode.css), so light/dark follow the app's own `data-mode`. Scoped to .doc so app.css keeps its own meaning. */
.doc {
  --d-mono: var(--cw-font-mono);
  --d-serif: var(--cw-font-serif);
  --d-sans: var(--cw-font-sans);
  font-family: var(--d-sans);
  color: var(--cw-text);
  font-size: 15.5px;
  line-height: 1.65;
  min-width: 0;
}
.doc :where(a) { color: var(--cw-link); text-underline-offset: 2px; }
.doc :where(a):hover { color: var(--cw-link-hover); }

.doc-hero { display: grid; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--cw-line); }
.doc-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cw-text-muted); font-weight: 600; }
.doc-hero :where(h1), .doc-hero .doc-h1 { font-family: var(--d-serif); font-weight: 400; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.75rem); line-height: 1.05; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
.doc-lede { font-size: 17px; color: var(--cw-text-muted); max-width: 66ch; margin: 0; }
/* Four facts, each on a card of its own (D-060: cards stand off the ground by tone, not a line). */
.doc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; font-size: 13.5px; margin-top: 14px; }
.doc-facts > :where(div) { min-width: 0; padding: 14px 16px; border: 1px solid transparent; border-radius: 12px; background: var(--cw-card); }
.doc-facts :where(b) { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cw-text-faint); font-weight: 600; }

.doc :where(section).doc-sec { padding-block: 6px 26px; border-bottom: 1px solid var(--cw-line); }
.doc :where(section).doc-sec:last-of-type { border-bottom: 0; }
.doc :where(h2) { font-family: var(--d-serif); font-weight: 400; font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem); letter-spacing: -.012em; line-height: 1.2; margin: 30px 0 12px; text-wrap: balance; scroll-margin-top: 5.5rem; }
.doc :where(h2) .n { font-family: var(--d-sans); font-size: 15px; font-weight: 600; color: var(--cw-accent-text); font-variant-numeric: tabular-nums; margin-right: .75em; }
.doc :where(h3) { font-family: var(--d-sans); font-weight: 650; font-size: 16.5px; margin: 24px 0 8px; scroll-margin-top: 5.5rem; }
.doc :where(p), .doc :where(ul), .doc :where(ol) { max-width: 72ch; }
.doc :where(p) { margin: 0 0 14px; }
.doc :where(ul), .doc :where(ol) { padding-left: 1.25em; margin: 0 0 14px; }
.doc :where(li) { margin: 4px 0; }
.doc :where(code) { font-family: var(--d-mono); font-size: .86em; background: var(--cw-sunken); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
/* Code on the navy band in both modes (D-060), so a sample reads the same wherever it is read; with the band's roles (tokens.mode.css `.cw-on-feature`) that anything inside reads: ink and selection. Not its focus coral: a focused sample's ring is drawn outside it, on the page. */
.doc :where(pre) { --cw-text: var(--cw-feature-fg); --cw-selection-bg: var(--cw-navy-700); font-family: var(--d-mono); font-size: 13.25px; line-height: 1.6; background: var(--cw-feature); color: var(--cw-text); color-scheme: dark; border: 1px solid transparent; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; overflow-x: auto; max-width: 100%; }
.doc :where(pre) :where(code) { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.doc .c { color: var(--cw-text-faint); }

.doc .tablewrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--cw-line); border-radius: 12px; background: var(--cw-card); }
.doc :where(table) { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc :where(th), .doc :where(td) { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--cw-line); }
.doc :where(th) { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--cw-text-muted); font-weight: 600; background: var(--cw-sunken); white-space: nowrap; }
.doc :where(tr):last-child :where(td) { border-bottom: 0; }
.doc :where(td).num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc :where(td) :where(code) { white-space: nowrap; }
.doc :where(td):first-child :where(code) { overflow-wrap: normal; }

.doc .note { border-left: 3px solid var(--cw-action-bg); background: var(--cw-selected-wash); padding: 10px 14px; border-radius: 0 6px 6px 0; margin: 0 0 16px; max-width: 72ch; }

.doc .who { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin: 6px 0 18px; }
.doc .who > :where(div) { background: var(--cw-card); border: 1px solid transparent; border-radius: 14px; padding: 18px 20px; min-width: 0; }
.doc .who :where(h3) { margin-top: 0; font-family: var(--d-serif); font-weight: 400; font-size: 22px; }
.doc .who :where(p) { margin-bottom: 0; font-size: 15px; }

.doc :where(ol).steps { list-style: none; padding: 0; margin: 0 0 18px; counter-reset: st; display: grid; gap: 16px; max-width: none; }
.doc :where(ol).steps > :where(li) { counter-increment: st; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; margin: 0; }
.doc :where(ol).steps > :where(li)::before { content: counter(st); width: 26px; height: 26px; border-radius: 50%; background: var(--cw-action-bg); color: var(--cw-action-fg); font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-top: 2px; }
.doc :where(ol).steps > :where(li) > :where(div) { min-width: 0; }
.doc :where(ol).steps :where(p) { margin-bottom: 8px; }

.doc .pill { display: inline-block; font-family: var(--d-mono); font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--cw-state-info-bg); color: var(--cw-state-info-text); white-space: nowrap; }
.doc .pill.done { background: var(--cw-state-success-bg); color: var(--cw-state-success-text); }
.doc .pill.stop { background: var(--cw-state-danger-bg); color: var(--cw-state-danger-text); }
.doc .pill.wait { background: var(--cw-state-warning-bg); color: var(--cw-state-warning-text); }

.doc .tabs { margin: 0 0 16px; }
.doc .tabbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: -1px; }
.doc .tabbar :where(button) { font: 600 13px var(--d-sans); color: var(--cw-text-muted); background: transparent; border: 1px solid transparent; border-bottom: 0; padding: 7px 12px; border-radius: 6px 6px 0 0; cursor: pointer; }
.doc .tabbar :where(button)[aria-selected="true"] { color: var(--cw-feature-fg); background: var(--cw-feature); border-color: var(--cw-feature); }
.doc .tabs :where(pre) { border-top-left-radius: 0; }

.doc .check { list-style: none; padding: 0; }
.doc .check :where(li) { padding-left: 28px; position: relative; }
.doc .check :where(li)::before { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 14px; border: 1.5px solid var(--cw-text-muted); border-radius: 3px; }

.doc .diagram { background: var(--cw-card); border: 1px solid transparent; border-radius: 14px; padding: 14px; overflow-x: auto; margin: 0 0 16px; }
.doc .diagram > :where(svg) { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.doc :where(dl).faq :where(dt) { font-weight: 650; margin-top: 16px; }
.doc :where(dl).faq :where(dd) { margin: 4px 0 0; max-width: 72ch; }

/* Reference */
.doc .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 16px 4px; }
.doc .switch { display: inline-flex; border: 1px solid var(--cw-line-strong); border-radius: 8px; overflow: hidden; background: var(--cw-card); }
.doc .switch :where(button) { font: 600 13.5px var(--d-sans); padding: 8px 14px; border: 0; background: transparent; color: var(--cw-text-muted); cursor: pointer; }
.doc .switch :where(button)[aria-pressed="true"] { background: var(--cw-action-bg); color: var(--cw-action-fg); }
.doc .status-line { font-size: 13px; color: var(--cw-text-muted); }
.doc .m { display: inline-block; min-width: 50px; text-align: center; font: 700 11.5px var(--d-mono); padding: 2px 6px; border-radius: 4px; letter-spacing: .03em; }
.doc .m.get { color: var(--cw-state-info-text); background: var(--cw-state-info-bg); }
.doc .m.post { color: var(--cw-state-success-text); background: var(--cw-state-success-bg); }
.doc :where(td).path { font-family: var(--d-mono); font-size: 13px; white-space: nowrap; }
.doc .codes { display: flex; flex-wrap: wrap; gap: 4px; }
.doc .cd { font: 600 12px var(--d-mono); padding: 0 6px; border-radius: 4px; border: 1px solid var(--cw-line); background: var(--cw-card); }
.doc .cd.s2 { color: var(--cw-state-success-text); }
.doc .cd.s4 { color: var(--cw-state-warning-text); }
.doc .cd.s5 { color: var(--cw-state-danger-text); }
.doc .op { background: var(--cw-card); border: 1px solid transparent; border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; scroll-margin-top: 5.5rem; min-width: 0; }
.doc .op-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.doc .op-head .path { font: 600 14.5px var(--d-mono); overflow-wrap: anywhere; }
.doc .op-head :where(h3) { margin: 0; }
.doc .op-head .sum { color: var(--cw-text-muted); }
.doc .tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--cw-text-faint); font-weight: 600; margin-left: auto; }
.doc .desc :where(p) { margin: 0 0 8px; max-width: 80ch; }
.doc .sub { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--cw-text-faint); font-weight: 700; margin: 14px 0 6px; }
.doc .req { color: var(--cw-state-danger-text); font-weight: 700; }
.doc .type { font-family: var(--d-mono); font-size: 12.5px; color: var(--cw-text-muted); white-space: nowrap; }
.doc .group { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--cw-text-muted); font-weight: 700; margin: 26px 0 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.doc .group :where(span) { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--cw-text-faint); font-size: 13px; }

.doc-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--cw-line); font-size: 13px; color: var(--cw-text-faint); display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* The side panel carries this page's contents; the app's rows, a count instead of an icon where a section has none. */
.cw-side .doc-count { width: 1.125rem; text-align: center; font: 600 11.5px var(--cw-font-mono); color: var(--cw-text-faint); font-variant-numeric: tabular-nums; }
.cw-side__item[aria-current="page"] .doc-count { color: inherit; }
.cw-side .cw-side__item { min-height: 2.25rem; }

@media (max-width: 40rem) {
  .doc :where(td).path { white-space: normal; overflow-wrap: anywhere; }
  .doc .tag { margin-left: 0; }
}


/* Two parts in one page; the side panel switches between them. */
.doc [data-part][hidden] { display: none; }
.cw-side [data-toc][hidden] { display: none; }

/* The Swagger page: Swagger UI has one look, so it sits on a card of its own. */
/* Swagger UI üçüncü taraf ve yalnızca açık çiziliyor: panel koyu modda da beyaz kalır, içindeki yerel denetimler de açık (D-060). */
.doc-swagger { color-scheme: light; margin-top: 20px; background: var(--cw-ground-0); border: 1px solid var(--cw-line); border-radius: 10px; padding-block: 4px 16px; overflow-x: auto; }
.doc-swagger-note { margin: 0; padding: 12px 20px 0; font-size: 13.5px; color: var(--cw-ground-600); }

/* Paper: the navy band is a screen's ground, and a printer that drops
 * backgrounds (Chrome's default) would leave its white ink on white paper.
 * Printed, a sample is ink on a ruled box, as it was before D-060. */
@media print {
  .doc :where(pre), .doc .tabbar :where(button)[aria-selected="true"] { background: none; color: var(--cw-ground-950); border: 1px solid var(--cw-ground-300); }
  .doc .tabbar :where(button)[aria-selected="true"] { border-bottom: 0; }
  /* Cards stand off the page by their ground on screen; on paper by a rule. */
  .doc .op, .doc .who > :where(div), .doc .diagram, .doc-facts > :where(div) { border: 1px solid var(--cw-ground-300); }
}
