/* Breach House v3 API documentation (DarkEye edition). Loaded only by templates/docs.html, after
   the site css and static/v3/skin.css (which defines the tokens used here: --bg, --line, --cyan,
   --mono, --hd…). Every class is dc-*, scoped under main.dc, so nothing here reaches another page
   and the site css cannot reach in. The reading layer is the one of static/v3/pagedoc.css (pd-*:
   crumb, prose, note, table box, code box with Copy, text link), copied under this prefix; the
   page head is the one of the index pages; "On this page" and the endpoint heads are ported from
   the v3 docs page (v3.css .toc, .ep-h). */

/* ---------- ground: what the site css sets on bare elements, undone inside the page ---------- */
.dc{display:block;min-height:60vh;padding-bottom:var(--s-5)}
.dc *,.dc *::before,.dc *::after{box-sizing:border-box}
/* :where() keeps these at the weight of one class, so any dc-* rule below can set a margin */
.dc :where(h1,h2,h3,p,ol,ul,pre){margin:0}
.dc :where(ol,ul){padding:0;list-style:none}
.dc a{color:inherit;text-decoration:none;text-shadow:none;transition:color var(--fast)}
.dc a:hover{color:var(--cyan);text-shadow:none}
.dc h1,.dc h2,.dc h3{text-wrap:balance}
.dc p,.dc li,.dc td,.dc th,.dc summary{text-wrap:pretty}
.dc button{font:inherit;color:inherit;letter-spacing:inherit;cursor:pointer}
.dc :is(a,summary,button):focus-visible{outline:2px solid var(--white);outline-offset:3px}
.dc table{border-collapse:collapse}

.dc-wrap{padding-inline:max(var(--g),calc((100% - var(--max))/2))}
.dc-lbl{font:400 var(--t-lbl)/1.5 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--dim)}
.dc-num{font-family:var(--mono);font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.04em;line-height:1;color:var(--white)}
.dc-kick{font:400 13.6px/1.5 var(--mono);letter-spacing:.147em;text-transform:uppercase;color:var(--cyan)}
.dc-kick::before{content:"// ";content:"// " / ""}

/* ---------- page head: crumb, kicker, title, how many endpoints ---------- */
.dc-ph{padding-top:clamp(28px,5vh,64px);padding-bottom:var(--s-3)}
.dc-crumb{display:flex;flex-wrap:wrap;gap:6px 12px;margin-bottom:var(--s-3);font:400 12px var(--mono);color:var(--dim)}
.dc .dc-crumb a{display:inline-block;padding-block:14px;margin-block:-14px}
.dc-crumb li+li::before{content:"/";content:"/" / "";margin-right:12px;color:var(--line-2)}
.dc-crumb [aria-current]{color:var(--text)}
.dc-ph-row{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:12px var(--s-4);margin-top:10px}
.dc .dc-h1{margin:0}
.dc-ph-n{display:flex;align-items:baseline;gap:12px}
.dc-ph-n .dc-num{font-size:var(--t-n3)}
.dc-ph-n .dc-lbl{white-space:nowrap}

/* ---------- the reading column ---------- */
.dc-prose{--read:38.5rem;padding-top:var(--s-2);font:400 17px/1.7 var(--sans);color:var(--text)}
.dc-prose>*,.dc-prose section>*{min-width:0;max-width:var(--read)}
.dc-prose>*+*,.dc-prose section>*+*{margin-top:1.15em}
.dc-prose .dc-lede{font-size:var(--t-lede);line-height:1.6}
/* a section takes the column (its text keeps the measure), so a table or a code block in it has
   room: 66rem at most (wider, a description line would run past 120 characters) */
.dc-prose>section{max-width:66rem;margin-top:var(--s-5)}
.dc-prose section section,.dc-prose section>h2,.dc-prose .dc-ep-h{max-width:none}
.dc-prose h2{padding-top:18px;border-top:1px solid var(--line-2);font:700 clamp(18px,1.55vw,23px)/1.3 var(--mono);letter-spacing:.01em;text-transform:uppercase;color:var(--text)}
.dc-prose h2+*{margin-top:.9em}
.dc-prose :where(p,li,td,th) a:where(:not(.dc-lnk)){color:var(--cyan);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.22em;text-decoration-color:rgba(0,242,255,.45);transition:color var(--fast),text-decoration-color var(--fast)}
.dc-prose :where(p,li,td,th) a:where(:not(.dc-lnk)):hover{color:var(--white);text-decoration-color:currentColor}
.dc-prose strong{font-weight:600;color:var(--white)}
.dc-prose em{font-style:italic}
.dc code{padding:0;border:0;border-radius:0;background:none;font:400 .86em var(--mono);color:var(--white);overflow-wrap:anywhere}
.dc a code{color:inherit}
.dc-prose .dc-sm{font-size:15px;color:var(--dim)}
.dc-prose .dc-sm code{color:var(--text)}

/* a note on what a plan gets: a hairline at its left, the text a step smaller */
.dc-prose .dc-note{padding:2px 0 2px 18px;border-left:1px solid var(--cyan);font-size:15px;line-height:1.65;color:var(--text)}

/* ---------- "On this page" ---------- */
.dc-toc{font:400 13px/1.45 var(--mono)}
.dc-prose>.dc-toc{max-width:none}
.dc-toc summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;cursor:pointer;list-style:none;border-block:1px solid var(--line);font:400 var(--t-lbl)/1.5 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--dim);transition:color var(--fast)}
.dc-toc summary::-webkit-details-marker{display:none}
.dc-toc summary::after{content:"";flex:none;width:11px;height:11px;background:linear-gradient(currentColor,currentColor) center/11px 1px no-repeat,linear-gradient(currentColor,currentColor) center/1px 11px no-repeat}
.dc-toc details[open]>summary::after{transform:rotate(135deg)}
.dc-toc summary:hover{color:var(--text)}
.dc-toc-g{margin-top:14px;font:400 11px/1.5 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--text)}
.dc .dc-toc ol{margin:6px 0 12px;border-left:1px solid var(--line)}
.dc-toc li+li{margin-top:0}
.dc .dc-toc li a{display:block;margin-left:-1px;padding:6px 0 6px 14px;border-left:1px solid transparent;color:var(--dim);text-decoration:none;transition:color var(--fast),border-color var(--fast)}
.dc .dc-toc li a:hover{color:var(--text)}
.dc .dc-toc li a[aria-current]{color:var(--cyan);border-left-color:var(--cyan)}
/* an endpoint reads "GET /me" with the method in a fixed width, so the paths line up */
.dc .dc-toc ol.dc-eps a{display:flex;align-items:baseline;gap:0 .5em}
.dc-tm{flex:none;min-width:2.9em;font-size:11px;letter-spacing:.04em}
.dc-tpath{min-width:0;overflow-wrap:anywhere}
/* under 1024 px the list is in the flow, closed until asked for: rows of 44 px, the endpoints in
   two columns from 600 px (each link then draws its own rail) */
@media (max-width:1023.98px){
  .dc .dc-toc li a,.dc .dc-toc ol.dc-eps a{display:flex;align-items:center;min-height:44px;padding-block:4px}
  .dc-toc details[open]{padding-bottom:var(--s-2);border-bottom:1px solid var(--line)}
}
@media (min-width:600px) and (max-width:1023.98px){
  .dc .dc-toc ol.dc-eps{columns:2;column-gap:var(--s-3);border-left:0}
  .dc-toc ol.dc-eps li{break-inside:avoid}
  .dc .dc-toc ol.dc-eps a{margin-left:0}
  .dc .dc-toc ol.dc-eps a:not([aria-current]){border-left-color:var(--line)}
}
/* from 1024 px: beside the text, sticky under the header, always open (its summary is a label) */
@media (min-width:1024px){
  .dc-prose{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,15rem);column-gap:clamp(40px,5vw,96px);align-items:start}
  .dc-prose>*{grid-column:1}
  .dc-prose>.dc-toc{grid-column:2;grid-row:1/span 60;position:sticky;top:calc(var(--hd) + 24px);max-height:calc(100vh - var(--hd) - 48px);margin-top:0;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line-2) transparent}
  :root:has(.bx-hd.is-up) .dc-prose>.dc-toc{top:24px;max-height:calc(100vh - 48px)}
  .dc-toc summary{min-height:0;padding-bottom:10px;border-top:0;pointer-events:none}
  .dc-toc summary::after{display:none}
}
@media (min-width:1024px) and (pointer:fine){
  .dc .dc-toc li a{padding-block:4px}
}
@media (min-width:1024px) and (max-height:960px) and (pointer:fine){
  .dc .dc-toc li a{padding-block:2px;line-height:1.35}
  .dc .dc-toc ol{margin-block:6px 8px}
  .dc-toc-g{margin-top:8px}
}
/* touch, 1024 px and up: 44 px rows make the list taller than the screen, and a box that scrolls
   inside the page is awkward with a finger: it stays beside the text, in the flow */
@media (min-width:1024px) and (pointer:coarse){
  .dc .dc-toc li a,.dc .dc-toc ol.dc-eps a{display:flex;align-items:center;min-height:44px;padding-block:4px}
  .dc-prose>.dc-toc{position:static;max-height:none;overflow:visible}
}

/* ---------- endpoints: a hairline, the method and the path in mono, the title under them ---------- */
.dc-prose .dc-ep{margin-top:var(--s-5)}
.dc-prose #endpoints>h2+.dc-ep{margin-top:var(--s-3)}
#endpoints>h2+.dc-ep>.dc-ep-h{padding-top:0;border-top:0}
.dc-prose .dc-ep-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;padding-top:18px;border-top:1px solid var(--line);font:700 16px/1.4 var(--mono);letter-spacing:0;text-transform:none;color:var(--white)}
.dc-prose .dc-ep-h+*{margin-top:1.1em}
.dc-mt{font:700 12px/1.4 var(--mono);letter-spacing:.08em;color:var(--cyan)}
.dc-mt--post{color:var(--amber)}
.dc .dc-ep-h code{min-width:0;font:700 16px/1.4 var(--mono);color:var(--white);overflow-wrap:break-word}
.dc-ep-tag{font:400 11px/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.dc-ep-tag::before{content:"· ";content:"· " / ""}
.dc-ep-t{flex-basis:100%;font:500 17px/1.45 var(--sans);color:var(--white)}

/* ---------- tables: the name in cyan mono, the type in dim mono, the description in sans ---------- */
.dc-prose .dc-tb{max-width:none}
.dc-tb>table{width:100%}
.dc-prose .dc-tb th,.dc-prose .dc-tb td{position:static;width:auto;padding:11px 18px 11px 0;border:0;border-bottom:1px solid var(--line);background:none;text-align:left;vertical-align:top;font:400 14px/1.55 var(--sans);letter-spacing:0;text-transform:none;color:var(--text)}
.dc-prose .dc-tb tr>:last-child{padding-right:0}
.dc-prose .dc-tb thead th{padding-top:0;vertical-align:bottom;border-bottom-color:var(--line-2);font:400 12px/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.dc-prose .dc-tb tbody tr,.dc-prose .dc-tb tbody tr:hover{background:none;border-left:0;transition:none}
.dc-prose .dc-tb tbody th{font-weight:400;white-space:nowrap}
.dc-prose .dc-tb tbody th code{font-size:13px;color:var(--cyan);overflow-wrap:normal}
.dc-prose .dc-tb td.dc-ty{width:9.5em;font:400 13px/1.6 var(--mono);color:var(--dim)}
.dc-prose .dc-tb td.dc-hs{width:4.5em;font:400 13px/1.6 var(--mono);color:var(--text);font-variant-numeric:tabular-nums}
@media (min-width:641px){
  /* one width for the name column of every parameter / field table, so they line up */
  .dc-prose .dc-tb:not(.dc-tb-e) tbody th{width:12em}
  .dc-prose .dc-tb-e tbody th{width:13em}
}
/* phones: each row stacked (name and type on the first line, the description under them); the
   column heads stay for screen readers. Nothing is cut and nothing scrolls sideways */
@media (max-width:640px){
  .dc-tb>table,.dc-tb tbody{display:block}
  .dc-tb thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .dc-tb tbody{border-top:1px solid var(--line-2)}
  .dc-tb tbody tr{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:baseline;gap:4px 14px;padding:12px 0;border-bottom:1px solid var(--line)}
  .dc-prose .dc-tb tbody tr>*{width:auto;min-width:0;padding:0;border:0}
  .dc-prose .dc-tb tbody tr>:last-child{grid-column:1/-1}
  .dc-prose .dc-tb tbody th{white-space:normal;overflow-wrap:anywhere}
  .dc-prose .dc-tb tbody th code{overflow-wrap:anywhere}
  .dc-prose .dc-tb td.dc-ty,.dc-prose .dc-tb td.dc-hs{width:auto}
}

/* the plan table ("What each plan receives"): its first column is a description, not a name;
   on a phone each cell is a line of its own under its column's label */
.dc-prose .dc-tb.dc-tb-p tbody th{width:38%;white-space:normal;color:var(--text)}
.dc-prose .dc-tb-p tbody th code{overflow-wrap:anywhere}
.dc-prose .dc-tb-p td:nth-child(2){width:12.5em}
@media (max-width:640px){
  .dc-tb-p tbody tr{display:block}
  .dc-prose .dc-tb.dc-tb-p tbody tr>*{display:block;width:auto}
  .dc-prose .dc-tb-p tbody tr>*+*{margin-top:10px}
  .dc-tb-p td[data-l]::before{content:attr(data-l);display:block;margin-bottom:2px;font:400 11px/1.5 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
}

/* ---------- a code example: scrolls inside its own box; the page script adds Copy ---------- */
.dc-code{position:relative}
.dc-prose .dc-code{max-width:none}
.dc .dc-code pre{max-width:none;padding:12px 76px 12px 16px;border:0;border-left:1px solid var(--line-2);border-radius:0;background:var(--bg-2);overflow-x:auto;font:400 13px/1.6 var(--mono);color:var(--text);white-space:pre;tab-size:2;scrollbar-width:thin;scrollbar-color:var(--line-2) transparent}
.dc-code pre:focus-visible{outline:2px solid var(--white);outline-offset:-2px}
.dc .dc-code-cp{position:absolute;top:0;right:0;display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;padding:0 10px;border:0;background:var(--bg-2);font:700 11px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--dim);transition:color var(--fast)}
.dc .dc-code-cp:hover,.dc .dc-code-cp[data-done]{color:var(--cyan)}
@media (max-width:640px){
  /* most lines are wider than a phone and scroll inside their box: Copy goes under it, at its
     right end, instead of over the text */
  .dc-code{display:flex;flex-direction:column}
  .dc .dc-code pre{padding-right:16px}
  .dc .dc-code-cp{position:static;align-self:flex-end;background:none}
}

/* ---------- the closing line ---------- */
.dc-prose>.dc-end{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px var(--s-4);max-width:66rem;margin-top:var(--s-5);padding-top:18px;border-top:1px solid var(--line-2)}
.dc-end p{color:var(--dim)}
.dc .dc-lnk{position:relative;display:inline-flex;align-items:center;gap:.6em;min-height:44px;font:700 13px var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--cyan);white-space:nowrap}
.dc-lnk::after{content:"";position:absolute;left:0;right:0;bottom:11px;height:1px;background:currentColor;transform:scaleX(.24);transform-origin:left}
.dc-lnk:hover::after,.dc-lnk:focus-visible::after{transform:scaleX(1)}
.dc-arr{display:inline-block;font-family:var(--mono)}

/* ---------- widths ---------- */
@media (max-width:600px){
  .dc-prose{font-size:16px}
  .dc .dc-ep-h code{font-size:15px}
  .dc .dc-lnk{white-space:normal}
}
@media (pointer:coarse){
  .dc .dc-crumb a{padding-inline:8px;margin-inline:-8px}
}

/* ---------- motion: transform only, and only when the visitor has not asked for less ---------- */
@media (prefers-reduced-motion:no-preference){
  .dc-toc summary::after,.dc-lnk::after,.dc-arr{transition:transform var(--mid) var(--ease)}
  .dc a:hover .dc-arr{transform:translateX(4px)}
}
