:root {
  color-scheme: light;
  --ink: #201642;
  --text: #494264;
  --violet: #5830c6;
  --line: #ded7ef;
  --ground: #f5f3fb;
  --paper: #fff;
  --console: #211840;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-family: Aptos, "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 2rem; }
body { margin: 0; }
h1, h2, h3, p, pre { margin: 0; }
a { color: var(--violet); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .12em; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, pre:focus-visible {
  outline: 3px solid #8965ed;
  outline-offset: 3px;
}
code { font-family: var(--mono); font-size: .91em; }
:not(pre) > code { overflow-wrap: anywhere; }

.frame { width: min(calc(100% - 5rem), 78rem); margin-inline: auto; }
.skip { position: absolute; z-index: 1; inset: .75rem auto auto .75rem; padding: .7rem; background: var(--paper); transform: translateY(-180%); }
.skip:focus { transform: none; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 4.75rem; display: flex; align-items: center; gap: 2rem; }
.identity { display: inline-flex; gap: .85rem; align-items: center; color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 660; }
.identity img { width: 4.25rem; height: auto; }
.identity span { border-left: 1px solid var(--line); padding-left: .85rem; }
.topbar nav { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.topbar nav a { color: var(--text); text-decoration: none; }
.topbar nav a:hover { color: var(--violet); }
.help-link { white-space: nowrap; font-weight: 650; color: var(--violet); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .98fr); align-items: center; gap: clamp(1.75rem, 6vw, 6rem); padding: clamp(3.5rem, 7vw, 6.25rem) 0; }
.hero-copy { min-width: 0; }
.route-mark { display: flex; align-items: center; gap: .65rem; width: fit-content; padding: .35rem .7rem .35rem .45rem; border: 1px solid #d9ccef; border-radius: .2rem; color: #4b26ab; font-weight: 700; font-size: .88rem; }
.route-mark span { display: inline-block; width: .75rem; height: .75rem; border: 2px solid #7852de; border-radius: 50%; }
.hero h1 { max-width: 13ch; font-size: clamp(3.35rem, 6.2vw, 6.2rem); line-height: .95; letter-spacing: -.063em; font-weight: 760; margin: 1.15rem 0 1.25rem; text-wrap: balance; }
.hero-copy > p:not(.route-mark) { max-width: 39ch; font-size: clamp(1.07rem, 1.6vw, 1.26rem); line-height: 1.52; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.45rem; margin-top: 1.7rem; }
.primary-button, .input-row button { border: 1px solid var(--violet); background: var(--violet); border-radius: .42rem; color: var(--paper); padding: .72rem 1rem; min-height: 2.75rem; text-decoration: none; font-weight: 680; }
.primary-button:hover, .input-row button:hover { background: #46239f; border-color: #46239f; }
.text-link { text-decoration-line: underline; font-weight: 660; }
.text-link span { margin-left: .25rem; }

.console { min-width: 0; border: 1px solid #37275e; background: var(--console); color: #fbf9ff; border-radius: .75rem; overflow: hidden; box-shadow: .75rem .75rem 0 #e4dcf4; }
.console :focus-visible { outline-color: #c5aafe; outline-offset: -3px; }
.console-title { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .8rem 1.1rem; border-bottom: 1px solid #4d3a75; }
.console-title h2 { font-size: 1rem; font-weight: 650; }
.console-button { background: #3d2b64; color: #fff; border: 1px solid #634c8e; padding: .55rem .7rem; border-radius: .35rem; white-space: nowrap; }
.console-button:hover { background: #523481; }
.console pre { padding: 1.05rem 1.1rem 1.17rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; line-height: 1.58; color: #f2eafe; }
.response-label { display: flex; flex-wrap: wrap; align-items: center; gap: .38rem .6rem; padding: .75rem 1.1rem; background: #30234e; font-size: .84rem; color: #dfd5f6; }
.response-label code { color: #a5ecc1; }
.status-light { width: .49rem; height: .49rem; background: #92e6a9; border-radius: 50%; }
.code-field { color: #d9bbff; }
.code-value { color: #b9ebce; }

.content-layout { display: grid; grid-template-columns: minmax(11.5rem, .28fr) minmax(0, 1fr); align-items: start; border: 1px solid var(--line); border-radius: .7rem; background: var(--paper); }
.contents { position: sticky; top: 1.5rem; padding: 2.15rem 1.05rem; }
.contents nav { display: grid; gap: .35rem; }
.contents a { padding: .6rem .75rem; border-radius: .25rem; text-decoration: none; color: var(--ink); font-weight: 620; font-size: .93rem; }
.contents a:hover { background: var(--ground); color: var(--violet); }
.reading-column { border-left: 1px solid var(--line); min-width: 0; }
.doc-section { padding: clamp(1.45rem, 4vw, 3rem); }
.doc-section + .doc-section { border-top: 1px solid var(--line); }
.doc-section > h2 { font-size: clamp(1.8rem, 3.25vw, 2.7rem); line-height: 1.05; letter-spacing: -.035em; margin-bottom: .95rem; }
.doc-section > p { max-width: 72ch; color: var(--text); line-height: 1.58; margin-bottom: .9rem; }
.doc-section h3 { font-size: 1.13rem; margin: 1.15rem 0 .6rem; }

.domain-form { margin: 1.15rem 0; background: var(--ground); padding: 1rem 1.1rem; border-left: 3px solid #8965ed; }
.domain-form label, .endpoint-search label { display: block; font-size: .94rem; font-weight: 700; margin-bottom: .55rem; }
.input-row { display: flex; gap: .55rem; }
.input-row input { flex: 1; min-width: 0; }
.input-row button { flex: none; }
.input-row input, .endpoint-search input { display: block; min-height: 2.75rem; padding: .65rem .7rem; border: 1px solid #a899c9; border-radius: .36rem; color: var(--ink); background: #fff; }
.input-row input[aria-invalid="true"] { border-color: #9a2752; }
.form-help { margin-top: .5rem; font-size: .86rem; line-height: 1.4; color: var(--text); }
.form-help.form-error { color: #9a2752; }
.domain-links { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; margin-top: .66rem; font-size: .9rem; }
.domain-links a { font-weight: 650; }
.instructions { padding-left: 1.25rem; margin: 1.25rem 0 0; }
.instructions li { line-height: 1.55; color: var(--text); padding-left: .35rem; }
.instructions li + li { margin-top: .65rem; }
.instructions li::marker { color: var(--violet); font-weight: 700; }
.instructions strong { color: var(--ink); }

.base-url { padding: .75rem .85rem; color: #492789; border-left: 3px solid #8965ed; background: var(--ground); white-space: pre-wrap; overflow-wrap: anywhere; }
.endpoint-search { margin-top: 1.25rem; }
.endpoint-search input { width: min(100%, 25rem); }
.endpoint-group { margin-top: 1.1rem; }
.endpoint { border-top: 1px solid var(--line); }
.endpoint:last-child { border-bottom: 1px solid var(--line); }
.endpoint summary { display: grid; grid-template-columns: 3.1rem minmax(8rem, .65fr) minmax(10rem, 1fr) 1.1rem; align-items: center; gap: .5rem; min-height: 3.15rem; padding: .65rem .5rem; cursor: pointer; }
.endpoint summary::-webkit-details-marker { display: none; }
.endpoint summary::marker { content: ''; }
.endpoint summary::after { content: '+'; font-size: 1.06rem; color: var(--violet); font-weight: 700; grid-column: -2; text-align: center; }
.endpoint[open] summary::after { content: '−'; }
.endpoint summary:hover { background: #faf9ff; }
.endpoint summary code { font-weight: 690; }
.endpoint-name { color: var(--text); font-size: .95rem; }
.method { justify-self: start; padding: .25rem .4rem; border-radius: .22rem; color: #154c37; background: #e3f4ea; font: 700 .79rem var(--mono); }
.endpoint-info { color: var(--text); line-height: 1.57; padding: .25rem .5rem .9rem 4.1rem; }
.scope { margin-top: .48rem; }
.scope code { color: #492789; }
.empty { padding: .7rem 0; }

.result-codes { margin: 1rem 0; }
.result-codes div { display: grid; grid-template-columns: 3rem 1fr; gap: .6rem; align-items: start; padding: .55rem .3rem; border-top: 1px solid var(--line); }
.result-codes dt { font: 700 .9rem var(--mono); margin-top: .13rem; }
.result-codes dd { margin: 0; color: var(--text); line-height: 1.48; }
.page-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.1rem; padding: 1.45rem 0; color: var(--text); font-size: .88rem; }
.page-footer a:first-child { font-weight: 780; }
.page-footer a:last-child { margin-left: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 61rem) {
  .frame { width: calc(100% - 3rem); }
  .hero { gap: 2rem; }
  .hero h1 { font-size: clamp(3rem, 7.3vw, 4.75rem); }
  .content-layout { grid-template-columns: minmax(9.7rem, .3fr) minmax(0, 1fr); }
  .contents { padding-inline: .5rem; }
}

@media (max-width: 46rem) {
  .frame { width: calc(100% - 1.75rem); }
  .hero { grid-template-columns: 1fr; gap: 1.65rem; padding: 2.4rem 0 3rem; }
  .hero h1 { font-size: clamp(2.85rem, 10vw, 4.5rem); margin-block: .9rem 1rem; }
  .console { box-shadow: .28rem .28rem 0 #e4dcf4; }
  .topbar-inner { min-height: 4rem; gap: .7rem; justify-content: space-between; }
  .topbar nav { display: none; }
  .identity { gap: .5rem; font-size: .89rem; }
  .identity img { width: 3.4rem; }
  .identity span { padding-left: .5rem; }
  .help-link { font-size: .82rem; }
  .content-layout { grid-template-columns: 1fr; }
  .contents { position: static; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
  .contents nav { display: flex; flex-wrap: wrap; gap: 0 .25rem; }
  .contents a { font-size: .86rem; padding: .5rem .4rem; }
  .reading-column { border-left: none; }
}

@media (max-width: 29rem) {
  .help-link { white-space: normal; text-align: end; line-height: 1.2; }
  .input-row { flex-direction: column; }
  .input-row button { align-self: flex-start; }
  .endpoint summary { grid-template-columns: 2.6rem minmax(0, 1fr) 1rem; }
  .endpoint-name { grid-column: 2; grid-row: 2; }
  .endpoint summary::after { grid-row: 1; }
  .endpoint-info { padding-left: .5rem; }
  .console pre { font-size: .86rem; }
}
