/* ============================================
   doctor-study — Design System v2
   ============================================ */

/* ----- Design Tokens ----- */
:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #f7f9fb;
  --bg-2: #edf2f7;
  --card: #ffffff;
  --card-solid: #ffffff;
  --card-hover: #ffffff;

  /* Text */
  --txt: #0f172a;
  --txt-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;

  /* Borders */
  --border: #e2e8f0;
  --border-2: #cbd5e1;

  /* Backgrounds */
  --soft: #f8fafc;
  --soft-2: #f1f5f9;

  /* Brand colors */
  --pri: #3b82f6;
  --pri-h: #2563eb;
  --pri-l: #eff6ff;
  --pri-ll: #dbeafe;

  --sec: #10b981;
  --sec-h: #059669;
  --sec-l: #ecfdf5;
  --sec-ll: #d1fae5;

  --acc: #8b5cf6;
  --acc-h: #7c3aed;
  --acc-l: #f5f3ff;
  --acc-ll: #ede9fe;

  --warn: #f59e0b;
  --warn-h: #d97706;
  --warn-l: #fffbeb;
  --warn-ll: #fef3c7;

  --danger: #ef4444;
  --danger-h: #dc2626;
  --danger-l: #fef2f2;
  --danger-ll: #fee2e2;

  /* Study desk accents */
  --trace: #22c7b8;
  --trace-l: rgba(34, 199, 184, 0.12);
  --graphite: #1f2937;
  --paper-line: rgba(15, 23, 42, 0.06);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 8px 24px rgba(15, 23, 42, 0.08);

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 8px;
  --r-xl: 8px;
  --r-2xl: 8px;

  /* Transitions */
  --t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --t-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Dark Mode ----- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a1018;
  --bg-2: #111a25;
  --card: #111a25;
  --card-solid: #111a25;
  --card-hover: #172232;

  --txt: #e2e8f0;
  --txt-2: #cbd5e1;
  --muted: #94a3b8;
  --muted-2: #64748b;

  --border: #1e293b;
  --border-2: #334155;

  --soft: #0f172a;
  --soft-2: #1e293b;

  --pri: #60a5fa;
  --pri-h: #3b82f6;
  --pri-l: rgba(59, 130, 246, 0.12);
  --pri-ll: rgba(59, 130, 246, 0.2);

  --sec: #34d399;
  --sec-h: #10b981;
  --sec-l: rgba(16, 185, 129, 0.12);
  --sec-ll: rgba(16, 185, 129, 0.2);

  --acc: #a78bfa;
  --acc-h: #8b5cf6;
  --acc-l: rgba(139, 92, 246, 0.12);
  --acc-ll: rgba(139, 92, 246, 0.2);

  --warn: #fbbf24;
  --warn-h: #f59e0b;
  --warn-l: rgba(245, 158, 11, 0.12);
  --warn-ll: rgba(245, 158, 11, 0.2);

  --danger: #f87171;
  --danger-h: #ef4444;
  --danger-l: rgba(239, 68, 68, 0.12);
  --danger-ll: rgba(239, 68, 68, 0.2);
  --trace: #2dd4bf;
  --trace-l: rgba(45, 212, 191, 0.14);
  --graphite: #cbd5e1;
  --paper-line: rgba(226, 232, 240, 0.06);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1018;
    --bg-2: #111a25;
    --card: #111a25;
    --card-solid: #111a25;
    --card-hover: #172232;
    --txt: #e2e8f0;
    --txt-2: #cbd5e1;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --border: #1e293b;
    --border-2: #334155;
    --soft: #0f172a;
    --soft-2: #1e293b;
    --pri: #60a5fa;
    --pri-h: #3b82f6;
    --pri-l: rgba(59, 130, 246, 0.12);
    --pri-ll: rgba(59, 130, 246, 0.2);
    --sec: #34d399;
    --sec-h: #10b981;
    --sec-l: rgba(16, 185, 129, 0.12);
    --sec-ll: rgba(16, 185, 129, 0.2);
    --acc: #a78bfa;
    --acc-h: #8b5cf6;
    --acc-l: rgba(139, 92, 246, 0.12);
    --acc-ll: rgba(139, 92, 246, 0.2);
    --warn: #fbbf24;
    --warn-h: #f59e0b;
    --warn-l: rgba(245, 158, 11, 0.12);
    --warn-ll: rgba(245, 158, 11, 0.2);
    --danger: #f87171;
    --danger-h: #ef4444;
    --danger-l: rgba(239, 68, 68, 0.12);
    --danger-ll: rgba(239, 68, 68, 0.2);
    --trace: #2dd4bf;
    --trace-l: rgba(45, 212, 191, 0.14);
    --graphite: #cbd5e1;
    --paper-line: rgba(226, 232, 240, 0.06);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  }
}

/* ----- Reset & Base ----- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--txt);
  background:
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px),
    linear-gradient(180deg, var(--paper-line) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
}

a { color: var(--pri); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--pri-h); }
::selection { background: var(--pri-ll); color: var(--txt); }

/* ----- Layout ----- */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 1.25rem;
  padding: 0 1rem;
}
body.side-collapsed .app-shell {
  --app-sidebar-width: 72px;
}

.app-shell .wrap {
  max-width: none;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 1.75rem 0 4rem;
}

.app-sidebar {
  position: sticky;
  top: 5rem;
  align-self: start;
  flex: 0 0 var(--app-sidebar-width, 260px);
  min-width: 0;
  width: var(--app-sidebar-width, 260px);
  max-width: var(--app-sidebar-width, 260px);
  height: calc(100vh - 6rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem;
  margin-top: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--card-solid);
  box-shadow: var(--shadow-sm);
  transition: flex-basis var(--t-smooth), padding var(--t-smooth), border-radius var(--t-smooth);
}

.side-resizer {
  position: sticky;
  top: 5rem;
  align-self: start;
  flex: 0 0 10px;
  width: 10px;
  height: calc(100vh - 6rem);
  margin: 1.75rem -0.65rem 0 -0.65rem;
  cursor: col-resize;
  touch-action: none;
  z-index: 3;
}
.side-resizer::before {
  content: '';
  display: block;
  width: 4px;
  height: 4.5rem;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--border-2);
  opacity: 0.65;
  transition: opacity var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.side-resizer:hover::before,
body.side-resizing .side-resizer::before {
  opacity: 1;
  background: var(--pri);
  transform: scaleX(1.35);
}
body.side-resizing {
  cursor: col-resize;
  user-select: none;
}

.side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.55rem 0.75rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.side-collapse {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-solid);
  color: var(--muted);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.side-collapse:hover {
  color: var(--txt);
  border-color: var(--border-2);
  background: var(--bg-2);
}
.side-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.side-title {
  margin-top: 0.15rem;
  color: var(--txt);
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0;
}
.side-section { margin-top: 0.75rem; }
.side-section-title {
  padding: 0.2rem 0.65rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.side-link {
  position: relative;
  display: block;
  margin-top: 0.25rem;
  padding: 0.68rem 0.75rem 0.68rem 0.9rem;
  border-radius: var(--r-md);
  color: var(--muted);
  border: 1px solid transparent;
}
.side-link::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: var(--txt);
  transform: translateY(-50%);
  transition: height var(--t-fast);
}
.side-link:hover {
  color: var(--txt);
  background: var(--bg-2);
}
.side-link.active {
  color: var(--txt);
  background: var(--bg-2);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.side-link.active::before { height: 58%; }
.side-link span {
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}
.side-link small {
  display: block;
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.3;
}
body.side-collapsed .app-sidebar {
  flex: 0 0 72px;
  padding: 0.55rem;
  border-radius: var(--r-xl);
  width: 72px;
  max-width: 72px;
  min-width: 0;
  contain: inline-size;
}
body.side-collapsed .side-resizer {
  display: none;
}
body.side-collapsed .side-head {
  justify-content: center;
  padding: 0.45rem 0 0.6rem;
}
body.side-collapsed .side-head > div,
body.side-collapsed .side-section-title,
body.side-collapsed .side-link span,
body.side-collapsed .side-link small {
  display: none;
}
body.side-collapsed .side-collapse {
  transform: rotate(180deg);
}
body.side-collapsed .side-section {
  margin-top: 0.45rem;
}
body.side-collapsed .side-link {
  display: grid;
  place-items: center;
  height: 2.55rem;
  padding: 0;
  margin-top: 0.35rem;
}
body.side-collapsed .side-link::before {
  left: 50%;
  top: auto;
  bottom: -0.18rem;
  width: 42%;
  height: 3px;
  transform: translateX(-50%);
}
body.side-collapsed .side-link.active::before { height: 3px; }
body.side-collapsed .side-link::after {
  content: attr(data-initial);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--soft);
  color: var(--txt);
  font-size: 0.72rem;
  font-weight: 850;
}
body.side-collapsed .side-link.active::after {
  background: var(--txt);
  color: var(--bg);
}

/* ----- Typography ----- */
h1 {
  text-align: center;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--txt);
  margin: 1.5rem 0 0.75rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--txt);
  letter-spacing: 0;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.25rem 0 0.6rem;
  color: var(--txt);
  letter-spacing: 0;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1rem 0 0.45rem;
  color: var(--txt-2);
}

h2[id], h3[id], h4[id] { scroll-margin-top: 5rem; }

.sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  max-width: 48rem;
  line-height: 1.6;
}

p { margin: 0.6rem 0; color: var(--txt); line-height: 1.75; }

.hl {
  background: linear-gradient(90deg, var(--warn-ll), transparent);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
}

/* ----- Top Navigation ----- */
.topnav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0.55rem max(1rem, calc((100vw - 1440px) / 2 + 1rem));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
:root[data-theme="dark"] .topnav { background: rgba(11, 17, 32, 0.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topnav { background: rgba(11, 17, 32, 0.9); } }

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 15rem;
  color: var(--txt);
}
.nav-brand:hover { color: var(--txt); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background: var(--txt);
  color: var(--bg);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
}
.nav-brand strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.1;
  letter-spacing: 0;
}
.nav-brand small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}
.nav-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}
.nav-pill,
.nav-menu > summary,
.nav-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 750;
  font-size: 0.83rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all var(--t-fast);
}
.nav-pill:hover,
.nav-menu > summary:hover,
.nav-search:hover {
  background: var(--bg-2);
  border-color: var(--border);
  color: var(--txt);
}
.nav-menu {
  position: relative;
}
.nav-menu > summary {
  cursor: pointer;
  list-style: none;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform var(--t-fast);
}
.nav-menu[open] > summary {
  background: var(--bg-2);
  color: var(--txt);
  border-color: var(--border);
}
.nav-menu[open] > summary::after {
  transform: translateY(1px) rotate(225deg);
}
.nav-menu-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--card-solid);
  box-shadow: var(--shadow-xl);
}
/* 多个下拉并排时，避免靠两侧的面板溢出视口 */
.nav-primary > .nav-menu:nth-of-type(1) .nav-menu-panel,
.nav-primary > .nav-menu:nth-of-type(2) .nav-menu-panel {
  left: 0;
  transform: none;
}
.nav-primary > .nav-menu:last-of-type .nav-menu-panel {
  left: auto;
  right: 0;
  transform: none;
}
.nav-menu-panel a {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: var(--r-lg);
  color: var(--txt);
  border: 1px solid transparent;
}
.nav-menu-panel a:hover {
  background: var(--bg-2);
  border-color: var(--border);
  color: var(--txt);
}
.nav-menu-panel span {
  display: block;
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1.3;
}
.nav-menu-panel small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.nav-search,
.side-toggle {
  font-family: inherit;
  cursor: pointer;
}
.nav-search {
  background: var(--soft);
}
.side-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--txt);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: var(--shadow-xs);
}

.theme-toggle {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--txt);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast);
}
.theme-toggle:hover { border-color: var(--border-2); color: var(--txt); box-shadow: var(--shadow-sm); }

/* ============================================
   INDEX PAGE
   ============================================ */

.home-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, var(--trace-l), transparent 24rem),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px),
    linear-gradient(180deg, var(--paper-line) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 32px 32px, 32px 32px, auto;
}

/* Topbar */
.idx-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
:root[data-theme="dark"] .idx-topbar { background: rgba(11, 17, 32, 0.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .idx-topbar { background: rgba(11, 17, 32, 0.9); } }
.idx-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1080px, calc(100% - 3rem));
  margin: 0 auto;
  min-height: 3.6rem;
}
.idx-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--txt);
  text-decoration: none;
}
.idx-logo span {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  background: var(--txt);
  color: var(--bg);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
}
.idx-logo strong { font-size: 0.95rem; letter-spacing: 0; }
.idx-home-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.15rem; }
.idx-home-nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.idx-home-nav a:hover { background: var(--bg-2); color: var(--txt); }

/* Shell */
.home-shell {
  width: min(1160px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

/* Hero */
.idx-hero {
  position: relative;
  max-width: 58rem;
  margin-bottom: 3.5rem;
  padding-left: 1.2rem;
  border-left: 4px solid var(--trace);
}
.idx-hero::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0.3rem;
  width: min(22rem, 34vw);
  height: 7rem;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, transparent 49%, var(--border) 50%, transparent 51%),
    linear-gradient(180deg, transparent 49%, var(--border) 50%, transparent 51%),
    var(--card-solid);
  background-size: 44px 44px;
  opacity: 0.42;
  pointer-events: none;
}
.idx-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.idx-hero h1 {
  margin: 0;
  text-align: left;
  color: var(--txt);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}
.idx-hero-desc { margin: 1.1rem 0 0; max-width: 45rem; color: var(--txt-2); font-size: 1.12rem; font-weight: 500; line-height: 1.6; }
.idx-hero-sub { margin: 0.8rem 0 0; max-width: 46rem; color: var(--muted); font-size: 0.98rem; line-height: 1.7; }
.idx-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.8rem; }
.idx-primary, .idx-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.6rem 1.05rem;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.idx-primary { border: 1px solid var(--txt); background: var(--txt); color: var(--bg); }
.idx-primary:hover { background: var(--txt-2); border-color: var(--txt-2); color: var(--bg); }
.idx-secondary { border: 1px solid var(--border); background: var(--card-solid); color: var(--txt); }
.idx-secondary:hover { border-color: var(--border-2); background: var(--bg-2); color: var(--txt); }
.idx-hero-stats { display: flex; flex-wrap: wrap; gap: 2.25rem; margin-top: 2.25rem; }
.idx-hero-stats div { display: flex; flex-direction: column; }
.idx-hero-stats strong { color: var(--txt); font-size: 1.6rem; font-weight: 800; line-height: 1.1; letter-spacing: 0; }
.idx-hero-stats span { margin-top: 0.2rem; color: var(--muted); font-size: 0.8rem; font-weight: 500; }

/* Lanes */
.idx-lanes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-bottom: 3.5rem; border: 1px solid var(--border); background: var(--card-solid); }
.idx-lanes article { min-height: 100%; padding: 1.25rem; border-right: 1px solid var(--border); background: transparent; }
.idx-lanes article:last-child { border-right: none; }
.idx-lanes span { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 4px; background: var(--graphite); color: var(--bg); font-size: 0.78rem; font-weight: 700; }
.idx-lanes h3 { margin: 0.9rem 0 0.4rem; color: var(--txt); font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.idx-lanes p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.idx-lane-links {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--txt-2);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.5;
}

/* Module tracks */
.idx-track { margin-bottom: 2.75rem; }
.idx-track-head { margin-bottom: 1.1rem; }
.idx-track-head span {
  display: inline-flex;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.idx-track-head h2 { margin: 0; color: var(--txt); font-size: 1.3rem; font-weight: 700; letter-spacing: 0; }
.idx-track-head p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.idx-track-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }

/* Cards */
.idx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.idx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-top: 3px solid var(--trace);
  opacity: 0;
  transition: opacity var(--t-fast);
  pointer-events: none;
}
.idx-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.idx-card:hover::before { opacity: 1; }
.idx-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.9rem; }
.idx-card-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
}
.idx-card-icon::before { content: "AI"; }
.idx-card.c1 { border-top-color: var(--pri); }
.idx-card.c2 { border-top-color: var(--sec); }
.idx-card.c3 { border-top-color: var(--acc); }
.idx-card.c4 { border-top-color: var(--warn); }
.idx-card.c5 { border-top-color: var(--danger); }
.idx-card.c1 .idx-card-icon { color: var(--pri); }
.idx-card.c2 .idx-card-icon { color: var(--sec); }
.idx-card.c3 .idx-card-icon { color: var(--acc); }
.idx-card.c4 .idx-card-icon { color: var(--warn); }
.idx-card.c5 .idx-card-icon { color: var(--danger); }
.idx-card-arrow { display: inline-flex; align-items: center; color: var(--muted-2); font-size: 0.74rem; font-weight: 600; }
.idx-card-arrow::after { content: "→"; margin-left: 0.3rem; transition: transform var(--t-fast); }
.idx-card:hover .idx-card-arrow { color: var(--txt); }
.idx-card:hover .idx-card-arrow::after { transform: translateX(3px); }
.idx-title { margin-bottom: 0.4rem; color: var(--txt); font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.idx-desc { flex: 1; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.idx-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1rem; }
.idx-tags span { display: inline-flex; align-items: center; padding: 0.1rem 0.5rem; border-radius: 6px; background: var(--bg-2); color: var(--muted); font-size: 0.7rem; font-weight: 500; white-space: nowrap; }

/* Footer */
.idx-footer-panel {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.idx-footer-panel h3 { margin: 0 0 0.4rem; color: var(--txt); font-size: 0.92rem; font-weight: 700; }
.idx-footer-panel p { margin: 0; max-width: 38rem; color: var(--muted); font-size: 0.85rem; line-height: 1.65; }
.idx-shortcuts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.45rem; }
.idx-shortcuts span { padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-radius: 7px; background: var(--card-solid); color: var(--muted); font-size: 0.74rem; font-weight: 500; white-space: nowrap; }

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  margin: 1.15rem 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-fast);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-m { border-left: 4px solid var(--pri); }
.card-d { border-left: 4px solid var(--sec); }
.card-s { border-left: 4px solid var(--acc); }
.card-w { border-left: 4px solid var(--warn); }
.card-r { border-left: 4px solid var(--danger); }

.card h3:first-child,
.card h4:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Card internal spacing: first/last elements */
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* Card header accent */
.card h3:first-child,
.card h4:first-child {
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
}
.card h3:first-child::after,
.card h4:first-child::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 3px;
  border-radius: 999px;
  background: var(--border-2);
}
.card-m h3:first-child::after { background: var(--pri); }
.card-d h3:first-child::after { background: var(--sec); }
.card-s h3:first-child::after { background: var(--acc); }
.card-w h3:first-child::after { background: var(--warn); }
.card-r h3:first-child::after { background: var(--danger); }

/* Card content spacing */
.card p { margin: 0.5rem 0; }
.card ul, .card ol { margin: 0.5rem 0; padding-left: 1.35rem; }
.card li { margin: 0.3rem 0; line-height: 1.65; }
.card table { margin: 0.75rem 0; }
.card .qa-summary { margin-top: 0.85rem; }
.card .qa-section { margin: 0.6rem 0; }

/* Adjacent cards: tighter spacing */
.card + .card { margin-top: 0.85rem; }

/* ============================================
   TABLES
   ============================================ */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card-solid);
}
table th {
  background: var(--soft);
  font-weight: 700;
  color: var(--txt-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.9rem;
  border-bottom: 2px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
table th:first-child { border-radius: var(--r-lg) 0 0 0; }
table th:last-child { border-radius: 0 var(--r-lg) 0 0; }
table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--txt);
}
table tr:last-child td { border-bottom: none; }
table tr:last-child td:first-child { border-radius: 0 0 0 var(--r-lg); }
table tr:last-child td:last-child { border-radius: 0 0 var(--r-lg) 0; }
table tr:nth-child(even) { background: var(--soft); }
table tr:hover { background: var(--soft-2); }

/* Compact table variant */
.table-sm { font-size: 0.82rem; }
.table-sm th { padding: 0.55rem 0.7rem; font-size: 0.74rem; }
.table-sm td { padding: 0.5rem 0.7rem; }

/* ============================================
   CODE & PRE
   ============================================ */

code {
  background: var(--soft);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  font-size: 0.85rem;
  color: var(--txt);
  font-weight: 500;
}

pre {
  background: var(--soft);
  color: var(--txt);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.6;
  box-shadow: var(--shadow-xs);
}
pre code {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  font-weight: 400;
}

pre[class*="language-"],
pre[class*="language-"] code,
code[class*="language-"] {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  text-shadow: none;
}

pre[class*="language-"] {
  background: var(--soft);
  color: var(--txt);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem;
  margin: 1rem 0;
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
}

pre[class*="language-"] code {
  background: none;
  border: none;
  padding: 0;
}

/* ============================================
   QA BLOCKS
   ============================================ */

.qa {
  margin: 0.85rem 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast);
}
.qa:hover { box-shadow: var(--shadow-sm); }
.qa.open { box-shadow: var(--shadow-md); }

.qa-q {
  padding: 0.9rem 1.1rem;
  background: var(--soft);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--txt);
  user-select: none;
  transition: background var(--t-fast);
}
.qa-q:hover { background: var(--soft-2); }

.qa-q::after {
  content: '+';
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  font-weight: 600;
  transition: all var(--t-fast);
}
.qa.open .qa-q::after { content: '−'; background: var(--txt); color: var(--bg); border-color: var(--txt); }

.qa-a {
  padding: 0 1.1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.qa.open .qa-a { padding: 1rem 1.1rem; max-height: 4000px; }

.qa-a p { margin: 0.4rem 0; line-height: 1.7; }
.qa-a ol, .qa-a ul { margin: 0.5rem 0 0.2rem; padding-left: 1.35rem; }
.qa-a li { margin: 0.3rem 0; line-height: 1.65; }

.qa-section {
  margin: 0.65rem 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--soft);
}
.qa-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--txt);
  letter-spacing: 0.02em;
}
.qa-section-title::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--txt-2);
}

.qa-summary {
  margin-top: 0.8rem;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid var(--sec);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--sec-l);
  font-weight: 700;
  line-height: 1.65;
  font-size: 0.9rem;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
  margin: 0.65rem 0;
}
.qa-mini {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--soft);
  line-height: 1.6;
}
.qa-mini strong { display: block; margin-bottom: 0.2rem; color: var(--txt); }

/* ----- Foundation Concept Blocks ----- */
.foundation-brief {
  position: relative;
  overflow: hidden;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-left: 3px solid var(--txt);
  border-radius: var(--r-xl);
  padding: 1.35rem;
  margin: 1rem 0 1.15rem;
  box-shadow: var(--shadow-sm);
}
.foundation-brief h3 {
  margin-top: 0;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
}
.foundation-brief p {
  color: var(--txt-2);
  line-height: 1.75;
}
.foundation-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0 0.2rem;
}
.foundation-node {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
}
.foundation-node strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--txt);
  font-size: 0.92rem;
}
.foundation-node span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}
.foundation-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.1rem;
}
.foundation-flow span {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft);
  color: var(--txt-2);
  font-size: 0.82rem;
  font-weight: 650;
}
.foundation-flow span + span::before {
  content: '→';
  margin-right: 0.5rem;
  color: var(--muted-2);
  font-weight: 500;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.badge-m { background: var(--pri-l); color: var(--pri); }
.badge-d { background: var(--sec-l); color: var(--sec); }
.badge-s { background: var(--acc-l); color: var(--acc); }

/* ============================================
   LISTS & MISC
   ============================================ */

ul, ol { padding-left: 1.4rem; margin: 0.5rem 0; }
li { margin: 0.35rem 0; line-height: 1.65; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}
.gi {
  text-align: center;
  padding: 1.1rem;
  background: var(--soft);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}
.gv { font-size: 1.5rem; font-weight: 800; color: var(--pri); letter-spacing: 0; }
.gv.g { color: var(--sec); }
.gl { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }

hr.div { border: none; border-top: 2px dashed var(--border); margin: 2rem 0; }

.comp {
  margin: 0.9rem 0;
  padding: 1rem 1.15rem;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.comp-t { font-weight: 750; margin-bottom: 0.35rem; color: var(--txt); }

.formula {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.8rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.86rem;
  overflow-x: auto;
}
.formula .katex-display {
  margin: 0;
}
.formula .katex {
  font-size: 1.02em;
}

/* ============================================
   TOC (Table of Contents)
   ============================================ */

.toc-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 110;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  background: var(--txt);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.toc-toggle:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }

.toc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-smooth);
}

.page-toc {
  position: fixed;
  right: 1.25rem;
  top: 4.5rem;
  bottom: 4.5rem;
  z-index: 100;
  width: min(340px, calc(100vw - 2.5rem));
  padding: 1.15rem;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  transform: translateX(calc(100% + 2rem));
  transition: transform var(--t-smooth);
  overflow-y: auto;
  pointer-events: none;
}
body.toc-open .page-toc { transform: translateX(0); pointer-events: auto; }
body.toc-open .toc-backdrop { opacity: 1; pointer-events: auto; }

.toc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}
.toc-title { font-weight: 750; color: var(--txt); font-size: 0.92rem; }
.toc-tip { font-size: 0.74rem; color: var(--muted); }
.toc-close {
  border: none;
  background: var(--soft);
  color: var(--muted);
  border-radius: var(--r-sm);
  padding: 0.15rem 0.55rem;
  font-size: 1.1rem;
  line-height: 1.4;
  cursor: pointer;
  transition: all var(--t-fast);
}
.toc-close:hover { color: var(--pri); background: var(--pri-l); }

.toc-links { display: flex; flex-direction: column; gap: 0.4rem; }
.toc-links button {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  cursor: pointer;
  transition: all var(--t-fast);
}
.toc-links button:hover { background: var(--soft); color: var(--txt); }
.toc-links button.active { background: var(--bg-2); color: var(--txt); border-color: var(--border-2); font-weight: 600; }
.toc-links button.toc-h3 { padding-left: 1rem; font-size: 0.78rem; }

/* ============================================
   TOPIC PAGE — HERO
   ============================================ */

.topic-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 1.25rem;
  align-items: stretch;
  margin: 1.25rem 0 2rem;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background:
    linear-gradient(90deg, var(--trace-l), transparent 42%),
    var(--card-solid);
  box-shadow: var(--shadow-sm);
}
.topic-hero::before {
  content: '';
  position: absolute;
  inset: auto 1.2rem 1rem auto;
  width: 7rem;
  height: 3.6rem;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, transparent 49%, var(--border) 50%, transparent 51%),
    linear-gradient(180deg, transparent 49%, var(--border) 50%, transparent 51%);
  background-size: 22px 22px;
  opacity: 0.45;
}

.hero-copy { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-weight: 750;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.topic-hero h1 { text-align: left; margin: 0.2rem 0 0.75rem; font-size: 2.25rem; }
.topic-hero .sub { text-align: left; margin: 0 0 1rem; max-width: none; }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.hero-tags span {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}
.hero-tags span::before { content: '#'; color: var(--muted-2); margin-right: 0.06rem; opacity: 0.7; }

.hero-goals {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.65rem;
  align-content: center;
}
.hero-goals div {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--soft);
  font-weight: 650;
  color: var(--txt);
  font-size: 0.9rem;
  line-height: 1.55;
}
.hero-goals div::before {
  content: '✓';
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  border-radius: 999px;
  background: var(--sec-l);
  color: var(--sec);
  font-weight: 800;
  font-size: 0.75rem;
}

.topic-hero.compact {
  display: block;
  grid-template-columns: 1fr;
  padding: 0.65rem 1.1rem;
  margin: 0.75rem 0 1.1rem;
}
.topic-hero.compact .hero-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.7rem;
  row-gap: 0.25rem;
}
.topic-hero.compact .hero-kicker {
  order: -1;
  margin-bottom: 0;
  padding: 0.12rem 0.5rem;
  font-size: 0.66rem;
}
.topic-hero.compact h1 { font-size: 1.2rem; margin: 0; line-height: 1.3; }
.topic-hero.compact .sub { margin: 0; font-size: 0.84rem; color: var(--muted); }
.topic-hero.compact .hero-tags { display: none; }

/* ============================================
   LAYOUT COMPONENTS (overview, path, grid, callout, resources)
   ============================================ */

.component-block { margin: 1.8rem 0; }

/* Overview Grid */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.insight-card {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast);
}
.insight-card:hover { box-shadow: var(--shadow-md); }
.insight-label { color: var(--muted); font-size: 0.76rem; font-weight: 700; margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.05em; }
.insight-value { color: var(--txt); font-weight: 650; line-height: 1.6; }

/* Path List */
.path-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}
.path-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast);
}
.path-step:hover { box-shadow: var(--shadow-md); }
.path-index {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--pri);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}
.path-title { font-weight: 750; color: var(--txt); margin-bottom: 0.15rem; }
.path-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  align-items: start;
}
.content-card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pri);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast);
}
.content-card:hover { box-shadow: var(--shadow-md); }
.content-card.card-m { border-left-color: var(--pri); }
.content-card.card-d { border-left-color: var(--sec); }
.content-card.card-s { border-left-color: var(--acc); }
.content-card.card-w { border-left-color: var(--warn); }
.content-card.card-r { border-left-color: var(--danger); }
.content-card h3 { margin-top: 0; font-size: 1.05rem; }
.content-card-desc { color: var(--muted); font-size: 0.86rem; margin-top: -0.15rem; }

/* Callout */
.callout {
  margin: 1.3rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  background: var(--card-solid);
}
.callout-title { font-weight: 750; margin-bottom: 0.45rem; font-size: 0.95rem; }
.callout-note { border-left: 4px solid var(--pri); }
.callout-warn { border-left: 4px solid var(--warn); background: var(--warn-l); }
.callout-danger { border-left: 4px solid var(--danger); background: var(--danger-l); }
.callout ul, .callout ol { margin: 0.3rem 0; }

/* Resources */
.resources-list { display: grid; gap: 0.65rem; }
.resource-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--soft);
  text-decoration: none;
  color: var(--txt);
  transition: all var(--t-fast);
}
.resource-item:hover { border-color: var(--pri); background: var(--pri-l); }
.resource-icon { font-size: 1.2rem; }
.resource-label { font-weight: 650; }
.resource-desc { font-size: 0.82rem; color: var(--muted); }

/* ----- Figures ----- */
.figure {
  margin: 1.15rem 0 1.45rem;
  padding: clamp(0.45rem, 1.2vw, 0.9rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
}
.figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(72vh, 900px);
  object-fit: contain;
  margin: 0 auto;
  border-radius: var(--r-md);
  background: #fff;
}
.figure .caption,
.figure figcaption {
  margin: 0.7rem auto 0;
  max-width: 76ch;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

/* ----- Flow Diagrams ----- */
.flow {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
  margin: 1rem 0 1.25rem;
  padding: 0.85rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--soft);
  box-shadow: var(--shadow-xs);
  scroll-snap-type: x proximity;
}
.flow-step {
  position: relative;
  flex: 1 0 min(180px, 72vw);
  min-width: 0;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
  scroll-snap-align: start;
}
.flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -0.78rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--txt);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 900;
  transform: translateY(-50%);
  box-shadow: var(--shadow-sm);
}
.flow-index {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 1.35rem;
  margin-bottom: 0.48rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.flow-title {
  color: var(--txt);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.35;
}
.flow-desc {
  margin-top: 0.32rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ============================================
   TABS WORKSPACE
   ============================================ */

.tabs-shell {
  display: flex;
  gap: 1.25rem;
  position: relative;
  margin: 1.5rem 0 2rem;
  --module-nav-width: 280px;
}
.tabs-shell.module-collapsed {
  --module-nav-width: 72px;
}

.tabs-toolbar {
  position: sticky;
  top: 4.65rem;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-sm);
}
:root[data-theme="dark"] .tabs-toolbar { background: rgba(17, 24, 39, 0.82); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs-toolbar { background: rgba(17, 24, 39, 0.82); } }

.module-toggle {
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--txt);
  border-radius: 999px;
  padding: 0.48rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  transition: all var(--t-fast);
}
.module-toggle:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.module-current {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  color: var(--muted);
  text-align: right;
  font-size: 0.75rem;
  line-height: 1.25;
}
.module-current span {
  display: block;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.module-current strong {
  display: block;
  margin-top: 0.1rem;
  color: var(--txt);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs-nav {
  position: sticky;
  top: 5rem;
  align-self: start;
  flex: 0 0 var(--module-nav-width, 280px);
  min-width: 0;
  width: var(--module-nav-width, 280px);
  max-width: var(--module-nav-width, 280px);
  height: calc(100vh - 6rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background:
    linear-gradient(180deg, var(--soft), var(--card-solid) 5.5rem),
    var(--card-solid);
  box-shadow: var(--shadow-sm);
  max-height: none;
  overflow: hidden;
  transition: flex-basis var(--t-smooth), width var(--t-smooth), max-width var(--t-smooth), padding var(--t-smooth), border-radius var(--t-smooth);
}
.tabs-shell.module-resizing .tabs-nav { transition: none; }

.module-resizer {
  position: absolute;
  top: 4.6rem;
  right: -0.72rem;
  z-index: 3;
  width: 0.9rem;
  height: calc(100% - 5.2rem);
  cursor: col-resize;
  touch-action: none;
}
.module-resizer::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  bottom: 0.55rem;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background: var(--border-2);
  transform: translateX(-50%);
  opacity: 0.45;
  transition: opacity var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.module-resizer:hover::before,
.tabs-shell.module-resizing .module-resizer::before {
  background: var(--txt-2);
  box-shadow: 0 0 0 4px var(--soft-2);
  opacity: 1;
}
body.resizing-module {
  cursor: col-resize;
  user-select: none;
}

.module-collapse {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-solid);
  color: var(--muted);
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.module-collapse:hover {
  color: var(--txt);
  border-color: var(--border-2);
  background: var(--bg-2);
}

.tabs-nav-head {
  display: grid;
  gap: 0.65rem;
  padding: 0.25rem 0.25rem 0.65rem;
  border-bottom: 1px solid var(--border);
}
.tabs-kicker {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tabs-title {
  margin-top: 0.1rem;
  color: var(--txt);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0;
}
.tabs-filter {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft);
  color: var(--txt);
  padding: 0.52rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: all var(--t-fast);
}
.tabs-filter:focus {
  border-color: var(--txt-2);
  background: var(--card-solid);
  box-shadow: 0 0 0 3px var(--soft-2);
}
.tabs-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  padding-right: 0.1rem;
  min-height: 0;
}

.tab-button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 0.82rem 0.9rem;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
}
.tab-button:hover {
  background: var(--soft);
  color: var(--txt);
  transform: translateX(2px);
}
.tab-button.active {
  background: var(--card-solid);
  border-color: var(--border-2);
  color: var(--txt);
  box-shadow: var(--shadow-xs);
}
.tab-button.active .tab-title { position: relative; padding-left: 0.6rem; }
.tab-button.active .tab-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 999px;
  background: var(--txt);
}
.tab-button[hidden] { display: none; }
.tab-button { display: flex; align-items: flex-start; gap: 0.55rem; }
.tab-progress {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 0.18rem;
  border: 1.5px solid var(--border-2);
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: transparent;
  transition: all var(--t-fast);
}
.tab-button.is-done .tab-progress {
  background: var(--txt);
  border-color: var(--txt);
  color: var(--bg);
}
.tab-button.is-done .tab-progress::before { content: '✓'; }
.tab-text { flex: 1 1 auto; min-width: 0; }
.tab-title { display: block; font-weight: 800; font-size: 0.9rem; line-height: 1.35; }
.tab-desc { display: block; margin-top: 0.22rem; font-size: 0.73rem; color: var(--muted); line-height: 1.45; }

/* 分组 */
.tab-group { border: 0; }
.tab-group + .tab-group { margin-top: 0.45rem; }
.tab-group-flat { display: flex; flex-direction: column; gap: 0.45rem; }
.tab-group-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  border-radius: var(--r-md);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
.tab-group-summary::-webkit-details-marker { display: none; }
.tab-group-summary:hover { background: var(--soft); color: var(--txt); }
.tab-group-caret {
  display: inline-grid;
  place-items: center;
  width: 14px;
  font-size: 0.65rem;
  transition: transform var(--t-fast);
}
.tab-group:not([open]) .tab-group-caret { transform: rotate(-90deg); }
.tab-group-title { flex: 1 1 auto; }
.tab-group-meta { color: var(--muted); }
.tab-group-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  padding: 0 0.4rem;
  height: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 0.68rem;
  font-weight: 750;
}
.tab-group-items { display: flex; flex-direction: column; gap: 0.4rem; }

/* 元信息 chip */
.tab-chips, .tab-panel-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.tab-chips { margin-top: 0.3rem; }
.tab-text + .tab-chips,
.tab-button .tab-chips { margin-top: 0; }
.tab-button .tab-chips { flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.tab-panel-chips { margin-top: 0.5rem; order: 3; flex-basis: 100%; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.chip-level-basic { color: var(--txt); border-color: var(--border-2); }
.chip-level-mid { color: var(--accent, var(--txt)); border-color: var(--border-2); background: var(--soft); }
.chip-level-pro {
  color: var(--bg);
  background: var(--txt);
  border-color: var(--txt);
}
.chip-priority { letter-spacing: 0; font-size: 0.7rem; color: var(--txt); }
.chip-time { font-variant-numeric: tabular-nums; }

.tabs-shell.module-collapsed .tab-chips,
.tabs-shell.module-collapsed .tab-progress { display: none; }

/* 级别筛选 */
.tabs-level-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.level-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  padding: 0.2rem 0.65rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.level-chip:hover { color: var(--txt); border-color: var(--border-2); }
.level-chip.active {
  background: var(--txt);
  color: var(--bg);
  border-color: var(--txt);
}
.tabs-shell.module-collapsed .tabs-level-filter { display: none; }

/* 进度条（顶部 toolbar） */
.module-progress {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--muted);
}
.module-progress-label { font-weight: 750; }
.module-progress-bar {
  display: inline-block;
  width: 110px;
  height: 6px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}
.module-progress-fill {
  display: block;
  height: 100%;
  background: var(--txt);
  transition: width var(--t-med);
}
.module-progress-text { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--txt); }

/* panel 底部：标记完成 + 上下篇 */
.tab-panel-footer {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.tab-step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.tab-step-row > :only-child:first-child { grid-column: 1; }
.tab-step-row > .tab-step-next:only-child { grid-column: 2; }
.tab-step {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0.7rem 0.95rem;
  background: var(--bg-2);
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.tab-step:hover { border-color: var(--border-2); background: var(--soft); transform: translateY(-1px); }
.tab-step-label { font-size: 0.7rem; color: var(--muted); font-weight: 750; }
.tab-step-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--txt);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tab-step-next { text-align: right; }
.tab-done {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--t-fast);
}
.tab-done:hover { color: var(--txt); border-color: var(--border-2); background: var(--soft); }
.tab-done-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-grid;
  place-items: center;
  font-size: 0.7rem;
  line-height: 1;
}
.tab-done[aria-pressed="true"] {
  background: var(--txt);
  color: var(--bg);
  border-color: var(--txt);
}
.tab-done[aria-pressed="true"] .tab-done-icon {
  background: var(--bg);
  color: var(--txt);
  border-color: var(--bg);
}
.tab-done[aria-pressed="true"] .tab-done-label::before { content: '已浏览 · '; }
.tab-done[aria-pressed="true"] .tab-done-label { font-size: 0.78rem; }

@media (max-width: 760px) {
  .tab-step-row { grid-template-columns: 1fr; }
  .module-progress { width: 100%; margin-left: 0; }
}

.tabs-shell.module-collapsed .tabs-nav {
  flex: 0 0 72px;
  padding: 0.55rem;
  border-radius: var(--r-xl);
  width: 72px;
  max-width: 72px;
  min-width: 0;
  contain: inline-size;
}
.tabs-shell.module-collapsed .module-resizer {
  display: none;
}
.tabs-shell.module-collapsed .module-collapse {
  position: static;
  width: 100%;
  margin-bottom: 0.3rem;
  transform: rotate(180deg);
}
.tabs-shell.module-collapsed .tabs-nav-head {
  display: none;
}
.tabs-shell.module-collapsed .tabs-list {
  gap: 0.35rem;
  padding: 0;
}
.tabs-shell.module-collapsed .tab-button {
  display: grid;
  place-items: center;
  height: 2.55rem;
  padding: 0;
  text-align: center;
}
.tabs-shell.module-collapsed .tab-button::after {
  content: attr(data-initial);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--soft);
  color: var(--txt);
  font-size: 0.72rem;
  font-weight: 850;
}
.tabs-shell.module-collapsed .tab-button.active::after {
  background: var(--txt);
  color: var(--bg);
}
.tabs-shell.module-collapsed .tab-title,
.tabs-shell.module-collapsed .tab-desc,
.tabs-shell.module-collapsed .tab-text,
.tabs-shell.module-collapsed .tab-group-summary,
.tabs-shell.module-collapsed .tab-group-meta {
  display: none;
}
.tabs-shell.module-collapsed .tab-group { display: contents; }
.tabs-shell.module-collapsed .tab-group[open] .tab-group-items { display: contents; }

.tabs-panels {
  flex: 1 1 auto;
  min-width: 0;
}
.tab-panel {
  min-width: 0;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background:
    linear-gradient(180deg, var(--card-solid), var(--soft) 220%),
    var(--card-solid);
  box-shadow: var(--shadow-sm);
}
.tab-panel[hidden] { display: none; }

.tab-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.tab-panel-kicker {
  display: inline-flex;
  order: 2;
  flex: 0 0 auto;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--trace-l);
  color: var(--muted);
  font-weight: 750;
  font-size: 0.72rem;
}
.tab-panel h2 { margin: 0; font-size: 1.4rem; order: 1; }
.tab-panel h2::before { display: none; }
.tab-panel h3:first-child { margin-top: 0; }

.tab-panel-body { min-width: 0; }
.tab-panel-body > :first-child { margin-top: 0; }
.tab-panel-body > :last-child { margin-bottom: 0; }
.tab-panel-body > .card {
  width: 100%;
  margin: 1rem 0 0.5rem;
  padding: 1.2rem 1.25rem;
  border-radius: var(--r-lg);
}
.tab-panel-body > .card:first-child { margin-top: 0; }
.tab-panel-body > .card h3 { margin: 0 0 0.5rem; font-size: 1.02rem; }
.tab-panel-body > .card h4 { margin: 0 0 0.5rem; font-size: 1rem; color: var(--txt); }
.tab-panel-body > .card p:last-child { margin-bottom: 0; }
.tab-panel-body > .card table { margin: 0.65rem 0; }
.tab-panel-body > .card ul, .tab-panel-body > .card ol { margin: 0.4rem 0; }
.tab-panel-body > .qa {
  width: 100%;
  margin: 0.5rem 0;
  border-radius: var(--r-md);
}
.tab-panel-body > .qa + .card { margin-top: 1.25rem; }
.tab-panel-body > .card + .qa { margin-top: 0.5rem; }
.tab-panel-body > .qa .qa-q { padding: 0.8rem 1rem; }

/* ============================================
   SUBTABS — 内容页内部子标签
   ============================================ */
.subtabs {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.subtabs-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  padding: 0.3rem;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  position: sticky;
  top: 0.4rem;
  z-index: 5;
  overflow-x: auto;
  scrollbar-width: thin;
}
.subtabs-nav::-webkit-scrollbar { height: 6px; }
.subtabs-nav::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 999px; }
.subtab-button {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex: 0 0 auto;
  line-height: 1.3;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.subtab-button:hover {
  background: var(--card-solid);
  color: var(--txt);
}
.subtab-button.active {
  background: var(--card-solid);
  color: var(--txt);
  border-color: var(--border-2);
  box-shadow: var(--shadow-xs);
  font-weight: 700;
}
.subtab-title { font-size: 0.86rem; font-weight: 600; }
.subtab-desc { display: none; }
.subtabs-panels { min-width: 0; }
.subtab-panel { min-width: 0; }
.subtab-panel[hidden] { display: none; }
.subtab-panel > :first-child { margin-top: 0; }
.subtab-panel > :last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .subtabs-nav { position: static; }
  .subtab-button { flex-shrink: 0; }
}

/* ============================================
   K8S ARCHITECTURE SVG
   ============================================ */

.k8s-arch { margin: 1.2rem 0 1.5rem; }
.k8s-title { font-size: 16px; font-weight: 800; fill: var(--txt); }
.k8s-subtitle { font-size: 11px; font-weight: 700; fill: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.k8s-box { rx: 12px; stroke-width: 1.5; }
.k8s-comp { rx: 10px; stroke-width: 1.2; }
.k8s-label { font-size: 12px; font-weight: 800; fill: var(--txt); }
.k8s-desc { font-size: 10px; fill: var(--muted); }
.k8s-arrow { stroke: var(--border); stroke-width: 1.5; fill: none; marker-end: url(#arrowhead); }

/* Component Grid */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin: 0.9rem 0;
}
.comp-item {
  padding: 1.05rem 1.15rem;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-left: 4px solid var(--acc);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast);
}
.comp-item:hover { box-shadow: var(--shadow-md); }
.comp-name { font-size: 0.98rem; font-weight: 750; color: var(--txt); margin-bottom: 0.35rem; letter-spacing: 0; }
.comp-role { font-size: 0.86rem; color: var(--txt-2); line-height: 1.6; margin-bottom: 0.3rem; }
.comp-detail { font-size: 0.8rem; color: var(--muted); line-height: 1.6; padding-top: 0.3rem; border-top: 1px dashed var(--border); }

/* ============================================
   SCHEDULER FLOW SVG
   ============================================ */

.sched-flow { margin: 1rem 0 1.25rem; overflow-x: auto; }
.sched-flow svg {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
}
.queue-flow svg { min-width: 980px; }

.sched-node {
  fill: var(--card-solid);
  stroke: var(--pri);
  stroke-opacity: 0.35;
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.06));
}
.sched-api { stroke: var(--pri); }
.sched-cache { stroke: var(--acc); }
.sched-queue { stroke: var(--warn); }
.sched-bind { stroke: var(--sec); }
.sched-kubelet { stroke: var(--danger); }
.sched-note { fill: var(--warn-l); stroke: var(--warn); stroke-opacity: 0.35; }
.sched-label { font-size: 13px; font-weight: 800; fill: var(--txt); }
.sched-desc { font-size: 10px; fill: var(--muted); }
.sched-arrow { stroke: var(--border-2); stroke-width: 1.7; fill: none; marker-end: url(#schedArrow); }
.queue-flow .sched-arrow { marker-end: url(#queueArrow); }
.sched-dashed { stroke-dasharray: 5 4; }

/* Queue Grid */
.queue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}
.queue-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
}
.queue-name { font-weight: 750; color: var(--txt); margin-bottom: 0.35rem; }
.queue-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }

/* Queue Detail Grid */
.queue-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0;
}
.queue-detail {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--pri);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
}
.queue-detail h4 { margin: 0 0 0.5rem; color: var(--txt); font-size: 1rem; }
.queue-detail p, .queue-detail li { font-size: 0.86rem; line-height: 1.65; }
.queue-detail ul { padding-left: 1.1rem; }
.queue-detail.active { border-left-color: var(--sec); }
.queue-detail.backoff { border-left-color: var(--warn); }
.queue-detail.unsched { border-left-color: var(--acc); }

/* Pod Flow Diagram */
.pod-flow-diagram { margin: 1rem 0; overflow-x: auto; }
.pod-flow {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.95;
  color: var(--txt);
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.3rem 1.5rem;
  white-space: pre;
  overflow-x: auto;
}
.flow-node {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-weight: 750;
  background: var(--soft-2);
  border: 1px solid var(--border);
}
.flow-node.active { background: var(--sec-l); border-color: var(--sec); color: var(--sec-h); }
.flow-node.success { background: var(--pri-l); border-color: var(--pri); color: var(--pri-h); }
.flow-node.backoff { background: var(--warn-l); border-color: var(--warn); color: var(--warn-h); }
.flow-node.unsched { background: var(--acc-l); border-color: var(--acc); color: var(--acc-h); }
.flow-arrow { color: var(--muted); font-weight: 700; }
.flow-split { color: var(--muted); }
.flow-note { color: var(--muted); font-size: 0.8rem; }
.flow-branch { display: inline-block; }

/* Queue Compare Table */
.queue-compare { margin: 1rem 0; overflow-x: auto; }
.queue-compare table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
  line-height: 1.6;
}
.queue-compare thead th {
  position: sticky;
  top: 0;
  padding: 0.8rem 0.9rem;
  background: var(--card-solid);
  border-bottom: 2px solid var(--border);
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}
.queue-compare thead th:first-child { width: 100px; color: var(--muted); }
.queue-compare thead th.q-active { color: var(--sec); border-bottom-color: var(--sec); }
.queue-compare thead th.q-backoff { color: var(--warn); border-bottom-color: var(--warn); }
.queue-compare thead th.q-unsched { color: var(--acc); border-bottom-color: var(--acc); }
.queue-compare tbody td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.queue-compare tbody td.q-dim { font-weight: 700; color: var(--muted); white-space: nowrap; }
.queue-compare tbody tr:last-child td { border-bottom: none; }
.queue-compare tbody tr:nth-child(even) { background: var(--soft); }

/* ============================================
   PAGEDATTENTION 图解
   ============================================ */

.pa-fig { margin: 1rem 0 1.25rem; overflow-x: auto; }
.pa-fig svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
}
.pa-title { font-size: 13px; font-weight: 800; fill: var(--txt); }
.pa-label { font-size: 12px; font-weight: 700; fill: var(--txt); }
.pa-sub { font-size: 10.5px; fill: var(--muted); }
.pa-mono { font-size: 11px; font-weight: 700; font-family: 'SF Mono','Fira Code',Consolas,monospace; }
.pa-arrow { stroke: var(--border-2); stroke-width: 1.8; fill: none; marker-end: url(#paArrow); }
.pa-arrow-map { stroke: var(--acc); stroke-width: 1.6; fill: none; marker-end: url(#paArrowAcc); stroke-dasharray: 4 3; }

.pa-slot { fill: var(--soft); stroke: var(--border-2); stroke-width: 1.3; }
.pa-slot-free { fill: var(--soft); stroke: var(--border-2); stroke-width: 1.3; stroke-dasharray: 4 3; }
.pa-slot-waste { fill: var(--danger-l); stroke: var(--danger); stroke-opacity: 0.5; stroke-width: 1.3; }
.pa-blk-a { fill: var(--pri-l); stroke: var(--pri); stroke-width: 1.4; }
.pa-blk-b { fill: var(--sec-l); stroke: var(--sec); stroke-width: 1.4; }
.pa-blk-c { fill: var(--acc-l); stroke: var(--acc); stroke-width: 1.4; }
.pa-blk-txt-a { fill: var(--pri-h); font-size: 11px; font-weight: 800; }
.pa-blk-txt-b { fill: var(--sec-h); font-size: 11px; font-weight: 800; }
.pa-blk-txt-c { fill: var(--acc-h); font-size: 11px; font-weight: 800; }

.fa-arrow { stroke: var(--border-2); stroke-width: 1.8; fill: none; marker-end: url(#faArrow); }
.fa-arrow-hot { stroke: var(--danger); stroke-width: 1.8; fill: none; marker-end: url(#faArrowHot); }
.pa-slot-sram { fill: var(--sec-l); stroke: var(--sec); stroke-width: 1.4; }

/* ============================================
   GPU METRICS
   ============================================ */

.metric-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}
.metric-card {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast);
}
.metric-card:hover { box-shadow: var(--shadow-md); }
.metric-name { font-weight: 750; color: var(--txt); margin-bottom: 0.25rem; }
.metric-value {
  display: inline-flex;
  margin-bottom: 0.55rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--pri-l);
  color: var(--pri);
  font-size: 0.76rem;
  font-weight: 700;
}
.metric-card p { margin: 0.1rem 0; font-size: 0.85rem; line-height: 1.6; color: var(--muted); }

.metric-flow { margin: 1rem 0 1.2rem; overflow-x: auto; }
.metric-flow svg {
  display: block;
  width: 100%;
  min-width: 900px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
}
.metric-node {
  rx: 14px;
  fill: var(--card-solid);
  stroke: var(--pri);
  stroke-opacity: 0.35;
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.06));
}
.metric-node.compute { stroke: var(--sec); }
.metric-node.memory { stroke: var(--warn); }
.metric-node.interconnect { stroke: var(--acc); }
.metric-node.output { stroke: var(--danger); }
.metric-label { font-size: 13px; font-weight: 800; fill: var(--txt); }
.metric-desc { font-size: 10px; fill: var(--muted); }
.metric-arrow { stroke: var(--border-2); stroke-width: 1.8; fill: none; marker-end: url(#metricArrow); }
.metric-note { font-size: 12px; font-weight: 700; fill: var(--muted); }

.formula-box {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 1.1rem;
  border: 1px dashed var(--pri-ll);
  border-radius: var(--r-lg);
  background: var(--pri-l);
  line-height: 1.7;
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}
.diag-item {
  padding: 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast);
}
.diag-item:hover { box-shadow: var(--shadow-md); }
.diag-item strong { display: block; margin-bottom: 0.3rem; color: var(--txt); }
.diag-item span { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.6; }

/* ============================================
   CARD ICONS (per color)
   ============================================ */

.idx-card.c1 .idx-card-icon::before { content: 'AI'; }
.idx-card.c2 .idx-card-icon::before { content: 'HW'; }
.idx-card.c3 .idx-card-icon::before { content: 'SYS'; }
.idx-card.c4 .idx-card-icon::before { content: 'CS'; }
.idx-card.c5 .idx-card-icon::before { content: 'ML'; }

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--soft);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer-inner code {
  font-size: 0.78rem;
}
.footer-dot {
  color: var(--border-2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1180px) {
  .nav-brand { min-width: auto; }
  .nav-brand small { display: none; }
  .nav-primary { justify-content: flex-start; }
  .app-shell { gap: 0.9rem; }
  .app-shell .wrap { padding: 1.5rem 0 4rem; }
  .app-sidebar,
  .side-resizer,
  .tabs-nav { top: 4.7rem; }
  .idx-track-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .idx-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .idx-lanes article { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .idx-lanes article:nth-child(3n) { border-right: none; }
  .idx-lanes article:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 900px) {
  .idx-track-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .idx-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .idx-lanes article { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .idx-lanes article:nth-child(3n) { border-right: 1px solid var(--border); }
  .idx-lanes article:nth-child(2n) { border-right: none; }
  .idx-lanes article:nth-last-child(-n+2) { border-bottom: none; }
  .idx-footer-panel { align-items: flex-start; flex-direction: column; }
  .idx-shortcuts { justify-content: flex-start; min-width: 0; }
  .tab-panel { padding: 1.1rem; border-radius: var(--r-xl); }
  .tab-panel-head { display: block; }
  .tab-panel-kicker { margin-bottom: 0.5rem; }
  .comp-grid { grid-template-columns: 1fr; }
  .queue-grid { grid-template-columns: 1fr; }
  .queue-detail-grid { grid-template-columns: 1fr; }
  .metric-map { grid-template-columns: 1fr; }
  .diag-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .path-list { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topic-hero { grid-template-columns: 1fr; padding: 1.25rem; }
  .topic-hero h1 { text-align: left; }
}

@media (max-width: 720px) {
  body { font-size: 0.94rem; }
  .wrap { padding: 1.25rem 1rem 2.5rem; }
  .topnav {
    min-height: 3.6rem;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
  }
  .brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
  }
  .nav-brand strong { display: none; }
  .nav-primary {
    justify-content: flex-end;
    gap: 0.25rem;
  }
  .nav-pill { display: none; }
  .nav-search { display: none; }
  .nav-menu-panel,
  .nav-primary > .nav-menu:nth-of-type(1) .nav-menu-panel,
  .nav-primary > .nav-menu:nth-of-type(2) .nav-menu-panel,
  .nav-primary > .nav-menu:last-of-type .nav-menu-panel {
    left: auto;
    right: 0;
    transform: none;
    grid-template-columns: 1fr;
    width: min(340px, calc(100vw - 1.5rem));
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
  }
  .module-current { display: none; }
  .tabs-toolbar {
    top: 4rem;
    padding: 0.55rem;
  }
  .tabs-nav,
  .app-sidebar { top: 4rem; }
  .module-resizer,
  .side-resizer { display: none; }
  .app-shell { padding: 0 0.75rem; }
  .app-shell .wrap { padding: 1.15rem 0 2.5rem; }
  .theme-toggle { margin-left: 0.2rem; }
  .home-shell {
    width: min(100% - 1.5rem, 1080px);
  }
  .idx-actions { gap: 0.5rem; }
  .idx-primary,
  .idx-secondary {
    width: 100%;
    justify-content: center;
    min-height: 2.55rem;
  }
  .idx-topbar-inner { gap: 0.5rem; }
  .idx-home-nav { gap: 0.15rem; }
  .idx-hero-stats { gap: 1.25rem; }
  .idx-lanes { grid-template-columns: 1fr; }
  .idx-lanes article { min-height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .idx-lanes article:nth-child(3n) { border-right: none; }
  .idx-lanes article:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .idx-lanes article:last-child { border-bottom: none; }
  .idx-hero { padding-left: 0.9rem; }
  .idx-hero::after { display: none; }
  .idx-hero h1 { font-size: 2.25rem; }
  .topic-hero h1 { font-size: 1.8rem; }
  .idx-track-cards { grid-template-columns: 1fr; }
  .idx-footer-panel { padding-top: 1.25rem; }
  .card { padding: 1.15rem; border-radius: var(--r-lg); }
  .grid { grid-template-columns: 1fr 1fr; }
  table { display: block; overflow-x: auto; }
  .page-toc { top: 3.5rem; bottom: 3.8rem; }
  .toc-tip { display: none; }
  .toc-toggle { right: 0.8rem; bottom: 0.8rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0 1rem; }
  .footer-dot { display: none; }
}

/* ===== 进度修复套件：toolbar 操作 / 上次学习 / 首页汇总 / toast ===== */
.module-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.module-action {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.module-action:hover { color: var(--txt); border-color: var(--border-2); background: var(--soft); }
.module-action-danger:hover { color: var(--danger); border-color: var(--danger); }

.tab-last-seen {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--muted);
  align-self: flex-start;
}
.tab-last-seen-label {
  font-weight: 750;
  color: var(--muted-2);
}
.tab-last-seen-value { font-variant-numeric: tabular-nums; }
.tab-last-seen.is-stale .tab-last-seen-value { color: var(--warn); font-weight: 750; }

.idx-card { position: relative; }
.idx-card-progress {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--border);
  margin-right: 0.4rem;
}
.idx-card.is-started .idx-card-progress { color: var(--txt); border-color: var(--border-2); }
.idx-card.is-complete .idx-card-progress {
  color: var(--bg);
  background: var(--txt);
  border-color: var(--txt);
}
.idx-card.is-complete .idx-card-progress::before { content: '✓ '; }

.storage-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--txt);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,0.18));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
  max-width: min(560px, 92vw);
  text-align: center;
}
.storage-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.transformer-figure {
  margin: 1.2rem 0 1.6rem;
  padding: clamp(0.45rem, 1.4vw, 1rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card-solid), var(--soft));
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.transformer-figure img {
  display: block;
  width: min(100%, 760px);
  max-height: min(74vh, 980px);
  object-fit: contain;
  margin: 0 auto;
  border-radius: var(--r-md);
  background: #fff;
}
.transformer-figure figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 760px) {
  .module-actions { width: 100%; justify-content: flex-end; }
  .transformer-figure { padding: 0.45rem; }
  .transformer-figure img { max-height: none; }
}
