/* ==========================================================================
   Creator Notify documentation — single stylesheet, no external dependencies.
   GitBook-inspired shell: fixed sidebar, breadcrumbs, right-hand page outline,
   a light-first palette with a full dark counterpart.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f8f9fb;
  --bg-elevated: #ffffff;
  --bg-inset: #f3f5f8;
  --hover: rgba(16, 24, 40, 0.045);
  --border: #e6e8ec;
  --border-strong: #d3d8e0;
  --text: #14161a;
  --text-muted: #667085;
  --text-subtle: #8b95a5;
  --accent: #2f63e6;
  --accent-hover: #2550c4;
  --accent-soft: rgba(47, 99, 230, 0.09);
  --accent-contrast: #ffffff;
  --violet: #7c5cff;
  --danger: #d1242f;
  --danger-soft: rgba(209, 36, 47, 0.08);
  --warning: #9a6700;
  --warning-soft: rgba(154, 103, 0, 0.08);
  --success: #1a7f37;
  --success-soft: rgba(26, 127, 55, 0.08);
  --code-bg: #f6f7f9;
  --code-border: #e6e8ec;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 6px 24px -8px rgba(16, 24, 40, 0.16);
  --radius: 10px;
  --radius-lg: 14px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --topbar-height: 56px;
  --sidebar-width: 268px;
  --outline-width: 218px;
  --content-max: 720px;
}

html[data-theme='dark'] {
  --bg: #101216;
  --bg-subtle: #14171c;
  --bg-elevated: #171a20;
  --bg-inset: #1b1f26;
  --hover: rgba(255, 255, 255, 0.055);
  --border: #242932;
  --border-strong: #333a46;
  --text: #eef1f6;
  --text-muted: #98a2b3;
  --text-subtle: #7b8697;
  --accent: #7b9cff;
  --accent-hover: #9db4ff;
  --accent-soft: rgba(123, 156, 255, 0.14);
  --accent-contrast: #0b1020;
  --violet: #9b82ff;
  --danger: #ff8f88;
  --danger-soft: rgba(255, 143, 136, 0.12);
  --warning: #f0c674;
  --warning-soft: rgba(240, 198, 116, 0.12);
  --success: #7bd88f;
  --success-soft: rgba(123, 216, 143, 0.12);
  --code-bg: #171a20;
  --code-border: #262c36;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px -10px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Last line of defence: one oversized element must never let the whole
     document scroll sideways on a phone. `clip` keeps position: sticky
     working, unlike `hidden`. */
  overflow-x: hidden;
  max-width: 100%;
}

@supports (overflow: clip) {
  body { overflow-x: clip; }
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

svg {
  flex: 0 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
  text-decoration: none;
}

/* ---------------------------------------------------------------- top bar -- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-height);
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .topbar {
    background: var(--bg);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), var(--violet));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 68% 30%, #fff 0 2.4px, transparent 2.6px),
    radial-gradient(circle at 50% 62%, rgba(255, 255, 255, 0.85) 0 4.6px, transparent 4.8px);
  opacity: 0.9;
}

.brand-name {
  font-size: 14.5px;
}

.brand-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 7px;
  line-height: 1.6;
}

.topnav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
}

.topnav a:hover {
  color: var(--text);
  background: var(--hover);
  text-decoration: none;
}

.nav-download svg,
.nav-keys svg,
.nav-demo svg {
  width: 15px;
  height: 15px;
}

.nav-keys {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-contrast) !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-sm);
}

.nav-keys:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-contrast);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.icon-button:hover {
  background: var(--hover);
  color: var(--text);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

/* ------------------------------------------------------------------ shell -- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--outline-width);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 12px 34px 16px;
  border-right: 1px solid var(--border);
  background: var(--bg-subtle);
  scrollbar-width: thin;
}

.search-wrap {
  position: relative;
  margin-bottom: 18px;
}

.search-input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  font-size: 13.5px;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-subtle);
  pointer-events: none;
}

.search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 5px;
  background: var(--bg-subtle);
  pointer-events: none;
}

.search-status {
  margin: 8px 2px 0;
  font-size: 12.5px;
  color: var(--text-muted);
  min-height: 1em;
}

.nav-group + .nav-group {
  margin-top: 22px;
}

.nav-label {
  margin: 0 0 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li[hidden] {
  display: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  margin: 1px 0;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
  border-left: 2px solid transparent;
}

.nav-link svg {
  width: 15px;
  height: 15px;
  opacity: 0.75;
}

.nav-link:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}

.nav-link:hover svg {
  opacity: 1;
}

.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-link.is-active svg {
  opacity: 1;
}

.sidebar-footer {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 2px;
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.sidebar-footer a:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}

.sidebar-footer svg {
  width: 15px;
  height: 15px;
  opacity: 0.75;
}

/* ---------------------------------------------------------------- content -- */

.content {
  min-width: 0;
  padding: 28px 32px 56px;
}

.content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 14px;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.prose {
  font-size: 14.6px;
}

.prose > h1:first-child,
.prose h1 {
  font-size: 1.85rem;
  line-height: 1.2;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 12px;
}

.prose h2 {
  font-size: 1.22rem;
  line-height: 1.3;
  letter-spacing: -0.014em;
  font-weight: 650;
  margin: 36px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--topbar-height) + 16px);
}

.prose h3 {
  font-size: 1.02rem;
  font-weight: 650;
  margin: 24px 0 7px;
  scroll-margin-top: calc(var(--topbar-height) + 16px);
}

.prose h4 {
  font-size: 0.95rem;
  font-weight: 650;
  margin: 22px 0 6px;
  color: var(--text);
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose strong {
  color: var(--text);
  font-weight: 640;
}

.prose .lead {
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 12px 0;
}

.prose li {
  margin: 6px 0;
}

.prose li::marker {
  color: var(--text-subtle);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 2px;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.muted {
  color: var(--text-subtle);
  font-size: 13.5px;
}

/* Inline code */
.prose code {
  font-family: var(--mono);
  font-size: 0.855em;
  padding: 0.15em 0.4em;
  border-radius: 5px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text);
  /* Inline code can be a long JSON snippet or URL. It has to wrap instead of
     widening the page — `nowrap` here is what pushed the mobile layout
     sideways and clipped code blocks at the left edge. Code *blocks* below
     keep their own white-space. */
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Code blocks */
.prose pre {
  position: relative;
  margin: 16px 0;
  padding: 16px 18px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.prose pre code {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre;
  color: var(--text);
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.prose pre:hover .copy-button,
.copy-button:focus-visible {
  opacity: 1;
}

/* Touch devices never hover: keep the copy affordance visible and tappable,
   and give it room so it cannot sit on top of the first line of code. */
@media (hover: none) {
  .copy-button {
    opacity: 1;
    top: 6px;
    right: 6px;
    padding: 6px 11px;
    font-size: 12px;
  }

  .prose pre {
    padding-top: 42px;
  }
}

.copy-button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Tables */
.table-wrap {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.prose thead th {
  text-align: left;
  font-weight: 650;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle);
  background: var(--bg-inset);
  padding: 10px 14px;
  white-space: nowrap;
}

.prose tbody td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

.prose tbody tr:hover td {
  background: var(--hover);
}

.prose tbody td code {
  white-space: nowrap;
}

/* Callouts, with an icon per variant */
.callout {
  position: relative;
  margin: 20px 0;
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.callout::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 16px;
  width: 16px;
  height: 16px;
  background-color: var(--accent);
  -webkit-mask: var(--icon-info) center / contain no-repeat;
  mask: var(--icon-info) center / contain no-repeat;
}

.callout-title {
  margin: 0 0 4px;
  font-weight: 650;
  color: var(--text);
  font-size: 14.5px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout p {
  color: var(--text-muted);
  font-size: 14.5px;
}

.callout.warn {
  border-left-color: var(--warning);
  background: var(--warning-soft);
}

.callout.warn::before {
  background-color: var(--warning);
  -webkit-mask-image: var(--icon-warn);
  mask-image: var(--icon-warn);
}

.callout.danger {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.callout.danger::before {
  background-color: var(--danger);
  -webkit-mask-image: var(--icon-warn);
  mask-image: var(--icon-warn);
}

:root {
  --icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'%3E%3Cpath d='M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM8 3a5 5 0 1 1 0 10A5 5 0 0 1 8 3Zm0 1.75a.9.9 0 1 1 0 1.8.9.9 0 0 1 0-1.8ZM7.25 7.5h1.5v4h-1.5v-4Z'/%3E%3C/svg%3E");
  --icon-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'%3E%3Cpath d='M8 1.6 1 13.9h14L8 1.6Zm0 3.1 4.6 8.1H3.4L8 4.7Zm.75 2.3h-1.5v3.4h1.5V7.4Zm0 4.1h-1.5v1.5h1.5v-1.5Z'/%3E%3C/svg%3E");
}

/* Badges and endpoint lines */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 6px 6px 0;
  padding: 1px 8px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  vertical-align: 1px;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.method {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--text-subtle);
}

.method.get {
  background: #2f9e44;
}

.method.post {
  background: var(--accent);
}

.method.delete {
  background: #d1242f;
}

.method.put,
.method.patch {
  background: #9a6700;
}

/* Flow list */
.flow {
  margin: 18px 0;
  display: grid;
  gap: 10px;
}

.flow-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.flow-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
}

.flow-step strong {
  display: block;
  color: var(--text);
  font-size: 14.5px;
}

.flow-step p {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* -------------------------------------------------------------- outline -- */

.page-outline {
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  max-height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  padding: 34px 20px 40px 4px;
  font-size: 13px;
}

.page-outline h2 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.page-outline ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.page-outline li a {
  display: block;
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  line-height: 1.45;
}

.page-outline li a:hover {
  color: var(--text);
  text-decoration: none;
}

.page-outline li a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.page-outline li.depth-2 a {
  font-size: 13.5px;
}

.page-outline li.depth-3 a {
  padding-left: 24px;
  font-size: 12.5px;
}

/* --------------------------------------------------------------- footer -- */

.pager {
  display: flex;
  gap: 12px;
  margin: 56px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pager-link {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pager-link:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.pager-next {
  text-align: right;
}

.pager-hint {
  font-size: 11.5px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pager-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.page-footer {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-subtle);
}

.page-footer p {
  margin: 0;
  color: var(--text-subtle);
  font-size: 13px;
}

.page-footer a {
  color: var(--text-muted);
}

.page-footer a:hover {
  color: var(--accent);
}

.page-footer .credit {
  flex-basis: 100%;
}

.page-footer .credit a {
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.page-footer .credit a:hover {
  color: var(--accent);
  border-bottom-color: currentColor;
}


/* ------------------------------------------------- landing-style polish -- */

@keyframes content-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}


/* Quick-link cards on the documentation home page. */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 22px 0 26px;
}

.hero-card {
  display: grid;
  gap: 4px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.hero-card:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.hero-card strong {
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.hero-card span:last-child {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-card-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  border-radius: 9px;
  background: var(--accent-soft, rgba(47, 99, 230, 0.09));
  color: var(--accent);
}

.hero-card-icon svg {
  width: 15px;
  height: 15px;
}

.content-inner {
  animation: content-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* A soft wash behind the top of every page, matching the marketing surface. */
.page-wash {
  position: absolute;
  inset: 0 0 auto 0;
  height: 320px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(560px 240px at 24% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%),
    radial-gradient(460px 200px at 84% 0%, color-mix(in srgb, #7c5cff 10%, transparent), transparent 74%);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .page-wash { display: none; }
}

.content { position: relative; }

.prose h1 {
  background: linear-gradient(120deg, var(--text) 35%, color-mix(in srgb, var(--accent) 60%, var(--text)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cards and callouts lift slightly, like the landing page's feature grid. */
.prose .callout,
.prose table,
.pager a {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.prose .callout:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: var(--shadow-md);
}

.pager a:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.topnav .nav-status {
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .content-inner { animation: none; }
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .page-outline {
    display: none;
  }

  .content {
    padding: 30px 32px 64px;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text);
    cursor: pointer;
  }

  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    position: relative;
  }

  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    content: '';
    position: absolute;
    left: 0;
  }

  .nav-toggle-bars::before {
    top: -5px;
  }

  .nav-toggle-bars::after {
    top: 5px;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    z-index: 35;
    width: min(84vw, 320px);
    height: calc(100vh - var(--topbar-height));
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-md);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .content {
    padding: 24px 20px 56px;
  }

  .topnav .nav-label-text {
    display: none;
  }

  .topnav a {
    padding: 7px 9px;
  }

  .prose h1 {
    font-size: 1.72rem;
  }

  .prose h2 {
    margin-top: 34px;
  }

  .pager {
    flex-direction: column;
  }

  .pager-next {
    text-align: left;
  }
}

@media (max-width: 560px) {
  :root {
    --topbar-height: 52px;
  }

  .brand-version {
    display: none;
  }

  .topnav .nav-download,
  .topnav .nav-demo,
  .topnav .nav-status {
    display: none;
  }

  .search-kbd {
    display: none;
  }

  .topbar {
    gap: 8px;
    padding: 0 12px;
  }

  .brand-name {
    font-size: 14px;
  }

  .content {
    padding: 18px 15px 44px;
  }

  .breadcrumbs {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .prose {
    font-size: 14.2px;
  }

  .prose h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .prose h2 {
    font-size: 1.14rem;
    margin-top: 28px;
  }

  .prose h3 {
    font-size: 1rem;
    margin-top: 20px;
  }

  /* On a phone a code block used to scroll sideways and clip its left edge.
     Wrapping keeps every character of a long shell/JSON line visible. */
  .prose pre {
    padding: 12px;
    font-size: 11.9px;
    border-radius: 8px;
    overflow-x: visible;
    overflow-wrap: anywhere;
  }

  /* Wrapped lines hang by one indent unit, so a continuation is visibly a
     continuation rather than a new statement at column zero. */
  .prose pre code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
    padding-left: 1.7ch;
    text-indent: -1.7ch;
  }

  .prose table {
    font-size: 12.5px;
    table-layout: auto;
  }

  /* Wide API tables: let cells wrap instead of pushing the page sideways. */
  .prose tbody td code {
    white-space: normal;
    word-break: break-word;
  }

  .prose th,
  .prose td {
    padding-left: 7px;
    padding-right: 7px;
  }

  .pager a {
    padding: 10px 12px;
  }

  .page-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .callout {
    padding: 12px 13px 12px 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

@media print {
  .topbar,
  .sidebar,
  .page-outline,
  .pager,
  .copy-button {
    display: none !important;
  }

  .shell {
    display: block;
  }

  .content {
    padding: 0;
  }
}

/* On a phone the copy button is always visible and sits above the first code
   line. Declared last so it beats the mobile padding shorthand above. */
@media (hover: none) and (max-width: 1024px) {
  .prose pre {
    padding-top: 44px;
  }
}

/* ===========================================================================
   Compact mobile scale
   ---------------------------------------------------------------------------
   A phone screen showed very little text per screen: the sidebar-scale type
   was tuned for a desktop column. Everything below shrinks the documentation
   by roughly 12% with tighter spacing, so a paragraph and its code block fit
   together without pinch-zooming out.
   =========================================================================== */
@media (max-width: 640px) {
  .topbar {
    height: 46px;
  }

  .breadcrumb {
    font-size: 11px;
    margin-bottom: 10px;
    gap: 5px;
  }

  .prose {
    font-size: 12.9px;
    line-height: 1.6;
  }

  /* Base rule is `.prose > h1:first-child, .prose h1`, so the first selector is
     more specific than `.prose h1` alone — match both shapes here. */
  body .prose h1,
  body .prose > h1:first-child {
    font-size: 21px;
    margin-bottom: 6px;
  }

  .prose h2 {
    font-size: 1.02rem;
    margin-top: 21px;
    margin-bottom: 7px;
  }

  .prose h3 {
    font-size: 0.93rem;
    margin-top: 16px;
  }

  .prose .lead {
    font-size: 13px;
    line-height: 1.55;
  }

  .prose p,
  .prose li {
    font-size: 12.9px;
  }

  .prose h2 {
    scroll-margin-top: 58px;
  }

  .prose pre {
    font-size: 10.8px;
    line-height: 1.55;
    padding: 10px 11px;
    margin: 12px 0;
  }

  .prose code {
    font-size: 0.86em;
  }

  .prose table {
    font-size: 11.7px;
  }

  .prose thead th {
    font-size: 10px;
    padding: 6px 7px;
  }

  .prose tbody td {
    padding: 6px 7px;
  }

  .table-wrap {
    margin: 12px 0;
  }

  .callout {
    padding: 10px 11px;
    font-size: 12.4px;
  }

  .pager a {
    padding: 9px 11px;
  }

  .pager .t {
    font-size: 12.5px;
  }

  .page-footer {
    padding: 14px 0 22px;
    font-size: 11.5px;
  }

  /* The copy button stays visible on touch; keep it clear of the code. */
  .prose pre {
    padding-top: 38px;
  }

  /* A three-column API table was 40px wider than the screen. Fixed layout plus
     word breaking keeps every cell inside the card and readable. */
  .prose table {
    table-layout: fixed;
    width: 100%;
  }

  .prose thead th,
  .prose tbody td {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .prose tbody td code {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-wrap {
    overflow-x: auto;
  }
}
