/* ═══════════════════════════════════════════════════════════════════════════
   XC Wiki — IAN Brand Design System (Mintlify-style layout)
   Typefaces: DM Sans · JetBrains Mono (code)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── IAN Brand Tokens ──────────────────────────────────────────────────────── */
:root {
  --ian-amber-gold:  #FFB500;
  --ian-coral-red:   #FF5757;
  --ian-sky-blue:    #13A3E0;
  --ian-fresh-green: #7ED956;
  --ian-ink-black:   #0B111A;
  --ian-charcoal:    #231F20;
  --ian-light-gray:  #E1E0E0;
  --ian-azure-blue:  #00A9EB;

  --ian-gradient-primary: linear-gradient(to right, #FFB500 0%, #FF5757 35%, #13A3E0 80%, #7ED956 100%);
  --ian-gradient-tagline:  linear-gradient(to right, #FFB500 0%, #FF5757 50%, #239ED7 100%);



  --font-ui:   'DM Sans', 'Avenir Next LT Pro Demi', 'Avenir Next', sans-serif;
  --font-body: 'DM Sans', 'Avenir Next LT Pro', 'Avenir Next', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --topbar-h:    60px;
  --sidebar-w:   268px;
  --toc-w:       228px;
  --content-max: 780px;
  --r:           8px;
  --r-lg:        10px;
  --ease:        0.18s cubic-bezier(0.4,0,0.2,1);
}

/* ── Dark Theme (default) ──────────────────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:       #0B0F17;
  --bg-2:     #12161dc2;
  --bg-3:     #252f47;
  --bg-4:     #1f2d42;
  --bg-5:     #16202f57;
  --border:   #1e2d42;
  --border-2: #2a3f5f;
  --border-3: #22262c;
  --text:     #F1F5F9;
  --text-1:   #cad5d9c1;
  --text-2:   #94A3B8;
  --text-3:   #64748B;
  --text-shadow:rgba(241, 211, 169, 0.741);


  --gold:     #FFB500;
  --gold-dim: rgba(255,181,0,0.08);
  --gold-mid: rgba(255,181,0,0.16);
  --gold-glow:rgba(255,181,0,0.24);

  --success:    #7ED956;
  --success-bg: rgba(126,217,86,0.10);
  --warning:    #FFB500;
  --warning-bg: rgba(255,181,0,0.10);
  --danger:     #FF7070;
  --danger-bg:  rgba(255,112,112,0.10);
  --info:       #47BEF0;
  --info-bg:    rgba(71,190,240,0.10);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.55);
  --shadow-cd: 3px 3px 5px rgba(17, 33, 42, 0.152);
  --title-gradient-blur: 60px;
  --gradient-shadow: rgba(98, 72, 31, 0.055);

  --hero-shape-opacity: 0.45;
  --card-thumb-bg: #0f131b;
  --card-grid-line: rgba(255,181,0,0.10);
  --toc-line: rgba(255,255,255,0.28);
}

/* ── Light Theme ──────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:       #FFFFFF;
  --bg-2:     #ebe4d417;
  --bg-3:     #dde3e9;
  --bg-4:     #E8EDF3;
  --bg-5:     #ebe4d417;
  --border:   #E2E8F0;
  --border-2: #CBD5E1;
  --border-3: #5f708697;
  --text:     #0F172A;
  --text-1:   #5f7086;
  --text-2:   #475569;
  --text-3:   #94A3B8;
  --text-shadow:rgba(227, 192, 136, 0.741);


  --gold:     #E6A300;
  --gold-dim: rgba(230,163,0,0.07);
  --gold-mid: rgba(230,163,0,0.14);
  --gold-glow:rgba(230,163,0,0.20);

  --success:    #16A34A;
  --success-bg: rgba(22,163,74,0.07);
  --warning:    #D97706;
  --warning-bg: rgba(217,119,6,0.07);
  --danger:     #DC2626;
  --danger-bg:  rgba(220,38,38,0.07);
  --info:       #0284C7;
  --info-bg:    rgba(2,132,199,0.07);

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.05);
  --shadow-md: 0 4px 8px rgba(15,23,42,0.07);
  --shadow-lg: 0 8px 24px rgba(15,23,42,0.10);
  --shadow-cd: 3px 3px 5px rgba(238, 234, 234, 0.421);
  --title-gradient-blur: 80px;
  --gradient-shadow: rgba(200, 160, 100, 0.055);

  --hero-shape-opacity: 0.45;
  --card-thumb-bg: white;
  --card-grid-line: rgba(230,163,0,0.13);
  --toc-line: rgba(0,0,0,0.22);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Offset anchored headings below the fixed topbar */
.prose h2[id], .prose h3[id], .prose h4[id] {
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* IAN gradient accent bar */
body::before {
  content: '';
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ian-gradient-primary);
  z-index: 9999;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--font-mono); }

h1,h2,h3,h4,h5,h6 { font-family: var(--font-ui); font-weight: 600; }

/* ── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,181,0,0.25); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,181,0,0.50); }

:focus-visible { outline: 2px solid var(--ian-sky-blue) !important; outline-offset: 2px !important; }
::selection { background: var(--gold-mid); color: var(--text); }

/* ── Topbar ─────────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 3px; left: 0; right: 0; z-index: 100;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.tb-left  { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tb-center { flex: 1; max-width: 440px; }
.tb-right { display: flex; align-items: center; gap: 4px; }

.home-link {
  font-family: var(--font-ui);
  font-size: 17px; font-weight: 700;
  letter-spacing: -1px; 
  line-height: -1;
  margin-bottom: 10px;
  position: relative;
  top: 10px;

  
}

/* ── Logo ───────────────────────────────────────────────────────────────────── */
.logo-link { display: flex; align-items: center; text-decoration: none; }
.ian-logo-img {
  height: 44px; width: auto; max-width: 140px;
  object-fit: contain; object-position: left center; display: block;

}

.logo-row{
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ian-main-logo-img {
  height: 94px; width: auto; 
  object-fit: contain; 
  margin-bottom: 55px;
}
[data-theme="light"] .ian-logo-dark  { display: none; }
[data-theme="light"] .ian-logo-light { display: block; }
[data-theme="dark"]  .ian-logo-dark  { display: block; }
[data-theme="dark"]  .ian-logo-light { display: none; }
.ian-logo-dark  { display: block; }
.ian-logo-light { display: none; }
[data-theme="dark"]  img[data-theme-show="light"] { display: none; }
[data-theme="light"] img[data-theme-show="dark"]  { display: none; }

.xc-logo { display: flex; align-items: baseline; gap: 3px; font-family: var(--font-ui); font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }
.logo-mark { font-size: 20px; line-height: 1; background: var(--ian-gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo-word { color: var(--text); font-size: 17px; font-weight: 600; }

/* ── Product switcher ───────────────────────────────────────────────────────── */
.product-switcher {
  display: flex; align-items: center; gap: 6px;
}
.ps-item {
  display: flex; align-items: center;
  font-family: var(--font-ui); font-size: 17px; font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.3px;
  transition: color var(--ease);
}
.ps-item:hover { color: var(--gold); }
.ps-active { color: var(--gold) !important; }
.ps-icon, .sb-prod-icon, .nav-icon { display: none !important; }

/* ── Search bar ─────────────────────────────────────────────────────────────── */
.search-bar {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: 36px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text-2); font-size: 13.5px;
  transition: border-color var(--ease), box-shadow var(--ease);
  cursor: text;
}
.search-bar:hover { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.sb-placeholder { flex: 1; text-align: left; }
.sb-kbd {
  background: var(--bg-4); border: 1px solid var(--border-2);
  border-radius: 5px; padding: 1px 6px;
  font-size: 11px; font-family: var(--font-ui); color: var(--text-3); white-space: nowrap;
}
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r);
  color: var(--text-3);
  transition: background var(--ease), color var(--ease);
}
.icon-btn:hover { background: var(--bg-3); color: var(--gold); }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
  padding-top: calc(var(--topbar-h) + 3px);
  min-height: 100vh;
}
.main-content {
  min-width: 0;
  padding: 0 48px 80px;
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  position: sticky; top: calc(var(--topbar-h) + 3px);
  height: calc(100vh - var(--topbar-h) - 3px);
  overflow-y: auto; 
  overflow-x: hidden;
  padding: 20px 0 40px;
  border-right: 1px solid var(--border);
  background: var(--bg);
  min-width: 200px;
  max-width: 310px;
  width: var(--sidebar-width, 280px);
}
.sidebar-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
    z-index: 10;
}
.sidebar-resizer:hover,
.sidebar-resizer.dragging {
    background: var(--accent,var(--ian-light-gray));
    width: 1 px;
}
body.sidebar-resizing {
    cursor: col-resize;
    user-select: none;
}

body.sidebar-resizing * {
    cursor: col-resize !important;
}

.sb-prod-header {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 16px 16px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.sb-prod-title { display: block; font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; color: var(--text); }
.sb-prod-desc  { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.4; margin-top: 2px; }

.nav-items { padding: 8px 8px; }

/* ── Sidebar section label ───────────────────────────────────────────────────── */
.sidebar-section-label {
  display: block;
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.9px;
  color: var(--text-3);
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

/* ── Product-level sidebar items ─────────────────────────────────────────────── */
.nav-product-section { margin: 2px 0; }
.nav-product-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px; font-weight: 600;
  font-family: var(--font-ui); color: var(--text-2);
  transition: background var(--ease), color var(--ease);
}
.nav-product-btn:hover { background: var(--bg-3); color: var(--text); }
.nav-product-btn.prod-active { background: var(--gold-dim); color: var(--text); }
.nav-product-link {
  display: flex; align-items: center; gap: 9px;
  flex: 1; min-width: 0; color: inherit; text-decoration: none;
  font: inherit;
}
.nav-product-link:hover { color: var(--text); }
.nav-product-link.prod-active { color: var(--gold); }
.prod-label { flex: 1; text-align: left; }
.nav-product-toggle {
  flex-shrink: 0; padding: 4px; border-radius: 4px;
  color: inherit; background: none; border: none; cursor: pointer;
}
.nav-product-toggle:hover { background: var(--bg-3); }
.nav-product-btn .nav-chevron {
  color: var(--text-3);
  opacity: 1;
  flex-shrink: 0;
  transition: transform var(--ease), color var(--ease);
}
.nav-product-btn:hover .nav-chevron { color: var(--text-2); }
.nav-product-btn.open .nav-chevron, .nav-product-toggle.open .nav-chevron { transform: rotate(180deg); color: var(--gold); }
.nav-product-btn.prod-active .nav-chevron { color: var(--gold); }

/* Gold left border on active product's children */
.nav-product-btn.prod-active + .nav-sec-children {
  border-left-color: var(--gold);
}

/* Section group headers — Mintlify style */
.nav-section { margin: 12px 0 2px; }
.nav-sec-btn {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 5px 10px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600;
  font-family: var(--font-ui); color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.7px;
  transition: color var(--ease);
}
.nav-sec-btn:hover { color: var(--text-2); }
.nav-sec-link {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0; color: inherit; text-decoration: none;
}
.nav-sec-link:hover { color: var(--text-1); }
.nav-sec-link.nav-active { color: var(--gold); }
.nav-sec-toggle {
  flex-shrink: 0; padding: 2px; border-radius: 4px;
  color: inherit; background: none; border: none; cursor: pointer;
}
.nav-sec-toggle:hover { background: var(--bg-3); }
.nav-sec-label { flex: 1; text-align: left; }
.nav-chevron { flex-shrink: 0; transition: transform var(--ease); }
.nav-sec-btn.open .nav-chevron, .nav-sec-toggle.open .nav-chevron { transform: rotate(180deg); }
.nav-sec-children { overflow: hidden; max-height: 0; transition: max-height 0.25s cubic-bezier(0.4,0,0.2,1); padding-left: 14px; border-left: 2px solid var(--border); margin-left: 12px; margin-top: 2px; margin-bottom: 4px; }
.nav-sec-children.open { max-height: 800px; }
.nav-sec-children.collapsed { max-height: 0; }

/* Nav links */
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 5.5px 10px; border-radius: 6px;
  font-size: 13.5px; color: var(--text-3); line-height: 1.45;
  transition: background var(--ease), color var(--ease);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative;
}
.nav-link:hover { background: var(--bg-3); color: var(--text-2); }
.nav-active {
  background: var(--gold-dim) !important;
  color: var(--gold) !important;
  font-weight: 500;
}
.nav-active::before {
  content: '';
  position: absolute; left: 0;
  width: 2px; height: 18px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

/* ── TOC sidebar ─────────────────────────────────────────────────────────────── */
.toc-sidebar {
  position: sticky; top: calc(var(--topbar-h) + 3px);
  height: calc(100vh - var(--topbar-h) - 3px);
  overflow-y: auto; overflow-x: hidden;
  padding: 32px 0 40px;
  border-left: 1px solid var(--border);
}
.toc-inner { padding: 0 20px; }
.toc-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 600;
  color: var(--text-3); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.toc-title svg { color: var(--text-3); flex-shrink: 0; }

/* Links container */
.toc-links {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 14px;
  max-height: calc(100vh - 230px);
  overflow-y: auto;
}

/* Continuous vertical track line behind all links */
.toc-links::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--toc-line);
  height: var(--toc-line-height, 100%);
  border-radius: 1px;
}

/* Individual TOC link */
.toc-link {
  position: relative;
  display: block;
  padding: 5px 0 5px 0;
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  line-height: 1.4;
  transition: color var(--ease);
}
.toc-link:hover { color: var(--text-1); }

/* Active link: gold text + gold bar */
.toc-link[data-active="true"] {
  color: var(--gold);
  font-weight: 500;
}

/* Gold highlight bar for the active link — covers the track line */
.toc-link[data-active="true"]::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 1.5px;
}

/* Depth 1 (h3) items — indented */
.toc-link[data-depth="1"] {
  padding-left: 14px;
  font-size: 12px;
}

/* ── Hero Section ─────────────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  padding: 72px 0 56px;
  text-align: center;
  margin-bottom: 40px;
}
/* Subtle noise texture overlay */
.hero-section::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}
.hero-shapes {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  border: 2px solid var(--border-3);border-radius: var(--r-lg);
 
}
.hero-shape {
  position: absolute;
  color: var(--gold);
  opacity: var(--hero-shape-opacity);
 
}
/* Shape positions — scattered around edges */
.hs1 { width: 102px; top: 10%; left: 5%; rotate: 3deg;}
.hs2 { width: 100px; top: 20%; right: 13%; rotate: -6deg; }
.hs3 { width: 105px; bottom: 5%; left: 3%; rotate: 7deg;}
.hs4 { width: 100px; top: 45%; right: 1%; rotate: 1deg;}
.hs5 { width: 100px; bottom: 25%; left: 20%; rotate: -9deg; }
.hs6 { width: 98px; top: 0%; right: 30%; }
.hs7 { width: 105px; top: 1%; right: 45%; rotate: -90deg;}
.hs8 { width: 105px; bottom: 50%; right: 0%; }
.hs9 { width: 102px; top: 45%; left: 69%; rotate: -5deg; }
.hs10 { width: 103px; top: 30%; left: 19%; rotate: -5deg; }
.hs11 { width: 105px; bottom: 15%; left: 8%; rotate: 9deg; }
.hs12 { width: 110px; top: 2%; left: 15%; }
.hs13 { width: 100px; top: 1%; right: 55%; rotate: -4deg; }
.hs14 { width: 106px; top: 5%; left: 25%; }
.hs15 { width: 115px; top: 6%; right: 18%; }
.hs16 { width: 105px; top: 5%; left: 56%;rotate: 7deg; }
.hs17 { width: 99px; top: 5%; right: 3%; rotate: 2deg; }
.hs18 { width: 95px; top: 5%; right: 43%; rotate: 2deg; }
.hs19 { width: 100px; top: 5%; right: 13%; rotate: -4deg; }
.hs20 { width: 95px; top: 5%; right: 3%; rotate: 8deg; }
.hs21 { width: 105px; bottom: 5%; right: 24%; rotate: 8deg; }
.hs22 { width: 95px; bottom: 5%; right: 83%; rotate: -8deg; }
.hs23 { width: 95px; bottom: 5%; left: 79%; rotate: -2deg; }
.hs24 { width: 95px; bottom: 5%; right: 29%; rotate: 15deg; }
.hs25 { width: 95px; bottom: 5%; left: 14%; rotate: 5deg; }

.hero-content {
  position: relative; z-index: 1;
  max-width: 600px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-direction: column; align-items: center;
}
.hero-title-row {
  display: flex; align-items: center; justify-content: center; gap: 16px;
 
}

.hero-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 300px;
    background: radial-gradient(
        ellipse at center,
        var(--bg) 0%,
        var(--bg) 30%,
        transparent 88%
    );
    filter: blur(var(--title-gradient-blur));
    z-index: -1;
    pointer-events: none;
}



.hero-title-row {
  display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 60px;
}
.hero-product-logo {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: contain; flex-shrink: 0;
  background: var(--bg-5); border: 1px solid var(--border-2); padding: 5px;
  box-shadow: 0 0px 88px var(--text-shadow);
}
.hero-title {
  font-family: var(--font-ui);
  font-size: 46px; font-weight: 700;
  letter-spacing: -1.2px; line-height: 1.1;
  color: var(--text);
  margin-bottom: 14px;
  text-shadow: 0 0 48px var(--text-shadow);
}
.hero-sub {
  font-size: 16px; color: var(--text-2);
  line-height: 1.65; max-width: 440px; margin: 0 auto;
  text-shadow: 0 0 28px var(--text-shadow);
  opacity: 0.8;      
}

/* ── Feature Cards Grid ──────────────────────────────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}
.feat-card {
  background: var(--bg-2);
  border: 2px solid var(--border-3);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: block;
  color: inherit; text-decoration: none;
  transition: border-color var(--ease), transform var(--ease);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><filter id='paper'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='5' stitchTiles='stitch' result='noise'/><feColorMatrix type='matrix' values='1 0 0 0 0  0 1 0 0 0  0 0 0.9 0 0  0 0 0 1 0' result='brownish'/><feBlend in='brownish' in2='noise' mode='overlay'/></filter><rect width='100%' height='100%' fill='#f5e6c4' filter='url(%23paper)'/></svg>");
  background-size: cover;
  
}


.feat-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255,181,0,0.10);
}
.fc-inner { display: flex; flex-direction: column; height: 100%; }
.fc-thumb {
  position: relative;
  filter: sepia(0.01);
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--card-thumb-bg);
  /* Dashed grid lines — like Mintlify card thumbnails */
  background-image:
    linear-gradient(var(--card-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--card-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow: hidden;
}

.fc-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
       
        radial-gradient(
            ellipse at 5% 10%,
            var(--gradient-shadow) 0%,
            transparent 30%
        ),
        
        radial-gradient(
            ellipse at 95% 90%,
            var(--gradient-shadow) 0%,
            transparent 30%
        );
    pointer-events: none;
    z-index: 1;
}

.fc-thumb svg {
  position: relative;  /* 👈 Dodaj to! */
  z-index: 2;
  width: 130px; height: 130px;
  color: var(--gold);
  opacity: 0.7;
  filter: drop-shadow(0 4px 16px rgba(255,181,0,0.25));
  transition: opacity var(--ease), transform var(--ease);
 
}
.feat-card:hover .fc-thumb svg {
  opacity: 0.95;
  transform: scale(1.05) translateY(-3px);
}
.fc-body { padding: 16px 18px 20px; }
.fc-title {
  display: flex; justify-content: center; align-items: center;
  font-weight: 50; font-size: 18px; font-style: italic;
  color: var(--text-1); margin-bottom: 5px;
  line-height: 1.65;
  letter-spacing: -1.55px;
  
  
}
.fc-desc {
  display: flex; justify-content: center; align-items: center; font-size: 13px;
  color: var(--text-2); line-height: 1.55;
}

/* ── Page content ────────────────────────────────────────────────────────────── */
.page-content { max-width: var(--content-max); padding-top: 40px; }

.breadcrumb {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 16px; font-size: 12.5px;
}
.bc-link { color: var(--text-3); transition: color var(--ease); }
.bc-link:hover { color: var(--gold); }
.bc-sep { color: var(--text-3); }
.bc-current { color: var(--text-2); }

.page-header { margin-bottom: 8px; }
.page-title {
  font-family: var(--font-ui); font-size: 34px; font-weight: 700;
  line-height: 1.15; letter-spacing: -0.7px; color: var(--text); margin-bottom: 8px;
}
.page-desc { font-size: 16px; color: var(--text-2); line-height: 1.6; }
.page-meta { display: flex; gap: 16px; margin: 12px 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.meta-item { font-size: 12px; color: var(--text-3); }

/* Status badge */
.status-bar { margin-bottom: 20px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 500; font-family: var(--font-ui);
}
.status-draft  { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(255,181,0,0.20); }
.status-review { background: var(--info-bg);    color: var(--info);    border: 1px solid rgba(71,190,240,0.20); }

/* ── Prose (markdown content) ─────────────────────────────────────────────────── */
.prose {
  margin-top: 28px; font-size: 15px; line-height: 1.8; color: var(--text);
}
.prose h1,.prose h2,.prose h3,.prose h4 {
  font-family: var(--font-ui); font-weight: 600; line-height: 1.3; color: var(--text); letter-spacing: -0.3px;
}
.prose h1 { font-size: 28px; margin: 40px 0 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.prose h1:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 17px; margin: 28px 0 10px; }
.prose h4 { font-size: 15px; margin: 24px 0 8px; color: var(--text-2); }

.prose p { margin-bottom: 16px; }
.prose strong { font-weight: 600; color: var(--text); }
.prose em { font-style: italic; }

.prose a {
  color: var(--ian-sky-blue); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: rgba(19,163,224,0.30);
  transition: text-decoration-color var(--ease), color var(--ease);
}
.prose a:hover { color: #47BEF0; text-decoration-color: #47BEF0; }
[data-theme="light"] .prose a { color: #0D7BAA; }
[data-theme="light"] .prose a:hover { color: var(--ian-sky-blue); }

.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 5px; }
.prose li > ul, .prose li > ol { margin-bottom: 4px; margin-top: 4px; }

.prose img {
  display: block;
  width: 100%;           /* fill the content column by default */
  max-width: 100%;       /* never overflow the column */
  height: auto;
  margin: 24px 0;
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.22);
  image-rendering: -webkit-optimize-contrast; /* crisp on high-DPI displays */
  image-rendering: crisp-edges;
}

/* Images with an explicit width= attribute — honour it but cap at column width */
.prose img[width] {
  width: auto;
  max-width: min(100%, calc(var(--content-max) - 0px));
}

/* Screenshot images — HD, full content-column width, crisp rendering */
.prose img.screenshot {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 28px 0;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
  image-rendering: auto;          /* let the browser upscale smoothly */
  -webkit-font-smoothing: auto;
}

@media (max-width: 900px) {
  .prose img,
  .prose img[width],
  .prose img.screenshot { width: 100%; max-width: 100%; }
}

.prose blockquote {
  margin: 20px 0; padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: var(--gold-dim);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--text-2); font-style: italic;
}
.prose code {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; font-size: 13px; color: #E8C97A;
}
[data-theme="light"] .prose code { color: #92400e; background: #fef3c7; border-color: #fde68a; }

.prose table {
  width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px;
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.prose th {
  background: var(--bg-3); padding: 10px 14px; text-align: left;
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-2);
}
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
.prose tr:last-child td { border-bottom: none; }
.prose tr:hover td { background: var(--bg-2); }
.prose hr { border: none !important; height: 1px !important; background: var(--ian-gradient-primary) !important; opacity: 0.3; margin: 32px 0; }
.prose input[type="checkbox"] { accent-color: var(--gold); margin-right: 6px; }

/* ── Code blocks ──────────────────────────────────────────────────────────────── */
.code-block {
  margin: 20px 0; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid #1e2d42; background: #070E17;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 14px; background: #0c1829; border-bottom: 1px solid #1e2d42;
}
.code-lang { font-family: var(--font-mono); font-size: 11px; color: #5a6472; text-transform: uppercase; letter-spacing: 0.8px; }
.copy-btn {
  display: flex; align-items: center; gap: 5px; padding: 3px 10px;
  background: #172235; border: 1px solid #243347; border-radius: 5px;
  font-size: 11.5px; color: #8E97A6;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.copy-btn:hover { background: #1E2D42; color: var(--text); border-color: var(--gold); }
.copy-btn.copied { color: var(--success); border-color: rgba(126,217,86,0.3); }
.code-block pre { margin: 0 !important; padding: 16px 18px !important; background: transparent !important; overflow-x: auto; border-radius: 0 !important; }
.code-block pre code { background: none !important; border: none !important; padding: 0 !important; font-size: 13px !important; line-height: 1.65 !important; color: #abb2bf !important; font-family: var(--font-mono) !important; }

/* ── Callouts ─────────────────────────────────────────────────────────────────── */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 20px 0; padding: 14px 16px;
  border-radius: var(--r-lg); border: 1px solid transparent;
  font-size: 14px; position: relative;
}
.callout-icon { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.callout-body { flex: 1; }
.callout-label { display: block; font-weight: 600; font-family: var(--font-ui); font-size: 13px; margin-bottom: 3px; }
.callout-text { line-height: 1.6; }
.callout-tip     { background: var(--success-bg); border-color: rgba(126,217,86,0.20); color: var(--success); }
.callout-info    { background: var(--info-bg);    border-color: rgba(71,190,240,0.20);  color: var(--info); }
.callout-warning { background: var(--warning-bg); border-color: rgba(255,181,0,0.20);  color: var(--warning); }
.callout-danger  { background: var(--danger-bg);  border-color: rgba(255,112,112,0.20); color: var(--danger); }
.callout .callout-text { color: inherit; opacity: 0.85; }

/* ── Cards ────────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── Prev / Next ─────────────────────────────────────────────────────────────── */
.prev-next { display: flex; gap: 12px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.pn-spacer { flex: 1; }
.pn-btn {
  flex: 1; display: flex; align-items: center;
  padding: 16px 18px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color var(--ease), background var(--ease), transform 0.12s ease;
}
.pn-btn:hover { border-color: var(--gold); background: var(--gold-dim); transform: translateY(-1px); }
.pn-next { justify-content: flex-end; text-align: right; }
.pn-dir  { display: block; font-size: 11.5px; color: var(--text-3); font-family: var(--font-ui); margin-bottom: 3px; }
.pn-title { display: block; font-size: 14px; font-weight: 500; color: var(--text); }

/* ── Search modal ─────────────────────────────────────────────────────────────── */
.search-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.search-modal.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.sm-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(4px); }
.sm-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 580px;
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); animation: sm-drop 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
.sm-inner::before { content: ''; display: block; height: 3px; background: var(--ian-gradient-primary); }
@keyframes sm-drop { from { transform: translateY(-12px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.sm-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sm-icon { flex-shrink: 0; color: var(--text-3); }
.sm-input-row input { flex: 1; background: none; border: none; outline: none; font: 15px/1 var(--font-body); color: var(--text); }
.sm-input-row input::placeholder { color: var(--text-3); }
.sm-esc { background: var(--bg-4); border: 1px solid var(--border-2); border-radius: 5px; padding: 2px 7px; font-size: 11px; font-family: var(--font-ui); color: var(--text-3); }
.search-results { max-height: 380px; overflow-y: auto; }
.sr-empty { padding: 20px; text-align: center; }
.sr-hint, .sr-no-results { color: var(--text-3); font-size: 13.5px; }
.sr-header { padding: 8px 16px 4px; }
.sr-count { font-size: 11px; color: var(--text-3); font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.5px; }
.sr-item { display: block; padding: 10px 16px; border-bottom: 1px solid var(--border); transition: background var(--ease); }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--gold-dim); }
.sr-product { display: inline-block; font-family: var(--font-ui); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--gold); background: var(--gold-dim); padding: 1px 6px; border-radius: 3px; margin-bottom: 4px; }
.sr-title { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.sr-desc  { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.4; }

/* ── Home page ───────────────────────────────────────────────────────────────── */
.home-page { max-width: 780px; padding-top: 0; }

.home-hero {
  position: relative; overflow: hidden;
  padding: 56px 40px 48px;
  margin-bottom: 40px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-top: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.home-hero-text { position: relative; flex: 1; min-width: 0; }
.home-hero-otter {
  width: 200px; height: 200px; flex-shrink: 0;
  position: relative; opacity: 0.85;
}
.home-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--ian-gradient-primary);
  opacity: 0.04;
  pointer-events: none;
}
.home-hero::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ian-gradient-primary);
}
.home-title {
  font-family: var(--font-ui);
  font-size: 40px; font-weight: 700;
  letter-spacing: -1px; line-height: 1.1;
  color: var(--text); margin-bottom: 10px;
  position: relative;
}
.home-sub { font-size: 15px; color: var(--text-2); line-height: 1.65; position: relative; }

.home-section-label {
  display: block;
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-3); margin-bottom: 14px;
}
.home-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.home-product-card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--ease), transform 0.12s ease, box-shadow var(--ease);
}
.home-product-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,181,0,0.10);
}
.hpc-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
}
.hpc-inner svg { color: var(--text-3); flex-shrink: 0; transition: color var(--ease), transform var(--ease); }
.home-product-card:hover .hpc-inner svg { color: var(--gold); transform: translateX(3px); }
.hpc-initial {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gold-dim); border: 1px solid var(--gold-mid);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 16px; font-weight: 700;
  color: var(--gold);
}
.hpc-logo {
  flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: contain;
  background: #fff; border: 1px solid #ddd;
  padding: 4px;
}
.sb-prod-logo {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: contain; flex-shrink: 0;
  background: var(--bg-5); border: 1px solid var(--border-2);
  padding: 2px;
}
.hpc-body { flex: 1; min-width: 0; }
.hpc-title { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.hpc-desc  { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.45; }
@media (max-width: 600px) { .home-product-grid { grid-template-columns: 1fr; } }

/* ── Error / Welcome pages ────────────────────────────────────────────────────── */
.error-page, .welcome-page {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-height: 60vh; max-width: 560px; padding-top: 40px;
}
.err-code { font-family: var(--font-ui); font-size: 80px; font-weight: 800; background: var(--ian-gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 8px; }
.err-title { font-family: var(--font-ui); font-size: 26px; font-weight: 600; margin-bottom: 12px; }
.err-desc  { color: var(--text-2); font-size: 15px; margin-bottom: 28px; }
.err-back  { display: inline-flex; align-items: center; padding: 9px 18px; background: var(--bg-3); border: 1px solid var(--border-2); border-radius: var(--r); font-size: 14px; color: var(--text); transition: border-color var(--ease), background var(--ease), color var(--ease); }
.err-back:hover { border-color: var(--gold); background: var(--gold-dim); color: var(--gold); }
.welcome-h1 { font-family: var(--font-ui); font-size: 32px; font-weight: 600; margin-bottom: 12px; }
.welcome-p  { color: var(--text-2); margin-bottom: 24px; }
.welcome-pre { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; font-family: var(--font-mono); font-size: 13px; color: var(--text-2); white-space: pre; overflow-x: auto; }

/* ── Mobile sidebar overlay ───────────────────────────────────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.mobile-only { display: none !important; }

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .toc-sidebar { display: none; }
  .layout { grid-template-columns: var(--sidebar-w) 1fr; }
}
@media (max-width: 900px) {
  .mobile-only { display: flex !important; }
  .layout { grid-template-columns: 1fr; }
  .main-content { padding: 24px 20px 60px; }
  .sidebar { position: fixed; top: calc(var(--topbar-h) + 3px); left: 0; bottom: 0; width: var(--sidebar-w); z-index: 95; transform: translateX(-100%); transition: transform var(--ease); border-right: 1px solid var(--border-2); box-shadow: 4px 0 24px rgba(0,0,0,0.4); }
  .sidebar.mobile-open { transform: none; }
  .sidebar-overlay.visible { display: block; }
  .product-switcher { display: none; }
  .tb-center { display: none; }
  .feat-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 34px; }
}
@media (max-width: 500px) {
  .prev-next { flex-direction: column; }
  .page-title { font-size: 26px; }
  .topbar { padding: 0 14px; }
}

/* ── Hljs ─────────────────────────────────────────────────────────────────────── */
.hljs { background: transparent !important; padding: 0 !important; }

/* ── Light mode fixes ─────────────────────────────────────────────────────────── */
[data-theme="light"] .topbar { background: rgba(255,255,255,0.92); }
[data-theme="light"] .search-bar { background: var(--bg-2); }
[data-theme="light"] .pn-btn { background: var(--bg-2); }
[data-theme="light"] .welcome-pre { background: var(--bg-2); }
[data-theme="light"] .code-block { border-color: var(--border); background: #FAFAFA; }
[data-theme="light"] .code-header { background: var(--bg-3); border-color: var(--border-2); }
/* light theme fc-thumb grid is handled by --card-grid-line variable above */

/* ── Heading anchor links ─────────────────────────────────────────────────────── */
.heading-anchor { display: inline-flex; align-items: center; margin-left: 8px; opacity: 0; color: var(--text-3); transition: opacity var(--ease), color var(--ease); vertical-align: middle; }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor { opacity: 1; }
.heading-anchor:hover { color: var(--gold); }

hr { border: none !important; height: 1px !important; background: var(--ian-gradient-primary) !important; opacity: 0.30; margin: 32px 0; }

/* .toc-conn is hidden — see new .toc-seg / .toc-diag system above */

/* ── Ask AI Floater ─────────────────────────────────────────────────────────── */
.ask-ai-btn {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 300;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 0 0 1px var(--border);
  transition: background var(--ease), color var(--ease), border-color var(--ease),
              box-shadow var(--ease), transform 0.15s ease;
  text-decoration: none;
  backdrop-filter: blur(12px);
}
.ask-ai-btn:hover {
  background: var(--bg-4);
  color: var(--text);
  border-color: var(--gold);
  box-shadow: 0 6px 28px rgba(255,181,0,0.18), 0 0 0 1px var(--gold-mid);
  transform: translateY(-2px);
}
.ask-ai-btn svg { flex-shrink: 0; color: var(--gold); }
[data-theme="light"] .ask-ai-btn {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 4px 20px rgba(15,23,42,0.12), 0 0 0 1px var(--border);
}

/* ── Ask AI chat panel ──────────────────────────────────────────────────────── */
.ask-ai-panel {
  position: fixed;
  bottom: 80px; right: 24px;
  z-index: 299;
  width: 340px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: panel-rise 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.ask-ai-panel.open { display: flex; }
@keyframes panel-rise {
  from { transform: translateY(16px) scale(0.96); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.aip-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.aip-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--text);
}
.aip-title svg { color: var(--gold); }
.aip-close {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: background var(--ease), color var(--ease);
}
.aip-close:hover { background: var(--bg-4); color: var(--text); }
.aip-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  min-height: 120px; max-height: 320px;
  display: flex; flex-direction: column; gap: 10px;
}
.aip-msg {
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 13.5px; line-height: 1.55;
  max-width: 90%;
}
.aip-msg-ai   { background: var(--bg-4); color: var(--text-2); align-self: flex-start; border-bottom-left-radius: 3px; }
.aip-msg-user { background: var(--gold-dim); color: var(--text); align-self: flex-end; border-bottom-right-radius: 3px; }
.aip-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.aip-input {
  flex: 1; background: var(--bg-4); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  font: 13.5px/1.4 var(--font-body); color: var(--text);
  outline: none; resize: none;
  transition: border-color var(--ease);
}
.aip-input::placeholder { color: var(--text-3); }
.aip-input:focus { border-color: var(--gold); }
.aip-send {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: #000;
  transition: opacity var(--ease), transform var(--ease);
  flex-shrink: 0;
}
.aip-send:hover { opacity: 0.85; transform: scale(1.05); }
.aip-send:disabled { opacity: 0.4; pointer-events: none; }

/* Ask AI — result cards inside chat */
.aip-reply-text { margin-bottom: 8px; line-height: 1.5; }
.aip-results { display: flex; flex-direction: column; gap: 6px; }
.aip-result-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: border-color var(--ease), background var(--ease);
}
.aip-result-card:hover { border-color: var(--gold); background: var(--bg-2); }
.aip-result-product {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--gold); font-weight: 600;
}
.aip-result-title { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.aip-result-snippet {
  font-size: 0.72rem; color: var(--text-3); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  body::before { display: none; }
}

/* ── Image Lightbox ──────────────────────────────────────────────────────── */
.prose img { cursor: zoom-in; transition: opacity var(--ease); }
.prose img:hover { opacity: .85; }

.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.82); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }

.lightbox-overlay img {
  max-width: 92vw; max-height: 90vh;
  border-radius: var(--r-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  transform: scale(.92); transition: transform .25s ease;
  cursor: default;
}
.lightbox-overlay.active img { transform: scale(1); }

.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff;
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--ease);
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
