/* ── Education sub-page styles ───────────────────────────── */

/* Breadcrumb */
.edu-breadcrumb {
  font-size: 12px; color: var(--text3);
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em;
}
.edu-breadcrumb a { color: var(--text3); text-decoration: none; }
.edu-breadcrumb a:hover { color: var(--accent); }
.edu-breadcrumb span { margin: 0 6px; }

/* Page header */
.edu-page-header {
  max-width: 1100px; margin: 0 auto;
  padding: 4.5rem 2rem 3rem;
}
.edu-page-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 800; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 1rem; line-height: 1.15;
}
.edu-page-header .section-sub { max-width: 560px; margin-bottom: 1.5rem; }
.edu-header-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Sticky in-page subnav */
.edu-subnav {
  position: sticky; top: 60px; z-index: 90;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: center;
}
.subnav-link {
  padding: 12px 22px; font-size: 12.5px; font-weight: 500;
  color: var(--text3); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s; white-space: nowrap;
}
.subnav-link:hover { color: var(--text); }
.subnav-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Content body */
.edu-content { max-width: 780px; margin: 0 auto; padding: 0 2rem 5rem; }
.edu-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
.edu-section:last-child { border-bottom: none; }

.edu-section-num {
  font-size: 10px; font-family: 'JetBrains Mono', monospace;
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 0.5rem;
}
.edu-section h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 750;
  letter-spacing: -0.02em; color: var(--text);
  margin-bottom: 1.5rem; line-height: 1.25;
}
.edu-section p {
  font-size: 15px; line-height: 1.82;
  color: var(--text2); margin-bottom: 1.3rem;
}
.edu-section p:last-of-type { margin-bottom: 0; }

/* Glossary tooltips */
.gloss {
  position: relative; cursor: help;
  color: var(--accent); border-bottom: 1px dashed rgba(37,99,235,0.4);
  display: inline;
}
.gloss-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--text); color: #fff;
  font-size: 12px; line-height: 1.55;
  padding: 9px 13px; border-radius: var(--radius-lg);
  width: 230px; white-space: normal;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s; z-index: 200;
  box-shadow: 0 4px 16px rgba(15,23,42,0.18);
  font-style: normal; font-weight: 400;
}
.gloss-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--text);
}
.gloss:hover .gloss-tip { opacity: 1; }

/* Pattern type inline labels */
.pattern-type {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 650;
}
.pattern-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.pattern-dot.wildtype { background: var(--accent); }
.pattern-dot.null     { background: var(--text3); }
.pattern-dot.diffuse  { background: var(--hematoxylin); }

/* H&E reference image (top of Section 3) */
.reference-figure {
  margin: 0 0 2rem; padding: 0;
}
.reference-img {
  width: 100%; border-radius: var(--radius-lg); display: block;
  border: 1px solid var(--border);
}
.reference-figure figcaption {
  font-size: 11.5px; color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.55rem; line-height: 1.5;
}

/* Color disclaimer note */
.color-note {
  font-size: 11.5px; color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 11px;
  margin: 0 0 1rem; display: flex; align-items: flex-start; gap: 6px;
  line-height: 1.5;
}

/* Pattern image */
.pattern-img-wrap { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.pattern-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: var(--radius);
  transition: opacity 0.25s;
}

/* Pattern toggle */
.pattern-toggle { margin: 2rem 0 1.5rem; }
.pattern-toggle-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text3);
  font-family: 'JetBrains Mono', monospace; margin-bottom: 0.85rem;
}
.pattern-tabs {
  display: flex; gap: 4px; margin-bottom: 1.25rem;
  background: var(--bg2); border-radius: var(--radius-lg);
  padding: 4px; width: fit-content;
}
.ptab {
  padding: 7px 22px; font-size: 13px; font-weight: 500;
  border: none; border-radius: var(--radius);
  background: transparent; color: var(--text2);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.ptab:hover { color: var(--text); background: rgba(255,255,255,0.6); }
.ptab.active {
  background: #fff; font-weight: 600;
  box-shadow: 0 1px 4px rgba(15,23,42,0.10);
}
.ptab[data-pattern="wildtype"].active { color: var(--accent); }
.ptab[data-pattern="null"].active     { color: var(--text3); }
.ptab[data-pattern="diffuse"].active  { color: var(--hematoxylin); }

.pattern-panel {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; align-items: start;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow); transition: border-color 0.35s;
}
.pattern-panel.state-wildtype { border-color: rgba(37,99,235,0.25); }
.pattern-panel.state-null     { border-color: rgba(100,116,139,0.25); }
.pattern-panel.state-diffuse  { border-color: rgba(124,58,237,0.25); }


.pattern-info { display: flex; flex-direction: column; gap: 1rem; }
.pattern-name {
  font-size: 17px; font-weight: 700; transition: color 0.35s;
}
.state-wildtype .pattern-name { color: var(--accent); }
.state-null .pattern-name     { color: var(--text3); }
.state-diffuse .pattern-name  { color: var(--hematoxylin); }

.pattern-pct-label {
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: 11.5px; color: var(--text3);
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}
.pattern-pct-num { font-size: 13px; font-weight: 700; transition: color 0.35s; }
.state-wildtype .pattern-pct-num { color: var(--accent); }
.state-null .pattern-pct-num     { color: var(--text3); }
.state-diffuse .pattern-pct-num  { color: var(--hematoxylin); }

.pattern-bar-track {
  height: 6px; background: var(--bg3); border-radius: 99px; overflow: hidden;
}
.pattern-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.55s cubic-bezier(0.25,0.46,0.45,0.94), background 0.35s;
}
.state-wildtype .pattern-bar-fill { background: var(--accent); }
.state-null .pattern-bar-fill     { background: var(--text3); }
.state-diffuse .pattern-bar-fill  { background: var(--hematoxylin); }

.pattern-desc {
  font-size: 13.5px; line-height: 1.78; color: var(--text2); margin: 0;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}
.pattern-anim { animation: fadeSlide 0.28s ease forwards; }

/* TriControl callout */
.tricontrol-callout {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: var(--bg);
  border: 1px solid rgba(124,58,237,0.20);
  border-radius: var(--radius-lg);
  padding: 1.5rem; margin: 2.5rem 0;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.tricontrol-callout::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--hematoxylin), var(--teal));
}
.tricontrol-callout .product-circle {
  width: 40px !important; height: 40px !important;
  font-size: 13px !important; flex-shrink: 0; margin-bottom: 0 !important;
}
.tricontrol-callout .product-circle::before { inset: -5px; }
.tricontrol-callout .product-circle::after  { inset: -10px; }
.tricontrol-body h4 {
  font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 0.4rem;
}
.tricontrol-body p {
  font-size: 13px; color: var(--text2); line-height: 1.65; margin-bottom: 0.9rem;
}

/* Clinical callout box */
.prognosis-box {
  background: rgba(124,58,237,0.05);
  border: 1px solid rgba(124,58,237,0.16);
  border-left: 3px solid var(--hematoxylin);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.75rem 0;
}
.prognosis-box p {
  font-size: 14.5px; color: var(--text2); line-height: 1.72; margin: 0;
}
.prognosis-box strong { color: var(--hematoxylin); }

/* Citations footnote */
.edu-citations {
  font-size: 11.5px; color: var(--text3); line-height: 1.65;
  border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 2rem;
}
.edu-citations strong { font-weight: 600; }

/* ── Stain SVG wrapper ─────────────────────────────────────── */
.stain-svg-wrap {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--radius); overflow: hidden;
  transition: opacity 0.18s;
}
.stain-svg-wrap svg { width: 100%; height: 100%; display: block; }

/* ── MMR interactive diagram v2 ───────────────────────────── */
.mmr-diagram-v2 {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  margin: 2rem 0; box-shadow: var(--shadow);
}
.mmr-nodes-row {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; margin: 1.5rem 0; flex-wrap: wrap;
}
.mmr-pair-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mmr-nodes-pair { display: flex; align-items: center; gap: 8px; }
.mmr-node { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.mmr-node-inner {
  width: 62px; height: 62px; border-radius: 50%; border: 2px solid;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 11px; letter-spacing: 0.04em;
  transition: background 0.4s, border-color 0.4s, color 0.4s;
}
#node-mlh1 .mmr-node-inner, #node-pms2 .mmr-node-inner {
  background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.28); color: var(--accent);
}
#node-msh2 .mmr-node-inner, #node-msh6 .mmr-node-inner {
  background: rgba(2,132,199,0.08); border-color: rgba(2,132,199,0.28); color: var(--teal);
}
.mmr-node-badge {
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; font-family: 'JetBrains Mono', monospace;
  min-height: 13px; color: transparent; transition: color 0.3s;
}
.mmr-node.lost .mmr-node-inner {
  background: rgba(220,38,38,0.08) !important;
  border-color: rgba(220,38,38,0.38) !important; color: #DC2626 !important;
}
.mmr-node.lost .mmr-node-badge { color: #DC2626; }
.mmr-node.co-lost .mmr-node-inner {
  background: rgba(220,38,38,0.04) !important;
  border-color: rgba(220,38,38,0.25) !important;
  border-style: dashed !important; color: #EF4444 !important;
}
.mmr-node.co-lost .mmr-node-badge { color: #EF4444; }
.mmr-bond {
  font-size: 22px; color: var(--border); transition: color 0.4s;
  line-height: 1; user-select: none; margin: 0 2px;
}
.mmr-bond.broken { color: #DC2626; }
.mmr-complex-name {
  font-size: 9.5px; font-family: 'JetBrains Mono', monospace;
  font-weight: 600; color: var(--text3); letter-spacing: 0.07em;
}
.mmr-pairs-divider { width: 1px; height: 72px; background: var(--border); margin: 0 0.25rem; align-self: center; }

/* Scenario selector */
.mmr-scenario-selector { margin: 0.5rem 0 0.75rem; }
.mmr-scenario-selector-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text3);
  font-family: 'JetBrains Mono', monospace; margin-bottom: 0.6rem;
}
.mmr-scenario-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.mmr-scenario-btn {
  padding: 5px 14px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); border-radius: 99px;
  background: var(--bg2); color: var(--text2);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.mmr-scenario-btn:hover { border-color: rgba(37,99,235,0.30); color: var(--text); }
.mmr-scenario-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.mmr-scenario-btn.active.loss-btn { background: #DC2626; border-color: #DC2626; }

/* Explanation panel */
.mmr-scenario-panel {
  margin-top: 1.25rem; padding: 1.25rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); transition: background 0.3s, border-color 0.3s;
}
.mmr-scenario-panel.scenario-active {
  border-color: rgba(220,38,38,0.22); background: rgba(220,38,38,0.025);
}
.mmr-scenario-headline {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 0.5rem; transition: color 0.3s;
}
.mmr-scenario-panel.scenario-active .mmr-scenario-headline { color: #DC2626; }
.mmr-scenario-pattern {
  font-size: 13px; color: var(--text2); line-height: 1.65; margin-bottom: 0.75rem;
}
.mmr-scenario-mechanism {
  font-size: 12.5px; color: var(--text3); line-height: 1.65; font-style: italic;
  padding: 0.65rem 0.9rem; margin-bottom: 0.75rem;
  border-left: 2px solid var(--border); background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.mmr-scenario-panel.scenario-active .mmr-scenario-mechanism { border-left-color: rgba(220,38,38,0.30); }
.mmr-scenario-clinical {
  padding-top: 0.75rem; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text2); line-height: 1.65;
}
.mmr-scenario-clinical-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--teal);
  font-family: 'JetBrains Mono', monospace; margin-bottom: 0.35rem;
}

/* ── MMR page: binary toggle states ───────────────────────── */
.ptab[data-pattern="intact"].active    { color: var(--teal); }
.ptab[data-pattern="deficient"].active { color: var(--hematoxylin); }

.pattern-panel.state-intact    { border-color: rgba(2,132,199,0.28); }
.pattern-panel.state-deficient { border-color: rgba(124,58,237,0.28); }

.state-intact .pattern-name    { color: var(--teal); }
.state-deficient .pattern-name { color: var(--hematoxylin); }

/* Image placeholder (MMR page uses placeholders instead of real images) */
.img-placeholder {
  aspect-ratio: 1; min-height: 180px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg2); padding: 1rem;
  transition: border-color 0.35s, background 0.35s;
}
.state-intact .img-placeholder {
  border-color: rgba(2,132,199,0.28);
  background: rgba(2,132,199,0.03);
}
.state-deficient .img-placeholder {
  border-color: rgba(124,58,237,0.28);
  background: rgba(124,58,237,0.04);
}
.img-placeholder-icon {
  font-size: 20px; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.35s;
}
.state-intact .img-placeholder-icon    { background: rgba(2,132,199,0.10); }
.state-deficient .img-placeholder-icon { background: rgba(124,58,237,0.10); }
.img-placeholder-label {
  font-size: 11px; color: var(--text3);
  font-family: 'JetBrains Mono', monospace; line-height: 1.5;
}

/* MMR status badge (replaces % bar for binary toggle) */
.mmr-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-family: 'JetBrains Mono', monospace;
  font-weight: 600; padding: 4px 12px; border-radius: 99px;
  border: 1px solid; transition: all 0.35s;
}
.state-intact .mmr-status {
  background: rgba(2,132,199,0.08);
  border-color: rgba(2,132,199,0.28); color: var(--teal);
}
.state-deficient .mmr-status {
  background: rgba(124,58,237,0.08);
  border-color: rgba(124,58,237,0.28); color: var(--hematoxylin);
}

/* Subsection headings inside edu-section */
.edu-subsection-head {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin: 2rem 0 0.65rem; display: flex; align-items: center; gap: 10px;
}
.edu-subsection-num {
  font-size: 10px; font-family: 'JetBrains Mono', monospace;
  font-weight: 700; letter-spacing: 0.1em;
  color: #fff; background: var(--accent);
  padding: 2px 7px; border-radius: 99px;
}

/* ── MMR heterodimer diagram ───────────────────────────────── */
.mmr-diagram {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  margin: 2rem 0; box-shadow: var(--shadow);
}
.mmr-diagram-title {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text3);
  font-family: 'JetBrains Mono', monospace; margin-bottom: 1.25rem;
}
.mmr-diagram-subtitle {
  font-size: 12px; color: var(--text3); font-style: italic;
  margin-bottom: 0.85rem; margin-top: 1.5rem;
}
.mmr-diagram-note {
  font-size: 12.5px; color: var(--text3); line-height: 1.65;
  margin: 1.25rem 0 0; padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.mmr-pairs-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.mmr-pair {
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem; background: var(--bg2);
  border-radius: var(--radius); padding: 1rem;
}
.mmr-protein {
  padding: 8px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em; text-align: center;
}
.mmr-protein.mlh1, .mmr-protein.pms2 {
  background: rgba(37,99,235,0.09);
  border: 1.5px solid rgba(37,99,235,0.25); color: var(--accent);
}
.mmr-protein.msh2, .mmr-protein.msh6 {
  background: rgba(2,132,199,0.09);
  border: 1.5px solid rgba(2,132,199,0.25); color: var(--teal);
}
.mmr-connector {
  font-size: 20px; color: var(--text3); flex-shrink: 0; line-height: 1;
}
.mmr-pair-label {
  font-size: 9.5px; color: var(--text3); text-align: center;
  margin-top: 4px; font-family: 'JetBrains Mono', monospace;
}
.mmr-loss-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem;
}
.mmr-loss-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem;
  text-align: center;
}
.mmr-lost-proteins {
  display: flex; gap: 5px; justify-content: center;
  margin-bottom: 0.55rem; flex-wrap: wrap;
}
.mmr-protein-tag {
  font-size: 10px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 9px; border-radius: 99px; display: inline-block;
}
.mmr-protein-tag.lost {
  background: rgba(124,58,237,0.09);
  border: 1px solid rgba(124,58,237,0.22);
  color: var(--hematoxylin);
  text-decoration: line-through; text-decoration-color: rgba(124,58,237,0.5);
}
.mmr-protein-tag.isolated {
  background: rgba(124,58,237,0.09);
  border: 1px solid rgba(124,58,237,0.22);
  color: var(--hematoxylin);
}
.mmr-protein-tag.intact-tag {
  background: rgba(2,132,199,0.07);
  border: 1px solid rgba(2,132,199,0.20);
  color: var(--teal); font-size: 9px;
}
.mmr-loss-text {
  font-size: 11.5px; color: var(--text2); line-height: 1.55;
}

/* ── Step progression widget ─────────────────────────────── */
.step-progression {
  margin: 2rem 0; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.step-nav {
  display: flex; gap: 6px; padding: 12px 16px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  overflow-x: auto; align-items: center;
}
.step-num-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text3); font-size: 12px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.step-num-btn:hover { border-color: var(--accent); color: var(--accent); }
.step-num-btn.completed {
  background: var(--teal); border-color: var(--teal); color: #fff;
}
.step-num-btn.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  transform: scale(1.1); box-shadow: 0 0 0 3px rgba(37,99,235,0.14);
}
.step-progress-track { height: 3px; background: var(--bg3); }
.step-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent));
  transition: width 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
}
.step-content-area { padding: 1.75rem; min-height: 240px; }
.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeSlide 0.28s ease forwards; }
.step-title-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 1rem;
}
.step-badge {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; font-family: 'JetBrains Mono', monospace;
}
.step-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.step-body { font-size: 13.5px; color: var(--text2); line-height: 1.8; margin-bottom: 1.25rem; }
.step-illustration {
  display: flex; justify-content: center; align-items: center;
  padding: 1.25rem; background: var(--bg2);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.step-svg { max-width: 240px; width: 100%; height: auto; }
.step-controls {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1.75rem; border-top: 1px solid var(--border);
  background: var(--bg2);
}
.step-btn {
  padding: 7px 18px; font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text2);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.step-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.step-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.step-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.step-btn.primary:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; }
.step-counter {
  font-size: 10.5px; font-family: 'JetBrains Mono', monospace;
  color: var(--text3); font-weight: 600; letter-spacing: 0.06em;
}

/* ── Manual vs AI comparison grid ────────────────────────── */
.comparison-grid {
  display: grid; grid-template-columns: 1fr 36px 1fr;
  margin: 2rem 0; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); background: var(--bg);
}
.comparison-col { padding: 1.5rem; }
.comparison-method-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; font-family: 'JetBrains Mono', monospace;
  color: var(--text3); margin-bottom: 1rem; padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.comparison-method-label.ai-label { color: var(--accent); }
.compare-icon-wrap {
  display: flex; justify-content: center; align-items: center;
  height: 64px; margin-bottom: 1.1rem;
}
.compare-method-icon { width: 64px; height: 48px; }
.comparison-vs {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 9px; font-weight: 800; letter-spacing: 0.12em;
  font-family: 'JetBrains Mono', monospace; color: var(--text3);
  writing-mode: vertical-rl; text-orientation: mixed;
}
.comparison-step-list {
  list-style: none; padding: 0; margin: 0 0 1.25rem;
}
.comparison-step-list li {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 12.5px; color: var(--text2); line-height: 1.65;
  padding: 0.45rem 0; border-bottom: 1px solid rgba(0,0,0,0.035);
}
.comparison-step-list li:last-child { border-bottom: none; }
.cmp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; margin-top: 6px;
}
.manual-dot { background: rgba(100,116,139,0.45); }
.ai-dot { background: var(--accent); }
.comparison-output {
  padding-top: 1rem; border-top: 1px solid var(--border); text-align: center;
}
.comparison-output-label {
  font-size: 8.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; font-family: 'JetBrains Mono', monospace;
  color: var(--text3); margin-bottom: 0.35rem;
}
.comparison-score {
  font-size: 30px; font-weight: 800; font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.03em; margin-bottom: 0.25rem;
}
.manual-score { color: var(--text3); }
.ai-score { color: var(--accent); }
.comparison-output-note {
  font-size: 9.5px; font-family: 'JetBrains Mono', monospace;
  color: var(--text3); letter-spacing: 0.06em;
}

/* ── Advantage cards ─────────────────────────────────────── */
.adv-cards {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 0.85rem; margin: 2rem 0;
}
.adv-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.adv-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,0.10); }
.adv-icon { width: 44px; height: 44px; margin-bottom: 0.85rem; display: block; }
.adv-card-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 0.5rem; line-height: 1.35;
}
.adv-card-body { font-size: 12.5px; color: var(--text2); line-height: 1.65; margin: 0; }

/* ── AI assistant callout ────────────────────────────────── */
.ai-assistant-callout {
  margin: 1.75rem 0; padding: 1.2rem 1.5rem;
  background: rgba(37,99,235,0.04);
  border: 1px solid rgba(37,99,235,0.15);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.ai-assistant-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 0.6rem;
}
.ai-assistant-title {
  font-size: 13px; font-weight: 700; color: var(--accent);
}
.ai-assistant-callout p {
  font-size: 13px; color: var(--text2); line-height: 1.75; margin: 0;
}

/* Responsive */
@media (max-width: 680px) {
  .pattern-panel { grid-template-columns: 1fr; }
  .edu-subnav { overflow-x: auto; justify-content: flex-start; }
  .subnav-link { padding: 10px 14px; font-size: 12px; }
  .tricontrol-callout { flex-direction: column; }
  .mmr-pairs-row { grid-template-columns: 1fr; }
  .mmr-loss-grid { grid-template-columns: 1fr; }
  .mmr-nodes-row { gap: 1rem; }
  .mmr-pairs-divider { width: 80%; height: 1px; margin: 0; }
}

/* ══ Education Hub Page ══════════════════════════════════════ */

/* Hero */
.edu-hub-hero {
  position: relative; overflow: hidden;
  background: #0a1628;
  padding: 6rem 2rem 5rem;
  text-align: center;
}
.edu-hub-hero-texture {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(59,130,246,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}
.edu-hub-hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 55%, rgba(37,99,235,0.18) 0%, transparent 60%);
}
.edu-hub-hero-circles {
  position: absolute; inset: 0; pointer-events: none;
}
.edu-hub-hero-circles::before {
  content: ''; position: absolute;
  width: 680px; height: 680px;
  border: 1px solid rgba(59,130,246,0.07);
  border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.edu-hub-hero-circles::after {
  content: ''; position: absolute;
  width: 440px; height: 440px;
  border: 1px solid rgba(59,130,246,0.10);
  border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.edu-hub-hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.edu-hub-hero-tag {
  display: inline-block; margin-bottom: 1.5rem;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; font-family: 'JetBrains Mono', monospace;
  padding: 5px 14px; border-radius: 100px;
  background: rgba(37,99,235,0.15);
  color: rgba(96,165,250,0.90);
  border: 1px solid rgba(37,99,235,0.28);
}
.edu-hub-headline {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800; color: #fff;
  line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.edu-hub-sub {
  font-size: 1.05rem; color: rgba(255,255,255,0.60);
  line-height: 1.75; max-width: 620px; margin: 0 auto;
}

/* How to use strip */
.edu-how-strip {
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
.edu-how-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: stretch;
}
.edu-how-item { padding: 1.75rem 1.75rem; text-align: center; }
.edu-how-icon {
  display: flex; align-items: center; justify-content: center;
  height: 36px; margin-bottom: 0.75rem;
}
.edu-how-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); margin-bottom: 0.4rem;
}
.edu-how-desc { font-size: 12.5px; color: var(--text2); line-height: 1.6; }
.edu-how-divider { background: var(--border); width: 1px; align-self: stretch; }

/* Hub sections */
.edu-hub-section { padding: 3.5rem 0; }
.edu-hub-section-alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.edu-hub-container { max-width: 960px; margin: 0 auto; padding: 0 2rem; }
.edu-hub-section-header { margin-bottom: 2rem; }

/* Annotated slides feature card */
.annotated-feature-card {
  display: grid; grid-template-columns: 1fr 380px;
  border: 1px solid rgba(37,99,235,0.22);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 12px 40px rgba(15,23,42,0.14);
  background: var(--bg); min-height: 340px;
  transition: box-shadow 0.25s;
}
.annotated-feature-card:hover { box-shadow: 0 16px 52px rgba(37,99,235,0.12); }
.annotated-feature-visual {
  background: #0d1520; overflow: hidden;
  display: flex; align-items: stretch;
}
.slide-viewer-svg { width: 100%; height: 100%; min-height: 280px; display: block; }
.annotated-feature-content {
  padding: 2.25rem 2rem; display: flex; flex-direction: column;
  justify-content: center; gap: 0;
  border-left: 1px solid rgba(37,99,235,0.15);
}
.annotated-feature-content .btn-primary { align-self: flex-start; margin-top: 0.25rem; }

/* Glossary grid */
.edu-glossary-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.edu-gloss-item {
  padding: 1.1rem 1.35rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.edu-gloss-item:nth-child(even) { border-right: none; }
.edu-gloss-item:nth-last-child(-n+2) { border-bottom: none; }
.edu-gloss-term {
  font-size: 12px; font-weight: 700; color: var(--text);
  font-family: 'JetBrains Mono', monospace; margin-bottom: 0.35rem;
}
.edu-gloss-exp { font-weight: 400; color: var(--text3); }
.edu-gloss-def { font-size: 12.5px; color: var(--text2); line-height: 1.65; margin: 0; }

/* Footer CTA strip */
.edu-hub-cta-strip {
  background: var(--bg2); border-top: 1px solid var(--border); padding: 2.5rem 0;
}
.edu-hub-cta-inner {
  max-width: 900px; margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 1fr 1px 1fr;
  gap: 0; align-items: center;
}
.edu-hub-cta-col { padding: 0 2.5rem; display: flex; flex-direction: column; gap: 0.85rem; }
.edu-hub-cta-col:first-child { padding-left: 0; }
.edu-hub-cta-col:last-child { padding-right: 0; }
.edu-hub-cta-divider { width: 1px; background: var(--border); align-self: stretch; }
.edu-hub-cta-label { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.4; }
.edu-hub-cta-link {
  font-size: 13px; font-weight: 600; color: var(--accent);
  text-decoration: none; letter-spacing: 0.01em;
}
.edu-hub-cta-link:hover { text-decoration: underline; }

/* Hub responsive */
@media (max-width: 860px) {
  .annotated-feature-card { grid-template-columns: 1fr; }
  .annotated-feature-content { border-left: none; border-top: 1px solid rgba(37,99,235,0.15); padding: 1.75rem; }
  .annotated-feature-visual { min-height: 220px; }
  .slide-viewer-svg { min-height: 220px; }
}
@media (max-width: 680px) {
  .edu-how-inner { grid-template-columns: 1fr; }
  .edu-how-divider { width: auto; height: 1px; }
  .adv-cards { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .comparison-vs { writing-mode: horizontal-tb; border: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 0.5rem; }
  .edu-glossary-grid { grid-template-columns: 1fr; }
  .edu-gloss-item { border-right: none !important; }
  .edu-gloss-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .edu-gloss-item:last-child { border-bottom: none !important; }
  .edu-hub-cta-inner { grid-template-columns: 1fr; }
  .edu-hub-cta-divider { height: 1px; width: auto; margin: 0.5rem 0; }
  .edu-hub-cta-col { padding: 0.5rem 0 !important; }
  .edu-hub-hero { padding: 4rem 1.5rem 3.5rem; }
}

/* ══ Hub Redesign (hub-*) ════════════════════════════════════ */

.hub-hero {
  position: relative; overflow: hidden;
  background: #0a1628; padding: 7rem 2rem 5.5rem; text-align: center;
}
.hub-hero-texture {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(59,130,246,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.07) 1px, transparent 1px);
  background-size: 44px 44px;
}
.hub-hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, rgba(37,99,235,0.22) 0%, transparent 62%);
}
.hub-hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hub-hero-eyebrow {
  display: inline-block; margin-bottom: 1.5rem;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.15em; font-family: 'JetBrains Mono', monospace;
  padding: 5px 14px; border-radius: 100px;
  background: rgba(37,99,235,0.16);
  color: rgba(96,165,250,0.88);
  border: 1px solid rgba(37,99,235,0.28);
}
.hub-headline {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800; color: #fff;
  line-height: 1.08; letter-spacing: -0.035em; margin-bottom: 1.3rem;
}
.hub-sub {
  font-size: 1.05rem; color: rgba(255,255,255,0.58);
  line-height: 1.75; max-width: 600px; margin: 0 auto 2.2rem;
}
.hub-cta-group { display: flex; gap: 0.9rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.hub-btn-lg { padding: 0.72rem 1.6rem; font-size: 15px !important; }
.hub-btn-outline {
  display: inline-block; padding: 0.68rem 1.5rem; font-size: 14px; font-weight: 600;
  border: 1.5px solid rgba(255,255,255,0.28); border-radius: var(--radius);
  background: transparent; color: rgba(255,255,255,0.80);
  text-decoration: none; transition: all 0.2s; cursor: pointer;
}
.hub-btn-outline:hover { border-color: rgba(255,255,255,0.60); color: #fff; }

/* Hub layout containers */
.hub-container { max-width: 980px; margin: 0 auto; padding: 0 2rem; }
.hub-section-eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); margin-bottom: 1.2rem;
}

/* Featured case section */
.hub-featured-section { padding: 4rem 0; border-top: 1px solid var(--border); }
.hub-featured-card {
  display: grid; grid-template-columns: 1fr 400px;
  border: 1px solid rgba(37,99,235,0.20); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: 0 12px 44px rgba(15,23,42,0.13);
  background: var(--bg); min-height: 320px;
  transition: box-shadow 0.25s;
}
.hub-featured-card:hover { box-shadow: 0 18px 56px rgba(37,99,235,0.11); }

.hub-featured-preview {
  background: #0d1520; flex: 0 0 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background-image:
    linear-gradient(rgba(59,130,246,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hub-featured-img {
  position: relative; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hub-featured-placeholder {
  width: 100%; height: 100%; min-height: 260px; display: block;
}

.hub-featured-content {
  padding: 2.25rem 2rem; display: flex; flex-direction: column;
  justify-content: center; gap: 0;
  border-left: 1px solid rgba(37,99,235,0.14);
}
.hub-featured-badges {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem;
}
.hub-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.10em; font-family: 'JetBrains Mono', monospace;
  padding: 3px 9px; border-radius: 100px;
  background: rgba(37,99,235,0.08);
  color: var(--accent); border: 1px solid rgba(37,99,235,0.18);
}
.hub-featured-title {
  font-size: 1.25rem; font-weight: 800; line-height: 1.2;
  margin-bottom: 0.85rem; color: var(--text);
}
.hub-featured-desc {
  font-size: 13.5px; color: var(--text2); line-height: 1.75;
  margin-bottom: 1.4rem;
}
.hub-featured-content .btn-primary { align-self: flex-start; }

/* Topic library */
.hub-topics-section {
  padding: 4rem 0; background: var(--bg2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.hub-topics-headline {
  font-size: 1.65rem; font-weight: 800; margin-bottom: 1.75rem; color: var(--text);
}

/* Bottom CTA */
.hub-bottom-cta {
  padding: 3.5rem 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.06) 0%, transparent 60%);
  border-top: 1px solid var(--border);
}
.hub-bottom-cta-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.2rem; }
.hub-bottom-cta-text {
  font-size: 1.2rem; font-weight: 700; color: var(--text); line-height: 1.4;
}

/* Hub responsive */
@media (max-width: 860px) {
  .hub-featured-card { grid-template-columns: 1fr; }
  .hub-featured-preview { min-height: 200px; }
  .hub-featured-placeholder { min-height: 200px; }
  .hub-featured-content { border-left: none; border-top: 1px solid rgba(37,99,235,0.14); }
}
@media (max-width: 640px) {
  .hub-hero { padding: 4.5rem 1.5rem 4rem; }
  .hub-featured-section, .hub-topics-section { padding: 2.5rem 0; }
}

/* ══ Case Viewer (case-*) ════════════════════════════════════ */

.case-progress-strip {
  position: sticky; top: 60px; z-index: 90;
  background: var(--bg); border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(15,23,42,0.06);
}
.case-progress-inner {
  max-width: 980px; margin: 0 auto; padding: 0.75rem 2rem;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 1.5rem; align-items: center;
}
.case-back-link {
  font-size: 12px; font-weight: 600; color: var(--text3);
  text-decoration: none; white-space: nowrap;
  transition: color 0.15s;
}
.case-back-link:hover { color: var(--accent); }
.case-prog-track-wrap { position: relative; padding: 0 4px; }
.case-prog-track {
  position: absolute; top: 50%; left: 16px; right: 16px;
  transform: translateY(-50%); height: 2px; background: var(--border); border-radius: 1px;
}
.case-prog-fill {
  height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent));
  border-radius: 1px; transition: width 0.40s cubic-bezier(0.25,0.46,0.45,0.94);
}
.case-prog-dots {
  display: flex; justify-content: space-between;
  position: relative; z-index: 1;
}
.case-prog-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg);
  color: var(--text3); font-size: 11px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.case-prog-dot:hover { border-color: var(--accent); color: var(--accent); }
.case-prog-dot.completed { background: var(--teal); border-color: var(--teal); color: #fff; }
.case-prog-dot.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  transform: scale(1.12);
}
.case-prog-label {
  font-size: 11px; font-weight: 700; color: var(--text3);
  font-family: 'JetBrains Mono', monospace; white-space: nowrap;
}

/* Case main area */
.case-main { padding: 2rem 0 4rem; }
.case-container { max-width: 980px; margin: 0 auto; padding: 0 2rem; }

/* Step panels */
.case-panel { display: none; grid-template-columns: 60fr 40fr; gap: 2rem; align-items: start; }
.case-panel.active { display: grid; }
.case-image-panel {
  border-radius: var(--radius-lg); overflow: hidden;
  background: #0d1520; min-height: 380px;
  background-image:
    linear-gradient(rgba(59,130,246,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(37,99,235,0.14);
}
.case-step-img {
  width: 100%; height: auto; max-height: 62vh;
  object-fit: contain; display: block; border-radius: var(--radius-lg);
}
.case-text-panel { display: flex; flex-direction: column; padding-top: 0.5rem; }
.case-step-eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.15em; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); margin-bottom: 0.6rem;
}
.case-step-headline {
  font-size: 1.4rem; font-weight: 800; line-height: 1.2;
  color: var(--text); margin-bottom: 0.9rem;
}
.case-step-body {
  font-size: 13.5px; color: var(--text2); line-height: 1.80; margin: 0;
}
.case-callout {
  margin-top: 1.25rem; padding: 0.9rem 1.1rem;
  background: rgba(37,99,235,0.05);
  border-left: 3px solid rgba(37,99,235,0.35);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 12.5px; color: var(--text2); line-height: 1.65;
  font-family: 'JetBrains Mono', monospace;
}
.case-callout-dominant {
  background: rgba(37,99,235,0.09);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.2rem;
}
.case-dominant-label {
  font-size: 11px; font-weight: 800; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 0.4rem;
}
.case-dominant-data {
  font-size: 13px; font-weight: 600; color: var(--text);
}

/* Case nav bar */
.case-nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0; margin-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.case-nav-btn {
  padding: 8px 22px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text2);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.case-nav-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.case-nav-btn:disabled { opacity: 0.32; cursor: not-allowed; }
.case-nav-next { background: var(--accent); border-color: var(--accent); color: #fff; }
.case-nav-next:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.case-nav-label {
  font-size: 11px; font-family: 'JetBrains Mono', monospace;
  color: var(--text3); font-weight: 600;
}

/* End panel */
.case-end-panel { display: none; margin-top: 2rem; }
.case-end-inner {
  padding: 3.5rem 2rem; text-align: center;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.case-end-icon { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.case-end-headline {
  font-size: 1.5rem; font-weight: 800; margin-bottom: 0.85rem; color: var(--text);
}
.case-end-body {
  font-size: 13.5px; color: var(--text2); line-height: 1.75;
  max-width: 520px; margin: 0 auto 1.75rem;
}
.case-end-secondary {
  margin-top: 1rem; font-size: 12.5px; color: var(--text3);
}
.case-end-secondary a { color: var(--accent); text-decoration: none; }
.case-end-secondary a:hover { text-decoration: underline; }

/* Case responsive */
@media (max-width: 860px) {
  .case-panel.active { grid-template-columns: 1fr; }
  .case-image-panel { min-height: 240px; }
  .case-step-img { max-height: 50vw; }
  .case-progress-inner { grid-template-columns: auto 1fr; }
  .case-prog-label { display: none; }
}
@media (max-width: 580px) {
  .case-progress-inner { grid-template-columns: 1fr; gap: 0.6rem; }
  .case-back-link { font-size: 11px; }
  .case-prog-dot { width: 26px; height: 26px; font-size: 10px; }
  .case-end-inner { padding: 2.5rem 1.25rem; }
}

/* ══ Annotated Viewer Page (vp-*) ════════════════════════════ */

/* Page header */
.vp-page-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.vp-container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }
.vp-breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 11.5px; color: var(--text3); margin-bottom: 0.85rem;
}
.vp-breadcrumb a { color: var(--text3); text-decoration: none; }
.vp-breadcrumb a:hover { color: var(--accent); }
.vp-eyebrow {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); margin-bottom: 0.5rem;
}
.vp-headline {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.15;
  color: var(--text); margin-bottom: 0.55rem;
}
.vp-subhead {
  font-size: 13.5px; color: var(--text2); line-height: 1.65; margin-bottom: 0.85rem;
}
.vp-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Viewer section */
.vp-viewer-section { padding: 1.5rem 0 0.5rem; }

/* ── Viewer chrome (dark instrument shell) ── */
.vp-viewer-chrome {
  border: 1px solid #1e3a5f;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.35);
  background: #0d1520;
}
.vp-topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 38px; padding: 0 12px; gap: 1rem;
  background: #060f1c; border-bottom: 1px solid #1e3a5f;
}
.vp-case-id {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  color: rgba(96,165,250,0.65); letter-spacing: 0.06em; white-space: nowrap; flex-shrink: 0;
}
.vp-mag-presets { display: flex; gap: 3px; flex-shrink: 0; }
.vp-mag-btn {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.50); cursor: pointer; transition: all 0.14s;
}
.vp-mag-btn:hover { background: rgba(37,99,235,0.18); border-color: rgba(37,99,235,0.40); color: rgba(255,255,255,0.85); }
.vp-mag-btn.active { background: rgba(37,99,235,0.28); border-color: rgba(37,99,235,0.55); color: #fff; }
.vp-topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.vp-statusbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 26px; padding: 0 12px; gap: 1rem;
  background: #060f1c; border-top: 1px solid #1e3a5f;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.38);
}
.vp-status-zoom { color: rgba(255,255,255,0.55); white-space: nowrap; }
.vp-status-coords { flex: 1; text-align: center; letter-spacing: 0.03em; }
.vp-status-scale { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.vp-scalebar-line {
  display: inline-block; height: 2px; width: 40px;
  background: rgba(255,255,255,0.45); border-radius: 1px;
  vertical-align: middle; transition: width 0.2s;
}
.vp-minimap {
  position: absolute; bottom: 10px; right: 10px; z-index: 20;
  width: 120px; height: 80px;
  border: 1px solid rgba(37,99,235,0.45); border-radius: 4px; overflow: hidden;
  background: #0d1520; box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.vp-minimap canvas { display: block; width: 100%; height: 100%; }
.vp-filmstrip {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: #060f1c; border-top: 1px solid #1e3a5f; overflow-x: auto;
}
.vp-filmstrip::-webkit-scrollbar { height: 3px; }
.vp-filmstrip::-webkit-scrollbar-track { background: #060f1c; }
.vp-filmstrip::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 2px; }
.vp-film-thumb {
  flex: 0 0 auto; position: relative; width: 88px; height: 58px;
  border: 2px solid rgba(255,255,255,0.10); border-radius: 4px;
  overflow: hidden; cursor: pointer; transition: border-color 0.15s;
}
.vp-film-thumb:hover { border-color: rgba(37,99,235,0.55); }
.vp-film-thumb.active { border-color: #2563eb; }
.vp-film-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-film-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 8px; font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.75); background: rgba(0,0,0,0.65);
  padding: 2px 4px; text-align: center; letter-spacing: 0.04em;
}
.vp-film-step-num {
  position: absolute; top: 2px; left: 4px;
  font-size: 7px; font-family: 'JetBrains Mono', monospace; color: rgba(255,255,255,0.40);
}
.ann-dot-red {
  background: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.28), 0 2px 8px rgba(0,0,0,0.55) !important;
}
.ann-dot-green {
  background: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.28), 0 2px 8px rgba(0,0,0,0.55) !important;
}

.vp-viewer-wrap {
  position: relative; overflow: hidden;
  background: #0d1520; user-select: none;
}
#osd-viewer {
  width: 100%; height: 68vh; min-height: 440px;
  background: #0d1520; display: block; cursor: grab;
}
#osd-viewer:active { cursor: grabbing; }

/* Toolbar: top-left */
.vp-toolbar { position: absolute; top: 12px; left: 12px; z-index: 25; }
.vp-toggle-btn {
  font-size: 11.5px; font-weight: 600; padding: 6px 14px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(8,18,36,0.82);
  color: rgba(255,255,255,0.78); cursor: pointer;
  backdrop-filter: blur(8px); font-family: inherit; transition: all 0.18s;
}
.vp-toggle-btn:hover { border-color: rgba(255,255,255,0.42); color: #fff; }

/* Controls: top-right */
.vp-controls {
  position: absolute; top: 12px; right: 12px; z-index: 25;
  display: flex; align-items: center; gap: 2px;
  background: rgba(8,18,36,0.82); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 100px; padding: 4px 12px; backdrop-filter: blur(8px);
}
.vp-ctrl-btn {
  width: 26px; height: 26px; border: none; background: transparent;
  color: rgba(255,255,255,0.70); font-size: 18px; line-height: 1;
  cursor: pointer; font-weight: 700; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s; border-radius: 50%;
}
.vp-ctrl-btn:hover { color: #fff; }
.vp-reset-btn { font-size: 14px; }
.vp-zoom-label {
  font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.55); padding: 0 5px; min-width: 34px; text-align: center;
}

/* ── Annotation overlays ── */
.ann-wrap {
  position: absolute; width: 0; height: 0;
  overflow: visible; pointer-events: none;
  transition: opacity 0.20s;
}
.ann-wrap.hidden-ann { opacity: 0; pointer-events: none !important; }
.ann-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid rgba(255,255,255,0.92);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.28), 0 2px 8px rgba(0,0,0,0.55);
  transform: translate(-50%,-50%); z-index: 3;
  pointer-events: auto; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.ann-dot:hover, .ann-wrap.active .ann-dot {
  background: #fff; border-color: var(--accent); transform: translate(-50%,-50%) scale(1.25);
}
.ann-conn {
  position: absolute; top: -0.5px; height: 1px; width: 30px;
  background: rgba(255,255,255,0.55);
}
.ann-conn-r { left: 5px; }
.ann-conn-l { right: 5px; }
.ann-chip {
  position: absolute; top: -13px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 10.5px; font-weight: 700;
  background: rgba(8,18,36,0.88); color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.16); white-space: nowrap;
  backdrop-filter: blur(8px); cursor: pointer; pointer-events: auto;
  font-family: inherit; box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ann-chip:hover, .ann-wrap.active .ann-chip {
  background: var(--accent); border-color: rgba(255,255,255,0.28); color: #fff;
}
.ann-chip-r { left: 36px; }
.ann-chip-l { right: 36px; }

/* Annotation info panel */
.vp-ann-panel {
  position: absolute; bottom: -90px; left: 12px; right: 12px; z-index: 30;
  background: rgba(6,15,30,0.93); border: 1px solid rgba(37,99,235,0.30);
  border-radius: var(--radius); padding: 0.85rem 0.95rem;
  backdrop-filter: blur(12px);
  display: flex; align-items: flex-start; gap: 0.85rem;
  transition: bottom 0.32s cubic-bezier(0.25,0.46,0.45,0.94);
  pointer-events: none;
}
.vp-ann-panel.active { bottom: 12px; pointer-events: auto; }
.vp-ann-panel-body { flex: 1; }
.vp-ann-panel-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.11em; font-family: 'JetBrains Mono', monospace;
  color: rgba(96,165,250,0.92); margin-bottom: 0.35rem;
}
.vp-ann-panel-desc {
  font-size: 12.5px; color: rgba(255,255,255,0.70); line-height: 1.68;
}
.vp-ann-panel-close {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  border: 1px solid rgba(255,255,255,0.16); background: transparent;
  color: rgba(255,255,255,0.50); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; line-height: 1; transition: all 0.15s;
}
.vp-ann-panel-close:hover { border-color: rgba(255,255,255,0.38); color: #fff; }

/* Summary section */
.vp-summary-section { padding: 2rem 0; border-top: 1px solid var(--border); }
.vp-stats-row {
  display: grid; grid-template-columns: repeat(4,1fr);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 1.75rem;
}
.vp-stat {
  padding: 1rem 1.25rem; background: var(--bg2);
  border-right: 1px solid var(--border);
}
.vp-stat:last-child { border-right: none; }
.vp-stat-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.11em; font-family: 'JetBrains Mono', monospace;
  color: var(--text3); margin-bottom: 0.4rem;
}
.vp-stat-value {
  font-size: 1.4rem; font-weight: 800; color: var(--text); line-height: 1;
}
.vp-stat-value.mono { font-family: 'JetBrains Mono', monospace; }
.vp-stat-sub {
  font-size: 11px; font-weight: 500; color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
}
.vp-summary-text {
  font-size: 13.5px; color: var(--text2); line-height: 1.82; max-width: 860px;
}
.vp-summary-text p { margin: 0; }

/* Responsive */
@media (max-width: 900px) {
  #osd-viewer { height: 56vw; min-height: 320px; }
  .vp-stats-row { grid-template-columns: repeat(2,1fr); }
  .vp-stat:nth-child(2) { border-right: none; }
  .vp-stat:nth-child(1),
  .vp-stat:nth-child(2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 580px) {
  #osd-viewer { height: 62vw; min-height: 260px; }
  .vp-controls { top: 8px; right: 8px; padding: 3px 8px; }
  .vp-toolbar { top: 8px; left: 8px; }
  .vp-toggle-btn { font-size: 10.5px; padding: 5px 11px; }
  .ann-chip { font-size: 9.5px; padding: 3px 8px; }
}

/* ══ Curriculum Tiers ════════════════════════════════════════ */

.hub-curriculum-section {
  padding: 4rem 0 2.5rem;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.hub-tier {
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.hub-tier:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.hub-tier-header { margin-bottom: 1.5rem; }
.hub-tier-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.18em; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); margin-bottom: 0.5rem;
}
.hub-tier-desc {
  font-size: 13.5px; color: var(--text2); line-height: 1.7;
  max-width: 640px; margin: 0;
}

/* ══ Learning Objectives Block ════════════════════════════════ */

.edu-objectives-inner {
  border: 1px solid rgba(37,99,235,0.16);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: rgba(37,99,235,0.03);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0 0;
}
.edu-objectives-eyebrow {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); margin-bottom: 0.75rem;
}
.edu-objectives-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.edu-objectives-list li {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 13.5px; color: var(--text2); line-height: 1.65;
}
.edu-objectives-list li::before {
  content: '\2192';
  color: var(--accent); font-weight: 700;
  flex-shrink: 0; font-size: 12px; margin-top: 1px;
}

/* ══ Quiz Section ════════════════════════════════════════════ */

.edu-quiz-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding-bottom: 5rem;
}
.edu-quiz-section .edu-content { padding-top: 0; }
.edu-quiz-inner {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  margin-top: 2.5rem;
}
.edu-quiz-eyebrow {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; font-family: 'JetBrains Mono', monospace;
  color: var(--text3);
  padding: 0.85rem 1.25rem;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
.quiz-q-area { padding: 1.25rem 1.25rem 0; }
.quiz-q-num {
  font-size: 9px; font-weight: 700; color: var(--text3);
  font-family: 'JetBrains Mono', monospace; margin-bottom: 0.45rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.quiz-q-text {
  font-size: 15px; font-weight: 600; color: var(--text);
  line-height: 1.5; margin-bottom: 1rem;
}
.quiz-options {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding-bottom: 1rem;
}
.quiz-option {
  display: block; width: 100%; text-align: left;
  padding: 0.7rem 1rem; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg2); color: var(--text2);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
  line-height: 1.5;
}
.quiz-option:hover:not(:disabled) { border-color: var(--accent); color: var(--text); background: var(--bg); }
.quiz-option:disabled { cursor: default; }
.quiz-option-correct { border-color: #16a34a !important; background: rgba(22,163,74,0.07) !important; color: #15803d !important; font-weight: 600 !important; }
.quiz-option-wrong { border-color: #dc2626 !important; background: rgba(220,38,38,0.06) !important; color: #b91c1c !important; }
.quiz-feedback {
  font-size: 13px; line-height: 1.6;
  padding: 0.65rem 0.9rem; border-radius: var(--radius);
  margin-bottom: 0.85rem;
}
.quiz-feedback-correct { background: rgba(22,163,74,0.07); border: 1px solid rgba(22,163,74,0.22); color: #15803d; }
.quiz-feedback-wrong { background: rgba(220,38,38,0.05); border: 1px solid rgba(220,38,38,0.18); color: #b91c1c; }
.quiz-nav { padding-bottom: 1.25rem; }
.quiz-next-btn {
  padding: 8px 22px; font-size: 13px; font-weight: 600;
  background: var(--accent); border: none; border-radius: var(--radius);
  color: #fff; cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.quiz-next-btn:hover { background: #1d4ed8; }
.quiz-score-inner {
  padding: 2.5rem 1.25rem; text-align: center;
}
.quiz-score-num {
  font-size: 3rem; font-weight: 800; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); line-height: 1; margin-bottom: 0.5rem;
}
.quiz-score-label { font-size: 14px; color: var(--text2); margin-bottom: 1.25rem; }
.quiz-restart-btn {
  padding: 8px 22px; font-size: 13px; font-weight: 600;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text2); cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.quiz-restart-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ══ AI Analysis Section ══════════════════════════════════════ */

.ai-analysis-section { border-top: 1px solid var(--border); }
.ai-section-eyebrow {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); margin-bottom: 0.5rem;
}
.ai-section-heading {
  font-size: 1.35rem; font-weight: 800; color: var(--text);
  margin-bottom: 2rem; line-height: 1.2;
}
.ai-image-block { margin-bottom: 3.5rem; }
.ai-image-block:last-child { margin-bottom: 0; }
.ai-image-title {
  font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem;
}
.ai-image-subtitle {
  font-size: 11.5px; color: var(--text3); font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.85rem;
}
.ai-image-frame { position: relative; }
.ai-image-inner {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(37,99,235,0.16);
  box-shadow: 0 4px 20px rgba(15,23,42,0.10);
  line-height: 0;
}
.ai-image-full { width: 100%; height: auto; display: block; }

/* ══ Research Page ═══════════════════════════════════════════ */

.research-citation {
  border: 1px solid rgba(37,99,235,0.18);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: rgba(37,99,235,0.03);
  padding: 1.5rem 1.75rem;
  margin: 0 0 0.5rem;
}

.research-conclusion {
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin: 1rem 0 0;
}

.research-conclusion-quote {
  font-size: 1.05rem; font-weight: 600; color: var(--text);
  line-height: 1.72; margin-bottom: 1rem; font-style: italic;
}

.research-conclusion-sub {
  font-size: 13.5px; color: var(--text2); line-height: 1.7; margin: 0;
}
