/* API docs. Tokens, the top bar, buttons and the brand come from css/base.css; everything else here is prefixed dx-.
   Layout: nav | text | code. Wide screens keep the code column beside its section (sticky inside it); below 1320px the
   code goes under the text, below 820px the nav becomes a menu bar. Motion follows css/MOTION.md (transform/opacity, 120-360 ms). */

/* In the panel .brand is the dark 224px sidebar column; the docs header has no sidebar, so the brand sits on the header
   surface itself — drop the dark fill and the fixed width. */
.dx-top .brand { width: auto; background: none; color: var(--ink); padding-left: 20px; overflow: visible; }
.dx-top .brand img.brand-word { max-width: none; height: 40px; }
@media (max-width: 900px) { .dx-top .brand { padding-left: 14px; } }

/* The header sits on the light paper surface in light theme, so it needs the dark-ink wordmark there and the off-white
   one in dark theme. Scoped above 900px only, so the badge swap in base.css still owns narrow screens. */
@media (min-width: 901px) {
  .dx-top .brand .dk, :root[data-theme="dark"] .dx-top .brand .lt { display: none; }
  :root[data-theme="dark"] .dx-top .brand .dk { display: block; }
}
:root {
  --mono: ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Consolas, monospace;
  /* Code surfaces stay dark in both themes so samples read like a terminal. */
  --code-bg: #191713; --code-bar: #24211c; --code-line: #38342d; --code-ink: #f1eee7; --code-muted: #aaa397;
  --code-str: #8fd6a0; --code-key: #93b4ff; --code-num: #ffb074; --code-bool: #c3a9ff; --code-fn: #f0cf7a; --code-var: #f2a6c8;
  --mo-out: cubic-bezier(.16, 1, .3, 1);
}
:root[data-theme="dark"] { --code-bg: #0a0908; --code-bar: #151311; --code-line: #2a2723; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.dx-body { background: var(--bg); }
.dx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dx-skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; font-weight: 600; text-decoration: none; transition: top .15s; }
.dx-skip:focus { top: 10px; }
.dx code, .dx-top code { font-family: var(--mono); font-size: .9em; }

/* ---------- top bar ---------- */
.dx-badge { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--raised); border: 1px solid var(--line); border-radius: 4px; padding: 4px 11px; white-space: nowrap; }
.dx-badge b { font-weight: 700; color: var(--ink); }
.dx-top .btn { height: 36px; }
.dx-lang { display: inline-flex; gap: 2px; padding: 3px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; margin-right: 6px; }
.dx-lang button { border: 0; background: none; padding: 5px 11px; border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .12s, color .12s, transform .12s; }
.dx-lang button:hover { color: var(--ink); }
.dx-lang button:active { transform: scale(.96); }
.dx-lang button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }

/* ---------- layout ---------- */
.dx { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 48px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.dx-main { min-width: 0; padding-bottom: 88px; }
.dx-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 40px; padding: 64px 0; border-top: 1px solid var(--line); }
.dx-sec:first-child { border-top: 0; padding-top: 48px; }
.dx-eps { display: contents; }
.dx-text { min-width: 0; container-type: inline-size; display: grid; gap: 16px; align-content: start; }
.dx-code { min-width: 0; display: grid; gap: 14px; align-content: start; position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow: auto; scrollbar-width: none; }
.dx-code:empty { display: none; }
.dx-code::-webkit-scrollbar { display: none; }
@media (max-width: 1319px) {
  .dx-sec { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 52px 0; }
  .dx-code { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
  .dx-lang { display: none; }
}

/* ---------- nav ---------- */
.dx-nav { position: sticky; top: 56px; align-self: start; height: calc(100vh - 56px); padding: 32px 0 24px; display: flex; flex-direction: column; min-height: 0; }
.dx-nav-toggle { display: none; }
.dx-toc { position: relative; overflow-y: auto; min-height: 0; padding-right: 8px; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; }
.dx-toc a { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .14s; }
.dx-toc a:hover { color: var(--ink); }
.dx-toc a[aria-current] { color: var(--ink); font-weight: 650; }
.dx-nav-label { margin: 18px 0 6px; padding: 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .8; }
.dx-nav-label:first-of-type { margin-top: 0; }
#navEps { display: flex; flex-direction: column; gap: 1px; }
.dx-ep-link { font-family: var(--mono); font-size: 13px !important; }
.dx-ind { position: absolute; left: 0; top: 0; right: 8px; height: 0; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); pointer-events: none; opacity: 0; transition: transform .32s var(--mo-out), height .2s var(--mo-out), opacity .2s; }
.dx-ind::before { content: ""; position: absolute; left: -1px; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--primary); }
.dx-ind.on { opacity: 1; }
@media (max-width: 820px) {
  .dx { display: block; padding: 0 16px; }
  .dx-nav { position: sticky; top: 56px; z-index: 12; height: auto; padding: 0; margin: 0 -16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .dx-nav-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: none; cursor: pointer; text-align: left; }
  .dx-nav-cur { display: grid; gap: 1px; }
  .dx-nav-cur small { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .dx-nav-cur b { font-size: 15px; font-weight: 650; }
  .dx-nav-toggle svg { width: 18px; height: 18px; color: var(--ink-2); transition: transform .22s var(--mo-out); }
  .dx-nav.open .dx-nav-toggle svg { transform: rotate(180deg); }
  .dx-toc { position: absolute; left: 0; right: 0; top: 100%; display: none; max-height: calc(100vh - 56px - 56px - 16px); padding: 8px 16px 14px; background: var(--surface); border-bottom: 1px solid var(--line-strong); }
  .dx-nav.open .dx-toc { display: flex; animation: dx-drop .22s var(--mo-out); }
  .dx-toc a { padding: 9px 12px; }
  .dx-ind { display: none; }
  .dx-toc a[aria-current] { background: var(--raised); }
  .dx-sec { padding: 40px 0; }
  html { scroll-padding-top: 112px; }
}
@keyframes dx-drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- type ---------- */
.dx-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary-ink); }
.dx-eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--primary); }
.dx-sec h1 { display: block; font: 800 clamp(34px, 4.4vw, 56px)/1.04 var(--display); letter-spacing: -0.035em; text-wrap: balance; }
.dx-sec h2 { display: flex; align-items: center; gap: 10px; font: 750 30px/1.15 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
.dx-h3 { margin-top: 10px !important; font: 700 16px/1.3 var(--display); letter-spacing: -0.01em; }
.dx-h3:first-child { margin-top: 0 !important; }
.dx-lead { font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.dx-p, .dx-list, .dx-acc p { font-size: 15px; line-height: 1.7; color: var(--ink-2); max-width: 70ch; text-wrap: pretty; }
.dx-p b, .dx-list b { color: var(--ink); font-weight: 650; }
.dx-quiet { color: var(--muted); }
.dx-text a:not(.btn):not(.dx-status):not(.dx-anchor) { color: var(--primary-ink); font-weight: 550; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.dx-text a:not(.btn):hover { text-decoration-color: currentColor; }
.dx-text :is(p, li, td, small, summary) code {
  background: var(--raised); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--ink); white-space: nowrap;
}
.dx-text :is(p, li, td) code { font-size: .86em; }
.dx-list { display: grid; gap: 9px; }
.dx-list li { position: relative; padding-left: 20px; }
.dx-list li::before { content: ""; position: absolute; left: 3px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--c2); }
.dx-anchor { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--muted); opacity: 0; transition: opacity .15s, background .15s; }
.dx-anchor svg { width: 15px; height: 15px; }
h2:hover .dx-anchor, .dx-anchor:focus-visible { opacity: 1; }
.dx-anchor:hover { background: var(--raised); color: var(--ink); }
.dx-note { display: flex; gap: 10px; align-items: flex-start; background: var(--c2-soft); border-radius: 8px; padding: 13px 15px; font-size: 14px; line-height: 1.6; color: var(--ink); }
.dx-note svg { width: 18px; height: 18px; color: var(--c2); flex: none; margin-top: 2px; }

/* ---------- hero ---------- */
.dx-hero { padding-bottom: 72px; }
.dx-hero .dx-text { gap: 22px; }
.dx-base { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; justify-self: start; background: var(--code-bg); color: var(--code-ink); border-radius: 8px; padding: 6px 6px 6px 16px; }
.dx-base span { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--code-muted); white-space: nowrap; }
.dx-base code { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 40px; margin: 6px 0 0; padding: 18px 0; border-block: 1px solid var(--line); }
.dx-facts dt { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.dx-facts dd { margin: 0; font: 800 26px/1 var(--display); letter-spacing: -0.025em; }
.dx-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.dx-grid3 > div { border-top: 3px solid var(--c1); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.dx-grid3 > div:nth-child(2) { border-color: var(--c2); }
.dx-grid3 > div:nth-child(3) { border-color: var(--c4); }
.dx-grid3 h3 { font: 700 15px/1.3 var(--display); }
.dx-grid3 p { font-size: 14px; line-height: 1.6; color: var(--muted); }
@container (max-width: 560px) { .dx-facts { grid-template-columns: repeat(2, auto); } .dx-grid3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- steps ---------- */
.dx-steps { display: grid; gap: 0; counter-reset: s; margin: 4px 0 0; padding: 0; list-style: none; }
.dx-steps > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding: 0 0 26px; position: relative; }
.dx-steps > li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.dx-n { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--bg); font: 800 15px/1 var(--display); }
.dx-steps h3 { font: 700 17px/1.3 var(--display); margin: 6px 0 6px; }
.dx-steps p { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.dx-keys { display: grid; gap: 12px; margin-top: 14px; }
.dx-key-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.dx-key-form .btn { height: 40px; }
.dx-key-new { display: grid; gap: 10px; background: var(--c4-soft); border: 1px solid color-mix(in srgb, var(--c4) 35%, transparent); border-radius: 8px; padding: 14px; }
.dx-key-new > p { font-size: 14px; color: var(--ink); }
.dx-key-new > p span { color: var(--ink-2); }
.dx-key-new .btn { justify-self: start; }
.dx-key-value { display: flex; align-items: center; gap: 8px; background: var(--code-bg); border-radius: 6px; padding: 5px 5px 5px 14px; min-width: 0; }
.dx-key-value code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; user-select: all; color: var(--code-str); font-size: 14px; }
.dx-key-list ul { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.dx-key-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.dx-key-list li:first-child { border-top: 0; }
.dx-key-list li b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-key-list li small { grid-column: 1 / -2; color: var(--muted); font-size: 12px; }
.dx-key-list li.revoked b { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.dx-key-list code { grid-column: 2; grid-row: 1; font-size: 12px; color: var(--muted); }
.dx-key-list li .dx-status { grid-column: 3; grid-row: 1; justify-self: end; }
.dx-key-list li .dx-link-btn { grid-column: 3; grid-row: 2; justify-self: end; }
.dx-key-count { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.dx-link-btn { border: 0; background: none; padding: 2px 4px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 4px; }
.dx-link-btn:hover { color: var(--ink); text-decoration: underline; }
.dx-link-btn.armed { color: var(--bad); background: var(--bad-soft); }
.dx-hint { font-size: 13px; color: var(--muted); }
.dx-err { color: var(--bad); font-size: 13px; background: var(--bad-soft); border-radius: 6px; padding: 8px 12px; }

/* ---------- forms ---------- */
.dx-field { display: grid; gap: 6px; min-width: 0; }
.dx-field > span { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.dx-field em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--primary-ink); background: var(--primary-soft); border-radius: 4px; padding: 1px 7px; }
.dx-field small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.dx-field input { width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 12px; outline: 0; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.dx-field input:focus { border-color: var(--ink); }
.dx-field input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.dx-field input, .dx-mono { font-family: var(--mono); font-size: 13px; }
#keyName { font-family: var(--font); font-size: 14px; }

/* ---------- tables ---------- */
.dx-table-wrap { min-width: 0; border-top: 1px solid var(--line-strong); }
.dx-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.dx-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dx-table td { padding: 11px 14px 11px 0; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.dx-table td:first-child { white-space: nowrap; color: var(--ink); }
.dx-table td:first-child code { font-weight: 650; background: none; border: 0; padding: 0; font-size: .92em; }
.dx-table td code { margin: 1px 4px 1px 0; display: inline-block; }
.dx-table tbody tr { transition: background .12s; }
.dx-table tbody tr:hover { background: color-mix(in srgb, var(--raised) 70%, transparent); }
.dx-plans td:not(:first-child), .dx-plans th:not(:first-child) { font-variant-numeric: tabular-nums; }
.dx-where { display: block; font-size: 11px; font-weight: 500; color: var(--muted); font-family: var(--font); }
.dx-type { font: 500 12px var(--mono); color: var(--c3-ink); white-space: nowrap; }
.dx-req { font-size: 12px; font-weight: 700; color: var(--primary-ink); }
.dx-opt { font-size: 12px; color: var(--muted); }
/* narrow text column: tables turn into stacked rows (container query, so it also works beside the code column) */
@container (max-width: 600px) {
  .dx-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dx-table, .dx-table tbody { display: block; }
  .dx-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .dx-table td { display: block; padding: 0; border: 0; }
  .dx-table td:last-child { flex-basis: 100%; }
  .dx-table td:first-child { white-space: normal; }
  .dx-table td:nth-child(n+3):not(:last-child)::before { content: attr(data-l) ": "; font-size: 11px; color: var(--muted); }
  .dx-table:not(.rich) tr { display: grid; gap: 4px; }
  .dx-table:not(.rich) td { display: grid; grid-template-columns: minmax(7.5em, 36%) minmax(0, 1fr); gap: 10px; }
  .dx-table:not(.rich) td::before { content: attr(data-l); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
  .dx-table:not(.rich) td:nth-child(n+3)::before { content: attr(data-l); }
}

/* ---------- status, method, tags ---------- */
.dx-status { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 2px 9px; font-variant-numeric: tabular-nums; white-space: nowrap; text-decoration: none; background: var(--raised); color: var(--ink-2); }
.dx-status.good { background: var(--good-soft); color: var(--good); }
.dx-status.bad { background: var(--bad-soft); color: var(--bad); }
.dx-status.warn { background: var(--warn-soft); color: var(--warn); }
a.dx-status { transition: transform .12s, filter .12s; }
a.dx-status:hover { filter: brightness(.96); transform: translateY(-1px); }
.dx-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.dx-method { display: inline-grid; place-items: center; min-width: 50px; font: 700 11.5px/1 var(--mono); letter-spacing: .04em; border-radius: 4px; padding: 6px 8px; }
.dx-method.get { background: var(--c2-soft); color: var(--c2-ink); }
.dx-method.post { background: var(--c4-soft); color: var(--c4-ink); }
.dx-method.mini { min-width: 0; font-size: 9.5px; padding: 3px 5px; }
.dx-ep-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dx-ep-path { font-size: 15px !important; font-weight: 600; overflow-wrap: anywhere; }
.dx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dx-tag { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--raised); border: 1px solid var(--line); border-radius: 4px; padding: 2px 9px; }
.dx-tag.open { color: var(--good); background: var(--good-soft); border-color: transparent; }

/* ---------- code blocks ---------- */
.dx-cb { position: relative; min-width: 0; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 8px; overflow: hidden; color: var(--code-ink); }
.dx-cb-bar { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 5px 6px 5px 14px; background: var(--code-bar); border-bottom: 1px solid var(--code-line); flex-wrap: wrap; }
.dx-cb-title { font-size: 12px; font-weight: 650; color: var(--code-muted); margin-right: auto; padding: 4px 0; }
.dx-cb pre { margin: 0; padding: 14px 16px; overflow: auto; max-height: 340px; font: 400 13px/1.65 var(--mono); tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--code-line) transparent; }
.dx-cb pre:focus-visible { outline: 2px solid #9cc0ff; outline-offset: -2px; }
.dx-cb code { font: inherit; white-space: pre; background: none; border: 0; padding: 0; color: inherit; }
.dx-cb-note { padding: 8px 14px 10px; font-size: 12px; line-height: 1.5; color: var(--code-muted); border-top: 1px solid var(--code-line); }
.dx-cb-note code { background: none; border: 0; padding: 0; color: var(--code-ink); }
.dx-cb-tabs { display: flex; gap: 1px; }
.dx-cb-tabs button { border: 0; background: none; color: var(--code-muted); font-size: 12px; font-weight: 650; padding: 5px 9px; border-radius: 4px; cursor: pointer; transition: background .12s, color .12s, transform .12s; }
.dx-cb-tabs button:hover { color: #fff; }
.dx-cb-tabs button:active { transform: scale(.96); }
.dx-cb-tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--code-key) 20%, transparent); color: #fff; }
.t-k { color: var(--code-key); } .t-s { color: var(--code-str); } .t-n { color: var(--code-num); } .t-b { color: var(--code-bool); }
.t-c { color: var(--code-muted); font-style: italic; } .t-f { color: var(--code-fn); } .t-v { color: var(--code-var); }
.dx-copy { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 30px; padding: 0 9px; flex: none; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--code-muted); cursor: pointer; font-size: 12px; font-weight: 650; transition: background .12s, color .12s, transform .1s; }
.dx-copy svg { width: 15px; height: 15px; }
.dx-copy:hover { background: color-mix(in srgb, #fff 10%, transparent); color: #fff; }
.dx-copy:active { transform: scale(.94); }
.dx-copy.copied { color: var(--code-str); }
.dx-copy.copied svg { animation: dx-tick .35s var(--mo-out); }
@keyframes dx-tick { from { transform: scale(.4); opacity: 0; } }
.dx-cb :focus-visible, .dx-base :focus-visible, .dx-key-value :focus-visible, .dx-try-result :focus-visible { outline: 2px solid #9cc0ff; outline-offset: 1px; }
.dx-dl { justify-self: start; }

/* ---------- Dene panel ---------- */
.dx-try { margin-top: 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); overflow: hidden; }
.dx-try-head { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--raised); }
.dx-try-head b { font: 750 15px/1 var(--display); }
.dx-try-head span { font-size: 13px; color: var(--muted); }
.dx-try-form { display: grid; gap: 14px; padding: 16px; }
.dx-try-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.dx-field-key { grid-column: 1 / -1; }
.dx-try-warn { font-size: 13px; line-height: 1.55; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 9px 12px; }
.dx-try-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dx-try-msg { font-size: 13px; color: var(--bad); background: var(--bad-soft); border-radius: 6px; padding: 9px 12px; line-height: 1.5; }
.btn.busy { opacity: .75; pointer-events: none; }
.btn.busy svg { animation: dx-nudge .8s ease-in-out infinite alternate; }
@keyframes dx-nudge { to { transform: translateX(4px); } }
.dx-try-result { background: var(--code-bg); border-top: 1px solid var(--code-line); color: var(--code-ink); }
.dx-try-bar { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; background: var(--code-bar); border-bottom: 1px solid var(--code-line); flex-wrap: wrap; }
.dx-try-bar .dx-status { background: color-mix(in srgb, currentColor 16%, transparent); }
.dx-try-bar .dx-status.good { color: var(--code-str); }
.dx-try-bar .dx-status.bad { color: #ff9d94; }
.dx-try-bar .dx-status.warn { color: #fbbf24; }
.dx-try-time, .dx-try-rate { font-size: 12px; color: var(--code-muted); font-variant-numeric: tabular-nums; }
.dx-try-bar .dx-copy { margin-left: auto; }
.dx-try-pre { margin: 0; padding: 14px 16px; overflow: auto; max-height: 420px; font: 400 13px/1.65 var(--mono); scrollbar-width: thin; scrollbar-color: var(--code-line) transparent; }
.dx-try-pre code { font: inherit; white-space: pre; background: none; border: 0; padding: 0; color: inherit; }

/* ---------- version log, faq ---------- */
.dx-log { display: grid; gap: 0; margin: 6px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.dx-log > li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dx-log-v { display: grid; gap: 4px; align-content: start; }
.dx-log-v b { font: 800 20px/1 var(--display); letter-spacing: -0.02em; }
.dx-log-v span { font-size: 12px; font-weight: 700; color: var(--good); }
.dx-log p { font-size: 15px; line-height: 1.65; color: var(--ink-2); margin-bottom: 10px; }
.dx-faq .dx-sec, .dx-faq { grid-template-columns: minmax(0, 1fr); }
.dx-faq .dx-text { max-width: 820px; }
.dx-acc { border-top: 1px solid var(--line-strong); }
.dx-acc details { border-bottom: 1px solid var(--line); }
.dx-acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px; cursor: pointer; font-size: 17px; font-weight: 650; transition: color .12s; }
.dx-acc summary::-webkit-details-marker { display: none; }
.dx-acc summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .22s var(--mo-out); }
.dx-acc summary:hover { color: var(--primary-ink); }
.dx-acc details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.dx-acc details[open] p { animation: dx-fade .3s var(--mo-out); }
.dx-acc p { padding: 0 2px 18px; }
@keyframes dx-fade { from { opacity: 0; transform: translateY(-4px); } }
.dx-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.dx-foot-links { display: flex; gap: 18px; }
.dx-foot a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.dx-foot a:hover { color: var(--primary-ink); text-decoration: underline; }

/* ---------- phones ---------- */
@media (max-width: 820px) {
  .dx-hide-sm { display: none; }
  .dx-sec h2 { font-size: 25px; }
  .dx-lead { font-size: 16px; }
  .dx-code { grid-template-columns: minmax(0, 1fr); }
  .dx-log > li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dx-key-form { grid-template-columns: minmax(0, 1fr); }
  .dx-key-form .btn { justify-self: start; }
  .dx-try-head { flex-wrap: wrap; gap: 4px 12px; }
}
@media (max-width: 480px) {
  .dx-top .dx-badge { display: none; }
  .dx-facts { grid-template-columns: repeat(2, auto); }
  .dx-base { flex-wrap: wrap; }
  .dx-cb pre, .dx-try-pre { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .dx-ind { transition: none; }
}

/* the tab bar is tight: its copy button shows only the icon until it says "Kopyalandı" */
.dx-cb-tabs ~ .dx-copy:not(.copied) span { display: none; }
.dx-cb-bar { flex-wrap: nowrap; }
.dx-cb-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- touch targets, colour-coded methods, Try micro-animation ---------- */
.dx-method.put, .dx-method.patch { background: var(--warn-soft); color: var(--warn); }
.dx-method.delete { background: var(--bad-soft); color: var(--bad); }
.dx-ep-link { gap: 8px; }
.dx-ep-link .dx-method.mini { flex: none; min-width: 34px; }
.dx-try { position: relative; transition: box-shadow .2s, border-color .2s; }
.dx-try:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.dx-try::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--c1), var(--c2), var(--c4)); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }
.dx-try.busy::before { opacity: 1; animation: dx-sweep 1.1s var(--mo-out) infinite; }
@keyframes dx-sweep { from { transform: scaleX(0); transform-origin: left; } 55% { transform: scaleX(1); transform-origin: left; } 56% { transform-origin: right; } to { transform: scaleX(0); transform-origin: right; } }
.dx-try-head b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--good); vertical-align: 1px; }
.dx-try.busy .dx-try-head b::before { background: var(--warn); animation: dx-pulse .8s ease-in-out infinite alternate; }
@keyframes dx-pulse { to { transform: scale(1.5); opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
  .dx-try.busy::before, .dx-try.busy .dx-try-head b::before, .btn.busy svg { animation: none; }
  .dx-try.busy::before { transform: scaleX(1); }
}
@media (pointer: coarse), (max-width: 820px) {
  .dx-toc a { min-height: 44px; }
  .dx-nav-toggle { min-height: 48px; }
  .dx-cb-tabs button, .dx-copy, .dx-link-btn, .dx-lang button { min-height: 44px; min-width: 44px; }
  .dx-acc summary { min-height: 48px; }
  .dx-field input, .dx-key-form .btn, .dx-try-actions .btn { min-height: 44px; }
  .dx-cb-tabs button { padding: 5px 8px; }
  .dx-cb-bar { flex-wrap: wrap; }
  .dx-anchor { width: 44px; height: 44px; }
}
