/* ══════════════════════════════════════════════════════════════════════
   MindAptiv Technical Docs — shared stylesheet
   Used by every page under /technical/*
   ══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;700&family=DM+Sans:ital,wght@0,300;0,400;1,300&display=swap');

/* ── TOKENS ── */
:root {
  --void:    #05060c;
  --void-2:  #0a0b14;
  --accent:  #00c4a3;
  --accent-bright: #00e5c0;
  --text:    #eeeeff;
  --muted:   rgba(238,238,255,0.38);
  --muted-stronger: rgba(238,238,255,0.62);
  --border:  rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.14);
  --card-bg: rgba(255,255,255,0.02);
  --card-bg-hover: rgba(0,229,192,0.04);
  --code-bg: rgba(0,229,192,0.05);
  --danger:  #ef5350;
  --warn:    #e07520;
}
body.light {
  --void:    #eae9e4;
  --void-2:  #e1e0db;
  --accent:  #00a389;
  --accent-bright: #008a72;
  --text:    #1a1f2e;
  --muted:   rgba(26,31,46,0.52);
  --muted-stronger: rgba(26,31,46,0.72);
  --border:  rgba(26,31,46,0.10);
  --border-strong: rgba(26,31,46,0.22);
  --card-bg: rgba(26,31,46,0.02);
  --card-bg-hover: rgba(0,163,137,0.04);
  --code-bg: rgba(0,163,137,0.06);
  --danger:  #c0183a;
  --warn:    #b85a0e;
}
body.light #nav { background: rgba(234,233,228,0.92); border-bottom-color: rgba(26,31,46,0.08); }
body.light .nav-links a { color: rgba(26,31,46,0.5); }
body.light .nav-links a:hover { color: var(--text); }
body.light .nav-cta { border-color: rgba(0,163,137,0.4); color: var(--accent); }
body.light .nav-cta:hover { background: var(--accent); color: #fff; }

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--void); color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}
section[id] { scroll-margin-top: 72px; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-bright); }

/* ══════════════════════════════════════════════════════════════════════
   TOP NAV (identical to site-wide nav — keep in sync with index.html)
   ══════════════════════════════════════════════════════════════════════ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px; flex-shrink: 0;
  flex-wrap: wrap; gap: 12px;
  background: rgba(5,6,12,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.3s, border-bottom-color 0.3s;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo { color: var(--accent); flex-shrink: 0; width: 24px; height: 24px; }
.nav-wordmark {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
}
.nav-links { display: none; align-items: center; gap: 16px; list-style: none; }
.nav-links a {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  font-family: 'IBM Plex Mono', monospace; font-size: 8px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(0,229,192,0.4); padding: 8px 16px;
  background: transparent; cursor: pointer; text-decoration: none; transition: all 0.22s;
}
.nav-cta:hover { background: var(--accent); color: var(--void); }

/* ── NAV DROPDOWN (Product) ── */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  background: transparent; border: none; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.nav-dropdown-trigger:hover { color: var(--text); }
.nav-dropdown.open .nav-dropdown-trigger { color: var(--accent); }
.nav-dropdown-trigger::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 2px;
  transition: transform 0.2s;
  opacity: 0.7;
}
.nav-dropdown.open .nav-dropdown-trigger::after { transform: rotate(180deg); opacity: 1; }

/* Panel: hidden by default, absolute positioning, only shows when .open */
.nav-dropdown-panel {
  list-style: none !important;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  top: calc(100% + 16px);
  left: -14px;
  min-width: 200px;
  background: rgba(5,6,12,0.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 110;
}
.nav-dropdown.open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
/* Hover opens on desktop only (no hover on touch) */
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-dropdown:hover .nav-dropdown-trigger { color: var(--accent); }

  /* Safari sticky-hover defeat: when JS has force-closed the dropdown
     (e.g. after clicking a sibling nav link), override the :hover rule
     so the panel stays hidden even if Safari holds the hover state. */
  .nav-dropdown.force-closed:hover .nav-dropdown-panel,
  .nav-dropdown.force-closed .nav-dropdown-panel {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-6px) !important;
  }
  .nav-dropdown.force-closed:hover .nav-dropdown-trigger {
    color: var(--muted) !important;
  }
}
body.light .nav-dropdown-panel {
  background: rgba(234,233,228,0.97);
  border-color: rgba(26,31,46,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.nav-dropdown-panel li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}
.nav-dropdown-panel a {
  display: block;
  font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 18px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.nav-dropdown-panel a:hover {
  color: var(--accent);
  background: rgba(0,229,192,0.06);
}
body.light .nav-dropdown-panel a:hover {
  background: rgba(0,163,137,0.05);
}

/* On mobile, the nav-links container is hidden entirely (see .nav-links base rule).
   The dropdown panel therefore is not visible on mobile — no special mobile styles needed. */
#theme-toggle {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid rgba(0,229,192,0.28);
  background: rgba(0,229,192,0.06);
  color: var(--accent);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.22s;
  flex-shrink: 0;
}
#theme-toggle:hover { background: rgba(0,229,192,0.16); border-color: rgba(0,229,192,0.5); }
body.light #theme-toggle { border-color: rgba(0,163,137,0.28); background: rgba(0,163,137,0.06); }
body.light #theme-toggle:hover { background: rgba(0,163,137,0.14); border-color: rgba(0,163,137,0.5); }
#theme-toggle svg { pointer-events: none; }
@media (min-width: 701px) and (max-width: 1024px) {
  #nav { padding: 20px 32px; }
  .nav-logo { width: 26px; height: 26px; }
  .nav-links { display: flex; gap: 20px; }
  .nav-wordmark { font-size: 10px; }
  .nav-cta { font-size: 9px; padding: 10px 20px; }
}
@media (min-width: 1025px) {
  #nav { padding: 28px 48px; }
  .nav-logo { width: 28px; height: 28px; }
  .nav-links { display: flex; gap: 36px; }
  .nav-wordmark { font-size: 11px; }
  .nav-cta { font-size: 9px; padding: 10px 24px; }
}

/* ══════════════════════════════════════════════════════════════════════
   DOCS LAYOUT — sidebar + main
   ══════════════════════════════════════════════════════════════════════ */
.docs-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  padding-top: 72px; /* clear fixed nav */
}
@media (min-width: 1025px) {
  .docs-shell {
    grid-template-columns: 280px 1fr;
    padding-top: 96px;
  }
}

/* ── SIDEBAR ── */
.docs-sidebar {
  border-right: 1px solid var(--border);
  background: var(--void-2);
  padding: 24px 0;
  display: none;
}
@media (min-width: 1025px) {
  .docs-sidebar {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 32px 0 48px;
  }
}
body.light .docs-sidebar { background: #e1e0db; border-right-color: rgba(26,31,46,0.08); }

/* Mobile sidebar drawer */
.sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--void-2);
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.sidebar-toggle:hover { color: var(--accent); }
body.light .sidebar-toggle { background: #e1e0db; }
.sidebar-toggle svg { width: 14px; height: 14px; }
@media (min-width: 1025px) {
  .sidebar-toggle { display: none; }
}
.docs-sidebar.open {
  display: block;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  overflow-y: auto;
  padding: 24px 0 48px;
  max-height: calc(100vh - 72px);
}

.sidebar-section {
  padding: 0 20px;
  margin-bottom: 24px;
}
@media (min-width: 1025px) {
  .sidebar-section { padding: 0 24px; }
}
.sidebar-section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  padding-left: 12px;
}
body.light .sidebar-section-label { color: rgba(26,31,46,0.42); }

.sidebar-links { list-style: none; }
.sidebar-link {
  display: block;
  padding: 8px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted-stronger);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.18s;
  line-height: 1.4;
}
.sidebar-link:hover {
  color: var(--text);
  background: rgba(0,229,192,0.04);
}
.sidebar-link.active {
  color: var(--accent);
  background: rgba(0,229,192,0.08);
  font-weight: 500;
}
body.light .sidebar-link { color: rgba(26,31,46,0.62); }
body.light .sidebar-link:hover { color: var(--text); background: rgba(0,163,137,0.05); }
body.light .sidebar-link.active { color: var(--accent); background: rgba(0,163,137,0.08); }

.sidebar-link.stub {
  color: var(--muted);
  cursor: default;
  pointer-events: none;
  opacity: 0.55;
}
.sidebar-link.stub::after {
  content: ' · soon';
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════════════ */
.docs-main {
  padding: 32px 20px 80px;
  max-width: 900px;
  width: 100%;
  justify-self: start;
}
@media (min-width: 701px) {
  .docs-main { padding: 48px 40px 96px; }
}
@media (min-width: 1025px) {
  .docs-main { padding: 64px 64px 112px; }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumbs a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--muted); opacity: 0.5; }
.breadcrumbs .current { color: var(--text); }
body.light .breadcrumbs .current { color: var(--text); }

/* Eyebrow + H1 (page headers) */
.page-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
  overflow-wrap: break-word;
}
.page-title em { font-style: normal; color: var(--accent); }
.page-lede {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px; font-weight: 300;
  color: var(--muted-stronger);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 64ch;
}
@media (min-width: 1025px) {
  .page-lede { font-size: 18px; margin-bottom: 48px; }
}

/* H2 / H3 / H4 */
.docs-main h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 56px 0 18px;
  color: var(--text);
}
.docs-main h2 em { font-style: normal; color: var(--accent); }
.docs-main h2:first-of-type { margin-top: 0; }

.docs-main h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 36px 0 14px;
  color: var(--text);
}

.docs-main h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin: 28px 0 12px;
}

/* Body copy */
.docs-main p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted-stronger);
  margin-bottom: 16px;
}
@media (min-width: 1025px) {
  .docs-main p { font-size: 17px; }
}
.docs-main p strong { color: var(--text); font-weight: 600; }

/* Lists */
.docs-main ul, .docs-main ol {
  margin: 0 0 20px 8px;
  padding-left: 16px;
}
.docs-main li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted-stronger);
  margin-bottom: 8px;
}
@media (min-width: 1025px) {
  .docs-main li { font-size: 17px; }
}
.docs-main li strong { color: var(--text); font-weight: 600; }
.docs-main ul li::marker { color: var(--accent); }
.docs-main ol li::marker { color: var(--accent); font-family: 'IBM Plex Mono', monospace; font-size: 13px; }

/* Inline code */
.docs-main code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent-bright);
  border: 1px solid var(--border);
}
body.light .docs-main code { color: var(--accent); }

/* Section dividers / callouts */
.callout {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--card-bg);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
}
.callout-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.callout p { margin-bottom: 0; }
.callout p + p { margin-top: 12px; }

/* Takeaway panel */
.takeaway {
  margin: 40px 0;
  padding: 24px 28px;
  background: rgba(0,229,192,0.04);
  border: 1px solid rgba(0,229,192,0.2);
  border-radius: 4px;
}
body.light .takeaway { background: rgba(0,163,137,0.05); border-color: rgba(0,163,137,0.25); }
.takeaway-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.takeaway p { color: var(--text); font-weight: 400; margin-bottom: 0; }

/* Tables */
.docs-table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--border); border-radius: 4px; }
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.docs-table th, .docs-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.docs-table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  background: var(--void-2);
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table td { color: var(--muted-stronger); }
.docs-table td strong { color: var(--text); }

/* Accordion / details */
.qa-list { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 48px; }
.qa-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.qa-item[open] { border-color: rgba(0,229,192,0.3); }
body.light .qa-item[open] { border-color: rgba(0,163,137,0.3); }
.qa-summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  line-height: 1.35;
  transition: background 0.2s;
}
.qa-summary::-webkit-details-marker { display: none; }
.qa-summary::after {
  content: '+';
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s;
}
.qa-item[open] .qa-summary::after { content: '−'; }
.qa-summary:hover { background: rgba(0,229,192,0.02); }
body.light .qa-summary:hover { background: rgba(0,163,137,0.03); }
.qa-q-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  flex-shrink: 0;
}
.qa-body {
  padding: 0 22px 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}
.qa-short {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  line-height: 1.6;
}
.qa-short strong { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; font-weight: 700; }
.qa-body p { font-size: 15px; }
.qa-body h4 { margin-top: 18px; margin-bottom: 8px; }
.qa-body ul, .qa-body ol { margin-bottom: 14px; }
.qa-body li { font-size: 15px; }

/* Related deep dives block */
.related-block {
  margin: 48px 0 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.related-links { display: flex; flex-wrap: wrap; gap: 10px; }
.related-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--muted-stronger);
  text-decoration: none;
  transition: all 0.2s;
}
.related-link:hover { border-color: var(--accent); color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════════
   LANDING PAGE — section card grid
   ══════════════════════════════════════════════════════════════════════ */
.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0 48px;
}
@media (min-width: 701px) {
  .section-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1025px) {
  .section-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.section-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 26px 24px 28px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.22s;
  position: relative;
}
.section-card:hover {
  background: var(--card-bg-hover);
  border-color: rgba(0,229,192,0.3);
  transform: translateY(-2px);
}
.section-card.stub {
  pointer-events: none;
  opacity: 0.5;
}
.section-card.stub::after {
  content: 'Coming soon';
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.sc-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.sc-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--text);
}
.sc-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--muted-stronger);
  line-height: 1.55;
  margin-bottom: 16px;
}
.sc-arrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  color: var(--accent);
  transition: transform 0.2s;
  display: inline-block;
}
.section-card:hover .sc-arrow { transform: translateX(4px); }

/* Category header on landing */
.category-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 56px 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.category-header:first-of-type { margin-top: 40px; }
.category-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}
.category-header .cat-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: auto;
}

/* ══════════════════════════════════════════════════════════════════════
   PERSONAS TAB SWITCHER
   ══════════════════════════════════════════════════════════════════════ */
.persona-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.persona-tab {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-stronger);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.persona-tab:hover {
  color: var(--text);
  border-color: rgba(0,229,192,0.4);
}
.persona-tab.active {
  color: var(--void);
  background: var(--accent);
  border-color: var(--accent);
}
body.light .persona-tab.active { color: #fff; }

.persona-panel { display: none; }
.persona-panel.active { display: block; }

.persona-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.persona-header h2 {
  margin-top: 0;
  margin-bottom: 8px;
}
.persona-header p {
  font-size: 15px;
  color: var(--muted-stronger);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════ */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  max-width: 960px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 16px;
}
@media (min-width: 701px) {
  #site-footer {
    flex-direction: row; align-items: center; justify-content: space-between;
    text-align: left; padding: 40px 32px;
  }
}
@media (min-width: 1025px) {
  #site-footer { padding: 40px 48px; }
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent);
}
.footer-links { display: flex; gap: 16px; list-style: none; flex-wrap: wrap; justify-content: center; }
@media (min-width: 701px) { .footer-links { gap: 28px; } }
.footer-links a {
  font-family: 'IBM Plex Mono', monospace; font-size: 8px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-family: 'IBM Plex Mono', monospace; font-size: 8px;
  letter-spacing: 0.12em; color: var(--muted); opacity: 0.55;
}

/* Return to top */
#return-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,229,192,0.12); border: 1px solid rgba(0,229,192,0.35);
  color: var(--accent); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, background 0.2s;
  backdrop-filter: blur(8px);
}
#return-top.visible { opacity: 1; pointer-events: auto; }
#return-top:hover { background: rgba(0,229,192,0.22); }
body.light #return-top { background: rgba(0,163,137,0.1); border-color: rgba(0,163,137,0.3); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* ============================================================
   MEANING COORDINATES FULL PANEL — LIGHT MODE
   (extracted from homepage for use in Semantic Encoding Appendix)
   ============================================================ */

/* Panel shell */
body.light #mceFullPanel {
  border-color: rgba(0,163,137,0.2) !important;
  background: #e8e7e2;
  color: #1a1f2e;
}
body.light #mceFullPanel .fp-header {
  border-bottom-color: rgba(26,31,46,0.1);
  background: #e0dfd9;
}
body.light #mceFullPanel .fp-title { color: var(--accent); }
body.light #mceFullPanel .fp-close {
  border-color: rgba(26,31,46,0.15);
  color: rgba(26,31,46,0.45);
}
body.light #mceFullPanel .fp-close:hover { color: #1a1f2e; border-color: rgba(26,31,46,0.35); }

/* Tab bar */
body.light #mceFullPanel .mc-view-tabs {
  border-bottom-color: rgba(26,31,46,0.1);
  background: #dddcd7;
}
body.light #mceFullPanel .mc-vtab { color: rgba(26,31,46,0.38); }
body.light #mceFullPanel .mc-vtab:hover { color: rgba(26,31,46,0.8); }
body.light #mceFullPanel .mc-vtab.mc-active { color: var(--accent); }
body.light #mceFullPanel .mc-vtab.mc-active::after { background: var(--accent); }

/* ── PERIODIC TABLE tab ── */
body.light #mceFullPanel .mc-search {
  background: rgba(26,31,46,0.05) !important;
  border-color: rgba(26,31,46,0.13) !important;
  color: #1a1f2e !important;
}
body.light #mceFullPanel .mc-search:focus { border-color: rgba(0,163,137,0.4) !important; }
body.light #mceFullPanel .mc-search::placeholder { color: rgba(26,31,46,0.3); }
body.light #mceFullPanel .mc-rf {
  background: rgba(26,31,46,0.05);
  border-color: rgba(26,31,46,0.12);
  color: rgba(26,31,46,0.45);
}
body.light #mceFullPanel .mc-rf.mc-rf-1.active { background:rgba(0,163,137,0.1); border-color:rgba(0,163,137,0.35); color:#008a72; }
body.light #mceFullPanel .mc-rf.mc-rf-2.active { background:rgba(74,86,204,0.1); border-color:rgba(74,86,204,0.35); color:#4a56cc; }
body.light #mceFullPanel .mc-rf.mc-rf-3.active { background:rgba(184,120,0,0.1); border-color:rgba(184,120,0,0.35); color:#b87800; }
body.light #mceFullPanel .mc-rf.mc-rf-4.active { background:rgba(192,24,58,0.1); border-color:rgba(192,24,58,0.35); color:#c0183a; }

body.light #mceFullPanel .mc-group-label { color: rgba(26,31,46,0.28); }
body.light #mceFullPanel .mc-cell {
  background: rgba(26,31,46,0.04);
  border-color: rgba(26,31,46,0.1);
}
body.light #mceFullPanel .mc-cell.mc-r1 { border-color: rgba(0,163,137,0.2); }
body.light #mceFullPanel .mc-cell.mc-r2 { border-color: rgba(74,86,204,0.2); }
body.light #mceFullPanel .mc-cell.mc-r3 { border-color: rgba(184,120,0,0.2); }
body.light #mceFullPanel .mc-cell.mc-r4 { border-color: rgba(192,24,58,0.2); }
body.light #mceFullPanel .mc-cell.mc-r1:hover { background:rgba(0,163,137,0.08); border-color:rgba(0,163,137,0.4); }
body.light #mceFullPanel .mc-cell.mc-r2:hover { background:rgba(74,86,204,0.08); border-color:rgba(74,86,204,0.4); }
body.light #mceFullPanel .mc-cell.mc-r3:hover { background:rgba(184,120,0,0.08); border-color:rgba(184,120,0,0.4); }
body.light #mceFullPanel .mc-cell.mc-r4:hover { background:rgba(192,24,58,0.08); border-color:rgba(192,24,58,0.4); }
body.light #mceFullPanel .mc-cell.mc-hl.mc-r1 { background:rgba(0,163,137,0.14); border-color:rgba(0,163,137,0.45); }
body.light #mceFullPanel .mc-cell.mc-hl.mc-r2 { background:rgba(74,86,204,0.14); border-color:rgba(74,86,204,0.45); }
body.light #mceFullPanel .mc-cell.mc-hl.mc-r3 { background:rgba(184,120,0,0.14); border-color:rgba(184,120,0,0.45); }
body.light #mceFullPanel .mc-cell.mc-hl.mc-r4 { background:rgba(192,24,58,0.14); border-color:rgba(192,24,58,0.45); }
body.light #mceFullPanel .mc-cell-num { color: rgba(26,31,46,0.28); }
body.light #mceFullPanel .mc-cell-mn  { color: rgba(26,31,46,0.35); }
body.light #mceFullPanel .mc-cell.mc-r1 .mc-cell-ph { color: #008a72; }
body.light #mceFullPanel .mc-cell.mc-r2 .mc-cell-ph { color: #4a56cc; }
body.light #mceFullPanel .mc-cell.mc-r3 .mc-cell-ph { color: #b87800; }
body.light #mceFullPanel .mc-cell.mc-r4 .mc-cell-ph { color: #c0183a; }

/* Tooltip */
body.light .mc-fp-tooltip {
  background: #f2f1ec;
  border-color: rgba(0,163,137,0.3);
  box-shadow: 0 8px 24px rgba(26,31,46,0.15);
}
body.light .mc-fp-tooltip .mc-tt-num  { color: rgba(26,31,46,0.38); }
body.light .mc-fp-tooltip .mc-tt-mn   { color: #1a1f2e; }
body.light .mc-fp-tooltip .mc-tt-def  { color: rgba(26,31,46,0.55); }
body.light .mc-fp-tooltip .mc-tt-pair {
  color: rgba(26,31,46,0.35);
  border-top-color: rgba(26,31,46,0.1);
}

/* ── REALM NAVIGATOR tab ── */
body.light #mceFullPanel .mc-realm-card {
  background: rgba(26,31,46,0.04);
  border-color: rgba(26,31,46,0.1);
}
body.light #mceFullPanel .mc-realm-card:hover { box-shadow: 0 4px 16px rgba(26,31,46,0.1); }
body.light #mceFullPanel .mc-realm-card.mc-rn-1:hover,
body.light #mceFullPanel .mc-realm-card.mc-rn-1.mc-rn-open { border-color:rgba(0,163,137,0.35); background:rgba(0,163,137,0.05); }
body.light #mceFullPanel .mc-realm-card.mc-rn-2:hover,
body.light #mceFullPanel .mc-realm-card.mc-rn-2.mc-rn-open { border-color:rgba(74,86,204,0.35); background:rgba(74,86,204,0.05); }
body.light #mceFullPanel .mc-realm-card.mc-rn-3:hover,
body.light #mceFullPanel .mc-realm-card.mc-rn-3.mc-rn-open { border-color:rgba(184,120,0,0.35); background:rgba(184,120,0,0.05); }
body.light #mceFullPanel .mc-realm-card.mc-rn-4:hover,
body.light #mceFullPanel .mc-realm-card.mc-rn-4.mc-rn-open { border-color:rgba(192,24,58,0.35); background:rgba(192,24,58,0.05); }
body.light #mceFullPanel .mc-rn-name  { color: #1a1f2e; }
body.light #mceFullPanel .mc-rn-meta  { color: rgba(26,31,46,0.4); }
body.light #mceFullPanel .mc-rn-desc  { color: rgba(26,31,46,0.55); }
body.light #mceFullPanel .mc-group-pill {
  background: rgba(26,31,46,0.04);
  border-color: rgba(26,31,46,0.12);
  color: rgba(26,31,46,0.5);
}
body.light #mceFullPanel .mc-rn-1 .mc-group-pill:hover { border-color:rgba(0,163,137,0.35); color:#008a72; background:rgba(0,163,137,0.07); }
body.light #mceFullPanel .mc-rn-2 .mc-group-pill:hover { border-color:rgba(74,86,204,0.35); color:#4a56cc; background:rgba(74,86,204,0.07); }
body.light #mceFullPanel .mc-rn-3 .mc-group-pill:hover { border-color:rgba(184,120,0,0.35); color:#b87800; background:rgba(184,120,0,0.07); }
body.light #mceFullPanel .mc-rn-4 .mc-group-pill:hover { border-color:rgba(192,24,58,0.35); color:#c0183a; background:rgba(192,24,58,0.07); }
body.light #mceFullPanel .mc-group-detail {
  background: #dddcd7;
  border-color: rgba(26,31,46,0.1);
}
body.light #mceFullPanel .mc-gd-close  { color: rgba(26,31,46,0.38); }
body.light #mceFullPanel .mc-gd-mn     { color: #1a1f2e; }
body.light #mceFullPanel .mc-gd-def    { color: rgba(26,31,46,0.55); }
body.light #mceFullPanel .mc-gd-coord  {
  background: #e8e7e2;
  border-color: rgba(26,31,46,0.1);
}
body.light #mceFullPanel .mc-gd-mn { color: #1a1f2e; }
body.light #mceFullPanel .mc-gd-pair { color: rgba(26,31,46,0.3); }

/* ── WAVEFORM tab ── */
body.light #mceFullPanel .mc-wave-canvas { background: rgba(26,31,46,0.06); }
body.light #mceFullPanel .mc-wave-info {
  background: rgba(26,31,46,0.04);
  border-color: rgba(26,31,46,0.1);
}
body.light #mceFullPanel .mc-wi-mn   { color: #1a1f2e; }
body.light #mceFullPanel .mc-wi-def  { color: rgba(26,31,46,0.5); }
body.light #mceFullPanel .mc-wi-meta { color: rgba(26,31,46,0.3); }
body.light #mceFullPanel .mc-wrl     { color: rgba(26,31,46,0.3); }
body.light #mceFullPanel .mc-wi-r1 { color: #008a72; }
body.light #mceFullPanel .mc-wi-r2 { color: #4a56cc; }
body.light #mceFullPanel .mc-wi-r3 { color: #b87800; }
body.light #mceFullPanel .mc-wi-r4 { color: #c0183a; }

/* ── GLYPHS tab ── */
body.light #mcfp-glyphs { color: #1a1f2e; }
body.light #mcfp-glyphs-diac .diac-lbl  { color: rgba(26,31,46,0.4); }
body.light #mcfp-glyphs-diac .diac-item { color: rgba(26,31,46,0.55); }
body.light #mcfp-glyphs .ws-ring-header {
  border-bottom-color: rgba(26,31,46,0.1);
  color: #1a1f2e;
}
body.light #mcfp-glyphs .ws-ring-desc { color: rgba(26,31,46,0.38); }
body.light #mcfp-glyphs .ws-grp-name  { color: inherit; }
body.light #mcfp-glyphs .ws-grp-num   { color: rgba(26,31,46,0.3); }
body.light #mcfp-glyphs .ws-glyph-cell {
  --ws-cell-bg: #dddcd8;
  --ws-ko: #dddcd8;
  background: rgba(26,31,46,0.04);
  border-color: rgba(26,31,46,0.1);
}
body.light #mcfp-glyphs .ws-glyph-cell:hover { background: rgba(26,31,46,0.08); }
body.light #mcfp-glyphs .ws-glyph-cell.ws-r1:hover { border-color: rgba(0,163,137,0.5); }
body.light #mcfp-glyphs .ws-glyph-cell.ws-r2:hover { border-color: rgba(74,86,204,0.5); }
body.light #mcfp-glyphs .ws-glyph-cell.ws-r3:hover { border-color: rgba(184,120,0,0.5); }
body.light #mcfp-glyphs .ws-glyph-cell.ws-r4:hover { border-color: rgba(192,24,58,0.5); }
body.light #mcfp-glyphs .ws-cell-idx  { color: rgba(26,31,46,0.15); }
body.light #mcfp-glyphs .ws-cell-hover {
  background: #f2f1ec;
  border-color: rgba(26,31,46,0.15);
  box-shadow: 0 4px 16px rgba(26,31,46,0.12);
}
body.light #mcfp-glyphs .ws-ch-code   { color: rgba(26,31,46,0.38); }
body.light #mcfp-glyphs .ws-ch-name   { color: #1a1f2e; }
body.light #mcfp-glyphs .ws-ch-desc   { color: rgba(26,31,46,0.55); }
body.light #mcfp-glyphs .ws-ch-conj   { color: rgba(26,31,46,0.28); }

/* ── LANGUAGE ROOTS tab ── */
body.light #mcfp-langroots .lr-section-title { color: rgba(0,120,95,0.85); border-bottom-color: rgba(0,120,95,0.12); }
body.light #mcfp-langroots .lr-body   { color: rgba(26,31,46,0.65); }
body.light #mcfp-langroots .lr-body strong { color: rgba(26,31,46,0.82); }
body.light #mcfp-langroots .lr-body a { color: rgba(0,120,95,0.8); }
body.light #mcfp-langroots .lr-item-box {
  background: rgba(26,31,46,0.03);
  border-color: rgba(26,31,46,0.08);
}
body.light #mcfp-langroots .lr-item-label { color: rgba(26,31,46,0.35); }
body.light #mcfp-langroots .lr-item  { color: rgba(26,31,46,0.62); }
body.light #mcfp-langroots .lr-item strong { color: rgba(26,31,46,0.82); }
body.light #mcfp-langroots .lr-item-num { color: rgba(26,31,46,0.25); }
body.light #mcfp-langroots .lr-note   { color: rgba(26,31,46,0.28); border-top-color: rgba(26,31,46,0.07); }
body.light #mcfp-langroots .lr-conj-chip {
  border-color: rgba(0,120,95,0.25);
  background: rgba(0,120,95,0.06);
  color: rgba(0,120,95,0.8);
}
body.light #mcfp-langroots .lr-conj-chip span { color: rgba(26,31,46,0.38); }
