/* The API reference in the BlueGrid design system (design-system/bg-design-system.html):
   sharp edges, one accent, Inter for words, JetBrains Mono for data. */

@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* -- The palette ------------------------------------------------------------ */
:root {
  --deep: #00239C; --bright: #027EFF; --ink: #050B24; --paper: #F5F7FC;
  --graphite: #4E5B80; --grey: #C8C8C8; --down: #E5484D;
  --bar: 56px;

  /* Light: Paper and Ink; Deep carries links; Bright marks what matters. */
  --bg: var(--paper); --panel: #FFFFFF; --fg: var(--ink); --mute: var(--graphite);
  --line: #C8CEE0; --link: var(--deep); --accent: var(--bright);
  color-scheme: light;
}
/* Dark: Redoc's own toggle (.redoc.dark) decides; the system's setting, until
   Redoc has drawn. */
:root:has(.redoc.dark) {
  --bg: #050B24; --panel: #0A1438; --fg: #F2F5FF; --mute: #9AA6C8;
  --line: #22305F; --link: #5CA8FF; --accent: var(--bright);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not(:has(.redoc)) {
    --bg: #050B24; --panel: #0A1438; --fg: #F2F5FF; --mute: #9AA6C8;
    --line: #22305F; --link: #5CA8FF; color-scheme: dark;
  }
}

* { border-radius: 0 !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
       -webkit-font-smoothing: antialiased; }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
        font-variant-numeric: tabular-nums; }

/* -- The brand bar ---------------------------------------------------------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--bar);
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: var(--bg); border-bottom: 1px solid var(--line); box-sizing: border-box;
}
.brand { display: flex; align-items: center; }
.logo { height: 22px; width: auto; display: block; }
.logo-dark { display: none; }
:root:has(.redoc.dark) .logo-light { display: none; }
:root:has(.redoc.dark) .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not(:has(.redoc)) .logo-light { display: none; }
  :root:not(:has(.redoc)) .logo-dark { display: block; }
}
.lab { font: 500 11px/1 Inter, sans-serif; letter-spacing: .22em; text-transform: uppercase;
       color: var(--mute); padding-left: 16px; border-left: 1px solid var(--line); }
/* The one filled thing: a tag with the 45° cut, bottom-left. */
.tag { background: var(--accent); color: #fff; font-size: 12px; font-weight: 500;
       padding: 3px 8px 3px 12px; clip-path: polygon(8px 100%, 0 calc(100% - 8px), 0 0, 100% 0, 100% 100%); }
.note { margin-left: auto; color: var(--mute); font-size: 13px; }
.download { color: var(--link); font-size: 13px; text-decoration: none;
            border: 1px solid var(--line); padding: 5px 10px; }
.download:hover { border-color: var(--accent); }
@media (max-width: 720px) { .note { display: none; } .download { margin-left: auto; } }

#redoc { padding-top: var(--bar); }
.loading { padding: calc(var(--bar) + 48px) 24px; color: var(--mute); max-width: 60ch; }

/* -- Redoc, in the brand ---------------------------------------------------- */
#redoc, #redoc * {
  --font-family-base: Inter, system-ui, sans-serif;
  --heading-font-family: Inter, system-ui, sans-serif;
  --font-family-monospaced: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --code-font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --code-block-font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --http-tag-font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --heading-font-weight: 600;

  --border-radius: 0; --border-radius-md: 0; --border-radius-lg: 0; --border-radius-xl: 0;
  --border-radius-xxl: 0; --border-radius-xxxl: 0; --button-border-radius: 0;
  --panel-border-radius: 0; --code-panel-border-radius: 0; --badge-border-radius: 0;
  --input-border-radius: 0; --menu-item-label-border-radius: 0;

  --bg-color: var(--bg); --bg-color-raised: var(--panel);
  --text-color-primary: var(--fg); --text-color-secondary: var(--mute);
  --text-color-description: var(--mute); --heading-text-color: var(--fg);
  --border-color-primary: var(--line); --border-color-secondary: var(--line);
  --sidebar-bg-color: var(--bg); --sidebar-border-color: var(--line);
  --sidebar-text-color: var(--fg);
  --sidebar-offset-top: var(--bar); --navbar-offset: var(--bar);
  --link-color-primary: var(--link); --link-color: var(--link);
  --color-primary-base: var(--accent); --color-primary-text: var(--link);
  --menu-item-color-active: var(--link);
  --schema-required-color: var(--link);
  /* Panels and code: the page's own surfaces. */
  --panel-bg-color: var(--panel); --panel-heading-bg-color: var(--panel);
  --panel-body-bg-color: var(--panel); --panel-samples-bg-color: var(--panel);
  --panel-samples-body-bg-color: var(--panel); --panel-samples-heading-bg-color: var(--panel);
  --panel-samples-code-block-bg-color: var(--panel); --code-panel-bg-color: var(--panel);
  --code-block-bg-color: var(--panel); --panel-border: 1px solid var(--line);
  --code-panel-border-color: var(--line);
  --layer-color: var(--panel); --bg-color-tonal: var(--panel);
  --inline-code-bg-color: transparent; --inline-code-border-color: var(--line);
  --inline-code-font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --inline-code-text-color: var(--fg);
  /* Statuses: success in the accent, failure in grey. Green and red mean prices. */
  --color-success-base: var(--bright); --color-error-base: var(--mute);
  --schema-property-required-label-text-color: var(--link);
}

/* Headings as the brand sets them: tight. */
#redoc h1 { letter-spacing: -0.04em; }
#redoc h2, #redoc h3 { letter-spacing: -0.025em; }

/* Methods: one accent, no traffic lights. Green and red mean up and down.
   Everywhere, the search dialog too, which Redoc draws outside #redoc. */
.tag-get  { --tag-color: var(--bright) !important;   --tag-bg-color: transparent !important; }
.tag-post { --tag-color: var(--deep) !important;     --tag-bg-color: transparent !important; }
.tag-put  { --tag-color: var(--graphite) !important; --tag-bg-color: transparent !important; }
:root:has(.redoc.dark) .tag-post { --tag-color: #5CA8FF !important; }
:root:has(.redoc.dark) .tag-put  { --tag-color: #9AA6C8 !important; }

/* A path in a table is one word. */
#redoc td code { white-space: nowrap; }

/* Redoc's credit links to its site: credit it in the folder's licence instead. */
#redoc a[href^="https://redocly.com/redoc"],
#redoc :has(> a[href^="https://redocly.com/redoc"]) { display: none; }
