/* The API reference's look: CNTXT Strata's colours from the design system's
   tokens (packages/design-system/src/tokens.css), mapped onto Redoc's CSS
   variables. Redoc declares its defaults under :where(), so :root wins in
   light and :root:has(.redoc.dark) in dark. Fonts: IBM Plex Sans when the
   reader has it, else the system's; the page loads no font. */

:root {
  --strata-header-height: 56px;
  --strata-strip: #14181f;
  --strata-strip-text: #eaeff6;
  --strata-strip-muted: #9aa6bc;

  --font-family-base:
    'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --heading-font-family: var(--font-family-base);
  --sidebar-font-family: var(--font-family-base);
  --font-family-monospaced:
    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --code-font-family: var(--font-family-monospaced);
  --heading-font-weight: 600;
  --navbar-height: var(--strata-header-height);

  --border-radius: 4px;
  --border-radius-md: 4px;
  --border-radius-lg: 6px;
  --border-radius-xl: 8px;
  --panel-border-radius: 6px;

  --bg-color: #ffffff;
  --bg-color-raised: #ffffff;
  --bg-color-tonal: #f4f7fd;
  --bg-color-hover: #edf2fa;
  --bg-color-active: #edf2fa;
  --layer-color: #f4f7fd;
  --sidebar-bg-color: #f4f7fd;
  --sidebar-border-color: #d9dce3;
  --text-color-primary: #1f2228;
  --text-color-secondary: #616c80;
  --text-color-description: #4a5262;
  --heading-text-color: #1f2228;
  --border-color-primary: #d9dce3;
  --border-color-secondary: #e6e9ef;
  --link-color-primary: #1c5ebe;
  --link-color-primary-hover: #154a96;
  --link-color-visited: #1c5ebe;
  --color-primary-base: #1c5ebe;
  --menu-content-color-active: #1c5ebe;
  --menu-item-bg-color-active: #e3ebf8;
  --tree-bg-color-active: #e3ebf8;
  --tree-bg-color-hover: #e9eef7;
}

:root:has(.redoc.dark) {
  --bg-color: #10141a;
  --bg-color-raised: #171c24;
  --bg-color-tonal: #171c24;
  --bg-color-hover: #1d2635;
  --bg-color-active: #1d2635;
  --layer-color: #171c24;
  --sidebar-bg-color: #0b0e12;
  --sidebar-border-color: #262d38;
  --text-color-primary: #f4f7fd;
  --text-color-secondary: #9aa6bc;
  --text-color-description: #c3cad8;
  --heading-text-color: #f4f7fd;
  --border-color-primary: #262d38;
  --border-color-secondary: #1f252f;
  --link-color-primary: #5c9df5;
  --link-color-primary-hover: #8bbaf8;
  --link-color-visited: #5c9df5;
  --color-primary-base: #5c9df5;
  --menu-content-color-active: #8bbaf8;
  --menu-item-bg-color-active: #1d2635;
  --tree-bg-color-active: #1d2635;
  --tree-bg-color-hover: #171c24;
}

html,
body {
  margin: 0;
  background: var(--bg-color);
}

/* The CNTXT Strata bar, dark in both modes like the design system's strip. */
.strata-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: var(--strata-header-height);
  padding: 0 20px;
  box-sizing: border-box;
  background: var(--strata-strip);
  border-bottom: 1px solid #262d38;
  font-family: var(--font-family-base);
}

.strata-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--strata-strip-text);
  text-decoration: none;
}

.strata-wordmark {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.strata-wordmark span {
  font-weight: 700;
  letter-spacing: 1.5px;
}

.strata-divider {
  width: 1px;
  height: 20px;
  background: #3a4250;
}

.strata-section {
  color: var(--strata-strip-muted);
  font-size: 14px;
}

/* Redoc's sidebar and panels stick under the bar, not under the window's top. */
.redoc .menu-content {
  top: var(--strata-header-height);
  height: calc(100vh - var(--strata-header-height));
}

/* A lifecycle badge sits on each operation's heading; in the sidebar the
   group's name already says it. */
.redoc .menu-content .tag-warning {
  display: none;
}

/* Base paths in the overview's table stay on one line. */
.redoc table code {
  white-space: nowrap;
}
