/* =========================================================================
   Zedda Documentation — Design System
   =========================================================================
   A single CSS file. Original design inspired by the documentation
   philosophy of Material for MkDocs (readability, navigation, hierarchy)
   but with its own visual identity grounded in Zedda's brand palette.

   Brand colours (from repository audit):
     --brand-teal      #1D9E75  (PyPI badge, HTML report --teal)
     --brand-teal-dark #0F5C44  (HTML report --teal-dark)
     --brand-orange    #E79C65  (CLI ASCII banner colour)
     --brand-crimson   #C8344D  (HTML report --accent)
     --cream           #FCFBF8  (HTML report --bg)
   ========================================================================= */

/* Accessibility Skip Link (WCAG 2.2 AA) */
.skip-link {
  position: absolute;
  top: -120px;
  left: 1rem;
  background: #3b82f6;
  color: #ffffff !important;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 99999;
  transition: top 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.skip-link:focus {
  top: 1rem;
}

/* -------- 1. Design tokens -------- */
:root {
  /* Type scale */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;

  /* Spacing scale (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Layout */
  --sidebar-width: 264px;
  --toc-width: 240px;
  --content-max-width: 820px;
  --topbar-height: 56px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Brand (User Image Exact Circle Blue #3b82f6) */
  --brand: #3b82f6;
  --brand-hover: #2563eb;
  --brand-active: #1d4ed8;
  --brand-subtle: rgba(59, 130, 246, 0.1);
  --brand-foreground: #ffffff;

  /* Light theme (default) - Pure White System */
  --bg: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #F1F5F9;

  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;

  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --link: #3b82f6;
  --link-hover: #2563eb;

  --code-bg: #F8FAFC;
  --code-border: #E2E8F0;
  --code-text: #0F172A;
  --code-inline-bg: #F1F5F9;
  --code-inline-text: #3b82f6;

  /* Syntax highlighting (light, GitHub-inspired) */
  --hljs-comment: #6e7781;
  --hljs-keyword: #cf222e;
  --hljs-string: #0a3069;
  --hljs-number: #0550ae;
  --hljs-function: #8250df;
  --hljs-title: #6639ba;
  --hljs-attr: #0550ae;
  --hljs-tag: #116329;
  --hljs-built-in: #953800;

  /* Callouts */
  --note-bg: #E8F1FA;
  --note-border: #15497F;
  --note-text: #15497F;
  --tip-bg: #EBF4E0;
  --tip-border: #2E5A0D;
  --tip-text: #2E5A0D;
  --warning-bg: #FBEFDB;
  --warning-border: #92600C;
  --warning-text: #92600C;
  --danger-bg: #FBE9E9;
  --danger-border: #922323;
  --danger-text: #922323;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

html.dark {
  /* Dark theme matching exact user screenshot #15161a */
  --bg: #15161a;
  --bg-subtle: #1c1d22;
  --surface: #1c1d22;
  --surface-2: #232529;
  --surface-3: #2a2c31;

  --text: #ffffff;
  --text-secondary: #f8fafc;
  --text-muted: #cbd5e1;

  --border: #2e3036;
  --border-strong: #3a3d44;

  --brand: #3b82f6;
  --brand-hover: #60a5fa;
  --brand-active: #3b82f6;
  --brand-subtle: rgba(59, 130, 246, 0.2);
  --brand-foreground: #ffffff;

  --link: #60a5fa;
  --link-hover: #93c5fd;

  --code-bg: #1c1d22;
  --code-border: #2e3036;
  --code-text: #ffffff;
  --code-inline-bg: #232529;
  --code-inline-text: #60a5fa;

  /* Syntax highlighting (dark, GitHub-dark-inspired) */
  --hljs-comment: #8b949e;
  --hljs-keyword: #ff7b72;
  --hljs-string: #a5d6ff;
  --hljs-number: #79c0ff;
  --hljs-function: #d2a8ff;
  --hljs-title: #d2a8ff;
  --hljs-attr: #79c0ff;
  --hljs-tag: #7ee787;
  --hljs-built-in: #ffa657;

  --note-bg: rgba(21, 73, 127, 0.15);
  --note-border: #5b9bd5;
  --note-text: #b1d4f5;
  --tip-bg: rgba(46, 90, 13, 0.18);
  --tip-border: #7bc442;
  --tip-text: #c5e89d;
  --warning-bg: rgba(146, 96, 12, 0.18);
  --warning-border: #e0b677;
  --warning-text: #f5d8a8;
  --danger-bg: rgba(146, 35, 35, 0.18);
  --danger-border: #f59595;
  --danger-text: #f5bcbc;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

  --focus-ring: 0 0 0 3px rgba(78, 200, 150, 0.4);
}

/* -------- 2. Reset & base -------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
}

p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

input, textarea, select { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--brand);
  color: var(--brand-foreground);
}

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--brand);
  color: var(--brand-foreground);
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { left: 0; }

/* -------- 3. Topbar -------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--space-4);
  gap: var(--space-4);
}

.topbar-left { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.topbar-center { flex: 1; display: flex; justify-content: center; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: var(--space-1); flex-shrink: 0; }

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.sidebar-toggle:hover { background: var(--surface-3); color: var(--text); }

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
}
.brand:hover { background: var(--surface-3); text-decoration: none; }

.brand-logo { display: none; height: 26px; width: auto; }
html:not(.dark) .brand-logo--light { display: block; }
html.dark .brand-logo--dark { display: block; }

.brand-version {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Search trigger */
.search-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 420px;
  height: 36px;
  padding: 0 var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.search-trigger:hover { border-color: var(--border-strong); background: var(--surface-3); color: var(--text-secondary); }
.search-trigger-text { flex: 1; font-size: 0.875rem; }
.search-trigger-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* Theme toggle + GitHub link */
.theme-toggle, .topbar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.theme-toggle:hover, .topbar-link:hover { background: var(--surface-3); color: var(--text); }

.theme-icon { display: none; }
html:not(.dark) .theme-icon--moon { display: block; }
html.dark .theme-icon--sun { display: block; }

/* -------------------------------------------------------------------------
   Circular Reveal Expanding Theme Animation
   ------------------------------------------------------------------------- */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 999999;
}

/* Fallback circular sweep for non-view-transition browsers */
.theme-sweep-curtain {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
  transition: clip-path 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------- 4. Layout grid -------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.sidebar-inner { padding: var(--space-4) var(--space-3); }

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.main-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-width);
  gap: var(--space-8);
  width: 100%;
  max-width: 1200px;
  margin: 0;
  padding: var(--space-8) var(--space-6);
  flex: 1;
}

.main-content-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* -------- 5. Sidebar -------- */
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; }

.sidebar-link {
  display: block;
  padding: var(--space-2) var(--space-3);
  padding-left: calc(var(--space-3) + var(--depth, 0) * 0.85rem);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background 0.1s, color 0.1s;
  border-left: 2px solid transparent;
}
.sidebar-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.sidebar-link--active {
  background: var(--brand-subtle);
  color: var(--brand);
  font-weight: 550;
  border-left-color: var(--brand);
}

.sidebar-group { margin-top: var(--space-3); }
.sidebar-group-title {
  display: flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: var(--radius-md);
}
.sidebar-group-title::-webkit-details-marker { display: none; }
.sidebar-group-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-right: var(--space-3);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.75;
}
details[open] > .sidebar-group-title::before,
.sidebar-group--open > .sidebar-group-title::before {
  transform: rotate(45deg);
}
.sidebar-group-title:hover { background: var(--surface-3); color: var(--text-secondary); }

.sidebar-group-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 2px;
}

/* -------- 6. Content -------- */
.content { min-width: 0; max-width: var(--content-max-width); }

.content-header { margin-bottom: var(--space-8); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }

.content-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-2);
}

.content-description {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.content-body { font-size: 0.9375rem; line-height: 1.75; }

.content-body > * + * { margin-top: var(--space-4); }

.content-body h2 {
  font-size: 1.4rem;
  font-weight: 650;
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

.content-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

.content-body h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

.content-body p { color: var(--text); }

.content-body ul, .content-body ol {
  margin: var(--space-3) 0;
  padding-left: var(--space-6);
}
.content-body li { margin-top: var(--space-2); }
.content-body li::marker { color: var(--text-muted); }
.content-body li > p { margin: 0; }

.content-body blockquote {
  margin: var(--space-4) 0;
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid var(--brand);
  color: var(--text-secondary);
  background: var(--brand-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.content-body blockquote p { margin: 0; }

/* Inline code */
.content-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-inline-bg);
  color: var(--code-inline-text);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

/* Code blocks */
.content-body pre {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}
.content-body pre code {
  background: none;
  color: var(--code-text);
  padding: 0;
  border: none;
  font-weight: 400;
  font-size: inherit;
}

/* Code block wrapper — we wrap pre in a div via the highlighter */
.content-body .code-block-wrapper {
  margin: var(--space-4) 0;
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--code-bg);
}
.content-body .code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--code-border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.content-body .code-block-copy {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background 0.1s, color 0.1s;
}
.content-body .code-block-copy:hover { background: var(--surface-3); color: var(--text); }
.content-body .code-block-copy.copied { color: var(--brand); }
.content-body .code-block-wrapper pre { margin: 0; border: none; border-radius: 0; }

/* Tables */
.content-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: var(--space-4) 0;
  display: block;
  overflow-x: auto;
}
.content-body thead { background: var(--surface-2); }
.content-body th {
  text-align: left;
  font-weight: 600;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.content-body td {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  vertical-align: top;
}
.content-body tbody tr:nth-child(2n) { background: var(--surface-2); }

.content-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

/* Heading anchor (permalink) */
.content-body .header-anchor {
  float: left;
  width: 1rem;
  margin-left: -1.25rem;
  padding-right: 0.25rem;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.1s;
  font-weight: 400;
}
.content-body h2:hover .header-anchor,
.content-body h3:hover .header-anchor,
.content-body h4:hover .header-anchor { opacity: 1; }
.content-body .header-anchor:hover { color: var(--brand); text-decoration: none; }

/* -------- 7. Callouts (admonitions) -------- */
.callout {
  margin: var(--space-5) 0;
  padding: var(--space-4);
  border-left: 4px solid var(--callout-border, var(--border));
  background: var(--callout-bg, var(--surface-2));
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.callout--note { --callout-bg: var(--note-bg); --callout-border: var(--note-border); --callout-text: var(--note-text); }
.callout--tip { --callout-bg: var(--tip-bg); --callout-border: var(--tip-border); --callout-text: var(--tip-text); }
.callout--warning { --callout-bg: var(--warning-bg); --callout-border: var(--warning-border); --callout-text: var(--warning-text); }
.callout--danger { --callout-bg: var(--danger-bg); --callout-border: var(--danger-border); --callout-text: var(--danger-text); }

.callout-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-weight: 650;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--callout-text);
}
.callout-title-icon { display: inline-flex; }
.callout > p:first-of-type { margin-top: 0; }
.callout > p:last-child { margin-bottom: 0; }
.callout code { background: rgba(0, 0, 0, 0.06); }
html.dark .callout code { background: rgba(255, 255, 255, 0.08); }

/* -------- 8. Breadcrumbs -------- */
.breadcrumbs {
  margin-bottom: var(--space-6);
  font-size: 0.8125rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}
.breadcrumbs li { display: flex; align-items: center; gap: var(--space-1); }
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-1);
  color: var(--border-strong);
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--brand); text-decoration: none; }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 500; }

/* -------- 9. Prev / next -------- */
.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}
.prev-next-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.prev-next-card:hover { border-color: var(--brand); background: var(--brand-subtle); text-decoration: none; transform: translateY(-1px); }
.prev-next-card--next { text-align: right; align-items: flex-end; }
.prev-next-spacer { display: block; }
.prev-next-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.prev-next-title { font-weight: 550; font-size: 0.9375rem; }

/* -------- 10. TOC (right rail) -------- */
.toc-wrapper {
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-8));
  align-self: start;
  max-height: calc(100vh - var(--topbar-height) - var(--space-16));
  overflow-y: auto;
  padding-top: var(--space-1);
}

.toc { font-size: 0.8125rem; }
.toc-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.toc-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc-item { margin: 0; }
.toc-link {
  display: block;
  padding: var(--space-1) var(--space-3);
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.1s, border-color 0.1s;
}
.toc-item--h3 .toc-link { padding-left: var(--space-6); font-size: 0.78rem; }
.toc-link.active,
.toc-link--active {
  color: var(--brand) !important;
  border-left-color: var(--brand) !important;
  font-weight: 600 !important;
}

/* -------- 11. Footer -------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  max-width: calc(var(--content-max-width) + var(--toc-width) + var(--space-10) * 2);
  margin: 0 auto;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-left { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.footer-link { color: var(--text-secondary); }
.footer-link:hover { color: var(--brand); text-decoration: none; }
.footer-sep { color: var(--border-strong); }
.footer-version { font-family: var(--font-mono); font-size: 0.75rem; }

/* -------- 12. Search modal -------- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.search-modal[hidden] { display: none; }
.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}
.search-modal-panel {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.search-input-icon { color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  background: none;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.search-results { max-height: 60vh; overflow-y: auto; }
.search-results-empty { padding: var(--space-8) var(--space-4); text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.search-result {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result--active { background: var(--brand-subtle); text-decoration: none; }
.search-result-title { font-weight: 550; font-size: 0.9rem; color: var(--text); }
.search-result-group {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 0.05rem 0.4rem;
  font-size: 0.7rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
}
.search-result-description {
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* -------- 13. Home page -------- */
.home { padding: var(--space-12) var(--space-6); max-width: 960px; margin: 0 auto; }
.home-hero { text-align: center; margin-bottom: var(--space-12); }
.home-logo { display: none; max-width: 280px; height: auto; margin: 0 auto var(--space-6); }
html:not(.dark) .home-logo--light { display: block; }
html.dark .home-logo--dark { display: block; }
.home-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}
.home-tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-6);
  line-height: 1.5;
}
.home-install {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.home-install code { background: none; padding: 0; color: var(--code-text); font-size: inherit; }
.home-install-copy {
  display: flex;
  align-items: center;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color 0.1s;
}
.home-install-copy:hover { color: var(--text); }
.home-install-copy.copied { color: var(--brand); }

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-foreground); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-foreground); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }

.home-section { margin-top: var(--space-12); }
.home-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.home-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.home-card:hover { border-color: var(--brand); background: var(--brand-subtle); text-decoration: none; transform: translateY(-1px); }
.home-card-title { display: flex; align-items: center; gap: var(--space-2); font-weight: 550; font-size: 0.9375rem; }
.home-card-arrow { margin-left: auto; color: var(--text-muted); transition: transform 0.15s, color 0.15s; }
.home-card:hover .home-card-arrow { transform: translateX(2px); color: var(--brand); }
.home-card-description { font-size: 0.8125rem; color: var(--text-secondary); }

/* -------- 14. Not-found page -------- */
.not-found { text-align: center; padding: var(--space-20) var(--space-4); }
.not-found h1 { font-size: 3rem; margin-bottom: var(--space-4); color: var(--brand); }
.not-found p { color: var(--text-secondary); margin-bottom: var(--space-6); }

/* -------- 15. Syntax highlighting (highlight.js) -------- */
.hljs { color: var(--code-text); background: transparent; }
.hljs-comment, .hljs-quote { color: var(--hljs-comment); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-link { color: var(--hljs-keyword); }
.hljs-string, .hljs-attr, .hljs-template-tag, .hljs-addition { color: var(--hljs-string); }
.hljs-number, .hljs-meta, .hljs-symbol, .hljs-bullet, .hljs-attribute { color: var(--hljs-number); }
.hljs-function .hljs-title, .hljs-title, .hljs-title.function_ { color: var(--hljs-function); }
.hljs-title.class_, .hljs-type, .hljs-built_in, .hljs-builtin-name { color: var(--hljs-built-in); }
.hljs-name, .hljs-tag { color: var(--hljs-tag); }
.hljs-deletion, .hljs-variable, .hljs-template-variable { color: var(--code-text); }
.hljs-regexp { color: var(--hljs-string); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* -------- 16. Responsive -------- */
@media (max-width: 1180px) {
  /* Hide TOC, content spans full width */
  .main-inner { grid-template-columns: minmax(0, 1fr); max-width: var(--content-max-width); padding-left: var(--space-6); padding-right: var(--space-6); }
  .toc-wrapper { display: none; }
}

@media (max-width: 900px) {
  /* Sidebar becomes a drawer */
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: 280px;
    height: calc(100vh - var(--topbar-height));
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    background: var(--bg);
    box-shadow: var(--shadow-md);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .sidebar-overlay {
    position: fixed;
    inset: var(--topbar-height) 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay[hidden] { display: none; }
  .main-inner { padding: var(--space-6) var(--space-4); }
  .content-title { font-size: 1.625rem; }
  .content-description { font-size: 1rem; }
  .home { padding: var(--space-8) var(--space-4); }
  .home-title { font-size: 1.75rem; }
}

@media (max-width: 600px) {
  .topbar-inner { padding: 0 var(--space-3); gap: var(--space-2); }
  .brand-version { display: none; }
  .search-trigger-text { display: none; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .search-trigger-kbd { display: none; }
  .prev-next { grid-template-columns: 1fr; }
  .prev-next-card--next { text-align: left; align-items: flex-start; }
  .prev-next-spacer { display: none; }
  .home-cards { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Print */
@media print {
  .topbar, .sidebar, .toc-wrapper, .footer, .prev-next, .search-modal, .sidebar-toggle, .sidebar-overlay { display: none !important; }
  .layout { display: block; }
  .main-inner { display: block; padding: 0; max-width: none; }
  body { background: white; color: black; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================================
   17. Premium White & Blue SaaS Landing Page Styles
   ========================================================================= */

html:not(.dark) .page-home,
html:not(.dark) .page-home body,
html:not(.dark) .page-home .main,
html:not(.dark) .page-home .layout,
html:not(.dark) .page-home .content {
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
}

html.dark .page-home,
html.dark .page-home body,
html.dark .page-home .main,
html.dark .page-home .layout,
html.dark .page-home .content {
  background-color: #15161a !important;
  color: #ffffff !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
}

.page-home h1,
.page-home h2,
.page-home h3,
.page-home .hero-title,
.page-home .section-heading,
.page-home .feature-title,
.page-home .manifesto-title,
.page-home .manifesto-num,
.page-home .section-tag,
.page-home .cta-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
}

.page-home .sidebar,
.page-home .toc-wrapper,
.page-home .breadcrumbs,
.page-home .skip-link,
.page-home .footer:not(.landing-footer),
.page-home .content-header {
  display: none !important;
}

.page-home .layout {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

.page-home .main {
  width: 100% !important;
  max-width: 100% !important;
}

.page-home .main-inner {
  display: block !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.page-home .content {
  max-width: 100% !important;
  padding: 0 !important;
}

/* Topbar Sticky Blur */
.page-home .topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-home .topbar.topbar-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Topbar Nav Links */
.topbar-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569 !important;
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar-nav-link:hover {
  color: #2563eb !important;
  text-decoration: none;
}

/* Container */
.landing-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- HERO SECTION (POLARS STYLE BG + 2-COLUMN LAYOUT + LIVE MAC OS TERMINAL) ---------------- */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 4rem 1.5rem;
  box-sizing: border-box;
  overflow: hidden;
}

/* Polars Image 3 Inspired Background (Grid + Glowing Rounded Pills) */
.hero-polars-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.polars-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.7) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.7) 1px, transparent 1px);
  background-size: 36px 36px;
}

html.dark .polars-bg-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.polars-glow-line {
  position: absolute;
  height: 48px;
  border-radius: 9999px;
  filter: blur(12px);
  opacity: 0.55;
  pointer-events: none;
}

.polars-glow-1 {
  top: 15%;
  left: -5%;
  width: 50%;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.25), transparent);
}

.polars-glow-2 {
  bottom: 20%;
  left: 10%;
  width: 45%;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.2), transparent);
}

html.dark .polars-glow-1 {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.25), rgba(96, 165, 250, 0.4), transparent);
}

html.dark .polars-glow-2 {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.25), rgba(59, 130, 246, 0.35), transparent);
}

/* Premium SaaS Light Mode Hero Multi-Layer Blue Glow (Vercel / Supabase / Linear style) */
.hero-light-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 1;
}

/* Layer 1: Large Central Soft Blue Radial Aura behind Hero text */
html:not(.dark) .hero-light-glow-1 {
  top: -10%;
  left: 15%;
  width: 650px;
  height: 450px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, rgba(96, 165, 250, 0.12) 50%, transparent 75%);
  animation: heroGlowPulse1 8s ease-in-out infinite alternate;
}

/* Layer 2: Vibrant Electric Accent Glow behind Terminal */
html:not(.dark) .hero-light-glow-2 {
  top: 10%;
  right: 5%;
  width: 550px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(59, 130, 246, 0.09) 60%, transparent 80%);
  animation: heroGlowPulse2 10s ease-in-out infinite alternate;
}

/* Layer 3: Cyan/Turquoise Soft Ambient Base Glow */
html:not(.dark) .hero-light-glow-3 {
  bottom: 0%;
  left: 30%;
  width: 700px;
  height: 350px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, rgba(59, 130, 246, 0.07) 55%, transparent 75%);
}

@keyframes heroGlowPulse1 {
  0% { transform: scale(0.95) translate(0, 0); opacity: 0.8; }
  100% { transform: scale(1.08) translate(20px, -15px); opacity: 1; }
}

@keyframes heroGlowPulse2 {
  0% { transform: scale(1) translate(0, 0); opacity: 0.85; }
  100% { transform: scale(1.12) translate(-15px, 20px); opacity: 1; }
}

/* 2-Column Hero Grid Container */
.hero-grid-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 992px) {
  .hero-grid-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 992px) {
  .hero-left {
    align-items: center;
    text-align: center;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #3b82f6 !important;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a !important;
  margin: 0 0 1.25rem 0;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.375rem;
  }
}

.highlight-green {
  color: #10b981 !important;
}

html.dark .highlight-green {
  color: #34d399 !important;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.65;
  color: #475569 !important;
  max-width: 560px;
  margin: 0 0 2rem 0;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------------- WORLD-CLASS macOS LIVE TERMINAL WINDOW ---------------- */
.hero-right {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.mac-terminal-window {
  width: 100%;
  max-width: 560px;
  background: #0b1020 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 40px rgba(37, 99, 235, 0.18);
  overflow: hidden;
  position: relative;
  animation: terminalFloat 6s ease-in-out infinite;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.mac-terminal-window:hover {
  box-shadow: 0 30px 75px -15px rgba(0, 0, 0, 0.75), 0 0 50px rgba(37, 99, 235, 0.3);
}

@keyframes terminalFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.terminal-header {
  background: #151926;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.t-red { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
.t-yellow { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.t-green { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }

.terminal-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: SFMono-Regular, Consolas, Monaco, monospace;
  font-size: 0.8125rem;
  color: #94a3b8;
  font-weight: 600;
}

.t-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: 'JetBrains Mono', Fira Code, SFMono-Regular, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #e2e8f0;
  height: 180px;
  max-height: 180px;
  overflow: hidden;
  text-align: left;
  background: #0b1020;
}

.terminal-line {
  margin-bottom: 0.35rem;
  word-break: break-word;
  animation: lineFadeIn 0.25s ease-out forwards;
}

@keyframes lineFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.term-cmd-line {
  color: #60a5fa;
  font-weight: 600;
}

.term-output {
  color: #e2e8f0;
}

.term-success {
  color: #60a5fa;
  font-weight: 600;
}

.term-cyan {
  color: #38bdf8;
}

.terminal-prompt-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #60a5fa;
  font-weight: 600;
}

.prompt-symbol {
  color: #60a5fa;
}

.blinking-cursor {
  display: inline-block;
  color: #60a5fa;
  font-weight: 700;
  margin-left: 2px;
  animation: cursorBlink 0.5s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 55px -15px rgba(37, 99, 235, 0.22);
}

.preview-card-header {
  background: #f8fafc;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.preview-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.preview-title {
  font-family: SFMono-Regular, Consolas, Monaco, monospace;
  font-size: 0.8125rem;
  color: #475569;
  font-weight: 600;
}

.preview-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-radius: 9999px;
  font-weight: 600;
}

.preview-card-body {
  padding: 1.5rem;
  font-family: SFMono-Regular, Consolas, Monaco, monospace;
}

.code-line {
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: #0f172a;
}

.code-keyword { color: #2563eb; font-weight: 700; }
.code-comment { color: #94a3b8; font-style: italic; }
.code-func { color: #0284c7; font-weight: 600; }
.code-string { color: #059669; }

.preview-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 1.25rem 0;
}

.preview-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.preview-stat .stat-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #2563eb;
  font-family: 'Space Grotesk', sans-serif;
}

.preview-stat .stat-text {
  font-size: 0.7rem;
  color: #64748b;
  font-family: system-ui, sans-serif;
  font-weight: 500;
}

.preview-bar-group {
  margin-bottom: 0.75rem;
  font-family: system-ui, sans-serif;
}

.preview-bar-group:last-child {
  margin-bottom: 0;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

.bar-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.bar-fill { height: 100%; border-radius: 9999px; }
.bar-blue { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.bar-sky { background: linear-gradient(90deg, #0284c7, #38bdf8); }

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-left {
    text-align: center;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-actions {
    justify-content: center;
  }
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: #3b82f6;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-hero-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  text-decoration: none;
}

.hero-install-pill, .cta-install-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.install-prefix {
  color: #3b82f6 !important;
  font-weight: 600;
}

.install-cmd {
  font-family: var(--font-mono);
  background: transparent;
  padding: 0;
  color: inherit;
}

.copy-btn {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.copy-btn:hover {
  color: #2563eb;
}

.copy-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: #0f172a;
  color: #ffffff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.copy-btn.copied .copy-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ---------------- FEATURES SECTION (IMAGE 3) ---------------- */
.features-section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #3b82f6 !important;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a !important;
  margin: 0;
  line-height: 1.2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.feature-card {
  grid-column: span 6;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.4) !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}

.feature-card-featured {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9) 0%, rgba(219, 234, 254, 0.4) 100%) !important;
  border-color: rgba(191, 219, 254, 0.8) !important;
}

@media (max-width: 768px) {
  .feature-card {
    grid-column: span 12;
  }
}

.card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a !important;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #64748b !important;
  margin: 0;
}

/* ---------------- STATS SECTION (IMAGE 4) ---------------- */
.stats-section {
  padding: 4rem 0;
  border-top: 1px solid #f1f5f9 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.5rem 0 !important;
}

.stat-value {
  font-size: 3.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #3b82f6 !important;
  line-height: 1;
  margin-bottom: 0.75rem;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.stat-value.stat-pulse-active {
  animation: statGlowPulse 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes statGlowPulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.35); }
  100% { transform: scale(1); filter: brightness(1); }
}

.stat-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #64748b !important;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Green Live Indicator Badge */
.live-dot-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  font-size: 0.725rem;
  font-weight: 600;
  color: #10b981 !important;
  margin-left: 0.3rem;
}

.live-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: livePulseAnim 1.8s ease-in-out infinite;
}

@keyframes livePulseAnim {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 4px #10b981;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.7;
    box-shadow: 0 0 10px #10b981;
  }
}

@keyframes livePulseAnim {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* ---------------- MANIFESTO SECTION (IMAGE 5) ---------------- */
.manifesto-section {
  padding: 6rem 0;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.06) 0%, rgba(255, 255, 255, 0) 70%) !important;
}

.manifesto-header {
  margin-bottom: 2.5rem;
}

.manifesto-list {
  display: flex;
  flex-direction: column;
}

.manifesto-item {
  display: flex;
  align-items: flex-start;
  gap: 4rem;
  padding: 3.5rem 0;
  border-bottom: 1px solid #e2e8f0 !important;
}

.manifesto-item:first-child {
  border-top: 1px solid #e2e8f0 !important;
}

@media (max-width: 768px) {
  .manifesto-item {
    flex-direction: column;
    gap: 1.25rem;
    padding: 2.5rem 0;
  }
}

.manifesto-num {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 0.95;
  color: #3b82f6 !important;
  min-width: 120px;
  letter-spacing: -0.05em;
}

.manifesto-body {
  flex: 1;
}

.manifesto-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a !important;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.manifesto-desc {
  font-family: system-ui, -apple-system, sans-serif !important;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #475569 !important;
  margin: 0;
  max-width: 720px;
}

/* ---------------- CTA SECTION (IMAGE 6) ---------------- */
.cta-section {
  padding: 4rem 0 6rem 0;
}

.cta-card {
  background: #091026 !important;
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
  border-radius: 28px;
  padding: 4.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(9, 16, 38, 0.5), 0 0 50px rgba(37, 99, 235, 0.15);
  position: relative;
  overflow: hidden;
}

/* Screenshot 2 Animated Blueprint Grid Lines */
.cta-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(59, 130, 246, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59, 130, 246, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Ambient Pulsing Blue Glow Aura */
.cta-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 320px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(59, 130, 246, 0.12) 50%, transparent 75%);
  filter: blur(40px);
  pointer-events: none;
  animation: ctaGlowPulse 4s ease-in-out infinite alternate;
}

@keyframes ctaGlowPulse {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

.cta-sparkle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.cta-title {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.03em;
  margin: 0 0 2.5rem 0;
  max-width: 700px;
  line-height: 1.15;
}

@media (max-width: 640px) {
  .cta-title {
    font-size: 2rem;
  }
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* CTA Install Pill Fix (100% Bright White Visible Text in Light & Dark Mode) */
.cta-install-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.35rem;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(37, 99, 235, 0.2);
  color: #ffffff !important;
}

.cta-install-pill *,
.cta-install-pill code,
.cta-install-pill .install-cmd {
  color: #ffffff !important;
  background: transparent !important;
  border: none !important;
  font-weight: 600 !important;
  font-family: SFMono-Regular, Consolas, Monaco, monospace !important;
  box-shadow: none !important;
  font-size: 0.9375rem !important;
}

.cta-install-pill .install-prefix {
  color: #60a5fa !important;
  font-weight: 700 !important;
}

.cta-install-pill .copy-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.cta-install-pill .copy-btn:hover {
  color: #ffffff !important;
}

.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: #3b82f6;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-cta-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  text-decoration: none;
}

/* ---------------- LANDING FOOTER (IMAGE 7) ---------------- */
.landing-footer {
  position: relative;
  padding: 6rem 1.5rem 4rem 1.5rem;
  color: #ffffff !important;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

html.dark .landing-footer {
  background: #15161a !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html:not(.dark) .landing-footer {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

.landing-footer .watermark-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: clamp(11rem, 20vw, 19rem);
  font-weight: 900;
  letter-spacing: -0.02em !important;
  line-height: 0.8;
  margin: 0;
  padding: 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  box-sizing: border-box;
}

html.dark .landing-footer .watermark-bg {
  color: rgba(255, 255, 255, 0.05) !important;
}

html:not(.dark) .landing-footer .watermark-bg {
  color: rgba(15, 23, 42, 0.07) !important;
}

/* Scroll Rise Animation: Rise up smoothly from bottom into 100% dead center */
.landing-footer .watermark-bg.scroll-reveal {
  opacity: 0;
  transform: translate(-50%, -20%);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-footer .watermark-bg.scroll-reveal.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.landing-footer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.landing-footer .brand-logo--light {
  display: none !important;
}

.landing-footer .brand-logo--dark {
  display: block !important;
  height: 32px;
  width: auto;
}

.landing-footer-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #94a3b8 !important;
  max-width: 600px;
  margin: 0 0 2rem 0;
}

.landing-footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.landing-footer-socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8 !important;
  text-decoration: none;
  transition: all 0.2s ease;
}

.landing-footer-socials a:hover {
  color: #3b82f6 !important;
  border-color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.landing-footer-meta {
  font-size: 0.8125rem;
  color: #64748b !important;
}

/* Header & Element Overrides for Landing Page */
html:not(.dark) .page-home .topbar .brand-logo--light {
  display: block !important;
}

html:not(.dark) .page-home .topbar .brand-logo--dark {
  display: none !important;
}

html.dark .page-home .topbar .brand-logo--light {
  display: none !important;
}

html.dark .page-home .topbar .brand-logo--dark {
  display: block !important;
}

html:not(.dark) .landing-footer .brand-logo--light {
  display: block !important;
  height: 32px;
  width: auto;
}

html:not(.dark) .landing-footer .brand-logo--dark {
  display: none !important;
}

html.dark .landing-footer .brand-logo--light {
  display: none !important;
}

html.dark .landing-footer .brand-logo--dark {
  display: block !important;
  height: 32px;
  width: auto;
}

.page-home .brand-version {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
}

/* Light mode search trigger & install pill */
html:not(.dark) .page-home .search-trigger {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  border-radius: 9999px !important;
  padding: 0.375rem 0.875rem !important;
}

html:not(.dark) .page-home .search-trigger-text {
  color: #64748b !important;
}

html:not(.dark) .page-home .search-trigger-kbd {
  background: #ffffff !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
}

html:not(.dark) .page-home .hero-left code,
html:not(.dark) .page-home .hero-left .install-cmd {
  background: transparent !important;
  border: none !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Explicit CTA Install Pill Rule for Light & Dark Mode */
html:not(.dark) .page-home .cta-install-pill code,
html:not(.dark) .page-home .cta-install-pill .install-cmd,
html.dark .page-home .cta-install-pill code,
html.dark .page-home .cta-install-pill .install-cmd {
  color: #ffffff !important;
  background: transparent !important;
}

/* Dark mode landing page overrides */
html.dark .page-home .topbar {
  background: rgba(21, 22, 26, 0.9) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html.dark .page-home .topbar-nav-link {
  color: #ffffff !important;
}

html.dark .page-home .topbar-nav-link:hover {
  color: #3b82f6 !important;
}

html.dark .page-home .search-trigger {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-radius: 9999px !important;
  padding: 0.375rem 0.875rem !important;
}

html.dark .page-home .search-trigger-text {
  color: #f8fafc !important;
}

html.dark .page-home .search-trigger-kbd {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

html.dark .page-home .theme-toggle,
html.dark .page-home .topbar-link {
  color: #ffffff !important;
}

html.dark .page-home .theme-toggle:hover,
html.dark .page-home .topbar-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

html.dark .page-home .hero-badge {
  background: rgba(37, 99, 235, 0.2) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  color: #60a5fa !important;
}

html.dark .page-home .hero-title {
  color: #ffffff !important;
}

html.dark .page-home .hero-subtitle {
  color: #f8fafc !important;
}

html.dark .page-home .hero-install-pill {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html.dark .page-home code,
html.dark .page-home .install-cmd {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

html.dark .page-home .install-prefix {
  color: #60a5fa !important;
}

html.dark .page-home .section-tag {
  color: #60a5fa !important;
}

html.dark .page-home .section-heading {
  color: #ffffff !important;
}

html.dark .page-home .feature-card {
  background: #1c1d22 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .page-home .feature-card-featured {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, #1c1d22 100%) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
}

html.dark .page-home .feature-title {
  color: #ffffff !important;
}

html.dark .page-home .feature-desc {
  color: #f8fafc !important;
}

html.dark .page-home .stat-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html.dark .page-home .stat-value {
  color: #60a5fa !important;
}

html.dark .page-home .stat-label {
  color: #f8fafc !important;
}

html.dark .page-home .manifesto-section {
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.15) 0%, rgba(21, 22, 26, 0) 70%) !important;
}

html.dark .page-home .manifesto-item {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .page-home .manifesto-num {
  color: #60a5fa !important;
}

html.dark .page-home .manifesto-title {
  color: #ffffff !important;
}

html.dark .page-home .manifesto-desc {
  color: #f8fafc !important;
}

html.dark .page-home .cta-card {
  background: #1c1d22 !important;
  background-image: radial-gradient(rgba(59, 130, 246, 0.25) 1px, transparent 1px) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Dark Mode Hero Spotlight Beam & Curved Horizon Arc (User Image) */
html.dark .spotlight-beam {
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(96, 165, 250, 0.5) 0%,
    rgba(59, 130, 246, 0.25) 45%,
    transparent 75%
  );
  filter: blur(45px);
}

html.dark .horizon-arc {
  border-top-color: rgba(96, 165, 250, 0.95);
  box-shadow: 0 -18px 55px rgba(59, 130, 246, 0.9), inset 0 14px 45px rgba(96, 165, 250, 0.6);
}

html.dark .horizon-glow {
  background: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.5) 0%, rgba(37, 99, 235, 0.18) 55%, transparent 80%);
}

/* ---------------- LEGAL FOOTER BAR & MODALS ---------------- */
.landing-footer-legal-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.84375rem;
  color: #94a3b8;
  margin-top: 1rem;
  z-index: 10;
  position: relative;
}

.copyright-item {
  font-weight: 600;
  color: inherit;
}

.legal-dot {
  opacity: 0.5;
  user-select: none;
}

.legal-item-link,
.legal-item-btn,
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  color: #94a3b8 !important;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.legal-item-link:hover,
.legal-item-btn:hover,
.footer-link-btn:hover {
  color: #3b82f6 !important;
  text-decoration: underline;
}

/* Modals Backdrop & Glassmorphism Card */
.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.legal-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.legal-modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .legal-modal-card {
  background: #1c1d22 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.legal-modal-backdrop.is-open .legal-modal-card {
  transform: translateY(0) scale(1);
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

html.dark .legal-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.legal-modal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

html.dark .legal-modal-title {
  color: #ffffff;
}

.legal-modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.legal-modal-close:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}

html.dark .legal-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.legal-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #334155;
}

html.dark .legal-modal-body {
  color: #cbd5e1;
}

.legal-effective-date {
  font-size: 0.8125rem;
  color: #3b82f6;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.legal-modal-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem 0;
  color: #0f172a;
}

html.dark .legal-modal-body h3 {
  color: #ffffff;
}

.legal-inline-link {
  color: #3b82f6 !important;
  font-weight: 600;
  text-decoration: underline;
}

.legal-inline-link:hover {
  color: #2563eb !important;
}

html.dark .ambient-dots {
  background-image: radial-gradient(circle, rgba(96, 165, 250, 0.2) 1px, transparent 1px);
}

/* Edit on GitHub link */
.content-footer-meta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

html.dark .content-footer-meta {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.edit-github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.edit-github-link:hover {
  color: #3b82f6 !important;
}




