/* xAI Docs Master Stylesheet - Universal Sans & Geist Mono */

@font-face {
  font-family: 'UniversalSans';
  src: url('./fonts/UniversalSans_Text_400-s.p.0kzgqcuw2bgx3.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'UniversalSans';
  src: url('./fonts/UniversalSans_Text_400Italic-s.p.2is42k878j3i9.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'UniversalSans';
  src: url('./fonts/UniversalSans_Text_550-s.p.2oz54pkhn1rbr.woff2') format('woff2');
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'UniversalSansDisplay';
  src: url('./fonts/UniversalSans_Display_550-s.p.1d_5desmfkuzx.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GeistMono';
  src: url('./fonts/GeistMono_Variable.p.42jdkyb02hb3d.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-page: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-card: #f9f8f6;
  --bg-card-hover: #f3f2ef;
  --bg-terminal: #0d0e11;
  --bg-terminal-header: #131418;
  --bg-input: #f4f4f5;
  --bg-pill-active: #09090b;
  --text-pill-active: #ffffff;
  --bg-pill-inactive: transparent;
  --text-pill-inactive: #71717a;
  --border-color: rgba(228, 228, 231, 0.8);
  --border-subtle: #f0f0f2;
  --border-card: #e5e5e8;
  --text-primary: #09090b;
  --text-secondary: #71717a;
  --text-muted: #a1a1aa;
  --scrollbar-track: #ededf0;
  --scrollbar-thumb: #b9bac1;
  --scrollbar-thumb-hover: #9899a2;
  --surface-raised: rgba(255, 255, 255, 0.78);
  --surface-glass: rgba(249, 248, 246, 0.82);
  --shadow-soft: 0 18px 45px rgba(24, 24, 27, 0.08), 0 2px 7px rgba(24, 24, 27, 0.035);
  --shadow-floating: 0 30px 80px rgba(24, 24, 27, 0.2), 0 8px 22px rgba(24, 24, 27, 0.1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Exact Solar Orange Badge tokens */
  --solar: hsl(22, 100%, 52%);
  --solar-border: rgba(255, 93, 5, 0.28);
  --solar-bg: rgba(255, 93, 5, 0.04);
  
  --topbar-height: 64px;
  --sidebar-width: 270px;
}

html.dark {
  --bg-page: #09090b;
  --bg-sidebar: #09090b;
  --bg-card: #141417;
  --bg-card-hover: #1a1a1e;
  --bg-terminal: #09090b;
  --bg-terminal-header: #101014;
  --bg-input: #18181b;
  --bg-pill-active: #ffffff;
  --text-pill-active: #09090b;
  --bg-pill-inactive: transparent;
  --text-pill-inactive: #a1a1aa;
  --border-color: #27272a;
  --border-subtle: #1f1f23;
  --border-card: #27272a;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --scrollbar-track: #18181b;
  --scrollbar-thumb: #3f3f46;
  --scrollbar-thumb-hover: #52525b;
  --surface-raised: rgba(24, 24, 27, 0.8);
  --surface-glass: rgba(20, 20, 23, 0.84);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.26), 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-floating: 0 32px 90px rgba(0, 0, 0, 0.58), 0 8px 24px rgba(0, 0, 0, 0.3);
  
  --solar: hsl(22, 100%, 55%);
  --solar-border: rgba(255, 100, 15, 0.32);
  --solar-bg: rgba(255, 100, 15, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: 'UniversalSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.16s var(--ease-smooth), color 0.16s var(--ease-smooth);
}

::selection {
  color: var(--bg-page);
  background: var(--text-primary);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* Typography */
h1, h2, h3, .font-display {
  font-family: 'UniversalSansDisplay', 'UniversalSans', sans-serif;
  letter-spacing: -0.025em;
  font-weight: 550;
}

.font-mono {
  font-family: 'GeistMono', monospace;
}

/* Header */
.top-header {
  height: var(--topbar-height);
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
  flex-shrink: 0;
  transition: background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo {
  display: flex;
  align-items: center;
  width: 40px;
  height: 40px;
  color: var(--text-primary);
  text-decoration: none;
}

.mciair-logo-mark {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  isolation: isolate;
}

.mciair-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transition: filter 0.2s var(--ease-smooth);
}

html.dark .mciair-logo-mark img {
  filter: invert(1);
}

.mciair-logo-mark::after {
  position: absolute;
  z-index: 1;
  content: "";
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, #f17836 6%, #f6b15c 34%, #5079ee 67%, #274bc7 96%);
  background-position: 0% 0%;
  background-size: 180% 180%;
  mask: url("./assets/mciair-logo-mark.png") center / contain no-repeat;
  -webkit-mask: url("./assets/mciair-logo-mark.png") center / contain no-repeat;
  pointer-events: none;
  animation: mciair-logo-gradient-pass 1520ms cubic-bezier(0.4, 0, 0.2, 1) 420ms both;
  will-change: opacity, background-position, background-size;
}

@keyframes mciair-logo-gradient-pass {
  0%,
  18% {
    opacity: 0;
    background-position: 0% 0%;
    background-size: 180% 180%;
    filter: saturate(0.96);
  }
  38% {
    opacity: 1;
    background-position: 18% 20%;
    background-size: 156% 156%;
    filter: saturate(1.02);
  }
  72% {
    opacity: 1;
    background-position: 68% 62%;
    background-size: 112% 112%;
    filter: saturate(1.06);
  }
  100% {
    opacity: 0;
    background-position: 50% 50%;
    background-size: 100% 100%;
    filter: saturate(1);
  }
}

.docs-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.16s var(--ease-smooth), background-color 0.16s var(--ease-smooth);
}

.docs-dropdown-btn:hover {
  background: var(--bg-card-hover);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid transparent;
  color: color-mix(in srgb, var(--text-primary) 36%, transparent);
  cursor: pointer;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.16s var(--ease-smooth), background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), transform 0.25s var(--ease-out-expo);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: rotate(-10deg) scale(1.04);
}

.theme-toggle-btn:active {
  transform: scale(0.92);
}

.theme-toggle-btn.is-animating svg {
  animation: theme-icon-turn 0.34s var(--ease-out-expo);
}

.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--text-primary) 16%, transparent);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 200px;
  transition: border-color 0.15s var(--ease-smooth), color 0.15s var(--ease-smooth), background-color 0.15s var(--ease-smooth), transform 0.2s var(--ease-out-expo), box-shadow 0.2s var(--ease-out-expo);
}

.search-trigger-btn:hover {
  border-color: color-mix(in srgb, var(--text-primary) 32%, transparent);
  color: var(--text-primary);
  background: var(--bg-card);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--text-primary) 6%, transparent);
  transform: translateY(-1px);
}

.kbd-shortcut {
  font-family: 'GeistMono', monospace;
  font-size: 11px;
  background: transparent;
  color: var(--text-muted);
  margin-left: auto;
}

.btn-console {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--text-primary);
  color: var(--bg-page);
  border: none;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}

.btn-console:hover {
  opacity: 0.9;
}

/* App Layout Grid */
.app-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - var(--topbar-height));
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 24px 16px 40px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  transition: background-color 0.2s, border-color 0.2s;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 9999px;
  background: var(--scrollbar-thumb);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.sidebar-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding: 0 8px;
  letter-spacing: -0.01em;
}

.sidebar-group-home {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
}

.sidebar-nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.sidebar-nav-item.active {
  color: var(--text-primary);
  background: var(--bg-card);
  font-weight: 500;
}

/* Solar Orange Badge */
.badge-orange {
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  color: var(--solar);
  border: 1px solid var(--solar-border);
  background-color: var(--solar-bg);
  padding: 2px 7px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  letter-spacing: 0.01em;
}

.badge-orange-large {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  color: var(--solar);
  border: 1px solid var(--solar-border);
  background-color: var(--solar-bg);
  padding: 3px 9px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.01em;
}

/* Main Content Area */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px 80px;
  background: var(--bg-page);
  transition: background-color 0.2s;
}

.main-content::-webkit-scrollbar {
  width: 6px;
}
.main-content::-webkit-scrollbar-thumb {
  background: rgba(125, 125, 125, 0.2);
  border-radius: 3px;
}

.content-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* Hero Overview Card */
.hero-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 92%, var(--bg-page)) 0%, var(--bg-card) 60%, color-mix(in srgb, var(--bg-card) 90%, var(--text-primary)) 160%);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1.05fr 1.35fr;
  gap: 36px;
  align-items: center;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bg-page) 66%, transparent) inset;
  transition: background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), box-shadow 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
}

.hero-card:hover {
  border-color: color-mix(in srgb, var(--text-primary) 14%, var(--border-card));
  box-shadow: var(--shadow-soft), 0 1px 0 color-mix(in srgb, var(--bg-page) 66%, transparent) inset;
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
}

.hero-left-title {
  font-size: 44px;
  line-height: 1.1;
  margin-bottom: 16px;
  font-weight: 550;
}

.hero-left-title span {
  color: var(--text-secondary);
}

.hero-left-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.hero-btn-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-pill-black {
  background: var(--text-primary);
  color: var(--bg-page);
  border: 1px solid var(--text-primary);
  border-radius: 9999px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bg-page) 25%, transparent) inset, 0 2px 6px color-mix(in srgb, var(--text-primary) 13%, transparent);
  transition: opacity 0.15s var(--ease-smooth), transform 0.22s var(--ease-out-expo), box-shadow 0.22s var(--ease-out-expo);
}

.btn-pill-black:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bg-page) 25%, transparent) inset, 0 7px 14px color-mix(in srgb, var(--text-primary) 17%, transparent);
}

.btn-pill-black:active,
.btn-pill-outline:active {
  transform: translateY(0) scale(0.975);
}

.btn-pill-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: 9999px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.15s var(--ease-smooth), border-color 0.15s var(--ease-smooth), transform 0.22s var(--ease-out-expo), box-shadow 0.22s var(--ease-out-expo);
}

.btn-pill-outline:hover {
  border-color: var(--text-primary);
  background: var(--bg-card-hover);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--text-primary) 6%, transparent);
  transform: translateY(-1px);
}

/* Generic block CTA buttons */
.block-ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.block-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--text-primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), color 0.16s var(--ease-smooth), transform 0.2s var(--ease-out-expo);
}

.block-cta--primary {
  background: var(--text-primary);
  color: var(--bg-page);
}

.block-cta--secondary {
  background: transparent;
  color: var(--text-primary);
}

.block-cta:hover {
  transform: translateY(-1px);
}

.block-cta--secondary:hover {
  background: color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.custom-card--cta .block-ctas {
  margin-top: auto;
  padding-top: 18px;
}

.page-block--code > .block-ctas {
  padding-right: 2px;
  padding-left: 2px;
}

body.is-editor-mode [data-cta-link] {
  position: relative;
  outline: 1px dashed color-mix(in srgb, var(--solar) 72%, transparent);
  outline-offset: 3px;
}

/* Code Terminal Component */
.terminal-card {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  font-family: 'GeistMono', monospace;
  transform: translateZ(0);
}

.terminal-header {
  background: #121212;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-tabs {
  display: flex;
  gap: 12px;
  position: relative;
  align-items: center;
}

.terminal-tab-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: auto;
  height: 16px;
  width: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  pointer-events: none;
  transition: opacity 0.16s var(--ease-smooth);
  opacity: 0;
}

.terminal-tabs.is-ready .terminal-tab-indicator {
  opacity: 1;
}

.terminal-tab-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'GeistMono', monospace;
  font-size: 12px;
  line-height: 16px;
  padding: 0 4px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s var(--ease-smooth), text-shadow 0.15s var(--ease-smooth);
}

.terminal-tab-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.terminal-tab-btn.active {
  color: #ffffff;
  text-shadow: none;
}

.terminal-tab-btn.active::after {
  content: none;
}

.copy-icon-btn {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.copy-icon-btn:hover {
  color: #ffffff;
}

.terminal-body {
  padding: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 13px;
  line-height: 1.625;
  color: #e1e4e8;
  min-height: 320px;
  background: transparent;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.terminal-body::-webkit-scrollbar {
  display: none;
}

.terminal-body pre {
  margin: 0;
  font-family: inherit;
  white-space: pre;
  transform-origin: 50% 0;
  transition: opacity 0.12s var(--ease-smooth), filter 0.12s var(--ease-smooth), transform 0.12s var(--ease-smooth);
}

.terminal-card.is-swapping .terminal-body pre {
  opacity: 0;
  filter: blur(3px);
  transform: translateY(-5px) scale(0.99);
}

.terminal-card.is-code-entering .terminal-body pre {
  animation: code-content-in 0.28s var(--ease-out-expo) both;
}

/* Syntax Highlighting */
.syn-cmd,
.syn-fn { color: #b392f0; }
.syn-flag,
.syn-val { color: #79b8ff; }
.syn-str { color: #9ecbff; }
.syn-key { color: #ffab70; }
.syn-kw,
.syn-operator { color: #f97583; }
.syn-comment { color: #6a737d; font-style: italic; }
.syn-env { color: #e1e4e8; }

/* Models Section */
.section-title {
  font-size: 28px;
  margin-bottom: 24px;
  font-weight: 550;
}

.models-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Grok 4.6 Flagship Card */
.model-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bg-page) 58%, transparent) inset;
  transition: background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), box-shadow 0.25s var(--ease-out-expo), transform 0.25s var(--ease-out-expo);
}

.model-hero-card:hover,
.api-card:hover,
.jump-interactive-box:hover {
  border-color: color-mix(in srgb, var(--text-primary) 15%, var(--border-card));
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .model-hero-card {
    grid-template-columns: 1fr;
  }
}

.model-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.model-title {
  font-size: 22px;
  font-weight: 550;
}

.model-id-tag {
  font-family: 'GeistMono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 16px;
}

.model-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.spec-table tr {
  border-bottom: 1px solid var(--border-color);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: 10px 0;
}

.spec-table td:first-child {
  color: var(--text-secondary);
}

.spec-table td:last-child {
  text-align: right;
  font-weight: 500;
  color: var(--text-primary);
}

/* 2-Column API Cards */
.api-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .api-cards-grid {
    grid-template-columns: 1fr;
  }
}

.api-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bg-page) 58%, transparent) inset;
  transition: background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), box-shadow 0.25s var(--ease-out-expo), transform 0.25s var(--ease-out-expo);
}

.api-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.api-card-title {
  font-size: 20px;
  font-weight: 550;
}

.api-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 40px;
}

.api-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.api-card-actions .btn-pill-black,
.api-card-actions .btn-pill-outline {
  width: 100%;
  justify-content: center;
}

/* Jump straight in Section */
.jump-section-header {
  margin-bottom: 24px;
}

.jump-section-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.category-pills {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--bg-card) 88%, var(--bg-page));
  padding: 3px;
  border-radius: 9999px;
  width: max-content;
  border: 1px solid var(--border-card);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bg-page) 72%, transparent) inset, 0 3px 9px color-mix(in srgb, var(--text-primary) 4%, transparent);
  position: relative;
  isolation: isolate;
  transition: background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
}

.category-pills:hover {
  border-color: color-mix(in srgb, var(--text-primary) 16%, var(--border-card));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bg-page) 72%, transparent) inset, 0 6px 18px color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.category-pill-indicator {
  position: absolute;
  z-index: 0;
  inset: 3px auto 3px 3px;
  width: 0;
  border-radius: 9999px;
  background: var(--bg-pill-active);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text-pill-active) 18%, transparent) inset, 0 3px 8px color-mix(in srgb, var(--text-primary) 22%, transparent);
  transform: translateX(var(--indicator-x, 0));
  transition: width 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth), opacity 0.14s var(--ease-smooth);
  opacity: 0;
}

.category-pills.is-ready .category-pill-indicator {
  opacity: 1;
}

.category-pill-btn {
  background: var(--bg-pill-inactive);
  color: var(--text-pill-inactive);
  border: none;
  border-radius: 9999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.2s var(--ease-smooth), transform 0.2s var(--ease-out-expo);
}

.category-pill-btn > span {
  display: block;
  transition: transform 0.2s var(--ease-out-expo), filter 0.2s var(--ease-smooth), opacity 0.2s var(--ease-smooth);
}

.category-pill-btn:not(.active):hover {
  color: color-mix(in srgb, var(--text-primary) 68%, transparent);
}

.category-pill-btn:active > span {
  transform: scale(0.94);
}

.category-pill-btn.active {
  color: var(--text-pill-active);
}

.jump-interactive-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bg-page) 58%, transparent) inset;
  transition: background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), box-shadow 0.25s var(--ease-out-expo), transform 0.25s var(--ease-out-expo);
}

@media (max-width: 900px) {
  .jump-interactive-box {
    grid-template-columns: 1fr;
  }
}

.jump-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 28px;
}

.jump-features-list li {
  font-size: 13.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Resource Links 3-Col Grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 48px;
}

@media (max-width: 800px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }

  .editor-footer-catalog-header,
  .editor-footer-link-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.resource-col-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.resource-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  transition: all 0.15s;
}

.resource-links a:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* Search Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 14, 0.22);
  backdrop-filter: blur(2px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-smooth), visibility 0s linear 0.2s, backdrop-filter 0.2s var(--ease-smooth);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.search-dialog {
  display: flex;
  width: 100%;
  max-width: 1000px;
  max-height: calc(100dvh - 48px);
  flex-direction: column;
  background: var(--surface-glass);
  border: 1px solid color-mix(in srgb, var(--text-primary) 15%, var(--border-card));
  border-radius: 12px;
  box-shadow: var(--shadow-floating), 0 1px 0 color-mix(in srgb, var(--bg-page) 65%, transparent) inset;
  overflow: hidden;
  backdrop-filter: blur(22px) saturate(140%);
  transform: translateY(-12px) scale(0.985);
  transform-origin: 50% 0;
  opacity: 0;
  transition: transform 0.26s var(--ease-out-expo), opacity 0.18s var(--ease-smooth);
}

.modal-overlay.open .search-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.search-dialog-header {
  display: flex;
  align-items: center;
  height: 50px;
  min-height: 50px;
  flex: 0 0 50px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.search-dialog-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
}

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

.search-close-key {
  flex-shrink: 0;
  padding: 3px 6px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-muted);
  font-family: 'GeistMono', monospace;
  font-size: 10px;
  cursor: pointer;
  transition: color 0.15s var(--ease-smooth), border-color 0.15s var(--ease-smooth), background-color 0.15s var(--ease-smooth);
}

.search-close-key:hover {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--text-primary) 30%, var(--border-color));
  background: var(--bg-card);
}

.search-dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  max-height: 400px;
  flex: 1 1 400px;
  overflow: hidden;
}

.search-results-pane {
  min-width: 0;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-primary) 18%, transparent) transparent;
}

.search-results-pane::-webkit-scrollbar {
  width: 5px;
}

.search-results-pane::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-primary) 18%, transparent);
  border-radius: 9999px;
}

.search-dialog-section-label {
  padding: 4px 0 9px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.search-developers-label {
  margin-top: 16px;
}

.search-dialog-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  margin: 1px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-family: inherit;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s var(--ease-smooth), background-color 0.15s var(--ease-smooth), transform 0.2s var(--ease-out-expo);
}

.search-dialog-item:hover,
.search-dialog-item.is-selected {
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
}

.search-dialog-item:hover {
  transform: translateX(2px);
}

.search-dialog-item[hidden] {
  display: none;
}

.search-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ask-grok-item {
  padding: 10px;
}

.ask-grok-item .search-item-icon {
  color: var(--text-primary);
}

.search-item-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.search-item-copy strong {
  font-size: 14px;
  font-weight: 500;
}

.search-item-copy small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.2;
}

.search-items-list .search-item-copy {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-item-section {
  max-width: 38%;
  margin-left: auto;
  flex: 0 0 auto;
  overflow: hidden;
  color: var(--text-muted);
  font-family: 'GeistMono', monospace;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-item-arrow {
  color: var(--text-muted);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.15s var(--ease-smooth), transform 0.2s var(--ease-out-expo);
}

.ask-grok-item:hover .search-item-arrow,
.ask-grok-item.is-selected .search-item-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.search-preview-pane {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 28px;
  border-left: 1px solid var(--border-color);
  background: linear-gradient(140deg, color-mix(in srgb, var(--bg-card) 80%, transparent), color-mix(in srgb, var(--bg-page) 45%, transparent));
}

.search-preview-eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-family: 'GeistMono', monospace;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search-preview-pane h3,
.search-preview-pane p {
  position: relative;
  z-index: 1;
}

.search-preview-pane h3 {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.search-preview-pane p {
  max-width: 280px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

.search-preview-orb {
  position: absolute;
  right: -96px;
  bottom: -118px;
  width: 320px;
  height: 320px;
  border: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--text-primary) 13%, transparent), transparent 28%), radial-gradient(circle at 55% 58%, color-mix(in srgb, var(--text-primary) 8%, transparent), transparent 58%);
  box-shadow: 0 0 0 42px color-mix(in srgb, var(--text-primary) 2.5%, transparent), 0 0 0 84px color-mix(in srgb, var(--text-primary) 1.5%, transparent);
  transition: transform 0.5s var(--ease-out-expo);
}

.search-preview-pane:hover .search-preview-orb {
  transform: scale(1.06) rotate(12deg);
}

.search-empty-state {
  padding: 36px 12px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.search-dialog-footer {
  min-height: 37px;
  padding: 6px 12px;
  border-top: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-card) 78%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.search-footer-mark {
  color: var(--text-secondary);
  font-family: 'GeistMono', monospace;
  font-size: 14px;
  font-weight: 650;
}

.search-footer-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  white-space: nowrap;
}

.search-dialog-footer kbd {
  margin-left: 5px;
  padding: 2px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--text-primary) 7%, transparent);
  color: var(--text-muted);
  font-family: 'GeistMono', monospace;
  font-size: 9px;
}

@keyframes code-content-in {
  from {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes theme-icon-turn {
  0% { transform: rotate(-28deg) scale(0.72); opacity: 0; }
  70% { transform: rotate(12deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(0) scale(1); opacity: 1; }
}

/* Local page editor */
.editor-toggle-btn,
.editor-toolbar button,
.editor-button-primary,
.editor-button-secondary,
.editor-nav-add-group,
.editor-nav-controls button,
.editor-nav-link-settings,
.editor-nav-remove-item,
.custom-card-controls button,
.custom-card-controls input,
.editor-code-button {
  font: inherit;
}

.editor-toggle-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-card) 72%, transparent);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), transform 0.2s var(--ease-out-expo);
}

.editor-toggle-btn:hover,
.editor-toggle-btn[aria-pressed="true"] {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-page);
}

.editor-toggle-btn:hover {
  transform: translateY(-1px);
}

body.is-editor-mode .editor-editable,
body.is-editor-mode [data-home-field],
body.is-editor-mode [data-nav-field],
body.is-editor-mode [data-card-field],
body.is-editor-mode [data-page-field] {
  outline: 1px dashed color-mix(in srgb, var(--solar) 72%, transparent);
  outline-offset: 4px;
  border-radius: 6px;
  cursor: text;
}

body.is-editor-mode [contenteditable="true"]:focus {
  outline-style: solid;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--solar) 12%, transparent);
}

body.is-editor-mode [data-editor-link],
body.is-editor-mode [data-card-link] {
  position: relative;
}

body.is-editor-mode [data-editor-link]::after,
body.is-editor-mode [data-card-link]::after {
  content: "Edit link";
  position: absolute;
  right: 8px;
  top: -18px;
  padding: 2px 6px;
  border: 1px solid var(--solar-border);
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--solar);
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}

.editor-toolbar {
  position: fixed;
  left: calc(var(--sidebar-width) + 20px);
  right: 20px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.99);
  transition: opacity 0.18s var(--ease-smooth), transform 0.26s var(--ease-out-expo);
}

.editor-toolbar[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.editor-toolbar-group,
.editor-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-toolbar-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  color: var(--text-secondary);
  font-size: 12px;
}

.editor-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--solar);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--solar) 14%, transparent);
}

.editor-toolbar button,
.editor-button-primary,
.editor-button-secondary {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.16s var(--ease-smooth), color 0.16s var(--ease-smooth), border-color 0.16s var(--ease-smooth), transform 0.2s var(--ease-out-expo);
}

.editor-toolbar button,
.editor-button-secondary {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
}

.editor-button-primary {
  border: 1px solid var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-page);
}

.editor-toolbar button:hover,
.editor-button-secondary:hover,
.editor-button-primary:hover {
  transform: translateY(-1px);
}

.editor-exit-btn {
  background: var(--text-primary) !important;
  border-color: var(--text-primary) !important;
  color: var(--bg-page) !important;
}

.editor-save-status {
  color: var(--text-muted);
  font-size: 12px;
}

.editor-public-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  text-decoration: none;
}

.editor-public-link:hover {
  border-color: var(--text-secondary);
  background: color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.editor-toolbar[data-save-state="saving"] .editor-save-status {
  color: var(--solar);
}

.editor-toolbar[data-save-state="warning"] .editor-save-status {
  color: var(--solar);
}

.editor-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease-smooth);
}

.editor-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.editor-modal-card {
  width: min(720px, 100%);
  max-height: min(84vh, 760px);
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-page);
  box-shadow: var(--shadow-floating);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.24s var(--ease-out-expo);
}

.editor-modal-overlay.open .editor-modal-card {
  transform: translateY(0) scale(1);
}

.editor-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 20px 12px;
}

.editor-modal-header span {
  color: var(--text-muted);
  font-family: 'GeistMono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-modal-header h2 {
  margin-top: 4px;
  font-size: 22px;
}

.editor-modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 18px;
}

.editor-form {
  display: grid;
  gap: 14px;
  padding: 0 20px 20px;
}

.editor-form label {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 12px;
}

.editor-form input,
.editor-form select,
.editor-form textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
}

.editor-form textarea {
  min-height: 120px;
  resize: vertical;
}

.editor-code-form textarea {
  min-height: 310px;
  font-family: 'GeistMono', monospace;
  font-size: 12px;
  line-height: 1.55;
}

.editor-form-help {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.editor-cta-rows {
  display: grid;
  gap: 12px;
}

.editor-cta-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-card) 78%, transparent);
}

.editor-cta-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-primary);
  font-size: 13px;
}

.editor-cta-remove,
.editor-icon-remove {
  border: 1px solid color-mix(in srgb, #dc2626 38%, var(--border-color));
  background: transparent;
  color: #dc2626;
  cursor: pointer;
  font: inherit;
}

.editor-cta-remove {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
}

.editor-icon-remove {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 11px;
}

.editor-cta-checkbox {
  display: flex !important;
  align-items: center;
  align-self: end;
  min-height: 40px;
  grid-template-columns: none !important;
}

.editor-cta-checkbox input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.editor-cta-add {
  justify-self: start;
}

.editor-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.editor-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 140;
  padding: 9px 13px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg-page);
  box-shadow: var(--shadow-floating);
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.18s var(--ease-smooth), transform 0.24s var(--ease-out-expo);
}

.editor-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.editor-rich-toolbar {
  position: fixed;
  left: 50%;
  bottom: 78px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 96%, transparent);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.16s var(--ease-smooth), transform 0.22s var(--ease-out-expo);
}

.editor-rich-toolbar[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.editor-rich-toolbar button {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.editor-rich-toolbar button:hover {
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
}

.editor-nav-group {
  position: relative;
}

.editor-nav-controls,
.editor-nav-link-settings,
.editor-nav-remove-item,
.editor-nav-add-group,
.custom-card-controls,
.editor-code-button {
  display: none;
}

body.is-editor-mode .editor-nav-controls,
body.is-editor-mode .editor-nav-link-settings,
body.is-editor-mode .editor-nav-remove-item,
body.is-editor-mode .editor-nav-add-group,
body.is-editor-mode .custom-card-controls,
body.is-editor-mode .editor-code-button {
  display: inline-flex;
}

.editor-nav-controls {
  margin-left: auto;
  gap: 5px;
}

.editor-nav-controls button,
.editor-nav-link-settings,
.editor-nav-remove-item,
.editor-nav-add-group {
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
}

.editor-nav-controls button,
.editor-nav-link-settings,
.editor-nav-remove-item {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
}

.editor-nav-item-wrap {
  position: relative;
}

.editor-nav-link-settings,
.editor-nav-remove-item {
  position: absolute;
  top: 7px;
  z-index: 2;
}

.editor-nav-link-settings {
  right: 30px;
}

.editor-nav-remove-item {
  right: 4px;
}

.editor-nav-add-group {
  width: 100%;
  height: 32px;
  margin-top: 10px;
  border-radius: 999px;
  font-size: 12px;
}

.editor-code-button {
  align-items: center;
  justify-content: center;
  height: 28px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 12px;
}

.editor-code-button + .copy-icon-btn {
  margin-left: 6px;
}

.custom-content-section {
  margin-top: 76px;
}

.custom-content-header {
  margin-bottom: 18px;
}

.custom-content-header p {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.custom-cards-grid {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 14px;
}

.mantra-home-view .editor-page-hero {
  max-width: 760px;
}

.mantra-home-grid {
  margin-bottom: 42px;
}

.mantra-home-grid .custom-card {
  min-height: 190px;
}

.mantra-home-grid .block-ctas {
  margin-top: 24px;
}

.mantra-footer {
  margin-top: 76px;
  padding-bottom: 12px;
}

.mantra-home-view > .custom-content-section {
  margin-top: 12px;
}

.mantra-home-view > .custom-content-section .custom-cards-grid {
  gap: 0;
}

.mantra-home-view .mantra-footer {
  margin-top: 76px;
}

.overview-split-feature {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(300px, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(32px, 4.5vw, 68px);
  width: 100%;
  flex: 1 1 100%;
  min-height: 500px;
  padding: clamp(36px, 5vw, 72px) 0;
  background: transparent;
  overflow: visible;
}

.overview-split-feature::after {
  display: none;
}

.overview-split-copy {
  min-width: 0;
}

.overview-split-eyebrow {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-family: 'GeistMono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overview-split-title {
  max-width: 720px;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(44px, 5.2vw, 76px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.overview-split-body {
  max-width: 560px;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
}

.overview-split-copy .block-ctas {
  margin-top: 28px;
}

.overview-split-preview {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.overview-split-preview .card-nested-media-item,
.overview-split-preview .card-nested-media-item.is-left,
.overview-split-preview .card-nested-media-item.is-right,
.overview-split-preview .card-nested-media-item.is-full {
  float: none;
  clear: both;
  width: 100%;
  height: auto;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
}

.overview-split-preview .card-nested-media-item > .custom-image-frame,
.overview-split-preview .card-nested-media-item > .custom-video-frame,
.overview-split-preview .card-nested-media-item > .custom-video-empty {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  object-fit: contain;
  object-position: center;
}

.overview-split-preview .card-nested-media-item figcaption {
  display: none;
}

.overview-split-preview .nested-media-controls,
.overview-split-preview .media-resize-handle,
.overview-split-preview .card-drop-zone {
  z-index: 5;
}

@media (max-width: 960px) {
  .overview-split-feature {
    display: grid;
    align-items: start;
    min-height: 0;
    padding: 36px 0 56px;
    background: transparent;
    overflow: visible;
  }

  .overview-split-feature::after {
    display: none;
  }

  .overview-split-copy {
    width: 100%;
  }

  .overview-split-eyebrow {
    color: var(--text-muted);
  }

  .overview-split-title {
    color: var(--text-primary);
    font-size: clamp(42px, 9vw, 64px);
  }

  .overview-split-body {
    color: var(--text-secondary);
  }

  .overview-split-preview {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 32px;
    opacity: 1;
    overflow: visible;
  }

  .overview-split-preview .card-nested-media-item,
  .overview-split-preview .card-nested-media-item.is-left,
  .overview-split-preview .card-nested-media-item.is-right,
  .overview-split-preview .card-nested-media-item.is-full {
    height: auto;
    overflow: hidden;
    border-radius: 18px;
  }

  .overview-split-preview .card-nested-media-item > .custom-image-frame,
  .overview-split-preview .card-nested-media-item > .custom-video-frame,
  .overview-split-preview .card-nested-media-item > .custom-video-empty {
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    object-fit: contain;
    object-position: center;
  }
}

.mantra-home-view--footer-only .mantra-footer {
  margin-top: 0;
}

.editor-footer-controls {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-bottom: -12px;
}

.editor-footer-form {
  gap: 18px;
}

.editor-modal-card:has(.editor-footer-form) {
  width: min(980px, 100%);
}

.editor-footer-catalogs,
.editor-footer-link-rows {
  display: grid;
  gap: 12px;
}

.editor-footer-catalog-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-card) 78%, transparent);
}

.editor-footer-catalog-header,
.editor-footer-link-row {
  display: grid;
  align-items: end;
  gap: 10px;
}

.editor-footer-catalog-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.editor-footer-link-row {
  grid-template-columns: minmax(140px, 0.8fr) minmax(200px, 1.4fr) auto auto;
  padding: 12px;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  background: var(--bg-page);
}

.editor-footer-add-link,
.editor-footer-add-catalog {
  justify-self: start;
}

.custom-card {
  position: relative;
  width: min(100%, var(--card-width, 100%));
  flex: 0 1 min(100%, var(--card-width, 100%));
  height: var(--card-height, auto);
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.16s var(--ease-smooth), background-color 0.16s var(--ease-smooth), transform 0.24s var(--ease-out-expo), box-shadow 0.24s var(--ease-out-expo);
}

.custom-card:hover {
  border-color: color-mix(in srgb, var(--text-primary) 14%, var(--border-card));
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.custom-card p {
  color: var(--text-muted);
  font-family: 'GeistMono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-card h3 {
  margin: 10px 0;
  font-size: 20px;
  line-height: 1.18;
}

.custom-card div[data-card-field="body"] {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.custom-card blockquote,
.page-block blockquote {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 2px solid var(--solar);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--solar) 7%, transparent);
  color: var(--text-primary);
}

.custom-card h1,
.page-block h1 {
  margin: 10px 0;
  font-size: 30px;
  line-height: 1.06;
}

.custom-card h2,
.page-block h2 {
  margin: 10px 0;
  font-size: 24px;
  line-height: 1.12;
}

.custom-card h3,
.page-block h3 {
  margin: 10px 0;
  font-size: 20px;
  line-height: 1.18;
}

.card-separator {
  height: 1px;
  margin: 14px 0;
  border: 0;
  background: color-mix(in srgb, var(--text-primary) 14%, transparent);
}

.custom-card--metric strong {
  display: block;
  margin: 10px 0 12px;
  font-family: 'UniversalSansDisplay', 'UniversalSans', sans-serif;
  font-size: 42px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.custom-card--cta {
  display: flex;
  flex-direction: column;
}

.custom-card--cta .btn-pill-black {
  width: max-content;
  margin-top: auto;
}

.custom-card--video {
  padding: 12px;
}

.custom-card-copy {
  padding: 14px 6px 4px;
}

.custom-video-frame,
.custom-video-empty {
  width: 100%;
  max-width: var(--video-width, 100%);
  margin-right: auto;
  margin-left: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
  background: #0b0b0d;
  overflow: hidden;
}

.custom-video-empty {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.custom-card-controls {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
  gap: 6px;
  align-items: center;
  max-width: calc(100% - 20px);
  padding: 4px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.custom-card-controls button {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-page) 92%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
}

.editor-autoplay-toggle[aria-pressed="true"] {
  border-color: var(--solar);
  color: var(--solar);
}

.custom-card::after,
.page-block::after {
  content: "";
  display: block;
  clear: both;
}

.custom-card--cta:has(.card-nested-media-item) {
  display: block;
}

.custom-card--cta:has(.card-nested-media-item) .btn-pill-black {
  margin-top: 12px;
}

.card-nested-media-item {
  position: relative;
  min-height: 0;
  margin: 0 0 12px;
  border-radius: 14px;
  background: transparent;
}

.card-nested-media-item.is-left {
  float: left;
  width: var(--media-size, 50%);
  margin-right: 16px;
}

.card-nested-media-item.is-right {
  float: right;
  width: var(--media-size, 50%);
  margin-left: 16px;
}

.card-nested-media-item.is-full {
  float: none;
  clear: both;
  width: 100%;
}

.card-nested-media-item.is-resizing {
  user-select: none;
}

.media-resize-handle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 5;
  display: none;
  width: 16px;
  height: 16px;
  border: 1px solid color-mix(in srgb, var(--text-primary) 24%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  box-shadow: var(--shadow-soft);
  cursor: ew-resize;
  backdrop-filter: blur(10px);
}

.card-nested-media-item.is-right .media-resize-handle {
  right: auto;
  left: 6px;
}

body.is-editor-mode .media-resize-handle {
  display: block;
}

.media-align-group {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.media-align-btn {
  width: 24px;
  padding: 0 !important;
  font-family: 'GeistMono', monospace;
  font-size: 10px !important;
  text-transform: uppercase;
}

.media-align-btn[aria-pressed="true"] {
  border-color: var(--solar);
  background: color-mix(in srgb, var(--solar) 16%, transparent);
  color: var(--text-primary);
}

.card-nested-media-item > .custom-image-frame,
.card-nested-media-item > .custom-video-frame,
.card-nested-media-item > .custom-video-empty {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
}

.card-nested-media-item.is-full > .custom-image-frame,
.card-nested-media-item.is-full > .custom-video-frame,
.card-nested-media-item.is-full > .custom-video-empty {
  max-height: min(280px, 42vh);
}

.card-nested-media-item figcaption {
  padding: 8px 4px 2px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.nested-media-controls {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 4;
  display: none;
  gap: 6px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

body.is-editor-mode .nested-media-controls {
  display: flex;
}

.nested-media-controls button {
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-page) 92%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
}

.nested-media-controls button:hover {
  border-color: var(--solar);
  color: var(--text-primary);
}

.card-drop-zone {
  position: absolute;
  inset: 14px;
  z-index: 6;
  display: none;
  place-items: center;
  border: 1.5px dashed color-mix(in srgb, var(--solar) 62%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--solar) 8%, transparent);
  color: var(--text-primary);
  font-size: 12px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s var(--ease-smooth);
}

.card-drop-zone span {
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-page) 84%, transparent);
}

body.is-dragging-media .card-drop-zone {
  display: grid;
  opacity: 0.8;
  pointer-events: auto;
}

body.is-dragging-media .card-drop-zone.is-active {
  border-style: solid;
  background: color-mix(in srgb, var(--solar) 18%, transparent);
  opacity: 1;
}

.editor-field-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.editor-field-row label {
  flex: 1 1 auto;
  min-width: 0;
}

.editor-icon-add {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.16s var(--ease-smooth), color 0.16s var(--ease-smooth), background-color 0.16s var(--ease-smooth);
}

.editor-icon-add:hover {
  border-color: var(--solar);
  color: var(--solar);
}

.custom-image-frame {
  display: block;
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  background: var(--bg-input);
}

.editor-drag-handle {
  cursor: grab !important;
}

.custom-card[draggable="true"],
.page-block[draggable="true"] {
  cursor: grab;
}

.custom-card.is-dragging,
.page-block.is-dragging {
  opacity: 0.55;
  transform: scale(0.99);
}

.custom-card.is-drag-over,
.page-block.is-drag-over {
  outline: 2px solid var(--solar);
  outline-offset: 5px;
}

.custom-card.is-resizing,
.page-block.is-resizing {
  user-select: none;
  transition: none;
}

.editor-resize-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  display: none;
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--text-primary) 24%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  box-shadow: var(--shadow-soft);
  cursor: nwse-resize;
  backdrop-filter: blur(10px);
}

.editor-resize-handle::before,
.editor-resize-handle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 7px;
  height: 1px;
  background: var(--text-muted);
  transform: rotate(-45deg);
  transform-origin: right center;
}

.editor-resize-handle::after {
  right: 4px;
  bottom: 8px;
  width: 4px;
}

body.is-editor-mode .editor-resize-handle {
  display: block;
}

.editor-page-view {
  min-height: calc(100vh - var(--topbar-height));
  padding-bottom: 110px;
}

.editor-page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--text-muted);
  font-size: 12px;
}

.editor-page-topbar button,
.editor-page-builder button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.editor-page-hero {
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--border-color);
}

.editor-page-hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
}

.editor-page-hero p {
  max-width: 620px;
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.6;
}

.editor-page-builder {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.editor-page-blocks {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 14px;
}

.page-block {
  width: min(100%, var(--card-width, 100%));
  flex: 0 1 min(100%, var(--card-width, 100%));
  height: var(--card-height, auto);
}

.page-block--code {
  position: relative;
}

.page-block--code .terminal-card {
  min-height: 320px;
}

/* Freeform Text Block */
.page-block--text {
  position: relative;
  width: 100%;
}

.page-block--section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border-color);
  scroll-margin-top: 24px;
}

.page-block--section:first-child {
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
}

.page-block--section .page-text-content {
  min-height: 0;
  padding-bottom: 14px;
}

.page-block--section .page-text-content h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
}

.page-block--section .page-text-content p {
  max-width: 720px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
}

.page-text-content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  min-height: 120px;
  padding: 4px 2px;
  outline: none;
  border-radius: 8px;
  transition: background-color 0.15s;
}

.is-editor-mode .page-text-content {
  min-height: 180px;
  padding: 6px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.is-editor-mode .page-text-content:focus {
  background: transparent;
}

body.is-editor-mode .page-text-content.is-empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  font-style: italic;
  pointer-events: none;
  position: absolute;
  top: 6px;
  left: 2px;
  right: 2px;
}

body.is-editor-mode .page-block--text:has(.card-nested-media-item) .page-text-content.is-empty::before {
  display: none;
}

body.is-editor-mode .editor-page-description.is-empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  font-style: italic;
  pointer-events: none;
}

.page-block--text .custom-card-controls {
  opacity: 0;
  transition: opacity 0.14s var(--ease-smooth);
}

.page-block--text:hover .custom-card-controls,
.page-block--text:focus-within .custom-card-controls {
  opacity: 1;
}

.page-text-content h1,
.page-text-content h2,
.page-text-content h3,
.page-text-content h4,
.page-text-content h5,
.page-text-content h6 {
  margin: 1em 0 0.4em;
  font-family: 'UniversalSansDisplay', 'UniversalSans', sans-serif;
  letter-spacing: -0.025em;
  font-weight: 550;
}

.page-text-content h1 { font-size: 28px; }
.page-text-content h2 { font-size: 22px; }
.page-text-content h3 { font-size: 18px; }
.page-text-content h4 { font-size: 16px; }
.page-text-content h5 { font-size: 14px; font-weight: 600; }
.page-text-content h6 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.page-text-content p {
  margin: 0.6em 0;
}

.page-text-content blockquote {
  margin: 1.15em 0;
  padding: 13px 16px;
  border-left: 3px solid var(--solar);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--solar) 7%, var(--bg-card));
  color: var(--text-secondary);
  font-style: normal;
}

.page-text-content blockquote p:first-child {
  margin-top: 0;
}

.page-text-content blockquote p:last-child {
  margin-bottom: 0;
}

.page-text-content table {
  display: block;
  width: 100%;
  margin: 1em 0 1.35em;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  border-spacing: 0;
  border-collapse: separate;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.page-text-content table::-webkit-scrollbar {
  height: 8px;
}

.page-text-content table::-webkit-scrollbar-track {
  border-radius: 9999px;
  background: var(--scrollbar-track);
}

.page-text-content table::-webkit-scrollbar-thumb {
  border: 2px solid var(--scrollbar-track);
  border-radius: 9999px;
  background: var(--scrollbar-thumb);
}

.page-text-content table::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.page-text-content thead,
.page-text-content tbody,
.page-text-content tfoot {
  display: table;
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
}

.page-text-content th,
.page-text-content td {
  padding: 11px 13px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.page-text-content th:last-child,
.page-text-content td:last-child {
  border-right: 0;
}

.page-text-content tbody tr:last-child td,
.page-text-content tfoot tr:last-child td {
  border-bottom: 0;
}

.page-text-content th {
  background: color-mix(in srgb, var(--text-primary) 5%, var(--bg-card));
  color: var(--text-primary);
  font-family: 'GeistMono', monospace;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.page-text-content td {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.page-text-content td strong {
  color: var(--text-primary);
  font-weight: 550;
}

.page-text-content caption {
  padding: 0 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: left;
}

.page-text-content hr,
.page-text-content .card-separator {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.5em 0;
}

@media (max-width: 760px) {
  .top-header {
    padding: 0 12px;
  }

  .header-left,
  .header-right {
    gap: 8px;
  }

  .search-trigger-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
  }

  .search-trigger-btn span,
  .search-trigger-btn .kbd-shortcut,
  .btn-console {
    display: none;
  }

  .app-layout {
    flex-direction: column;
    min-width: 0;
  }

  .sidebar {
    width: 100%;
    min-height: 0;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidebar > div {
    flex: 0 0 auto;
  }

  .sidebar-group-title {
    display: none;
  }

  .sidebar-nav-list {
    flex-direction: row;
    gap: 4px;
  }

  .sidebar-nav-item {
    white-space: nowrap;
  }

  .main-content {
    width: 100%;
    min-width: 0;
    padding: 24px 16px 64px;
    overflow-x: hidden;
  }

  .content-container {
    min-width: 0;
    gap: 36px;
  }

  .editor-page-hero {
    padding: 32px 0 24px;
  }

  .editor-page-hero h1 {
    font-size: clamp(36px, 12vw, 54px);
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 16px 0 0;
  }

  .search-dialog {
    max-height: calc(100dvh - 16px);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }

  .search-dialog-body {
    display: block;
    height: min(58dvh, 460px);
    min-height: 0;
    max-height: min(58dvh, 460px);
    flex: 0 1 auto;
  }

  .search-results-pane {
    height: 100%;
    max-height: none;
  }

  .search-preview-pane {
    display: none;
  }

  .search-footer-actions span:not(:last-child) {
    display: none;
  }

  .editor-toolbar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    align-items: stretch;
    flex-direction: column;
  }

  .editor-toolbar-group,
  .editor-toolbar-actions {
    justify-content: center;
  }

  .custom-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .block-ctas {
    align-items: stretch;
    flex-direction: column;
  }

  .block-cta {
    width: 100%;
  }

  .editor-cta-row .editor-field-row {
    align-items: stretch;
    flex-direction: column;
  }

  .custom-card,
  .page-block {
    width: 100% !important;
    flex-basis: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mciair-logo-mark,
  .mciair-logo-mark::after {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
