/* =====================================================================
   XOORA — Design System
   Tokens, base styles, and shared components (navbar, footer, buttons,
   cards, badges, code blocks). Loaded on every page before the
   page-specific stylesheet.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;

  /* ---- Color: surfaces ---- */
  --bg: #ffffff;
  --bg-soft: #f4f7fd;
  --bg-alt: #eef2fb;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --border: #e3e9f5;
  --border-strong: #d3ddf3;
  --overlay: rgba(16, 26, 52, 0.5);

  /* ---- Color: text ---- */
  --text-primary: #101a34;
  --text-secondary: #4a5368; /* UX: kontras >= 7:1 di atas --bg */
  --text-tertiary: #5f6982; /* UX: kontras >= 4.5:1 (WCAG AA) */
  --text-on-accent: #ffffff;

  /* ---- Color: brand + accents ---- */
  --accent: #2f6fed;
  --accent-hover: #2558c9;
  --accent-soft: #eaf1ff;
  --accent-soft-strong: #dbe8ff;
  --cyan: #06b6d4;
  --cyan-soft: #e3f9fc;
  --violet: #7c6ff0;
  --violet-soft: #efedfe;
  --lime: #bbe63a;

  /* ---- Color: status ---- */
  --success: #15803d; /* UX: teks status hijau lulus AA di atas tint */
  --success-soft: #e7f8ee;
  --danger: #c62d32;
  --danger-soft: #fdecec;
  --warning: #8f5d0c;
  --warning-soft: #fdf3e3;

  /* ---- Code ---- */
  --code-bg: #0b1220;
  --code-bg-2: #0e1a2f;
  --code-text: #dbe4f3;
  --code-border: #1c2a44;
  --code-muted: #5c6f92;

  /* tokens used by hand-authored syntax highlighting */
  --tok-kw: #6db4ff;
  --tok-str: #ffcb6b;
  --tok-num: #c3a4ff;
  --tok-func: #7ee8c7;
  --tok-comment: #5c6f92;
  --tok-punct: #8fa3c8;

  /* ---- Radius ---- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* ---- Shadow ---- */
  --shadow-sm: 0 1px 2px rgba(16, 26, 52, 0.05);
  --shadow-md: 0 10px 30px rgba(16, 26, 52, 0.07);
  --shadow-lg: 0 24px 60px rgba(16, 26, 52, 0.12);

  /* ---- Type ---- */
  --font-display: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  /* ---- Layout ---- */
  --container-max: 1280px;
  --nav-height: 72px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: calc(160ms * var(--speed, 1)) var(--ease);
  --t-med: calc(280ms * var(--speed, 1)) var(--ease);
}

[data-theme='dark'] {
  color-scheme: dark;

  --bg: #090d17;
  --bg-soft: #0c1120;
  --bg-alt: #0f1526;
  --surface: #101728;
  --surface-2: #141d33;
  --border: #212c46;
  --border-strong: #2b3a5c;
  --overlay: rgba(3, 6, 14, 0.65);

  --text-primary: #eef2fb;
  --text-secondary: #a4aec6;
  --text-tertiary: #8b98b6; /* UX: kontras >= 4.5:1 di mode gelap */

  --accent: #5088ff;
  --accent-hover: #6f9dff;
  --accent-soft: #16223f;
  --accent-soft-strong: #1b2a4d;
  --cyan: #22d3ee;
  --cyan-soft: #102830;
  --violet: #9c8fff;
  --violet-soft: #201d42;

  --success: #35c470;
  --success-soft: #0f2a1c;
  --danger: #ff6b6f;
  --danger-soft: #34161a;
  --warning: #f0b429;
  --warning-soft: #332510;

  --code-bg: #05070d;
  --code-bg-2: #080c17;
  --code-border: #1a2438;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* =====================================================================
   Reset + base
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: calc(0.001ms * var(--speed, 1)) !important;
    animation-iteration-count: 1 !important;
    transition-duration: calc(0.001ms * var(--speed, 1)) !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--t-med), color var(--t-med);
}

img { max-width: 100%; display: block; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-primary); margin: 0; line-height: 1.2; }
p { margin: 0; }
code, pre { font-family: var(--font-mono); }

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }
@media (min-width: 1200px) { .container { padding: 0 40px; } }

.section { padding: 56px 0; }
@media (min-width: 1024px) { .section { padding: 88px 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px 5px 10px;
  border-radius: var(--r-pill);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
@media (min-width: 48rem) { .section-head h2 { font-size: 1.625rem; } }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8438rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  transition: gap var(--t-fast);
}
.link-arrow:hover { gap: 9px; }
.link-arrow svg { width: 15px; height: 15px; }

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

.icon {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* =====================================================================
   Decorative sci-fi bits (used sparingly)
   ===================================================================== */
.deco-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}

.spark { color: var(--accent); }

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35); }
  70% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 20px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 111, 237, 0.28);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-soft); }

.btn-sm { --btn-h: 2.125rem; padding: 0 0.875rem; font-size: 0.8125rem; border-radius: 0.5rem; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--r-sm); }

/* =====================================================================
   Cards + badges
   ===================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  line-height: 1.6;
}
.badge svg { width: 11px; height: 11px; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-info { background: var(--accent-soft); color: var(--accent); }
.badge-neutral { background: var(--bg-soft); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-method {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-soft);
  color: var(--accent);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.status-dot.is-live { animation: pulse-dot calc(2.2s * var(--speed, 1)) ease-out infinite; }

/* =====================================================================
   Navbar
   ===================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.nav.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (min-width: 768px) { .nav-inner { padding: 0 32px; } }
@media (min-width: 1200px) { .nav-inner { padding: 0 40px; } }

.brand { display: flex; align-items: center; gap: 8px; }
.brand img { height: 26px; width: auto; }
@media (min-width: 768px) { .brand img { height: 28px; } }

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 900px) {
  .nav-links { display: flex; }
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-soft); }
.nav-link.is-active { color: var(--accent); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-actions .btn-primary { display: none; }
@media (min-width: 900px) { .nav-actions .btn-primary { display: inline-flex; } }

.nav-icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
}
@media (min-width: 900px) { .nav-icon-btn { display: inline-flex; } }
.nav-icon-btn:hover { color: var(--text-primary); background: var(--bg-soft); border-color: var(--border); }
.nav-icon-btn svg { width: 19px; height: 19px; }
.nav-icon-btn .dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  border: 1.5px solid var(--surface);
}

.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
}
@media (min-width: 900px) { .nav-avatar { display: inline-flex; } }
.nav-avatar svg { width: 18px; height: 18px; }

.nav-toggle {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}
@media (min-width: 900px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 19px; height: 19px; }

/* Popovers used by the notification / avatar buttons */
.nav-pop {
  position: absolute;
  top: calc(var(--nav-height) - 8px);
  right: 20px;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 70;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.nav-pop.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav-pop p { font-size: 0.8125rem; color: var(--text-secondary); }
.nav-pop .nav-pop-title { font-size: 0.8125rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.375rem; }
.nav-pop a.nav-pop-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; margin: 0 -8px;
  border-radius: 0.5rem; font-size: 0.8125rem; font-weight: 500;
  color: var(--text-secondary);
}
.nav-pop a.nav-pop-link:hover { background: var(--bg-soft); color: var(--text-primary); }
.nav-pop a.nav-pop-link svg { width: 15px; height: 15px; }

/* Mobile drawer (nav) */
.drawer-scrim {
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}
.drawer-scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(84vw, 340px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 90;
  padding: 18px;
  transform: translateX(100%);
  transition: transform var(--t-med);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer.is-open { transform: translateX(0); }
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer-close {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer;
}
.drawer-close svg { width: 17px; height: 17px; }
.drawer-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px;
  border-radius: var(--r-sm);
  font-weight: 600; font-size: 0.9375rem;
  color: var(--text-secondary);
}
.drawer-link svg { width: 18px; height: 18px; }
.drawer-link.is-active { color: var(--accent); background: var(--accent-soft); }
.drawer-divider { height: 1px; background: var(--border); margin: 10px 0; }
.drawer-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.drawer-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; }
.drawer-row span { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 600; }

body.drawer-open { overflow: hidden; }

/* Theme toggle switch */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text-primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
[data-theme='dark'] .theme-toggle .icon-sun { display: block; }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 44px 0 28px;
}
.footer-top {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  padding-bottom: 28px;
}
@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
}
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.8438rem; max-width: 20rem; }
.footer-col h4 {
  font-size: 0.7812rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-weight: 700;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 0.8438rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.7812rem;
  color: var(--text-tertiary);
}
.footer-bottom .status-dot { display: inline-block; margin-right: 6px; }
.footer-bottom a { color: var(--text-secondary); font-weight: 600; }
.footer-bottom a:hover { color: var(--accent); }
.footer-status { display: inline-flex; align-items: center; font-weight: 600; }
.footer-status:hover { color: var(--accent); }
.footer-status .status-dot { margin-right: 7px; }

/* =====================================================================
   Code blocks (shared by Docs + Playground)
   ===================================================================== */
.code-card {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--code-border);
  background: var(--code-bg-2);
}
.code-card-title {
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--code-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.code-tabs { display: flex; gap: 2px; }
.code-tab {
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 6px;
  color: var(--code-muted);
  background: transparent;
  border: none;
  cursor: pointer;
}
.code-tab.is-active { background: rgba(255,255,255,0.08); color: #fff; }

.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--code-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--code-border);
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.code-copy:hover { color: #fff; border-color: rgba(255,255,255,0.2); }
.code-copy svg { width: 13px; height: 13px; }
.code-copy.is-copied { color: var(--success); border-color: var(--success); }

.code-body { overflow-x: auto; }
.code-pre {
  margin: 0;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--code-text);
  white-space: pre;
  tab-size: 2;
}
.code-pre .ln {
  display: inline-block;
  width: 20px;
  margin-right: 14px;
  color: #3a4a6b;
  text-align: right;
  user-select: none;
}
.tok-kw { color: var(--tok-kw); }
.tok-str { color: var(--tok-str); }
.tok-num { color: var(--tok-num); }
.tok-func { color: var(--tok-func); }
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-punct { color: var(--tok-punct); }

.kbd {
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  font-size: 0.8438rem;
  line-height: 1.65;
}
.callout svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.callout-info { background: var(--accent-soft); color: var(--text-primary); border-color: var(--accent-soft-strong); }
.callout-info svg { color: var(--accent); }
.callout a { color: var(--accent); font-weight: 600; }
.callout p + p { margin-top: 8px; }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.8438rem; min-width: 30rem; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); background: var(--bg-soft); }
.doc-table tr:last-child td { border-bottom: none; }
.doc-table code { font-family: var(--font-mono); font-size: 0.7812rem; background: var(--bg-soft); padding: 0.0625rem 0.375rem; border-radius: 0.3125rem; }

/* Left-anchored drawer variant (used by the Docs sections drawer) */
.drawer.drawer--left { left: 0; right: auto; border-left: none; border-right: 1px solid var(--border); transform: translateX(-100%); }
.drawer.drawer--left.is-open { transform: translateX(0); }

/* =====================================================================
   Empty states
   ===================================================================== */
.empty-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: var(--r-sm);
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.8438rem;
  font-weight: 600;
}
.empty-state svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Placeholder copy shown inside an otherwise-code <pre> block */
.placeholder-note {
  color: var(--code-muted) !important;
  font-family: var(--font-body) !important;
  white-space: normal !important;
  font-size: 0.8125rem !important;
  padding: 22px 16px !important;
}

/* =====================================================================
   Small utility spinner
   ===================================================================== */
.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: spin-slow calc(0.7s * var(--speed, 1)) linear infinite;
}

/* Toast (used for "copied" / lightweight confirmations) */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transition: opacity var(--t-fast), transform var(--t-fast);
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
