/* Inlux Support Center — one stylesheet, design tokens on :root (light + dark). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  color-scheme: light;
  --bg:        #f6f6f4;
  --surface:   #ffffff;
  --surface-2: #f1f1ee;
  --surface-3: #e9e9e5;
  --border:    #e3e3de;
  --text:      #1b1b1a;
  --muted:     #6b6b66;
  --accent:    #E8651A;
  --accent-2:  #ff7a2e;
  --accent-ink:#c2510f;
  --accent-soft: rgba(232,101,26,.10);
  --sidebar:   #141414;
  --sidebar-2: #1f1f1f;
  --sidebar-text: #d4d4d4;
  --sidebar-muted:#7d7d7d;
  --green:     #16a34a;
  --green-soft: rgba(22,163,74,.12);
  --amber:     #d97706;
  --amber-soft: rgba(217,119,6,.12);
  --red:       #dc2626;
  --red-soft:  rgba(220,38,38,.10);
  --radius:    10px;
  --shadow:    0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.05);
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --sidebar-w: 272px;
}
/* Light mode only (the support center has no dark theme). */

html { scroll-padding-top: 72px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; font-size: 15px; line-height: 1.55;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; padding: 22px 14px 14px; overflow-y: auto;
}
.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
#view { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 40px 48px; outline: none; }

.brand { display: block; padding: 0 8px 18px; text-decoration: none !important; }
.brand img { height: 44px; width: auto; display: block; }
.brand-sub { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; font-weight: 500; letter-spacing: .01em; color: #d4d4d4; }
.brand-sub::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: #E86828; }

.side-search { position: relative; margin: 0 2px 16px; }
.side-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--sidebar-muted); display: flex; }
.side-search input {
  width: 100%; padding: 9px 12px 9px 34px; border-radius: 8px; border: 1px solid #2a2a2a;
  background: var(--sidebar-2); color: #eee; outline: none; font-size: 13.5px;
}
.side-search input:focus { border-color: #4a4a4a; }
.side-search input::placeholder { color: #777; }

.nav-group { margin-bottom: 6px; }
.nav-group-title { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sidebar-muted); padding: 10px 10px 6px; }
.nav-sep { height: 1px; background: #262626; margin: 8px 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--sidebar-text); font-size: 14px; font-weight: 500; text-decoration: none !important;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--sidebar-2); color: #fff; }
.nav-item.active { background: rgba(232,101,26,.16); color: #fff; }
.nav-item.active .icon { color: var(--accent-2); }
.nav-num { min-width: 22px; font-size: 11px; font-weight: 600; color: var(--sidebar-muted); font-variant-numeric: tabular-nums; }
.nav-item.active .nav-num { color: var(--accent-2); }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-foot { margin-top: auto; padding-top: 16px; }
.side-contact { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; border: 1px solid #2a2a2a; color: var(--sidebar-text); font-size: 13.5px; text-decoration: none !important; }
.side-contact:hover { background: var(--sidebar-2); color: #fff; }
.side-buy { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px; border-radius: 8px; background: #E86828; color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none !important; }
.side-buy:hover { background: #d05a1e; color: #fff; }

.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 40px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.menu-btn { display: none; background: none; border: 0; padding: 6px; border-radius: 6px; cursor: pointer; color: var(--text); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.crumb-sep { display: flex; opacity: .5; }

.site-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 40px 80px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); }
.site-foot a { color: var(--muted); }

.version-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 40px 0; padding: 10px 14px; border-radius: 8px;
  background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); font-size: 13.5px;
}
.version-banner .icon { color: var(--amber); }
.version-banner a { font-weight: 600; margin-left: auto; }

.loading { padding: 40px 0; color: var(--muted); }
.error-box { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 8px; background: var(--red-soft); color: var(--red); }

/* ── Version selector (bottom-right, Read the Docs style) ──────────────── */
.version-switch { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.vs-btn {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: var(--sidebar); color: #eee; border: 1px solid #333; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: 13px;
}
.vs-btn:hover { border-color: var(--accent); }
.vs-btn .icon:first-child { color: var(--accent-2); }
.vs-label { color: #999; }
.vs-menu {
  width: 280px; max-width: calc(100vw - 40px); padding: 8px; border-radius: 12px;
  background: var(--sidebar); color: #ddd; border: 1px solid #333; box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.vs-head { padding: 6px 10px 8px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8a8a8a; }
.vs-opt { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; color: #ddd; font-size: 13.5px; text-decoration: none !important; }
.vs-opt:hover { background: #222; color: #fff; }
.vs-opt.current { background: rgba(232,101,26,.18); color: #fff; font-weight: 600; }
.vs-note { color: #8a8a8a; font-weight: 400; }
.vs-status { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px; background: #2a2a2a; color: #aaa; }
.vs-status.latest { background: rgba(22,163,74,.2); color: #4ade80; }
.vs-status.legacy { background: rgba(217,119,6,.2); color: #fbbf24; }
.vs-foot { padding: 8px 10px 4px; margin-top: 6px; border-top: 1px solid #2a2a2a; font-size: 12px; color: #8a8a8a; }

/* ── Common components ──────────────────────────────────────────────────── */
.page-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 28px; }
.page-num {
  flex-shrink: 0; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 15px;
}
.page-head h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 70ch; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent;
  background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background .12s;
}
.btn:hover { background: var(--accent-2); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-disabled { background: var(--surface-2); color: var(--muted); cursor: default; font-weight: 500; }
.btn-disabled:hover { background: var(--surface-2); }
.btn-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.badge-soon { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.badge-fairino { background: var(--surface-2); color: var(--text); }
.badge-inlux { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.filter-input { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 380px; }
.filter-input .icon { position: absolute; left: 12px; color: var(--muted); }
.filter-input input, .field {
  width: 100%; padding: 9px 12px 9px 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); outline: none;
}
.field { padding-left: 12px; }
.filter-input input:focus, .field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; cursor: pointer; }
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.empty, .empty-state { color: var(--muted); padding: 20px 0; }
.empty-state { display: flex; align-items: center; gap: 10px; padding: 24px; border: 1px dashed var(--border); border-radius: var(--radius); }

.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }

.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.section-title { font-size: 18px; font-weight: 650; letter-spacing: -.01em; margin-bottom: 4px; }
.section-desc { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.group-block { margin-bottom: 36px; }

/* Prose (Markdown) */
.prose { max-width: 75ch; }
.prose > * + * { margin-top: .85em; }
.prose h1, .prose h2, .prose h3 { letter-spacing: -.01em; line-height: 1.3; margin-top: 1.4em; }
.prose h2 { font-size: 21px; } .prose h3 { font-size: 17px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .3em; }
.prose blockquote { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: 8px; border: 1px solid var(--border); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }
pre { background: #0d1117; color: #e6edf3; border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }
pre code.hljs { padding: 0; background: transparent; }

/* Feedback */
.feedback { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.feedback span { display: inline-flex; align-items: center; gap: 6px; }
.flip { display: inline-flex; transform: scaleY(-1); }

/* ── Home ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; border-radius: 16px; padding: 44px 40px; margin-bottom: 36px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(232,101,26,.35), transparent 55%), #161616; color: #f2f2f2;
}
.hero-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.hero h1 { font-size: 36px; line-height: 1.15; letter-spacing: -.03em; margin: 8px 0 10px; }
.hero p { color: #bdbdbd; max-width: 60ch; font-size: 16px; }
.hero-search { position: relative; margin-top: 24px; max-width: 560px; }
.hero-search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #888; }
.hero-search input { width: 100%; padding: 14px 16px 14px 46px; border-radius: 10px; border: 1px solid #333; background: #0f0f0f; color: #fff; font-size: 15px; outline: none; }
.hero-search input:focus { border-color: var(--accent); }
.hero-meta { margin-top: 14px; font-size: 13px; color: #9a9a9a; }
.hero-meta strong { color: #fff; }

.home-group { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-bottom: 34px; }
.home-card { display: flex; gap: 14px; padding: 18px; color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.home-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.home-card-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.home-card-num { font-size: 11.5px; font-weight: 700; color: var(--accent-ink); }
.home-card h3 { font-size: 15.5px; line-height: 1.3; margin: 2px 0 4px; }
.home-card p { font-size: 13.5px; color: var(--muted); }
.home-contact { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px; }
.home-contact h3 { font-size: 16px; }
.home-contact p { color: var(--muted); font-size: 14px; }

/* ── Doc (Quick Start) ──────────────────────────────────────────────────── */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; align-items: start; }
/* Guide (Quick Start) */
.guide-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 0 0 36px; }
.guide-overview-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 10px 10px; box-shadow: var(--shadow); }
.guide-overview-head { display: block; padding: 0 8px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none !important; }
.guide-overview-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none !important; }
.guide-overview-item:hover { background: var(--surface-2); color: var(--accent-ink); }
.guide-overview-item .badge { margin-left: auto; }
.gchip { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); }
.gchip-lg { width: 40px; height: 40px; border-radius: 10px; }
.badge-optional { background: var(--surface-2); color: var(--muted); font-weight: 500; }
.doc-guide + .doc-guide { margin-top: 48px; }
.guide-head { margin-bottom: 16px; }
.guide-head .section-desc { margin: 2px 0 0; }
.doc-chapter { padding: 26px 28px 28px; margin-bottom: 18px; scroll-margin-top: 80px; }
.chapter-head { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.chapter-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chapter-lead { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.chapter-body { max-width: none; font-size: 15px; line-height: 1.65; }
.chapter-body > :first-child { margin-top: 0; }
.chapter-body h3 { font-size: 16px; margin-top: 1.8em; }
.chapter-body table { width: auto; min-width: 60%; border-radius: 8px; overflow: hidden; }
.chapter-body th { background: var(--surface-2); font-weight: 600; }
.chapter-body ul { padding-left: 1.2em; }
.chapter-body ul li::marker { color: var(--accent); }
/* numbered steps */
.chapter-body ol { list-style: none; padding-left: 0; counter-reset: step; }
.chapter-body ol > li { counter-increment: step; position: relative; padding-left: 40px; min-height: 28px; }
.chapter-body ol > li + li { margin-top: 10px; }
.chapter-body ol > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: #fff; font-size: 12.5px; font-weight: 600; display: grid; place-items: center; }
/* callouts */
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; border: 1px solid; margin: 1.2em 0; }
.callout-icon { flex: none; margin-top: 1px; }
.callout-label { font-weight: 600; font-size: 13.5px; margin-bottom: 2px; }
.callout-body p, .callout-body ul { margin: 0; }
.callout-body ul { padding-left: 1.1em; }
.callout-body li + li { margin-top: .35em; }
.callout-warn { background: #fff6ef; border-color: #f6d3bb; } .callout-warn .callout-icon, .callout-warn .callout-label { color: var(--accent-ink); }
.callout-note { background: #f3f6fb; border-color: #d8e2f0; } .callout-note .callout-icon, .callout-note .callout-label { color: #2a5d93; }
.callout-tip { background: var(--green-soft); border-color: transparent; } .callout-tip .callout-icon, .callout-tip .callout-label { color: var(--green); }
/* figures */
.chapter-body figure { margin: 1.4em 0; }
.chapter-body figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: zoom-in; transition: box-shadow .15s; }
.chapter-body figure img:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.chapter-body figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.chapter-body .shot-wide img { max-width: min(100%, 680px); }
.chapter-body .shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin: 1.4em 0; }
.chapter-body .shots figure { margin: 0; }
.chapter-body .shots img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; padding: 6px; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10,10,10,.82); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox figure { margin: 0; max-width: min(1200px, 100%); }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; background: #fff; display: block; margin: 0 auto; }
.lightbox figcaption { color: #e5e5e5; text-align: center; margin-top: 10px; font-size: 14px; }
@media (max-width: 640px) { .doc-chapter { padding: 20px 16px; } .chapter-body .shots { grid-template-columns: 1fr 1fr; gap: 12px; } }
.toc { position: sticky; top: 76px; font-size: 13.5px; border-left: 1px solid var(--border); padding-left: 16px; }
.toc-title { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc a { display: block; padding: 4px 0; color: var(--muted); }
.toc a:hover, .toc a.active { color: var(--accent-ink); text-decoration: none; }

.toc { max-height: calc(100vh - 100px); overflow-y: auto; }
.toc a.toc-l3 { padding-left: 12px; font-size: 13px; }
.toc a.toc-group { font-weight: 600; color: var(--text); margin-top: 8px; }
.guide-title { font-size: 24px; letter-spacing: -.02em; margin: 8px 0 4px; }
.doc-guide + .doc-guide { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--border); }

/* Markdown pages inside the portal */
.doc-head { margin-bottom: 20px; }
.doc-head h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.02em; margin: 8px 0 4px; }
.doc-body { max-width: none; }
.doc-body h2 { padding-top: 6px; border-top: 1px solid var(--border); margin-top: 1.8em; }
.doc-body h2:first-child { border-top: 0; margin-top: 0; }
.doc-body h2, .doc-body h3 { scroll-margin-top: 72px; }
.table-scroll { overflow-x: auto; margin: 1em 0; }
.table-scroll table { min-width: 480px; }
.prose pre { position: relative; }
.copy-btn { position: absolute; top: 8px; right: 8px; display: inline-flex; gap: 5px; align-items: center; padding: 4px 9px; border-radius: 6px; border: 0; background: #21262d; color: #ccc; font-size: 12px; cursor: pointer; font-family: inherit; }
.copy-btn:hover { background: #30363d; color: #fff; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none !important; }
.pager a:hover { border-color: var(--accent); }
.pager a.next { text-align: right; }
.count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.cat-title a { color: var(--text); }
.cat-title a:hover { color: var(--accent-ink); }
.matrix th, .matrix td { padding: 7px 8px; text-align: center; font-size: 12.5px; }
.matrix tbody th { text-align: left; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text); white-space: nowrap; }
.matrix .pill { font-size: 11px; padding: 1px 6px; }

/* Figures from the Word guides */
.prose p.fig { margin: 1em 0; }
.prose p.fig img, .fig-row img { max-width: 100%; height: auto; border: 0; border-radius: 6px; background: #fff; }
.fig-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin: 1em 0; }
.fig-row img { flex: 0 1 auto; min-width: 0; }
@media (max-width: 640px) { .fig-row img { width: 100%; } }

/* ── Tools ──────────────────────────────────────────────────────────────── */
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; margin-right: 14px; }
.switch input { accent-color: var(--accent); width: 16px; height: 16px; }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; margin-top: 8px; }
.compare-wrap { max-height: none; }
.compare { min-width: 720px; }
.compare th, .compare td { text-align: center; }
.compare .sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 150px; }
.compare thead .sticky-col { background: var(--surface-2); }
.compare .model-col { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); vertical-align: bottom; min-width: 130px; background: var(--surface); }
.compare .model-col img { width: 92px; height: 92px; object-fit: contain; margin: 0 auto 6px; }
.model-ph { width: 92px; height: 92px; margin: 0 auto 6px; border-radius: 8px; background: var(--surface-2); }
.model-name { font-weight: 700; font-size: 14px; }
.model-price { color: var(--muted); font-weight: 500; margin: 2px 0 8px; }
.compare .group-row td { background: var(--surface-2); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; }
.compare td.best-cell { background: var(--green-soft); color: var(--green); font-weight: 700; }
/* Compact specification table: fixed, equal column widths */
.compare.compact { table-layout: fixed; min-width: 0; font-size: 13px; }
.compare.compact th, .compare.compact td { padding: 6px 10px; white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
.compare.compact .model-col { padding: 12px 8px 10px; vertical-align: top; }
.compare.compact .model-col img { width: 64px; height: 64px; margin: 0 auto 6px; }
.compare.compact .model-name { font-size: 13.5px; }
.compare.compact .model-price { font-size: 12px; margin: 1px 0 8px; white-space: nowrap; }
.compare.compact .model-btns { flex-wrap: nowrap; gap: 4px; }
.compare.compact .sticky-col { font-weight: 600; text-align: left; }
.compare.compact .group-row td { padding: 6px 10px; font-size: 11px; }
.btn-xs { padding: 3px 7px; font-size: 11.5px; gap: 4px; border-radius: 6px; }
.spec-tiles { columns: 2 340px; column-gap: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 18px; }
.spec-tile { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); break-inside: avoid; font-size: 13.5px; }
.spec-label { color: var(--muted); font-weight: 500; }
.spec-value { font-weight: 600; white-space: pre-line; }

.finder { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.finder-form { position: sticky; top: 76px; }
.field-block + .field-block { margin-top: 20px; }
.field-label { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.field-label output { color: var(--accent-ink); font-weight: 600; font-size: 13px; }
.finder input[type=range] { width: 100%; accent-color: var(--accent); }
.chart-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.finder-chart, .roi-chart { width: 100%; height: auto; display: block; }
.finder-chart .grid, .roi-chart .grid { stroke: var(--border); stroke-width: 1; }
.finder-chart .tick, .roi-chart .tick { fill: var(--muted); font-size: 10.5px; }
.finder-chart .axis, .roi-chart .axis { fill: var(--muted); font-size: 11px; font-weight: 600; }
.finder-chart .need-area { fill: var(--accent); fill-opacity: .14; stroke: var(--accent); stroke-dasharray: 4 3; }
.finder-chart .pt circle { fill: var(--surface); stroke: var(--muted); stroke-width: 2; }
.finder-chart .pt text { fill: var(--muted); font-size: 10.5px; }
.finder-chart .pt.fit circle { fill: var(--accent); stroke: var(--accent); }
.finder-chart .pt.fit text { fill: var(--text); font-weight: 700; }
.finder-chart .leader { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.finder-result .result-count { margin: 14px 0 10px; font-weight: 600; color: var(--text); }
.finder-result [data-notes] { display: grid; gap: 10px; margin-top: 16px; }
.finder-result [data-notes] .notice { margin: 0; }
.variant-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.variant-tags span { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 600; }
.finder-cards { display: grid; gap: 12px; }
.finder-card { display: flex; gap: 16px; padding: 14px; }
.finder-card.is-best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.finder-card > img, .finder-card > .model-ph { width: 96px; height: 96px; object-fit: contain; flex-shrink: 0; margin: 0; }
.finder-card-body { flex: 1; min-width: 0; }
.finder-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.finder-card-head h3 { font-size: 16px; }
.finder-card p { margin: 8px 0 0; color: var(--muted); }
.finder-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.finder-card-foot strong { margin-right: auto; }
.usage { display: grid; grid-template-columns: 96px 1fr 38px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.usage .bar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.usage .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.usage b { color: var(--text); font-weight: 600; text-align: right; }

.roi { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
.roi-inputs { display: grid; gap: 14px; }
.roi-block h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.roi-block h3 .icon { color: var(--accent-ink); }
.roi-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--muted); }
.roi-field + .roi-field { margin-top: 12px; }
.roi-field .hint { font-weight: 400; font-size: 11.5px; }
.unit-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.unit-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.unit-input .field { border: 0; box-shadow: none !important; background: transparent; }
.unit-input i { font-style: normal; color: var(--muted); padding: 0 10px; font-size: 13px; }
.roi-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.roi-total strong { font-size: 18px; }
.num-slider { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; }
.num-box { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.num-box input { width: 100%; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--text); }
.finder .seg { flex-wrap: wrap; }
.roi .field-label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.roi-grid { grid-template-columns: 1fr 1fr; margin-bottom: 0; }
.roi-grid .hint { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.good .kpi-value { color: var(--green); }
.kpi.bad .kpi-value { color: var(--red); }
.kpi.accent .kpi-value { color: var(--accent); }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis-3 .kpi-value { font-size: 23px; }
.roi-out .notice { margin: 14px 0; }
.roi-chart .roi-line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.roi-chart .roi-area { fill: var(--accent); fill-opacity: .10; }
.roi-chart .zero { stroke: var(--text); stroke-width: 1; opacity: .5; }
.roi-chart .payback { stroke: var(--green); stroke-dasharray: 4 3; }
.roi-chart .payback-dot { fill: var(--green); }
.roi-cta { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1100px) {
  .finder, .roi { grid-template-columns: minmax(0, 1fr); }
  .finder-form { position: static; }
}
@media (max-width: 520px) { .roi-grid, .kpis, .kpis-3 { grid-template-columns: 1fr; } .finder-card { flex-direction: column; } }

/* ── Vision Checker ─────────────────────────────────────────────────────── */
.vz-intro { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; margin-bottom: 30px; }
.vz-intro-icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.vz-intro h2 { font-size: 19px; margin-bottom: 4px; }
.vz-intro p { color: var(--muted); max-width: 75ch; }
.vz-h { display: flex; align-items: center; gap: 8px; font-size: 20px; letter-spacing: -.01em; margin: 30px 0 4px; }
.vz-h.good .icon { color: var(--green); }
.vz-h.warn .icon { color: var(--amber); }
.vz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.vz-card { margin: 0; overflow: hidden; display: flex; flex-direction: column; }
.vz-card.vz-good { border-top: 3px solid var(--green); }
.vz-card.vz-warn { border-top: 3px solid var(--amber); }
.vz-art { background: var(--surface-2); padding: 8px; }
.vz-card figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.vz-card figcaption span { color: var(--muted); }
svg.vz { width: 100%; height: auto; display: block; overflow: visible; }
.vz text { font-family: inherit; }
.vz-label { font-size: 9.5px; fill: var(--muted); }
.vz-center { text-anchor: middle; }
.vz-good { fill: var(--green); font-weight: 700; font-size: 10.5px; }
.vz-warn { fill: var(--amber); font-weight: 700; font-size: 10.5px; }
.vz-bad { fill: var(--red); font-weight: 700; font-size: 10.5px; }
.vz-belt { fill: var(--surface-3); stroke: var(--border); }
.vz-belt-line { stroke: var(--border); stroke-width: 2; }
.vz-guide { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.vz-stop { fill: var(--muted); }
.vz-floor { stroke: var(--muted); stroke-width: 2; }
.vz-target { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 5 4; }
.vz-box { fill: #c9955c; stroke: #9a6b38; stroke-width: 1.5; }
.vz-tape { stroke: #e8c690; stroke-width: 5; }
.vz-pallet { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 3 3; }
.vz-grip-ring { fill: color-mix(in srgb, var(--surface) 70%, transparent); stroke: var(--text); stroke-width: 2.5; }
.vz-grip-finger { fill: var(--text); }
.vz-grip-core { fill: var(--accent); }
.vz-arm { fill: var(--muted); }
.vz-tray { fill: var(--surface-3); stroke: var(--border); stroke-width: 1.5; }
.vz-cell { fill: var(--surface); stroke: var(--border); }
.vz-part { fill: #9aa3ad; stroke: #6b7580; stroke-width: 1.5; }
.vz-plate { fill: #9cc0e6; stroke: #2a5d93; stroke-width: 1.6; }
.vz-machine { fill: var(--surface-3); stroke: var(--border); stroke-width: 1.5; }
.vz-door { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.vz-cam { fill: #23272e; }
.vz-lens { fill: #3b4350; stroke: #8c96a3; }
.vz-lens-in { fill: var(--accent); }
.vz-fov { fill: var(--accent); fill-opacity: .10; stroke: var(--accent); stroke-opacity: .5; stroke-dasharray: 4 3; }
.vz-fov-area { fill: var(--accent); fill-opacity: .06; stroke: var(--accent); stroke-dasharray: 4 3; }
.vz-scanline { stroke: var(--accent); stroke-width: 2; opacity: .8; }
.vz-detect { fill: none; stroke: var(--green); stroke-width: 2.5; }
.vz-detect-fill { fill: var(--green); fill-opacity: .55; stroke: var(--green); stroke-width: 2; }
.vz-bin { fill: none; stroke: var(--text); stroke-width: 3; stroke-linejoin: round; }
.vz-bin-outer { fill: var(--surface-3); stroke: var(--text); stroke-width: 2.5; }
.vz-bin-inner { fill: var(--surface); stroke: var(--border); }
.vz-deep { fill: #7d8791; stroke: #59626b; }
.vz-nest { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.vz-pin { fill: var(--muted); }
.vz-divider { stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; }
.vz-pocket { fill: #4a515b; stroke: #2c3138; stroke-width: 1.5; }  /* empty pocket: same grey as the mold */
.vz-mold { fill: #4a515b; stroke: #2c3138; stroke-width: 2; }
.vz-part-lite { fill: #e9edf1; stroke: #9aa3ad; stroke-width: 1.5; }
.vz-lframe { fill: none; stroke: var(--text); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.vz-art { position: relative; }
.vz-art.paused svg.vz * { animation-play-state: paused !important; }
.vz-play { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; opacity: .75; }
.vz-play:hover { opacity: 1; border-color: var(--accent); }
.vz-flow { max-width: 760px; }
.vz-step-n { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); }
.vz-flow h3 { font-size: 17px; margin: 4px 0 4px; }
.vz-options { display: grid; gap: 8px; margin: 14px 0; }
.vz-option { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 14px; cursor: pointer; color: var(--text); }
.vz-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.vz-option .icon { color: var(--muted); }
.vz-result-cam { margin-top: 14px; }
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cam-card { display: flex; flex-direction: column; overflow: hidden; }
.cam-card.is-best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.vz-result-cam .cam-card { flex-direction: row; }
.vz-result-cam .cam-card img, .vz-result-cam .cam-ph { width: 160px; height: auto; }
.cam-card img { width: 100%; height: 160px; object-fit: contain; background: #fff; }
.cam-ph { height: 160px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.cam-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cam-body h3 { font-size: 16px; }
.cam-price { font-weight: 700; color: var(--accent-ink); }
.cam-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; flex: 1; }
.cam-lists ul { padding-left: 16px; color: var(--muted); }
.cam-lists li + li { margin-top: 3px; }
.cam-h { display: flex; align-items: center; gap: 5px; font-weight: 600; margin-bottom: 4px; }
.cam-h.good { color: var(--green); }
.cam-h.bad { color: var(--red); }
.cam-body .btn { align-self: flex-start; }
@media (max-width: 640px) { .vz-result-cam .cam-card { flex-direction: column; } .vz-result-cam .cam-card img { width: 100%; } .cam-lists { grid-template-columns: 1fr; } }

/* ── 3D viewer ──────────────────────────────────────────────────────────── */
.view-tabs { margin-bottom: 16px; }
.view-tabs .tab { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 500; }
.view-tabs .tab.active { border-bottom-color: var(--accent); }
.model-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.r3d { position: relative; overflow: hidden; }
.r3d-canvas, .r3d-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.r3d-canvas canvas { cursor: grab; touch-action: none; }
.r3d-canvas canvas:active { cursor: grabbing; }
.r3d-labels { position: absolute; inset: 0; pointer-events: none; }
.r3d-label { position: absolute; left: 0; top: 0; pointer-events: none; transition: opacity .15s; will-change: transform; }
.r3d-tag { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 9px; border-radius: 8px; border: 1px solid #3a3a3a; background: rgba(28,28,28,.9); color: #f2f2f2; font: inherit; font-size: 11.5px; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow); }
.r3d-tag b { font-size: 13px; }
.r3d-tag span { color: #a8a8a8; }
.r3d-tag:hover { border-color: var(--accent); }
.r3d-tag.muted-tag { cursor: default; color: #a8a8a8; }
.r3d-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #a8a8a8; font-size: 14px; }
.size3d-stage { height: min(68vh, 620px); min-height: 380px; border-radius: var(--radius); border: 1px solid #2a2a2a;
  background: radial-gradient(120% 90% at 50% 10%, #2a2a2a 0%, #141414 100%); }
.size3d-bar { margin-bottom: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
body.modal-open { overflow: hidden; }
.r3d-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.r3d-modal-box { width: min(1100px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.r3d-modal-box header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.r3d-modal-box header h2 { font-size: 20px; }
.r3d-modal-body { display: grid; grid-template-columns: minmax(0, 1fr) 270px; min-height: 0; flex: 1; }
.r3d-stage { min-height: 520px; background: radial-gradient(120% 90% at 50% 10%, #2a2a2a 0%, #141414 100%); }
.r3d-side { padding: 16px 18px; border-left: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.r3d-sliders label { display: grid; grid-template-columns: 26px 1fr 44px; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.r3d-sliders label output { order: 3; text-align: right; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.r3d-sliders input { accent-color: var(--accent); width: 100%; }
.r3d-sliders label + label { margin-top: 6px; }
.r3d-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 800px) {
  .r3d-modal { padding: 0; }
  .r3d-modal-box { max-height: 100vh; height: 100vh; border-radius: 0; }
  .r3d-modal-body { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 1fr) auto; }
  .r3d-stage { min-height: 300px; }
  .r3d-side { border-left: 0; border-top: 1px solid var(--border); max-height: 42vh; }
}

/* ── Academy ────────────────────────────────────────────────────────────── */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.video-card { overflow: hidden; color: var(--text); text-decoration: none !important; transition: border-color .15s; }
.video-card:hover { border-color: var(--accent); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #1a1a1a; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #555; background: repeating-linear-gradient(45deg, #1b1b1b 0 12px, #202020 12px 24px); }
.duration { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 4px; }
.video-body { padding: 12px 14px 14px; }
.video-body h3 { font-size: 14.5px; line-height: 1.35; }
.video-body p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.video-body .badge { margin-top: 8px; }
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.player { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.player iframe { width: 100%; height: 100%; border: 0; }
.player .thumb-ph { color: #777; flex-direction: column; gap: 8px; display: flex; align-items: center; justify-content: center; }
.player-title { font-size: 24px; letter-spacing: -.02em; margin: 18px 0 6px; }
.up-next { padding: 14px; }
.up-next h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.up-next a { display: flex; gap: 10px; padding: 7px; border-radius: 8px; color: var(--text); font-size: 13.5px; line-height: 1.35; text-decoration: none !important; }
.up-next a:hover { background: var(--surface-2); }
.up-next a.current { background: var(--accent-soft); }
.up-next .mini-thumb { width: 96px; flex-shrink: 0; aspect-ratio: 16/9; border-radius: 5px; overflow: hidden; background: #1b1b1b; }
.up-next .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Walkthrough ────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 9px 14px; color: var(--muted); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.wt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.wt-stage { position: relative; border-radius: var(--radius); overflow: visible; border: 1px solid var(--border); background: #111; user-select: none; }
.wt-stage img { width: 100%; border-radius: var(--radius); }
.hotspot {
  position: absolute; border: 2px solid transparent; border-radius: 6px; background: transparent; cursor: help; padding: 0;
  transition: background .12s, border-color .12s;
}
.hotspot:hover, .hotspot:focus-visible, .hotspot.active { background: rgba(232,101,26,.14); border-color: var(--accent); outline: none; }
.hs-dot {
  position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; box-shadow: 0 0 0 3px rgba(232,101,26,.3);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(232,101,26,.35); } 50% { box-shadow: 0 0 0 7px rgba(232,101,26,.08); } }
.wt-tip {
  position: absolute; z-index: 5; width: 300px; max-width: 80%; transform: translate(-50%, 10px); pointer-events: none;
  background: var(--sidebar); color: #eee; padding: 12px 14px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: 13.5px;
}
.wt-tip.above { transform: translate(-50%, calc(-100% - 10px)); }
.wt-tip.inside { transform: translate(-50%, 0); }
.wt-tip strong { display: block; color: #fff; margin-bottom: 4px; }
.wt-tip p { color: #c8c8c8; }
.wt-list { padding: 12px; position: sticky; top: 76px; }
.wt-list-title { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 2px 4px 8px; }
.wt-li { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.wt-li:hover, .wt-li.active { background: var(--accent-soft); }
.hs-num { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11.5px; font-weight: 700; }
.wt-li.active .hs-num { background: var(--accent); color: #fff; }
.wt-detail { margin-top: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--border); font-size: 14px; }
.wt-detail h3 { font-size: 15px; margin-bottom: 6px; }
.wt-editor { margin-top: 24px; padding: 18px; }
.wt-editor h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.edit-layer { position: absolute; inset: 0; cursor: crosshair; }
.edit-rect { position: absolute; border: 2px dashed var(--accent); background: rgba(232,101,26,.15); border-radius: 4px; }
.edit-rect span { position: absolute; left: 4px; top: 2px; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); padding: 0 5px; border-radius: 4px; }
.edit-rect.drawing { border-style: solid; }
.edit-item { display: grid; grid-template-columns: 26px 140px 1fr 30px; gap: 8px; align-items: start; margin-top: 10px; }
.edit-item textarea { grid-column: 2 / 4; }
.edit-json { width: 100%; min-height: 180px; margin-top: 12px; font-family: var(--mono); font-size: 12.5px; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }

/* ── Catalog (manuals, downloads, certification) ───────────────────────── */
.cat-list { overflow: hidden; }
.cat-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cat-row:last-child { border-bottom: 0; }
.cat-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.cat-main { flex: 1; min-width: 0; }
.cat-title { font-weight: 600; font-size: 14.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cat-summary { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.cat-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.cat-action { flex-shrink: 0; }

/* ── Examples ───────────────────────────────────────────────────────────── */
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ex-card { padding: 16px; color: var(--text); text-decoration: none !important; display: flex; flex-direction: column; gap: 6px; }
.ex-card:hover { border-color: var(--accent); }
.ex-card h3 { font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-card p { color: var(--muted); font-size: 13.5px; }
.lang { font-family: var(--mono); font-size: 11.5px; font-weight: 500; text-transform: uppercase; color: var(--accent-ink); }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; background: #161b22; color: #9aa4af; border-radius: var(--radius) var(--radius) 0 0; font-family: var(--mono); font-size: 12.5px; }
.code-head + pre { border-radius: 0 0 var(--radius) var(--radius); }
.code-actions { display: flex; gap: 6px; }
.code-actions .btn { padding: 5px 10px; font-size: 12.5px; background: #21262d; color: #ddd; }
.code-actions .btn:hover { background: #30363d; }

/* ── Tools ──────────────────────────────────────────────────────────────── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool-card { padding: 18px; display: flex; gap: 14px; color: var(--text); text-decoration: none !important; }
.tool-card:hover { border-color: var(--accent); }
.tool-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.tool-card p { color: var(--muted); font-size: 13.5px; }
.tool-panel { padding: 22px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.notice .icon { margin-top: 2px; }
.notice-warn { background: var(--amber-soft); color: var(--text); }
.notice-warn .icon { color: var(--amber); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td.num { font-variant-numeric: tabular-nums; }
.data-table code { font-family: var(--mono); font-weight: 600; color: var(--accent-ink); }
.data-table tr.best td { background: var(--green-soft); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill-yes { background: var(--green-soft); color: var(--green); }
.pill-adapter { background: var(--amber-soft); color: var(--amber); }
.pill-no { background: var(--red-soft); color: var(--red); }
.pill-unknown { background: var(--surface-2); color: var(--muted); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.q-block { margin-bottom: 20px; }
.q-block h3 { font-size: 15px; margin-bottom: 10px; }
.q-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.q-opt { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; font-size: 14px; background: var(--surface); }
.q-opt:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.q-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.q-opt input { accent-color: var(--accent); margin-top: 3px; }
.result { padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.result h3 { font-size: 18px; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.result-good { background: var(--green-soft); border-color: transparent; }
.result-warn { background: var(--amber-soft); border-color: transparent; }
.result-bad { background: var(--red-soft); border-color: transparent; }
.result-pending { color: var(--muted); }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.check-grid label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13.5px; cursor: pointer; background: var(--surface); }
.check-grid input { accent-color: var(--accent); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq-list { overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { list-style: none; cursor: pointer; padding: 15px 18px; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform .15s; color: var(--muted); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item summary:hover { background: var(--surface-2); }
.faq-answer { padding: 0 18px 18px; }

/* ── Search ─────────────────────────────────────────────────────────────── */
.search-big { position: relative; max-width: 640px; margin-bottom: 8px; }
.search-big .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-big input { width: 100%; padding: 13px 14px 13px 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 15px; outline: none; }
.search-big input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.result-count { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.result-item { display: block; padding: 14px 16px; margin-bottom: 10px; color: var(--text); text-decoration: none !important; }
.result-item:hover { border-color: var(--accent); }
.result-sec { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.result-title { font-weight: 600; font-size: 15.5px; margin: 2px 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.result-item p { color: var(--muted); font-size: 13.5px; }
mark { background: rgba(232,101,26,.25); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .doc-layout, .player-layout, .wt-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .wt-list { position: static; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .nav-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.45); display: none; }
  body.nav-open .nav-backdrop { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  #view { padding: 22px 16px 40px; }
  .version-banner { margin: 12px 16px 0; }
  .site-foot { padding: 18px 16px 80px; }
  .hero { padding: 30px 22px; }
  .hero h1 { font-size: 28px; }
  .page-head h1 { font-size: 23px; }
  .cat-row { flex-wrap: wrap; }
  .cat-action { width: 100%; padding-left: 52px; }
  .version-switch { right: 12px; bottom: 12px; }
  .vs-label { display: none; }
  .edit-item { grid-template-columns: 26px 1fr 30px; }
  .edit-item textarea { grid-column: 2 / 3; }
}


/* Catalog parts, logo tiles, quick links, folded groups, notices */
.part-head { margin: 44px 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--text); }
.part-head:first-of-type, .toolbar + .empty + .part-head { margin-top: 8px; }
.part-head h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.part-head p { margin: 4px 0 0; color: var(--muted); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 16px; color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; position: relative; }
.tile:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-1px); }
.tile-logo { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--accent-ink); }
.tile-logo img { width: 30px; height: 30px; object-fit: contain; }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-title { font-weight: 600; font-size: 15px; }
.tile-summary { font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.tile-ext { position: absolute; top: 10px; right: 10px; color: var(--muted); }
.tile.is-off { opacity: .6; }
.qlink-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px; padding: 8px; }
.qlink { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none !important; }
.qlink .icon { color: var(--accent-ink); flex: none; }
.qlink:hover { background: var(--accent-soft); color: var(--accent-ink); }
.qlink.is-off { color: var(--muted); }
.group-fold { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.group-fold > summary { list-style: none; cursor: pointer; padding: 14px 16px; margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.group-fold > summary::-webkit-details-marker { display: none; }
.group-fold > summary .icon { transition: transform .15s; color: var(--muted); }
.group-fold[open] > summary .icon { transform: rotate(90deg); }
.group-fold > summary:hover { color: var(--accent-ink); }
.fold-body { padding: 0 16px 16px; }
.fold-body .cat-list { box-shadow: none; }
.subgroup + .subgroup { margin-top: 22px; }
.subgroup-title { font-size: 15px; margin: 0 0 4px; }
.cat-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 14px; border-radius: 10px; background: #f3f6fb; border: 1px solid #d8e2f0; font-size: 14px; }
.cat-note .icon { color: #2a5d93; flex: none; margin-top: 2px; }
.cat-note p { margin: 0; }
.cat-note img { display: block; max-width: 100%; margin-top: 10px; border-radius: 8px; border: 1px solid var(--border); }
/* Figures inside portal pages (guides) */
.doc-body figure { margin: 1.4em 0; }
.doc-body figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: zoom-in; }
.doc-body figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.doc-body .shot-wide img { max-width: min(100%, 680px); }
.doc-body .shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin: 1.4em 0; }
.doc-body .shots figure { margin: 0; }
.doc-body .shots img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; padding: 6px; }

.video-resources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.ex-card.is-off { opacity: .65; cursor: default; }

.player-short { aspect-ratio: 9 / 16; max-width: 360px; max-height: 70vh; margin: 0 auto; }
.player:fullscreen, .player:-webkit-full-screen { max-width: none; max-height: none; width: 100vw; height: 100vh; border-radius: 0; }
.player-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Version tabs inside guides */
.ver-tabs { border: 1px solid var(--border); border-radius: 12px; margin: 1.2em 0; overflow: hidden; background: var(--surface); }
.ver-tabbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.ver-tabbar-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.ver-tab { font: inherit; font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.ver-tab:hover { border-color: var(--accent); }
.ver-tab.active { background: var(--text); border-color: var(--text); color: #fff; }
.ver-tabs > [data-tab] { padding: 6px 18px 4px; }
.ver-tabs > [data-tab] > :first-child { margin-top: 12px; }

/* Featured manual card */
.feature-card { display: flex; align-items: center; gap: 28px; padding: 28px 30px; margin-bottom: 14px; border-radius: 16px; color: #fff; text-decoration: none !important;
  background: radial-gradient(120% 140% at 0% 0%, #2b2b2b 0%, #141414 60%), #141414; border: 1px solid #262626; box-shadow: 0 10px 30px rgba(0,0,0,.18); transition: transform .15s, box-shadow .15s; }
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.25); color: #fff; }
.feature-brand { flex: none; width: 220px; display: grid; place-items: center; padding: 14px 0; border-right: 1px solid #333; padding-right: 28px; }
.feature-logo { max-width: 200px; max-height: 48px; width: auto; height: auto; }
.feature-wordmark { font-size: 34px; font-weight: 700; letter-spacing: .32em; color: #fff; }
.feature-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.feature-title { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.feature-summary { color: #c9c9c9; font-size: 14.5px; line-height: 1.5; }
.feature-cta { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; background: #E86828; color: #fff; font-weight: 600; font-size: 14.5px; }
.feature-card:hover .feature-cta { background: #d05a1e; }
@media (max-width: 800px) { .feature-card { flex-direction: column; align-items: flex-start; gap: 16px; } .feature-brand { border-right: 0; padding-right: 0; width: auto; justify-items: start; } }

/* YouTube embeds inside example and guide pages */
.video-embeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 1.2em 0; }
.video-embeds figure { margin: 0; }
.video-embed { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-embeds figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

.ex-card.has-logo { position: relative; padding-left: 78px; min-height: 76px; }
.ex-logo { position: absolute; left: 16px; top: 16px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); }
.ex-logo img { width: 30px; height: 30px; object-fit: contain; }

/* Application Examples */
.ab-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; margin-bottom: 20px; }
.ab-app { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.ab-app:hover { border-color: var(--accent); }
.ab-app.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.ab-app-title { font-weight: 600; font-size: 14px; line-height: 1.25; }
.ab-app-sub { font-size: 12.5px; color: var(--muted); }
.ab-head { margin-bottom: 14px; }
.ab-stage-wrap { position: relative; }
.ab-overlay { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.ab-step { pointer-events: auto; padding: 7px 12px; border-radius: 999px; background: rgba(20,20,20,.82); border: 1px solid #333; color: #f2f2f2; font-size: 13px; font-weight: 500; }
.ab-controls { display: inline-flex; gap: 6px; pointer-events: auto; }
.ab-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #3a3a3a; background: rgba(20,20,20,.82); color: #fff; cursor: pointer; }
.ab-btn:hover { border-color: var(--accent); }
.ab-parts { overflow: hidden; }
.ab-part { display: grid; grid-template-columns: 64px minmax(0, 1fr) 40px 110px auto; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ab-part-img { width: 64px; height: 64px; border-radius: 10px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.ab-part-img img { width: 100%; height: 100%; object-fit: contain; }
.ab-part-title { font-weight: 600; }
.ab-part-role { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.ab-part-qty { color: var(--muted); text-align: right; }
.ab-part-price { font-weight: 600; text-align: right; white-space: nowrap; }
.ab-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--surface-2); font-size: 15px; border-bottom: 1px solid var(--border); }
.ab-total strong { font-size: 20px; color: var(--accent-ink); }
.ab-opt-head { padding: 10px 16px 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ab-parts > .ab-part:last-child { border-bottom: 0; }
@media (max-width: 700px) { .ab-part { grid-template-columns: 52px minmax(0, 1fr) auto; } .ab-part-qty, .ab-part-link { display: none; } .ab-part-img { width: 52px; height: 52px; } }

/* Application Builder (build your own cell) */
.cb { display: grid; gap: 14px; }
.cb-stage-wrap { position: relative; }
.cb-stage { height: min(74vh, 700px); }
.cb-stage:focus { outline: none; }
.cb-toolbar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.cb-toolbar > * { pointer-events: auto; }
.cb-modes { background: rgba(20,20,20,.82); border-color: #333; }
.cb-modes button { display: inline-flex; align-items: center; gap: 6px; color: #bbb; }
.cb-modes button.active { background: #f2f2f2; color: #111; }
.cb-toolbar-right { display: inline-flex; gap: 6px; }
.ab-btn.ok { border-color: var(--green); color: var(--green); }
.cb-hint { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); padding: 7px 12px; border-radius: 999px; background: rgba(20,20,20,.88); border: 1px solid #333; color: #f2f2f2; font-size: 13px; z-index: 3; }
.cb-hint.error { border-color: #c0392b; background: rgba(120,20,15,.92); }
.cb-hint:empty { display: none; }
/* Inspector: a panel on the right of the 3D view (below it on small screens). */
.cb-inspector { position: absolute; top: 62px; right: 12px; width: 330px; max-height: calc(100% - 74px); overflow: auto; padding: 14px 16px; border-radius: 12px; background: rgba(24,24,24,.92); border: 1px solid #333; color: #f2f2f2; z-index: 2; }
.cb-inspector .muted { color: #a8a8a8; }
.cb-inspector .btn-ghost { background: #2a2a2a; color: #f2f2f2; border-color: #3a3a3a; }
.cb-inspector .btn-ghost:hover { background: #333; }
.cb-inspector .btn-icon { color: #ccc; }
.cb-inspector .seg { background: #1b1b1b; border-color: #333; }
.cb-inspector .seg button { color: #bbb; }
.cb-inspector .seg button.active { background: #f2f2f2; color: #111; }
.cb-inspector .r3d-sliders label output { color: #a8a8a8; }
.cb-insp-head { display: grid; gap: 8px; }
.cb-insp-title { font-weight: 600; font-size: 15.5px; }
.cb-insp-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cb-insp-actions .btn-icon { margin-left: auto; }
.cb-insp-info { margin-top: 8px; line-height: 1.6; }
.cb-robot { margin-top: 12px; display: grid; gap: 10px; }
.cb-sliders { display: grid; grid-template-columns: 1fr; gap: 6px; }
.cb-empty { margin: 0; display: flex; align-items: center; gap: 8px; min-height: 0; }
.cb-empty:empty { display: none; }
/* Gripper: pick the cobot */
.cb-picker { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); z-index: 4; border-radius: var(--radius); }
.cb-picker[hidden] { display: none; }
.cb-picker-box { width: min(380px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.cb-picker-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cb-picker-list { display: grid; gap: 6px; }
.cb-pick { display: grid; gap: 2px; text-align: left; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.cb-pick:hover, .cb-pick.active { border-color: var(--accent); }
/* Catalogue: three columns under the 3D view, each with its own scroll bar */
.cb-palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.cb-row { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); padding: 10px 6px 6px 10px; min-width: 0; }
.cb-row-title { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cb-list { display: grid; gap: 6px; max-height: 430px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.cb-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.cb-item:hover { border-color: var(--accent); }
.cb-item-img { width: 52px; height: 52px; border-radius: 8px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.cb-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cb-item-text { min-width: 0; display: grid; gap: 1px; }
.cb-item-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-item-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-item-sub:empty { display: none; }
.cb-item-price { font-size: 12.5px; color: var(--accent-ink); font-weight: 600; }
.cb-item-add { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; opacity: .85; }
.cb-item:hover .cb-item-add { opacity: 1; }
@media (max-width: 1200px) {
  .cb-inspector { position: static; width: auto; max-height: none; margin-top: 10px; background: #1c1c1c; }
  .cb-sliders { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
}
@media (max-width: 900px) { .cb-palette { grid-template-columns: 1fr; } .cb-list { max-height: 300px; } }
@media (max-width: 760px) {
  .cb-stage { height: 440px; min-height: 0; }
  .cb-sliders { grid-template-columns: 1fr; }
}
/* Tooling schema in the cobot inspector */
.cb-tooling { margin-top: 4px; padding-top: 10px; border-top: 1px solid #333; }
.cb-tooling-head { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.cb-chain { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 2px solid #4a4a4a; display: grid; gap: 4px; counter-reset: tool; }
.cb-tool { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 6px 5px 8px; border-radius: 8px; background: #2a2a2a; border: 1px solid #3a3a3a; font-size: 13px; counter-increment: tool; }
.cb-tool::before { content: counter(tool) "."; color: #8a8a8a; font-size: 12px; margin-right: 2px; }
.cb-tool.adapter { border-color: var(--accent); }
.cb-tool-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-tool-btns { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.cb-tool-btns .btn-icon { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; color: #ccc; }
.cb-tool-btns .btn-icon:disabled { opacity: .3; cursor: default; }
.cb-tool-btns [data-tool-act="up"] svg { transform: rotate(-90deg); }
.cb-tool-btns [data-tool-act="down"] svg { transform: rotate(90deg); }
.cb-tool-btns select { background: #1b1b1b; color: #eee; border: 1px solid #3a3a3a; border-radius: 6px; font: inherit; font-size: 12px; padding: 2px 4px; }
.cb-chain-empty { margin: 2px 0 0 12px; }
.cb-slots { display: grid; gap: 8px; margin: 8px 0 0 12px; padding-left: 10px; border-left: 2px dashed var(--accent); }
.cb-slot-head { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
@media (max-width: 1200px) {
  .cb-tooling { border-top-color: #333; }
}
