/* ============================================================
   Giftronaut API Platform — Docs CSS
   Three-zone docs layout and component styles
   ============================================================ */

/* ============================================================
   Top navigation
   ============================================================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: 56px;
}
.top-nav__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.top-nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.top-nav__logo:hover { text-decoration: none; }
.top-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.top-nav__links a {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.top-nav__links a:hover, .top-nav__links a.active {
  color: var(--color-text-primary);
  background: var(--color-bg-muted);
}
.top-nav__actions { display: flex; align-items: center; gap: 10px; }

/* ── Auth header button ───────────────────────────────────────────────────── */
.auth-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-family: var(--font-sans);
  white-space: nowrap;
  flex-shrink: 0;
}
.auth-header-btn:hover,
.auth-header-btn--open {
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
  background: var(--color-bg-muted);
}
.auth-header-btn--authorized {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}
.auth-header-btn--authorized:hover,
.auth-header-btn--authorized.auth-header-btn--open {
  background: #dcfce7;
}
.auth-header-btn--expired {
  color: #b45309;
  border-color: #fcd34d;
  background: #fffbeb;
}
.auth-header-btn__icon { flex-shrink: 0; }
.auth-header-btn__chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.auth-header-btn__chevron--open { transform: rotate(180deg); }

/* ── Auth dropdown panel ─────────────────────────────────────────────────── */
.auth-dropdown {
  position: fixed;
  top: 56px;          /* same as .top-nav height */
  left: 0;
  right: 0;
  z-index: 95;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  animation: authSlideDown 0.18s ease-out;
}
@keyframes authSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-dropdown__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-dropdown__controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-dropdown__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.auth-dropdown__field--btn {
  position: relative;   /* anchor for the absolutely-positioned error */
  justify-content: flex-end;
  gap: 8px;
}
/* Inline validation error — absolutely positioned to the right of the button
   so it never shifts the button's vertical position */
.auth-dropdown__validation-err:not([hidden]) {
  display: inline-flex;
  align-items: center;
  position: absolute;
  left: calc(100% + 10px);
  bottom: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #b91c1c;
  white-space: nowrap;
  animation: errShake 0.25s ease-out;
}
@keyframes errShake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}
.auth-dropdown__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-dropdown__select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  cursor: pointer;
  min-width: 190px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-dropdown__select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 15%, transparent);
}
/* Status row — :not([hidden]) prevents display:flex from overriding the hidden attribute */
.auth-dropdown__status:not([hidden]) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.auth-dropdown__status--expired {
  background: #fffbeb;
  border-color: #fcd34d;
}
.auth-dropdown__status--error {
  background: #fef2f2;
  border-color: #fca5a5;
}
.auth-dropdown__status-icon { font-size: 1rem; flex-shrink: 0; padding-top: 1px; }
.auth-dropdown__status-text { flex: 1; min-width: 0; color: var(--color-text-primary); line-height: 1.6; }
.auth-dropdown__status-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
/* Empty state — same guard against hidden override */
.auth-dropdown__empty:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.auth-dropdown__empty-link {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
}
.auth-dropdown__empty-link:hover { text-decoration: underline; }

/* ── Auth overlay (blur backdrop) ───────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 56px 0 0 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ── Shared auth badge / tag components ──────────────────────────────────── */
.auth-scope-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  font-family: var(--font-mono, ui-monospace, monospace);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  color: var(--color-accent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
}
.auth-env-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-env-tag--sandbox    { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.auth-env-tag--production { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.auth-token-mask {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Panel auth section ──────────────────────────────────────────────────── */
.panel-auth {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}
.panel-auth--no-token {
  text-align: center;
  padding: 22px 16px;
}
.panel-auth--authorized {
  background: #f0fdf4;
  border-color: #86efac;
}
.panel-auth--expired {
  background: #fffbeb;
  border-color: #fcd34d;
}
.panel-auth__lock {
  font-size: 1.75rem;
  margin-bottom: 8px;
}
.panel-auth__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}
.panel-auth__desc {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  line-height: 1.55;
}
.panel-auth__header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.panel-auth__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.panel-auth__status-dot--ok      { background: #16a34a; }
.panel-auth__status-dot--expired { background: #d97706; }
.panel-auth__status-label {
  font-size: 0.8125rem;
  font-weight: 600;
}
.panel-auth__meta {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}
.panel-auth__meta strong { color: var(--color-text-primary); font-weight: 500; }
.panel-auth__token-mask {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  word-break: break-all;
}
.panel-auth__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Panel toolbar (endpoint header + expand toggle) ─────────────────────── */
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: sticky;
  /* also relative for dropdown positioning */
  top: -24px;           /* aside padding-top(24px)만큼 올려 padding 영역까지 커버 */
  z-index: 10;
  background: var(--color-bg-subtle);
  padding: 24px 20px 12px; /* aside padding을 toolbar 내부에서 복원 */
  margin: -24px -20px 0;   /* aside padding을 상쇄해 좌우/위 끝까지 확장 */
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.2s;
}
/* 스크롤 후 sticky 상태일 때 elevation 효과 */
.panel-toolbar.is-stuck {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.panel-toolbar .panel-endpoint-header {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  margin: -4px -6px;
  transition: background 0.15s;
}
.panel-toolbar .panel-endpoint-header:hover {
  background: var(--color-bg-muted);
}
.panel-endpoint-header__chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.2s;
}
.panel-endpoint-header[aria-expanded="true"] .panel-endpoint-header__chevron {
  transform: rotate(180deg);
}

/* Endpoint dropdown */
.panel-endpoint-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  margin-top: 4px;
  max-height: 360px;
  display: flex;
  flex-direction: column;
}
.panel-endpoint-dropdown[hidden] {
  display: none;
}
.panel-endpoint-dropdown__search {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  outline: none;
  box-sizing: border-box;
}
.panel-endpoint-dropdown__search::placeholder { color: var(--color-text-muted); }
.panel-endpoint-dropdown__list {
  overflow-y: auto;
  flex: 1;
}
.panel-endpoint-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
}
.panel-endpoint-dropdown__item:hover {
  background: var(--color-bg-muted);
}
.panel-endpoint-dropdown__item.is-active {
  background: var(--color-accent-bg, #eff6ff);
  font-weight: 500;
}
.panel-endpoint-dropdown__item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-endpoint-dropdown__group {
  padding: 6px 12px 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: var(--color-bg-muted);
  border-top: 1px solid var(--color-border);
  position: sticky;
  top: 0;
}
.panel-endpoint-dropdown__group:first-child {
  border-top: none;
}
.panel-endpoint-dropdown__empty {
  padding: 12px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
}
.method-badge--sm {
  font-size: 0.625rem;
  padding: 1px 5px;
}

/* Expand / collapse button */
.panel-expand-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.panel-expand-btn:hover {
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
  background: var(--color-bg-muted);
}
/* Icon swap */
.panel-expand-btn .icon-collapse { display: none; }
.panel-expand-btn.is-expanded .icon-expand  { display: none; }
.panel-expand-btn.is-expanded .icon-collapse { display: block; }

/* ── Send Request button disabled tooltip ────────────────────────────────── */
.panel-send-btn {
  position: relative;
}
.panel-send-btn[disabled] {
  cursor: not-allowed;
}
/* Tooltip bubble */
.panel-send-btn[disabled]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e2e;
  color: #e2e8f0;
  padding: 5px 11px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
/* Tooltip arrow */
.panel-send-btn[disabled]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e1e2e;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
.panel-send-btn[disabled]:hover::after,
.panel-send-btn[disabled]:hover::before {
  opacity: 1;
}

/* Search trigger */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: var(--font-sans);
  min-width: 180px;
}
.search-trigger:hover { border-color: var(--color-border-strong); background: var(--color-bg-muted); }
.search-trigger kbd {
  margin-left: auto;
  padding: 1px 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  color: var(--color-text-muted);
}

/* ============================================================
   Three-zone docs layout
   ============================================================ */
.docs-body { overflow-x: hidden; }

.docs-layout {
  display: grid;
  grid-template-columns: 256px 1fr 360px;
  grid-template-rows: 1fr;
  min-height: calc(100vh - 56px);
  max-width: 1440px;
  margin: 0 auto;
  transition: grid-template-columns 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Panel expanded state ────────────────────────────────────────────────── */
/*
 * Grid columns stay UNCHANGED (256px 1fr 360px) — nav and main don't move.
 * The panel switches to position:fixed and overlays from the right edge,
 * slightly overlapping the main content. This is consistent across all pages
 * regardless of content width.
 */
.docs-layout.panel-expanded > .try-it-panel,
.docs-layout.panel-expanded > .try-it-panel__content {
  position: fixed;
  top: 56px;
  right: 0;
  height: calc(100vh - 56px);
  width: min(680px, calc(100vw - 536px));
  z-index: 50;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

/* Left nav */
.docs-nav {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  border-right: 1px solid var(--color-border);
  padding: 20px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.docs-nav__inner { padding: 0 16px; }
.docs-nav__tree { display: flex; flex-direction: column; gap: 2px; }
.docs-nav__item-group { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }

.docs-nav__item {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
  cursor: pointer;
  font-weight: 500;
}
.docs-nav__item:hover { color: var(--color-text-primary); background: var(--color-bg-muted); text-decoration: none; }
.docs-nav__item.is-active { color: var(--color-accent); background: var(--color-accent-light); font-weight: 600; }
.docs-nav__item--child { padding-left: 20px; font-weight: 400; }
.docs-nav__item--soon { color: var(--color-text-muted); cursor: default; }
.docs-nav__sub-items { display: flex; flex-direction: column; gap: 1px; }
.docs-nav__item--sub { padding-left: 32px; font-size: 0.8125rem; font-weight: 400; color: var(--color-text-muted); }
.docs-nav__item--sub:hover { color: var(--color-text-primary); background: var(--color-bg-muted); }
/* API Reference items in Guide LNB — show page-jump icon */
.docs-nav__item--ref-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.docs-nav__ref-icon {
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity 0.15s;
}
.docs-nav__item--ref-link:hover .docs-nav__ref-icon { opacity: 0.7; }

.docs-nav__section { margin-bottom: 4px; }
.docs-nav__section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  transition: background 0.12s;
}
.docs-nav__section-toggle:hover { background: var(--color-bg-muted); }
.docs-nav__section-toggle .toggle-arrow { transition: transform 0.2s; }
.docs-nav__section-toggle.is-open .toggle-arrow { transform: rotate(0deg); }
.docs-nav__section-toggle:not(.is-open) .toggle-arrow { transform: rotate(-90deg); }

.docs-nav__section-body { display: flex; flex-direction: column; gap: 1px; padding-bottom: 4px; }
.docs-nav__section-body.is-collapsed { display: none; }

/* Main content */
.docs-main { border-right: 1px solid var(--color-border); overflow-y: auto; }

.docs-content { max-width: 760px; padding: 40px 48px; }
.docs-content__breadcrumb { font-size: 0.8125rem; color: var(--color-text-secondary); margin-bottom: 10px; }
.docs-content__title { font-size: 2rem; font-weight: 800; color: var(--color-text-primary); margin-bottom: 16px; letter-spacing: -0.03em; }
.docs-content__lead { font-size: 1.0625rem; color: var(--color-text-secondary); line-height: 1.7; margin-bottom: 40px; }

.docs-section { margin-bottom: 48px; }
.docs-section h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); }

/* Endpoint sections */
.endpoint-section {
  margin-bottom: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  /* Offset scroll so .endpoint-header (method+path) stays visible below sticky nav */
  scroll-margin-top: 72px;
}
.endpoint-section:first-of-type { border-top: none; }
.endpoint-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.endpoint-path { font-family: var(--font-mono); font-size: 0.9375rem; color: var(--color-text-primary); }
.endpoint-section h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 10px; padding: 0; border: none; }

/* ── Parameter table — shared base ── */
.param-table {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 12px 0 24px;
  font-size: 0.875rem;
  background: var(--color-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* ── Parameter table — div-based (subgrid for consistent column widths) ── */
div.param-table {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.65fr 3fr;
}
div.param-table .param-row {
  /* Each row spans all outer columns and inherits column tracks via subgrid */
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  gap: 0 14px;
  align-items: start;
  transition: background 0.1s;
}
div.param-table .param-row:last-child { border-bottom: none; }
div.param-table .param-row:not(.param-row--header):hover { background: var(--color-bg-muted); }
/* Span last cell across remaining columns for 2- or 3-column rows */
div.param-table .param-row > div:last-child:nth-child(2) { grid-column: 2 / -1; padding-left: 0; }
div.param-table .param-row > div:last-child:nth-child(3) { grid-column: 3 / -1; padding-left: 0; }
div.param-table .param-row--header {
  background: var(--color-bg-subtle);
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* Name column — mono code pill */
div.param-table .param-row:not(.param-row--header) > div:first-child > code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}
/* Required column (3rd div) — badge style */
div.param-table .param-row:not(.param-row--header) > div:nth-child(3) {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}
/* Inline <code> in div-based rows */
div.param-table .param-row code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--color-bg-muted);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Parameter table — table-based (recipient-groups, etc.) ── */
table.param-table {
  display: table; /* explicitly restore table layout (overrides any inherited display) */
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
table.param-table thead th {
  background: var(--color-bg-subtle);
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
table.param-table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  font-size: 0.875rem;
  color: var(--color-text-primary);
}
table.param-table tbody tr:last-child td { border-bottom: none; }
table.param-table tbody tr:hover td { background: var(--color-bg-muted); transition: background 0.1s; }
table.param-table tbody td:first-child > code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}
table.param-table tbody td code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--color-bg-muted);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Required scope badge */
.scope-badge {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

/* Rules list */
.rules-list { padding-left: 20px; color: var(--color-text-secondary); font-size: 0.9rem; }
.rules-list li { margin-bottom: 6px; }
.rules-list code { font-size: 0.8125rem; background: var(--color-bg-muted); padding: 1px 5px; border-radius: 3px; }

/* Code blocks */
.code-block {
  background: #1e1e2e;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 12px 0 24px;
}
/* Raw <pre class="code-block"><code> used in guides — give code the right color */
.code-block > code {
  color: #cdd6f4;
  display: block;
  padding: 20px 24px;
  font-size: 0.8125rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}
.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #16161e;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-block__lang { font-size: 0.75rem; color: rgba(255,255,255,0.45); font-family: var(--font-mono); }
.code-block__copy {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.55);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  transition: color 0.15s, border-color 0.15s;
}
.code-block__copy:hover { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.35); }
.code-block__copy.copied { color: #4ade80; border-color: #4ade80; }
.code-block__body { margin: 0; padding: 20px 24px; overflow-x: auto; }
.code-block__body code { color: #cdd6f4; font-size: 0.8125rem; line-height: 1.7; white-space: pre; }

/* ============================================================
   Right: Try It panel
   ============================================================ */
.try-it-panel {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: var(--color-bg-subtle);
  scrollbar-width: thin;
}
/* th:replace in the layout swaps <aside class="try-it-panel"> with
   the fragment root <aside class="try-it-panel__content">, so the
   grid item ends up with this class — apply sticky here too. */
.try-it-panel__content {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 56px;
  right: 0;
  height: calc(100vh - 56px);
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--color-bg-subtle);
  scrollbar-width: thin;
  align-self: start;
}
/* Prevent flex children from shrinking — ensures the panel scrolls
   rather than compressing code blocks (which would clip them via overflow:hidden). */
.try-it-panel__content > * { flex-shrink: 0; }

.panel-placeholder { padding: 40px 24px; text-align: center; }
.panel-placeholder__text { color: var(--color-text-secondary); font-size: 0.875rem; margin-bottom: 16px; line-height: 1.6; }

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px;
  flex-wrap: wrap;
}
.lang-tab {
  padding: 5px 10px;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  transition: background 0.15s, color 0.15s;
}
.lang-tab.active { background: #1e1e2e; color: #cdd6f4; }

/* Try It form */
.try-it-auth { }
.try-it-auth__label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--color-text-secondary); margin-bottom: 6px; }
.try-it-auth__input {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
}
.try-it-auth__input:focus { outline: none; border-color: var(--color-accent); }

/* Try It response */
.try-it-response { }
.try-it-response__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.8125rem; }
.try-it-response__status { font-weight: 600; }
.try-it-response__time { color: var(--color-text-secondary); }

/* ============================================================
   Search modal
   ============================================================ */
.search-modal { position: fixed; inset: 0; z-index: 500; }
.search-modal[hidden] { display: none; }
.search-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.search-modal__dialog {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-modal__input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.search-modal__icon { color: var(--color-text-muted); flex-shrink: 0; }
.search-modal__input {
  flex: 1;
  border: none;
  background: none;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  outline: none;
}
.search-modal__close {
  padding: 3px 8px;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
}
.search-modal__tabs {
  display: flex;
  gap: 2px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-border);
}
.search-tab {
  padding: 5px 12px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  transition: background 0.12s, color 0.12s;
}
.search-tab.active { background: var(--color-bg-muted); color: var(--color-text-primary); }
.search-modal__results { min-height: 200px; max-height: 400px; overflow-y: auto; padding: 8px; }
.search-modal__empty { padding: 40px 20px; text-align: center; color: var(--color-text-muted); font-size: 0.875rem; }
.search-result {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.12s;
}
.search-result:hover, .search-result.is-focused { background: var(--color-bg-muted); }
.search-result__type { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent); margin-bottom: 2px; }
.search-result__title { font-size: 0.9rem; font-weight: 600; color: var(--color-text-primary); }
.search-result__excerpt { font-size: 0.8125rem; color: var(--color-text-secondary); margin-top: 2px; }
.search-result mark { background: #fef08a; color: var(--color-text-primary); border-radius: 2px; }

/* ============================================================
   Overview page components
   ============================================================ */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature-card {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.feature-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-sm); }
.feature-card__icon { margin-bottom: 12px; color: var(--color-accent); }
.feature-card h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 0.875rem; color: var(--color-text-secondary); line-height: 1.6; }

.getting-started-steps { padding-left: 20px; }
.getting-started-steps li { margin-bottom: 14px; font-size: 0.9375rem; line-height: 1.6; }
.getting-started-steps strong { color: var(--color-text-primary); }

.domain-table { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.domain-row { display: grid; grid-template-columns: 1fr 3fr 2fr; padding: 12px 16px; border-bottom: 1px solid var(--color-border); gap: 16px; align-items: center; }
.domain-row:last-child { border-bottom: none; }
.domain-row__name { font-weight: 600; font-size: 0.9375rem; }
.domain-row__desc { font-size: 0.875rem; color: var(--color-text-secondary); }
.domain-row__scope { display: flex; flex-wrap: wrap; gap: 4px; }
.domain-row__scope code { font-size: 0.75rem; background: var(--color-bg-muted); padding: 2px 7px; border-radius: var(--radius-full); }

.base-url-switcher { display: flex; flex-direction: column; gap: 10px; }
.base-url-row { display: flex; align-items: center; gap: 12px; }
.base-url { font-family: var(--font-mono); font-size: 0.875rem; background: var(--color-bg-muted); padding: 6px 12px; border-radius: var(--radius-md); }

.api-domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.api-domain-card {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.api-domain-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-sm); text-decoration: none; }
.api-domain-card--soon { opacity: 0.6; cursor: default; }
.api-domain-card h3 { font-size: 1rem; font-weight: 700; color: var(--color-text-primary); margin-bottom: 8px; }
.api-domain-card p { font-size: 0.875rem; color: var(--color-text-secondary); margin-bottom: 12px; line-height: 1.5; }

/* ============================================================
   Docs hero section
   ============================================================ */
.docs-hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 48px;
}
.docs-hero__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
}
.docs-hero__lead {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 28px;
}
.docs-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   Illustration placeholder blocks
   ============================================================ */
.illustration-block {
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 32px 0;
  background: var(--color-bg-muted);
}
.illustration-block--hero { margin-top: 0; }
.illustration-block__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  margin-bottom: 10px;
}
.illustration-block__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 14px;
}
.illustration-block__brief {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.illustration-block__brief p { margin-bottom: 8px; }
.illustration-block__brief ol, .illustration-block__brief ul {
  padding-left: 20px;
  margin-bottom: 10px;
}
.illustration-block__brief li { margin-bottom: 4px; }

/* ============================================================
   API Ref nav — group-based (apiRefNav)
   ============================================================ */
.docs-nav__tree--api-ref .docs-nav__api-group {
  margin-bottom: 4px;
}
.docs-nav__api-group-header { padding: 0; }
.docs-nav__group-title {
  display: block;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: color 0.15s;
}
.docs-nav__group-title:hover, .docs-nav__group-title.is-active {
  color: var(--color-text-primary);
}
.docs-nav__api-group-body.is-collapsed-group { display: none; }
.docs-nav__item--endpoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 12px 5px 16px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background 0.12s, color 0.12s;
}
.docs-nav__item--endpoint:hover {
  background: var(--color-bg-muted);
  color: var(--color-text-primary);
}
.docs-nav__item--endpoint.is-active {
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  color: var(--color-accent);
  font-weight: 600;
}

/* Docs-only nav section labels */
.docs-nav__section-label {
  padding: 16px 12px 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted, var(--color-text-secondary));
}

/* ============================================================
   Right panel — active endpoint header
   ============================================================ */
.panel-endpoint-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border);
}
.panel-endpoint-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Right panel — URL block
   ============================================================ */
.panel-url-block {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-url-block__base,
.panel-url-block__resolved {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.panel-url-block__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  flex-shrink: 0;
  width: 60px;
}
.panel-url-block__value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-primary);
  word-break: break-all;
}
.panel-url-block__value--path {
  color: var(--color-accent);
  font-weight: 600;
}

/* ============================================================
   Right panel — Credential block
   ============================================================ */
.panel-credentials {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}
.panel-credentials__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.panel-credentials__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
}
.panel-credentials__type {
  font-size: 0.6875rem;
  color: var(--color-text-secondary);
  background: var(--color-bg-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.panel-credentials__input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.panel-credentials__input:focus { border-color: var(--color-accent); }
.panel-credentials__input::placeholder { color: var(--color-text-muted, var(--color-text-secondary)); opacity: 0.6; }

/* ============================================================
   Right panel — Params area
   ============================================================ */
.panel-params {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}
.params-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.panel-params .param-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.param-name {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  min-width: 90px;
}
.param-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
  outline: none;
  transition: border-color 0.15s;
}
.param-input:focus { border-color: var(--color-accent); }

/* ── Body editor ──────────────────────────────────────────────── */
.panel-body-editor {
  border-bottom: 1px solid var(--color-border);
}

/* Header bar — matches .code-block__header dark style */
.body-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  background: #16161e;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.body-editor__label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.45);
  user-select: none;
}
.body-editor__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Format / Reset buttons — same style as .code-block__copy */
.body-editor__btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.55);
  padding: 2px 9px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  transition: color 0.15s, border-color 0.15s;
}
.body-editor__btn:hover {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.35);
}

/* Real-time validity indicator */
.body-editor__validity {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  transition: opacity 0.2s;
  white-space: nowrap; /* ✓ valid 사이 줄바꿈 방지 */
}
.body-editor__validity--valid {
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.35);
}
.body-editor__validity--invalid {
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.35);
}

/* Textarea — dark code editor feel */
.body-editor {
  display: block;
  width: 100%;
  min-height: 240px;
  max-height: 500px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  padding: 16px 18px;
  border: none;
  border-radius: 0;
  background: #1e1e2e;
  color: #cdd6f4;
  resize: none;
  outline: none;
  box-sizing: border-box;
  caret-color: #cdd6f4;
}
.body-editor::placeholder { color: rgba(205,214,244,0.25); }
.body-editor:focus { outline: none; }

/* Full-width resize handle at bottom of editor */
.body-editor__resize-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 10px;
  background: #181825;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  cursor: ns-resize;
  user-select: none;
}
.body-editor__resize-handle::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: rgba(205,214,244,0.2);
}
.body-editor__resize-handle:hover::after {
  background: rgba(205,214,244,0.4);
}

/* Error message below editor */
.body-editor__error {
  padding: 6px 14px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #f87171;
  background: #16161e;
}

/* ── Scope warning ────────────────────────────────────────────── */
.scope-warning {
  margin: 0 16px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: #fef3c7;
  border: 1px solid #fbbf24;
  font-size: 0.75rem;
  font-weight: 500;
  color: #92400e;
}

/* ============================================================
   Right panel — Example response tabs
   ============================================================ */
.panel-example-responses {
  border-top: 1px solid var(--color-border);
  padding-top: 0;
}
.panel-example-responses__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px;
}
.panel-example-responses__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.response-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px 8px;
  flex-wrap: wrap;
}
.response-tab {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
}
.response-tab:hover { border-color: var(--color-border); }
.response-tab.active.status-2xx { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.response-tab.active.status-4xx { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.response-tab.active.status-5xx { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.response-tab.status-2xx { color: #059669; }
.response-tab.status-4xx { color: #d97706; }
.response-tab.status-5xx { color: #dc2626; }

/* ============================================================
   Method badges — extended variants for panel header
   ============================================================ */
.method-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; flex-shrink: 0; }
.method-badge--get    { background: #dcfce7; color: #15803d; }
.method-badge--post   { background: #dbeafe; color: #1d4ed8; }
.method-badge--put    { background: #fef3c7; color: #92400e; }
.method-badge--patch  { background: #ede9fe; color: #5b21b6; }
.method-badge--delete { background: #fee2e2; color: #991b1b; }
.api-domain-card__methods { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================
   Syntax highlighting — "Deep Sea" token colors
   Applied by SyntaxHighlighter.js to .code-block__body code
   and static code blocks in guides.
   ============================================================ */

/* JSON */
.sh-key   { color: #89dceb; }          /* teal — JSON keys */
.sh-str   { color: #ecc48d; }          /* warm sand — string values */
.sh-num   { color: #f78c6c; }          /* coral orange — numbers */
.sh-bool  { color: #c792ea; }          /* soft lavender — true/false/null */
.sh-punct { color: #585b70; }          /* steel gray — {[,:]} */

/* Shell / curl */
.sh-cmd     { color: #89dceb; }        /* teal — curl */
.sh-flag    { color: #f38ba8; }        /* rose — -X -H -d --header */
.sh-url     { color: #f78c6c; }        /* coral — https://... */
.sh-comment { color: #45475a; font-style: italic; }

/* Generic */
.sh-kw  { color: #c792ea; }            /* lavender — language keywords */
.sh-fn  { color: #82aaff; }            /* periwinkle — function calls */
.sh-var { color: #f07178; }            /* pink-red — $variables (PHP) */

/* ============================================================
   ScrollSyncObserver — auto-sync toast notification
   ============================================================ */

.ep-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.08);
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ep-toast[hidden] { display: none; }
.ep-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.ep-toast__msg {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-secondary);
}

.ep-toast__undo {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-accent);
  background: none;
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s;
}
.ep-toast__undo:hover { background: var(--color-accent-light); }

.ep-toast__close {
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 4px;
  font-family: var(--font-sans);
  transition: color 0.15s, background 0.15s;
}
.ep-toast__close:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-muted);
}


/* ============================================================
   Guide & Quickstart page components
   ============================================================ */

/* Callout boxes */
.callout {
  padding: 14px 18px;
  border-radius: 8px;
  border-left: 4px solid transparent;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 20px 0;
}
.callout--info {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e3a5f;
}
.callout--warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #78350f;
}
.callout--success {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #14532d;
}
.callout--danger {
  background: #fef2f2;
  border-color: #ef4444;
  color: #7f1d1d;
}

/* Step header (numbered steps in quickstart) */
.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.step-header h2 {
  margin: 0;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Guide list — styled <ul> with tighter spacing */
.guide-list {
  padding-left: 20px;
  margin: 12px 0;
}
.guide-list li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.guide-list li strong {
  color: var(--color-text-primary);
}

/* Order status flow diagram */
.status-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.status-flow__arrow {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-badge--pending  { background: #fef9c3; color: #854d0e; }
.status-badge--progress { background: #dbeafe; color: #1e40af; }
.status-badge--complete { background: #d1fae5; color: #065f46; }
.status-badge--failed   { background: #fee2e2; color: #991b1b; }
.status-badge--canceled { background: #f3f4f6; color: #374151; }

/* Next-steps grid at the bottom of quickstart / guide pages */
.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.next-step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  background: var(--color-bg);
}
.next-step-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  background: var(--color-bg-muted);
  text-decoration: none;
}
.next-step-card__icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.next-step-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.next-step-card p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Parameter row table (used in email-customization guide) */
.param-table.param-row-table,
div.param-table {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0;
  font-size: 0.875rem;
}
.param-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr 3fr;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
}
.param-row:last-child { border-bottom: none; }
.param-row > div {
  padding: 10px 14px;
  border-right: 1px solid var(--color-border);
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.param-row > div:last-child { border-right: none; }
/* Span last cell across remaining columns for 2- or 3-column rows */
.param-row > div:last-child:nth-child(2) { grid-column: 2 / -1; }
.param-row > div:last-child:nth-child(3) { grid-column: 3 / -1; }
.param-row--header > div {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-bg-muted);
}

/* ── FieldTree ────────────────────────────────────────────────────────────── */

.field-tree {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.875rem;
  margin-top: 8px;
}

/* Controls bar */
.ft-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--color-bg-muted);
  border-bottom: 1px solid var(--color-border);
}
.ft-controls__count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-right: auto;
}
.ft-btn {
  padding: 3px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1.4;
}
.ft-btn:hover { background: var(--color-bg-subtle); }

/* Column header */
.ft-header {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1fr 2.5fr;
  background: var(--color-bg-muted);
  border-bottom: 1px solid var(--color-border);
}
.ft-header > div {
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

/* Body */
.ft-body { background: var(--color-bg); }

/* Node row */
.ft-node__row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1fr 2.5fr;
  align-items: center;
  padding: 0;
  border-bottom: 1px solid var(--color-border);
  min-height: 42px;
  transition: background 0.1s;
}
.ft-node:last-child > .ft-node__row { border-bottom: none; }
.ft-node--parent > .ft-node__row { cursor: pointer; }
.ft-node--parent > .ft-node__row:hover { background: var(--color-bg-subtle); }

/* Name cell */
.ft-name-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}
.ft-indent { flex-shrink: 0; display: inline-block; }

/* Chevron toggle */
.ft-toggle {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}
.ft-toggle svg { display: block; width: 100%; height: 100%; }
.ft-toggle--leaf { opacity: 0; pointer-events: none; }
.ft-toggle--open { transform: rotate(90deg); }

/* Field name */
.ft-name {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  background: none;
  padding: 0;
}

/* Type — plain monospace text, color-coded but no background badge */
.ft-type {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8rem;
  font-weight: 400;
}
.ft-type--string  { color: #2563eb; }
.ft-type--number  { color: #b45309; }
.ft-type--integer { color: #b45309; }
.ft-type--boolean { color: #7c3aed; }
.ft-type--object  { color: #15803d; }
.ft-type--array   { color: #3730a3; }
.ft-type--unknown { color: var(--color-text-muted); }

/* Required — small muted text, no background badge */
.ft-req {
  font-size: 0.75rem;
  font-weight: 400;
}
.ft-req--yes  { color: #b91c1c; }
.ft-req--opt  { color: var(--color-text-muted); }
.ft-req--cond { color: #b45309; font-style: italic; }

/* Description cell */
.ft-desc-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.ft-desc { flex: 1; min-width: 0; }
.ft-summary {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* Children container & guide line */
.ft-node__children {
  position: relative;
}
.ft-node__children::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ft-guide-x, 22px);
  width: 1px;
  background: var(--color-border);
  pointer-events: none;
}
.ft-node__children.is-collapsed { display: none; }

/* Depth-based subtle row shading */
.ft-node--depth-1 > .ft-node__row { background: color-mix(in srgb, var(--color-bg-subtle) 40%, transparent); }
.ft-node--depth-2 > .ft-node__row { background: color-mix(in srgb, var(--color-bg-subtle) 70%, transparent); }
.ft-node--depth-3 > .ft-node__row { background: color-mix(in srgb, var(--color-bg-subtle) 90%, transparent); }
.ft-node--depth-1.ft-node--parent > .ft-node__row:hover,
.ft-node--depth-2.ft-node--parent > .ft-node__row:hover,
.ft-node--depth-3.ft-node--parent > .ft-node__row:hover { filter: brightness(0.97); }

/* ============================================================
   Expandable nav items (Sending Rewards, Balance sub-steps)
   ============================================================ */
.docs-nav__expandable-item {
  display: flex;
  flex-direction: column;
}
.docs-nav__expandable-item .docs-nav__section-body {
  padding-bottom: 4px;
}
.docs-nav__item--expandable {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.docs-nav__expandable-arrow {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
  transform: rotate(-90deg); /* collapsed: pointing right */
}
/* When the sibling section-body is NOT collapsed → arrow points down */
.docs-nav__expandable-item:has(.docs-nav__section-body:not(.is-collapsed)) .docs-nav__expandable-arrow {
  transform: rotate(0deg);
  color: var(--color-text-secondary);
}
.docs-nav__item--sub {
  padding-left: 20px !important;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* ============================================================
   Guide section anchor scroll offset
   ============================================================ */
.docs-section[id] {
  scroll-margin-top: 80px;
}

/* ============================================================
   Beta callout (overview hero)
   ============================================================ */
.callout--beta {
  background: #f5f3ff;
  border-left: 3px solid var(--color-accent);
  color: #3b2f9e;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-top: 20px;
  line-height: 1.6;
}
.callout--beta a { color: var(--color-accent); }
.callout--beta a:hover { text-decoration: underline; }

/* ============================================================
   Code line highlight (used in guide code blocks)
   ============================================================ */
.code-line--highlight {
  display: block;
  background: rgba(255, 255, 150, 0.10);
  margin: 0 -24px;
  padding: 0 24px;
  border-left: 2px solid rgba(255, 220, 50, 0.6);
}

/* ============================================================
   Guide inline endpoint pill
   ============================================================ */
.endpoint-path-inline {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-primary);
}
.code-pill {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

/* ============================================================
   Catalog lookup cards (Sending Rewards — Step 1)
   ============================================================ */
.catalog-lookup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 24px;
}
@media (max-width: 600px) {
  .catalog-lookup-grid { grid-template-columns: 1fr; }
}
.catalog-lookup-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--color-bg-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.catalog-lookup-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}
.catalog-lookup-card p strong {
  color: var(--color-text-primary);
}
.catalog-lookup-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-accent);
  text-decoration: none;
  padding: 5px 10px;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);
  transition: background 0.15s, border-color 0.15s;
  align-self: flex-start;
}
.catalog-lookup-link:hover {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--color-accent) 35%, transparent);
  text-decoration: none;
}
.catalog-lookup-link code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: none;
  padding: 0;
  color: inherit;
}
.catalog-lookup-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ============================================================
   Guide step heading
   ============================================================ */
.guide-step-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 6px;
}

/* ============================================================
   Payment methods table (Balance guide)
   ============================================================ */
.guide-section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 32px 0;
}

/* ============================================================
   Docs footer
   ============================================================ */
.docs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 32px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.docs-footer__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.docs-footer__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.docs-footer__links a:hover {
  color: var(--color-text-primary);
}

/* Try It panel — subtle flash on endpoint change */
@keyframes panelFlash {
  0%   { opacity: 0.6; }
  100% { opacity: 1; }
}
.panel--flash {
  animation: panelFlash 0.25s ease-out;
}

