/* =========================================================
   specialty-nvm.css · Flagship Enterprise Design System
   Matches styling standards of secure-storage.html & ai-nvm-opportunities.html
   ========================================================= */

:root {
  --spec-midnight: #061925;
  --spec-midnight-2: #0a2230;
  --spec-navy: #133445;
  --spec-surface: #0e2a38;
  --spec-surface-card: #0e2a38;
  --spec-surface-elevated: #0e2a38;
  --spec-cyan: #c4a574;
  --spec-aqua: #c4a574;
  --spec-teal: #b08a5b;
  --spec-amber: #c4a574;
  --spec-green: #34d399;
  --spec-danger: #dc2626;
  --spec-line: rgba(28, 25, 23, 0.10);
  --spec-line-subtle: rgba(28, 25, 23, 0.06);
  --spec-text-main: #f3ebe0;
  --spec-text-muted: #e8e0d4;
  --spec-text-dim: #94a3b8;
  --spec-mono: 'IBM Plex Mono', Consolas, monospace;
  --spec-sans: 'Plus Jakarta Sans', 'Noto Sans TC', 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, sans-serif;
  --spec-glow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.specialty-page {
  background-color: var(--spec-midnight);
  color: var(--spec-text-muted);
  font-family: var(--spec-sans);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background-image: none;
}

/* =========================================================
   Hero Section
   ========================================================= */
.specialty-hero {
  position: relative;
  padding: 42px 20px 28px;
  background: 
    radial-gradient(circle at 50% 15%, rgba(176, 138, 91, 0.12) 0%, rgba(3, 19, 30, 0) 65%),
    linear-gradient(180deg, rgba(6, 27, 41, 0.95) 0%, rgba(3, 19, 30, 1) 100%);
  border-bottom: 1px solid rgba(176, 138, 91, 0.18);
}

.hero-container {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--spec-mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.18em;
  color: var(--spec-amber);
  background: rgba(196, 165, 116, 0.1);
  border: 1px solid rgba(196, 165, 116, 0.35);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--spec-amber);
  box-shadow: 0 0 8px rgba(196, 165, 116, 0.45);
}

.specialty-hero h1 {
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--spec-text-main);
  margin: 0 0 14px;
  text-wrap: balance;
}

.hero-lede {
  color: #a7c2c9;
  font-size: clamp(15.5px, 1.3vw, 18.5px);
  line-height: 1.78;
  max-width: 960px;
  margin: 0 auto 20px;
  text-wrap: pretty;
}

/* Quick Navigation Pills */
.specialty-nav-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--spec-surface);
  border: 1px solid var(--spec-line);
  border-radius: 6px;
  text-decoration: none;
  color: #e0f2f1;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.25s var(--ease-premium, cubic-bezier(.2,.7,.2,1));
  backdrop-filter: blur(8px);
}

.nav-pill:hover {
  background: var(--spec-aqua);
  color: var(--spec-midnight);
  border-color: var(--spec-aqua);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(196, 165, 116, 0.28);
}

.pill-number {
  font-family: var(--spec-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--spec-amber);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 3px;
}

.nav-pill:hover .pill-number {
  color: var(--spec-midnight);
  background: rgba(0, 0, 0, 0.15);
}

/* =========================================================
   晶圓顯微照片原圖完整比例縮放（零裁切規範 Zero-Crop Scale）
   ========================================================= */
.specialty-hero-image-wrap {
  margin: 28px auto 0;
  max-width: 780px; /* 緊湊專注寬度，避免過度縱向擴張 */
  width: 100%;
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 25px rgba(6, 182, 212, 0.15);
  background: #01080e;
  position: relative;
}

/* 顯微鏡取景角標 (Wafer Reticle Optical Alignment) */
.specialty-hero-image-wrap[data-reticle]::before {
  content: attr(data-reticle);
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  font-family: var(--spec-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: #c4a574;
  background: rgba(2, 10, 16, 0.85);
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  pointer-events: none;
}

.specialty-hero-image-wrap img {
  width: 100%;
  height: auto; /* 等比例縮放 */
  aspect-ratio: 16 / 9;
  object-fit: contain; /* 絕對不截斷上下左右任何像素，完整露出比例尺與金凸塊 */
  display: block;
  background: #01080e;
  filter: contrast(1.05) saturate(1.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.specialty-hero-image-wrap:hover img {
  transform: scale(1.015);
}

.hero-image-caption {
  padding: 8px 16px;
  background: rgba(4, 18, 28, 0.96);
  border-top: 1px solid var(--spec-line);
  font-family: var(--spec-mono);
  font-size: 11.5px;
  color: var(--spec-aqua);
  letter-spacing: 0.09em;
  text-align: center;
}

/* =========================================================
   Topic Sections (Editorial Enterprise Framing)
   ========================================================= */
.topic-section {
  position: relative;
  padding: 28px 20px;
  border-bottom: 1px solid var(--spec-line-subtle);
}

.topic-dark {
  background: 
    radial-gradient(circle at 80% 20%, rgba(176, 138, 91, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #020c14 0%, #04141e 100%);
}

.topic-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Section Header Structure */
.topic-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--spec-line-subtle);
}

.topic-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--spec-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--spec-cyan);
  background: rgba(176, 138, 91, 0.08);
  border: 1px solid rgba(176, 138, 91, 0.28);
  padding: 5px 14px;
  border-radius: 4px;
}

.topic-header h2 {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--spec-text-main);
  margin: 0 0 16px;
  text-wrap: balance;
}

.topic-lede {
  font-size: clamp(15.5px, 1.2vw, 17.5px);
  line-height: 1.76;
  color: #a2bcc4;
  max-width: 980px;
  margin: 0;
  padding-left: 20px;
  border-left: 3px solid var(--spec-cyan);
  text-wrap: pretty;
}

/* Metric Callout Tiles Bar */
.metric-tiles-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 34px 0 46px;
}

.metric-tile {
  background: var(--spec-surface);
  border: 1px solid var(--spec-line);
  border-radius: 6px;
  padding: 18px 20px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.metric-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--spec-cyan), var(--spec-amber));
}

.metric-tile-val {
  font-family: var(--spec-mono);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 800;
  color: var(--spec-aqua);
  line-height: 1.15;
  margin-bottom: 6px;
}

.metric-tile-label {
  font-family: var(--spec-mono);
  font-size: 11px;
  color: #7fa1ac;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.metric-tile-sub {
  font-size: 12.5px;
  color: #cadfe4;
  line-height: 1.5;
}

/* Sub-topic Section Framing */
.sub-topic-block {
  margin-bottom: 22px;
}

.sub-topic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.sub-topic-header h3 {
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 750;
  color: #f0f7f8;
  margin: 0;
  letter-spacing: -0.015em;
}

.tag-accent {
  font-family: var(--spec-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--spec-amber);
  background: rgba(255, 157, 92, 0.12);
  border: 1px solid rgba(255, 157, 92, 0.35);
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}

/* Silicon Cards Grid */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.tech-card {
  background: var(--spec-surface-card);
  border: 1px solid var(--spec-line);
  border-radius: 8px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.28s cubic-bezier(.2,.7,.2,1), border-color 0.28s, box-shadow 0.28s;
  backdrop-filter: blur(12px);
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: var(--spec-aqua);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), var(--spec-glow);
}

.tech-card-featured {
  border-color: rgba(196, 165, 116, 0.4);
  background: linear-gradient(180deg, rgba(14, 52, 72, 0.75) 0%, rgba(8, 37, 54, 0.75) 100%);
}

.card-header-icon {
  font-size: 24px;
  margin-bottom: 16px;
  display: inline-block;
}

.tech-card h4 {
  font-size: 18.5px;
  font-weight: 750;
  color: #ffffff;
  margin: 0 0 14px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.tech-card p {
  color: #a7c2c9;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 20px;
  flex-grow: 1;
}

/* Silicon Chip Spec List */
.spec-chip-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.spec-chip-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
  background: rgba(3, 16, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 7px 12px;
  border-radius: 4px;
}

.spec-chip-k {
  font-family: var(--spec-mono);
  font-size: 10.5px;
  color: var(--spec-cyan);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spec-chip-v {
  color: #e2eff2;
  line-height: 1.45;
}

.card-footer-metric {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--spec-mono);
  font-size: 11px;
  color: var(--spec-aqua);
  letter-spacing: 0.03em;
}

/* =========================================================
   Architectural Comparison Callout Boxes
   ========================================================= */
.architecture-callout-box {
  margin: 18px 0;
  padding: 28px 32px;
  background: 
    linear-gradient(115deg, rgba(176, 138, 91, 0.08) 0%, transparent 40%),
    rgba(6, 30, 44, 0.85);
  border: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.callout-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.callout-badge {
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--spec-amber);
  background: rgba(255, 157, 92, 0.15);
  border: 1px solid rgba(255, 157, 92, 0.4);
  padding: 4px 10px;
  border-radius: 3px;
}

.callout-title {
  font-size: 18px;
  font-weight: 750;
  color: #ffffff;
  margin: 0;
}

.callout-body {
  font-size: 14px;
  line-height: 1.72;
  color: #b2ced4;
  margin: 0;
}

/* =========================================================
   Fuse Technology Evolution (Timeline Framing)
   ========================================================= */
.fuse-evolution-block {
  margin-top: 52px;
  padding: 36px 32px;
  background: rgba(4, 20, 32, 0.7);
  border: 1px solid var(--spec-line);
  border-radius: 8px;
}

.fuse-evolution-block h3 {
  font-size: 21px;
  font-weight: 750;
  color: #ffffff;
  margin: 0 0 26px;
  letter-spacing: -0.015em;
  text-align: center;
}

.evo-card {
  background: rgba(8, 33, 49, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 24px;
  position: relative;
  transition: all 0.25s ease;
}

.evo-card:hover {
  border-color: rgba(196, 165, 116, 0.4);
  transform: translateY(-2px);
}

.evo-active {
  border-color: var(--spec-aqua);
  background: linear-gradient(180deg, rgba(176, 138, 91, 0.12) 0%, rgba(8, 37, 54, 0.8) 100%);
  box-shadow: 0 10px 30px rgba(176, 138, 91, 0.15);
}

.evo-phase {
  display: inline-block;
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
  color: #9cb5bc;
  background: rgba(255, 255, 255, 0.08);
}

.evo-active .evo-phase {
  color: var(--spec-midnight);
  background: var(--spec-aqua);
  font-weight: 800;
}

.evo-card h4 {
  font-size: 17px;
  font-weight: 750;
  color: #ffffff;
  margin: 0 0 10px;
}

.evo-card p {
  font-size: 13.5px;
  line-height: 1.68;
  color: #a2bcc4;
  margin: 0;
}

/* =========================================================
   Interactive Labs (Flagship ATE Instrument Shell)
   ========================================================= */
.interactive-lab-card {
  margin: 20px 0;
  background: #04141e;
  border: 1px solid var(--spec-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), var(--spec-glow);
}

.lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(6, 25, 37, 0.96);
  border-bottom: 1px solid var(--spec-line);
  flex-wrap: wrap;
  gap: 12px;
}

.lab-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lab-pulse-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--spec-green);
  box-shadow: 0 0 10px var(--spec-green);
  animation: ledPulse 2s infinite ease-in-out;
}

@keyframes ledPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.lab-title-wrap h4 {
  font-size: 16.5px;
  font-weight: 750;
  color: #ffffff;
  margin: 0;
  font-family: var(--spec-sans);
}

.lab-subpanel {
  background: rgba(7, 30, 44, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 20px;
}

/* Stat Grid */
.stat-box {
  background: rgba(3, 14, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-family: var(--spec-mono);
  font-size: 10px;
  color: #7fa1ac;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-val {
  font-family: var(--spec-mono);
  font-size: 16.5px;
  font-weight: 800;
  color: var(--spec-aqua);
}

.stat-val.text-green { color: var(--spec-green); }
.stat-val.text-warn  { color: var(--spec-danger); }
.stat-val.text-amber { color: var(--spec-amber); }
.stat-val.text-cyan  { color: var(--spec-cyan); }

/* Sliders & Buttons */
.lab-slider {
  width: 100%;
  accent-color: var(--spec-cyan);
  cursor: pointer;
}

.btn-lab-action {
  width: 100%;
  padding: 12px 18px;
  font-family: var(--spec-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--spec-midnight);
  background: var(--spec-aqua);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-lab-action:hover:not(:disabled) {
  background: #a2f5ee;
  box-shadow: 0 6px 18px rgba(196, 165, 116, 0.35);
  transform: translateY(-1px);
}

.btn-lab-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-lab-action.btn-accent-amber {
  background: var(--spec-amber);
  color: #03131e;
}

.btn-lab-action.btn-accent-amber:hover:not(:disabled) {
  background: #ffb887;
  box-shadow: 0 6px 18px rgba(255, 157, 92, 0.35);
}

/* Terminal Mac Window Mockup */
.terminal-window-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #030d14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.term-dot-red   { background: #ef5743; }
.term-dot-yellow{ background: #fbbf24; }
.term-dot-green { background: #38c99e; }

.repair-terminal {
  background: #01060a;
  border: 1px solid rgba(196, 165, 116, 0.2);
  border-radius: 0 0 4px 4px;
  font-family: var(--spec-mono);
  font-size: 11px;
  color: var(--spec-aqua);
  padding: 12px 14px;
  height: 90px;
  overflow-y: auto;
  line-height: 1.55;
}

/* =========================================================
   Typography Balance, Equal-Height Cards & Boundary Defenses
   ========================================================= */
.specialty-hero h1,
.topic-header h2,
.lab-header h3,
.sub-topic-header h3,
.tech-card h4,
.evo-card h4,
.foundry-card h4,
.comparison-panel h3 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero-lede,
.topic-header p,
.tech-card p,
.lab-header p {
  text-wrap: pretty;
  overflow-wrap: break-word;
  hyphens: auto;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.tech-card,
.evo-card,
.foundry-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tech-card p,
.evo-card p,
.foundry-card p {
  flex-grow: 1;
}

/* =========================================================
   Comparison Panel & Foundry Benchmark Decision Matrix
   Target: BCD Pure Logic vs eFlash & E-Ink vs LCD/OLED Tables
   ========================================================= */
.comparison-panel {
  margin: 40px 0;
  padding: 28px 30px;
  background: 
    linear-gradient(135deg, rgba(176, 138, 91, 0.05) 0%, transparent 45%),
    rgba(5, 23, 34, 0.88);
  border: 1px solid rgba(196, 165, 116, 0.28);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 24px rgba(176, 138, 91, 0.06);
  position: relative;
  overflow: hidden;
}

.comparison-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--spec-cyan), transparent);
}

/* Panel Header & Kicker */
.comparison-header {
  margin-bottom: 20px;
}

.comparison-header .panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comparison-header .pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--spec-cyan);
  box-shadow: 0 0 8px var(--spec-cyan);
}

.comparison-header .kicker-tag {
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: var(--spec-aqua);
  text-transform: uppercase;
}

.comparison-panel h3 {
  font-size: 18px;
  font-weight: 750;
  color: #ffffff;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.comparison-header .panel-sub {
  font-size: 12.5px;
  color: var(--spec-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Table Scrolling Defense & Visual Hint */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  border: 1px solid rgba(196, 165, 116, 0.2);
  margin-top: 16px;
  background: 
    linear-gradient(to right, #051a26 30%, rgba(5, 26, 38, 0)),
    linear-gradient(to right, rgba(5, 26, 38, 0), #051a26 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(196, 165, 116, 0.25), rgba(0, 0, 0, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(196, 165, 116, 0.25), rgba(0, 0, 0, 0)) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}

/* Data Table Precision Typography & Layout (收斂比例，消除過大字體) */
.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-family: var(--spec-sans);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--spec-text-muted);
}

/* thead th: 高反差半導體儀表風格 */
.data-table thead th {
  background: #041a27;
  color: var(--spec-aqua);
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 2px solid rgba(196, 165, 116, 0.35);
  border-right: 1px solid rgba(196, 165, 116, 0.12);
  white-space: nowrap;
}

.data-table thead th:last-child {
  border-right: none;
}

/* 繁體中文表頭字體平衡微調 */
html[data-language="zh"] .data-table thead th {
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* 欄位寬度最佳化配置 */
.data-table th:nth-child(1),
.data-table td:nth-child(1) { width: 19%; min-width: 135px; }
.data-table th:nth-child(2),
.data-table td:nth-child(2) { width: 28%; min-width: 185px; }
.data-table th:nth-child(3),
.data-table td:nth-child(3) { width: 26%; min-width: 175px; }
.data-table th:nth-child(4),
.data-table td:nth-child(4) { width: 27%; min-width: 185px; }

/* tbody 單元格與細緻半導體網格 */
.data-table tbody tr {
  border-bottom: 1px solid rgba(196, 165, 116, 0.1);
  transition: background-color 0.18s ease;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:nth-child(even) td {
  background-color: rgba(6, 30, 44, 0.35);
}

.data-table tbody tr:hover td {
  background-color: rgba(176, 138, 91, 0.06);
}

.data-table tbody td {
  padding: 11px 14px;
  vertical-align: top;
  border-right: 1px solid rgba(196, 165, 116, 0.08);
  color: #a4bfc9;
  font-size: 12.5px;
  line-height: 1.55;
  word-break: break-word;
}

.data-table tbody td:last-child {
  border-right: none;
}

/* 第一欄：評估維度 / 指標 */
.data-table tbody td:first-child strong {
  display: block;
  font-family: var(--spec-sans);
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}

/* 第四欄：架構決策意涵 (次要分析筆記風格) */
.data-table tbody td:last-child {
  color: #8daab6;
  font-size: 12px;
  line-height: 1.5;
}

/* =========================================================
   .cell-win 與 .cell-lose 半透明光澤與微狀態樣式
   ========================================================= */
.data-table tbody td.cell-win {
  background: rgba(56, 201, 158, 0.085);
  color: #c9f5e7;
  border-left: 2px solid rgba(56, 201, 158, 0.55);
}

.data-table tbody tr:hover td.cell-win {
  background: rgba(56, 201, 158, 0.14);
}

.data-table tbody td.cell-win strong {
  color: #38c99e;
  font-weight: 700;
}

.data-table tbody td.cell-lose {
  background: rgba(239, 87, 67, 0.075);
  color: #fed9d4;
  border-left: 2px solid rgba(239, 87, 67, 0.45);
}

.data-table tbody tr:hover td.cell-lose {
  background: rgba(239, 87, 67, 0.13);
}

.data-table tbody td.cell-lose strong {
  color: #ef5743;
  font-weight: 700;
}

/* =========================================================
   Responsive Breakpoint Ladder
   ========================================================= */
@media (max-width: 1280px) {
  .specialty-hero {
    padding: 70px 20px 48px;
  }
  .topic-section {
    padding: 28px 20px;
  }
  .subpanel-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .subpanel-title .lab-btn,
  .subpanel-title .badge-accent,
  .subpanel-title .mura-toggle-wrapper {
    align-self: flex-start;
  }
}

@media (max-width: 1080px) {
  .lab-split-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 991px) {
  .specialty-hero h1 {
    font-size: clamp(26px, 3.5vw, 36px);
  }
  .specialty-nav-pills {
    gap: 8px;
  }
  .nav-pill {
    padding: 8px 14px;
    font-size: 12.5px;
  }
  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
  }
  .foundry-grid {
    grid-template-columns: 1fr;
  }
  .comparison-panel {
    padding: 22px 18px;
  }
  .data-table {
    font-size: 12px;
  }
  .data-table thead th {
    padding: 11px 12px;
    font-size: 9.5px;
  }
  .data-table tbody td {
    padding: 10px 12px;
    font-size: 12px;
  }
  .data-table tbody td:first-child strong {
    font-size: 12px;
  }
  .data-table tbody td:last-child {
    font-size: 11.5px;
  }
}

@media (max-width: 768px) {
  .topic-section {
    padding: 28px 16px;
  }
  .comparison-panel {
    padding: 20px 16px;
    margin: 30px 0;
  }
  .comparison-panel h3 {
    font-size: 16px;
  }
  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
  .spec-chip-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .topic-badge-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .metric-tiles-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .topic-section {
    padding: 28px 12px;
  }
  .interactive-lab-card {
    padding: 20px 14px;
    margin: 14px 0;
    border-radius: 8px;
  }
  .lab-subpanel {
    padding: 14px 12px;
  }
  .comparison-panel {
    padding: 16px 12px;
  }
  .lab-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .lab-stat-row .stat-box:last-child {
    grid-column: span 2;
  }
  .stat-val {
    font-size: 12.5px;
  }
  .calc-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .result-card {
    padding: 12px 10px;
  }
  .res-num {
    font-size: clamp(16px, 4.5vw, 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .repair-step-buttons {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .repair-step-buttons .lab-btn {
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    font-size: 12px;
  }
  .eink-mode-buttons {
    flex-direction: column;
    gap: 6px;
  }
  .mode-btn {
    width: 100%;
    min-width: 0;
    text-align: center;
    padding: 9px 12px;
  }
  .canvas-wrapper canvas {
    max-height: 180px;
  }
}

@media (max-width: 480px) {
  .metric-tiles-bar {
    grid-template-columns: 1fr;
  }
  .hero-lede {
    font-size: 15px;
  }
  .specialty-hero h1 {
    font-size: 26px;
  }
}

@media (max-width: 390px) {
  .specialty-hero {
    padding: 40px 10px 30px;
  }
  .topic-section {
    padding: 28px 8px;
  }
  .lab-stat-row {
    grid-template-columns: 1fr;
  }
  .lab-stat-row .stat-box:last-child {
    grid-column: span 1;
  }
  .calc-results-grid {
    grid-template-columns: 1fr;
  }
}



/* =========================================================
   Research Meta Strip (Foundry & Standards Discipline)
   ========================================================= */
.specialty-research-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 28px auto 34px;
  max-width: 1060px;
  padding: 10px 16px;
  background: rgba(3, 16, 26, 0.75);
  border: 1px solid var(--spec-line);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.specialty-research-meta .meta-item b {
  display: block;
  font-family: var(--spec-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--spec-aqua);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.specialty-research-meta .meta-item span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8faab0;
  line-height: 1.45;
}

/* =========================================================
   Physics Formula & State Contract Cards
   ========================================================= */
.physics-formula-card {
  margin: 36px 0 32px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(6, 26, 38, 0.92) 0%, rgba(3, 14, 22, 0.98) 100%);
  border: 1px solid rgba(196, 165, 116, 0.25);
  border-left: 4px solid var(--spec-aqua);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.formula-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.formula-badge {
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  background: rgba(196, 165, 116, 0.15);
  color: var(--spec-aqua);
  border-radius: 3px;
  border: 1px solid rgba(196, 165, 116, 0.3);
}

.formula-header h4 {
  font-size: 15.5px;
  font-weight: 750;
  color: #ffffff;
  margin: 0;
  font-family: var(--spec-sans);
}

.formula-equation {
  margin: 14px 0 16px;
  padding: 14px 20px;
  background: rgba(1, 8, 14, 0.65);
  border-radius: 4px;
  border: 1px dashed rgba(196, 165, 116, 0.2);
}

.formula-equation strong {
  display: block;
  font-family: var(--spec-mono);
  font-size: 13.5px;
  color: #e2eff2;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.formula-equation small {
  display: block;
  margin-top: 6px;
  color: #8faab0;
  font-size: 11.5px;
  line-height: 1.5;
}

.state-contract-takeaway {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contract-tag {
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--spec-amber);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.contract-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contract-list li {
  font-size: 12.5px;
  line-height: 1.55;
  color: #b0c9dd;
}

.contract-list li b {
  color: #ffffff;
}

/* =========================================================
   Global Foundry Stepper Matrix Section
   ========================================================= */
.foundry-roadmap-section {
  margin: 54px 0 32px;
  padding: 32px 36px;
  background: linear-gradient(135deg, rgba(6, 26, 38, 0.85) 0%, rgba(2, 12, 20, 0.95) 100%);
  border: 1px solid var(--spec-line);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), var(--spec-glow);
}

.roadmap-header {
  margin-bottom: 24px;
}

.roadmap-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 6px 0 8px;
}

.foundry-stepper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.stepper-col {
  background: rgba(3, 14, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s var(--ease-premium);
}

.stepper-col:hover {
  border-color: var(--spec-aqua);
  box-shadow: 0 8px 24px rgba(176, 138, 91, 0.12);
  transform: translateY(-2px);
}

.stepper-brand {
  font-family: var(--spec-sans);
  font-weight: 800;
  font-size: 14px;
  color: var(--spec-aqua);
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(196, 165, 116, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stepper-sub {
  font-family: var(--spec-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: #8faab0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stepper-node-card {
  background: rgba(1, 8, 14, 0.5);
  padding: 10px 12px;
  border-radius: 4px;
  border-left: 2.5px solid var(--spec-amber);
}

.stepper-node-card .node-tag {
  display: inline-block;
  font-family: var(--spec-mono);
  font-size: 9px;
  font-weight: 800;
  color: var(--spec-amber);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.stepper-node-card b {
  display: block;
  font-size: 12px;
  color: #ffffff;
  margin-bottom: 4px;
  font-family: var(--spec-mono);
}

.stepper-node-card p {
  font-size: 11px;
  line-height: 1.45;
  color: #8faab0;
  margin: 0;
}

@media (max-width: 1024px) {
  .specialty-research-meta, .foundry-stepper-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .specialty-research-meta, .foundry-stepper-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   Flagship Card Aesthetics Alignment (Matching ai-nvm & memory-physics)
   ========================================================= */
.tech-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--spec-aqua), transparent);
  opacity: 0.6;
}

.tech-card:hover::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, var(--spec-aqua), var(--spec-cyan), transparent);
}

.card-header-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 165, 116, 0.08);
  border: 1px solid rgba(196, 165, 116, 0.2);
  border-radius: 6px;
  font-size: 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.25s var(--ease-premium);
}

.tech-card:hover .card-header-icon {
  background: rgba(196, 165, 116, 0.16);
  border-color: var(--spec-aqua);
  transform: scale(1.05);
}

.card-footer-metric span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(3, 16, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10.5px;
}

/* =========================================================
   Lab 01 & Lab 02 Scaffolding Upgrades (HIVE+Loop)
   ========================================================= */
.lab-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lab-btn.btn-toggle {
  background: rgba(196, 165, 116, 0.08);
  border: 1px solid rgba(196, 165, 116, 0.35);
  color: var(--spec-aqua);
  padding: 6px 12px;
  font-size: 11px;
}

.lab-btn.btn-toggle:hover {
  background: rgba(196, 165, 116, 0.18);
  border-color: var(--spec-aqua);
}

.terminal-window-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #020b12;
  border-bottom: 1px solid rgba(196, 165, 116, 0.15);
}

.terminal-title {
  margin-left: 8px;
  font-family: var(--spec-mono);
  font-size: 9px;
  color: #c4a574;
  letter-spacing: 0.1em;
}

.fusebox-register-map {
  margin-top: 12px;
  background: #020e17;
  border: 1px solid rgba(196, 165, 116, 0.22);
  border-radius: 4px;
  padding: 10px 12px;
}

.fusebox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196, 165, 116, 0.1);
  margin-bottom: 8px;
}

.fusebox-title {
  font-family: var(--spec-mono);
  font-size: 11px;
  font-weight: 700;
  color: #c9f5e7;
  letter-spacing: 0.04em;
}

.fusebox-status {
  font-family: var(--spec-mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  color: #8faab0;
}

.fusebox-status.burned {
  background: rgba(56, 201, 158, 0.2);
  color: #38c99e;
  border: 1px solid rgba(56, 201, 158, 0.5);
}

.fusebox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

@media (max-width: 600px) {
  .fusebox-grid {
    grid-template-columns: 1fr;
  }
}

.fuse-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 30, 44, 0.6);
  padding: 6px 10px;
  border-radius: 3px;
  border: 1px solid rgba(196, 165, 116, 0.08);
  font-family: var(--spec-mono);
  font-size: 10px;
}

.fuse-idx {
  color: var(--spec-aqua);
  font-weight: 700;
}

.fuse-val {
  color: #d1e7ed;
}

.fuse-state {
  font-size: 8.5px;
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 700;
}

.fuse-state.state-blank {
  background: rgba(255, 255, 255, 0.08);
  color: #8faab0;
}

.fuse-state.state-mapped {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.fuse-state.state-burned {
  background: rgba(56, 201, 158, 0.25);
  color: #38c99e;
  border: 1px solid rgba(56, 201, 158, 0.6);
}

/* =========================================================
   DESIGN SYSTEM PORTING (From AI Systems & NVM Opportunities)
   Slate/Navy #0a1118 theme, Cyber Cyan, Monospace Eyebrows,
   4-Metric Stat Strip, 4-Metric Spec Grids, State Contract Boxes,
   Governing Physics Blocks, Modern Decision Tables
   ========================================================= */

.text-gradient-cyan {
  background: linear-gradient(90deg, #8a6a42, #8a6a42, #c4a574);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.hero-eyebrow-flex {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--spec-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a42;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #8a6a42;
  box-shadow: 0 0 10px #8a6a42;
  animation: pulse-glow-cyan 2s infinite ease-in-out;
}

@keyframes pulse-glow-cyan {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px #8a6a42; }
  50% { opacity: 0.35; transform: scale(0.85); box-shadow: 0 0 4px #8a6a42; }
}

/* 4-Metric Stat Strip */
.stat-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 32px 0 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

@media (max-width: 900px) {
  .stat-strip-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .stat-strip-grid { grid-template-columns: 1fr; }
}

.stat-strip-card {
  background: rgba(13, 21, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px 18px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat-strip-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.3);
}

.border-l-cyan { border-left: 4px solid #8a6a42 !important; }
.border-l-teal { border-left: 4px solid #8a6a42 !important; }
.border-l-emerald { border-left: 4px solid #c4a574 !important; }
.border-l-amber { border-left: 4px solid #f59e0b !important; }

.stat-strip-card .stat-val {
  font-family: var(--spec-mono);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.stat-strip-card .stat-label {
  font-family: var(--spec-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-top: 4px;
}

.stat-strip-card .stat-sub {
  font-size: 11.5px;
  margin-top: 6px;
  font-weight: 500;
}

/* Topic Header Row & Ghost Badge */
.topic-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.topic-ghost-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--spec-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.12);
  color: #8a6a42;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.status-verified {
  font-family: var(--spec-mono);
  font-size: 11px;
  font-weight: 700;
  color: #c4a574;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.05em;
}

.status-verified::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #c4a574;
  box-shadow: 0 0 8px #c4a574;
}

/* 4-Metric Spec Grids */
.spec-grid-four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0 20px;
}

@media (max-width: 900px) {
  .spec-grid-four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .spec-grid-four { grid-template-columns: 1fr; }
}

.spec-card {
  background: rgba(13, 21, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 16px 18px;
  transition: all 0.25s ease;
}

.spec-card:hover {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(13, 21, 32, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.spec-card-val {
  font-family: var(--spec-mono);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.val-cyan { color: #b08a5b; }
.val-emerald { color: #c4a574; }
.val-amber { color: #fbbf24; }
.val-purple { color: #c4a574; }

.spec-card-title {
  font-family: var(--spec-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  margin-top: 6px;
}

.spec-card-desc {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.45;
}

/* State Contract Takeaways */
.state-contract-box {
  margin: 14px 0;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  background: #0b131e;
  border-left: 4px solid #8a6a42;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--spec-sans);
}

.state-contract-header {
  font-family: var(--spec-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6a42;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.state-contract-header .arrow-icon {
  color: #8a6a42;
  font-weight: 900;
  font-size: 13px;
}

.state-contract-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.state-contract-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
}

.state-contract-list li .bullet-dot {
  font-family: var(--spec-mono);
  color: #8a6a42;
  font-size: 13px;
  margin-top: 1px;
  line-height: 1;
}

.state-contract-list li strong {
  color: #ffffff;
  font-family: var(--spec-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Governing Physics Box */
.governing-physics-box {
  margin: 14px 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(10, 15, 22, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.governing-physics-header {
  font-family: var(--spec-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #b08a5b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.governing-physics-header .math-integral {
  color: #8a6a42;
  font-weight: 800;
  font-size: 13px;
}

.governing-physics-formula {
  padding: 16px 20px;
  background: #050b10;
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 6px;
  overflow-x: auto;
  color: #67e8f9;
  font-size: 14px;
  text-align: center;
  margin-bottom: 12px;
}

.governing-physics-desc {
  font-size: 12px;
  line-height: 1.6;
  color: #94a3b8;
  font-family: var(--spec-sans);
}

.physics-desc-title {
  font-family: var(--spec-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: #e2e8f0;
  margin-bottom: 4px;
  display: block;
}

/* Decision Matrix Card & Modern Table */
.decision-matrix-card {
  margin: 18px 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0e1724;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.decision-matrix-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 21, 32, 0.85);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.decision-matrix-title {
  font-family: var(--spec-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6a42;
}

.decision-matrix-subtitle {
  font-family: var(--spec-mono);
  font-size: 11px;
  color: #94a3b8;
}

.decision-table-modern {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
  font-family: var(--spec-sans);
}

.decision-table-modern thead tr {
  background: #09131f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.decision-table-modern th {
  padding: 8px 12px;
  font-family: var(--spec-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.decision-table-modern th.th-cyan {
  color: #b08a5b;
}

.decision-table-modern tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}

.decision-table-modern tbody tr:last-child {
  border-bottom: none;
}

.decision-table-modern tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.decision-table-modern td {
  padding: 8px 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

.decision-table-modern td.metric-col {
  font-weight: 600;
  color: #ffffff;
}




/* =========================================================
   COMPACT DASHBOARD ENGINE (Reviewer 1, 2, 3 Consensus)
   ========================================================= */
.lab-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .lab-body-grid {
    grid-template-columns: 1fr;
  }
}

.spec-duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
  align-items: stretch;
}

@media (max-width: 900px) {
  .spec-duo-grid {
    grid-template-columns: 1fr;
  }
}

.spec-duo-grid .governing-physics-box,
.spec-duo-grid .state-contract-box {
  margin: 0 !important;
  height: 100%;
}

.matrix-canvas-wrap canvas {
  max-height: 250px !important;
  width: auto !important;
  margin: 0 auto;
  display: block;
}

.canvas-wrapper canvas {
  max-height: 150px;
}

/* Compact EDA Card Styling */
.tech-card {
  padding: 16px 18px !important;
}

.tech-card h4 {
  font-size: 15px !important;
  margin-bottom: 8px !important;
}

.tech-card p {
  font-size: 13px !important;
  line-height: 1.55 !important;
  margin-bottom: 12px !important;
}

.spec-chip-list {
  gap: 6px !important;
  margin: 0 0 14px !important;
}

.spec-chip-item {
  padding: 5px 10px !important;
  font-size: 11.5px !important;
}

.card-footer-metric {
  padding-top: 10px !important;
  font-size: 10.5px !important;
}

.pipeline-flow {
  margin: 16px 0 !important;
  padding: 14px 18px !important;
}

.pipeline-step {
  padding: 12px 14px !important;
}

.fuse-evolution-block {
  margin-top: 20px !important;
  padding: 18px 20px !important;
}

.fuse-evolution-block h3 {
  margin-bottom: 16px !important;
  font-size: 17px !important;
}

.evo-card {
  padding: 16px !important;
}

.foundry-landscape {
  margin-top: 24px !important;
  padding: 20px !important;
}

.foundry-grid {
  gap: 12px !important;
}

.foundry-card {
  padding: 14px !important;
}



/* =========================================================
   TOPIC 02: 半導體 3 階段缺陷修復流程圖 (SVG Flowchart)
   ========================================================= */
.semiconductor-flowchart-card {
  margin: 24px 0 28px;
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(2, 14, 24, 0.95) 0%, rgba(4, 22, 36, 0.95) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(6, 182, 212, 0.2);
}

.flowchart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.flowchart-title-tag {
  font-family: var(--spec-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: #c4a574;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.flowchart-header h4 {
  font-size: 14.5px;
  margin: 0;
  color: #f1f5f9;
  font-weight: 600;
}

.flowchart-svg-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 6px;
  background: #010a12;
  border: 1px solid rgba(30, 58, 95, 0.5);
  padding: 6px;
}

.flow-svg {
  width: 100%;
  min-width: 860px;
  height: auto;
  display: block;
}

/* 流程圖底部雙語工程微標籤欄 */
.flowchart-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(30, 58, 95, 0.4);
}

.flow-legend-col {
  background: rgba(3, 16, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 10px 12px;
}

.flow-legend-col h5 {
  font-size: 12.5px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.flow-legend-col p {
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
  margin: 0;
}

.flow-dot-cyan { width: 6px; height: 6px; border-radius: 50%; background: #c4a574; display: inline-block; }
.flow-dot-amber { width: 6px; height: 6px; border-radius: 50%; background: #ffb703; display: inline-block; }
.flow-dot-green { width: 6px; height: 6px; border-radius: 50%; background: #c4a574; display: inline-block; }

/* =========================================================
   TOPIC 03: 晶圓廠簽核管線流程圖 (Silicon Qualification Stepper)
   ========================================================= */
.qual-pipeline-container {
  margin: 24px 0 28px;
  padding: 22px 24px;
  background: linear-gradient(180deg, #020d16 0%, #041624 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.qual-pipeline-header {
  margin-bottom: 18px;
}

.qual-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.qual-chip {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid #c4a574;
  color: #c4a574;
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}

.qual-chip-verified {
  background: rgba(196, 165, 116, 0.15);
  border: 1px solid #c4a574;
  color: #d4b896;
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}

.pipeline-stepper-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
}

.stepper-step {
  background: #031420;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stepper-step.active {
  border-color: rgba(196, 165, 116, 0.5);
  box-shadow: 0 0 20px rgba(196, 165, 116, 0.08);
}

.stepper-step:hover {
  transform: translateY(-2px);
  border-color: #c4a574;
}

.step-gate-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: #042f2e;
  border: 1px solid #c4a574;
  color: #a7f3d0;
  font-family: var(--spec-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.step-visual-box {
  height: 64px;
  background: #010a10;
  border: 1px solid #1e293b;
  border-radius: 6px;
  margin: 6px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 4px 8px;
}

/* 晶圓疊圖視覺 */
.mini-wafer-stack {
  position: relative;
  width: 42px;
  height: 40px;
}
.wafer-disc {
  position: absolute;
  width: 36px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #c4a574;
  background: rgba(0, 240, 255, 0.15);
}
.wafer-disc.w1 { top: 0; }
.wafer-disc.w2 { top: 6px; background: rgba(0, 240, 255, 0.25); }
.wafer-disc.w3 { top: 12px; background: rgba(0, 240, 255, 0.4); }

.shmoo-matrix-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.shmoo-lbl { font-size: 8px; font-family: var(--spec-mono); color: #64748b; }
.shmoo-grid {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 2px;
}
.shmoo-grid span {
  width: 10px; height: 10px; font-size: 7px; font-weight: 700;
  display: grid; place-items: center; border-radius: 2px;
}
.shmoo-grid .p { background: #6f5536; color: #fff; }
.shmoo-grid .f { background: #dc2626; color: #fff; }

/* 脈衝與老煉視覺 */
.pulse-noise-mini { display: flex; flex-direction: column; align-items: center; }
.mini-svg { width: 55px; height: 26px; }
.pulse-lbl { font-size: 8px; font-family: var(--spec-mono); color: #c4a574; }
.chamber-box-mini {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(239, 68, 68, 0.15); border: 1px solid #ef4444;
  padding: 3px 6px; border-radius: 4px;
}
.chamber-temp { font-size: 10px; font-weight: 700; color: #fca5a5; font-family: var(--spec-mono); }
.chamber-time { font-size: 8px; color: #f87171; font-family: var(--spec-mono); }

/* 窄條 Die 與金凸塊視覺 */
.slim-die-mini { width: 56px; }
.die-bar {
  height: 16px; border: 1px solid #eab308; background: #1c1917;
  border-radius: 2px; position: relative; display: flex; flex-direction: column; justify-content: space-between;
}
.die-height { font-size: 7px; color: #fef08a; font-family: var(--spec-mono); text-align: center; }
.gold-bumps { display: flex; justify-content: space-around; padding: 0 2px; }
.gold-bumps i { width: 3px; height: 3px; background: #eab308; border-radius: 50%; }
.reflow-curve-mini {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(245, 158, 11, 0.15); border: 1px solid #f59e0b;
  padding: 3px 6px; border-radius: 4px;
}
.reflow-temp { font-size: 10px; font-weight: 700; color: #fde68a; font-family: var(--spec-mono); }
.reflow-lbl { font-size: 8px; color: #fbbf24; font-family: var(--spec-mono); }

.step-phase-tag {
  font-family: var(--spec-mono);
  font-size: 9.5px;
  color: #c4a574;
  letter-spacing: 0.08em;
}

.step-content h4 {
  font-size: 13.5px;
  margin: 4px 0 8px;
  color: #f8fafc;
  line-height: 1.35;
}

.step-metrics {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.55;
}

.step-metrics li strong { color: #cbd5e1; }

.stepper-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.connector-line {
  width: 20px;
  height: 2px;
  background: #1e3a5f;
}

.connector-arrow {
  color: #c4a574;
  font-size: 11px;
  margin-left: -3px;
}

@media (max-width: 900px) {
  .pipeline-stepper-grid {
    grid-template-columns: 1fr;
  }
  .stepper-connector {
    transform: rotate(90deg);
    margin: 6px 0;
  }
  .flowchart-legend-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   ROUND 2: EDA TIMING & E-INK BIPOLAR WAVEFORM STYLING
   ========================================================= */
.timing-waveform-track {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.waveform-timing-canvas {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.migration-state-machine {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

/* 緊湊型高密度協議卡片 */
.compact-proto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.compact-proto-card {
  background: rgba(3, 16, 26, 0.7);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-proto-card:hover {
  transform: translateY(-2px);
  border-color: #c4a574;
}

.compact-proto-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.compact-proto-badge {
  font-family: var(--spec-mono);
  font-size: 9px;
  font-weight: 700;
  color: #c4a574;
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}

.compact-proto-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 6px;
}

.compact-proto-card p {
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
  margin: 0 0 10px;
}

.compact-proto-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  font-family: var(--spec-mono);
  font-size: 9.5px;
  color: #67e8f9;
}

@media (max-width: 900px) {
  .compact-proto-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   ROUND 4: ATE STATION RACK, COMPACT STAT STRIP & TRUTH GRID
   ========================================================= */

/* --- 1. Compact Hero ATE Stat Strip --- */
.compact-ate-strip {
  margin-top: 24px !important;
  gap: 10px !important;
}

.compact-ate-strip .stat-strip-card:not(.f2-stat-bridge *):not(.m3-stat-bridge *) {
  padding: 12px 14px !important;
  background: #020a12 !important;
  border: 1px solid rgba(30, 58, 95, 0.6) !important;
  border-left-width: 3px !important;
  border-radius: 4px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-top-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.pulse-chip-mini {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c4a574;
  box-shadow: 0 0 6px #c4a574;
  animation: pulse-glow 1.8s infinite;
}

.meta-code {
  font-family: var(--spec-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #64748b;
  text-transform: uppercase;
}

.compact-ate-strip .stat-val {
  font-family: var(--spec-mono);
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin-bottom: 2px;
}

.compact-ate-strip .stat-label {
  font-family: var(--spec-mono);
  font-size: 9.5px !important;
  letter-spacing: 0.08em;
  color: #94a3b8 !important;
  margin-bottom: 4px;
}

.compact-ate-strip .stat-sub {
  font-size: 11px !important;
  line-height: 1.35;
}

/* --- 2. Interactive Labs: ATE Instrument Rack Shell --- */
.interactive-lab-card {
  margin: 20px 0 24px !important;
  background: #020b13 !important;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.08) !important;
  position: relative !important;
}

/* Rack Mount Hex Screws */
.interactive-lab-card::before,
.interactive-lab-card::after {
  content: "+" !important;
  position: absolute !important;
  font-family: var(--spec-mono) !important;
  font-size: 14px !important;
  color: #b5aa9c !important;
  line-height: 1 !important;
  pointer-events: none !important;
  z-index: 5 !important;
}
.interactive-lab-card::before { top: 7px !important; left: 9px !important; }
.interactive-lab-card::after  { top: 7px !important; right: 9px !important; }

.lab-header {
  padding: 10px 18px !important;
  background: linear-gradient(180deg, #061e30 0%, #031320 100%) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.25) !important;
}

.lab-header h3 {
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  margin: 4px 0 2px !important;
}

.lab-header p {
  font-size: 11.5px !important;
  line-height: 1.45 !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

.lab-body-grid {
  padding: 12px 14px !important;
  gap: 12px !important;
}

.lab-subpanel {
  background: rgba(3, 16, 26, 0.8) !important;
  border: 1px solid rgba(30, 58, 95, 0.6) !important;
  border-radius: 4px !important;
  padding: 10px 12px !important; /* Tightened by 40% */
}

.subpanel-title {
  font-family: var(--spec-mono) !important;
  font-size: 11px !important;
  margin-bottom: 8px !important;
}

/* ATE Reticle / Graticule Background for Oscilloscope Canvas */
.canvas-wrapper {
  background: #01060a !important;
  border: 1px solid #1e293b !important;
  border-radius: 4px !important;
  position: relative !important;
  background-image: 
    linear-gradient(rgba(30, 41, 59, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.35) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
}

.canvas-wrapper canvas {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
}

/* ATE Stat Readouts (Digital Instrument Boxes) */
.lab-stat-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  margin-top: 8px !important;
}

.stat-box {
  background: #010810 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 3px !important;
  padding: 5px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.stat-box .stat-label {
  font-family: var(--spec-mono) !important;
  font-size: 8px !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
  text-transform: uppercase !important;
}

.stat-box .stat-val {
  font-family: var(--spec-mono) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
}

/* ATE Control Rows & Sliders */
.control-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 6px !important;
  padding: 6px 10px !important;
  background: #020e18 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 4px !important;
}

.control-row label {
  font-size: 11px !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

.lab-btn {
  padding: 5px 10px !important;
  font-size: 11px !important;
  border-radius: 4px !important;
  letter-spacing: 0.04em !important;
}

.calc-results-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 8px !important;
}

.result-card {
  padding: 8px 10px !important;
  background: #010810 !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 3px !important;
}

.result-card .res-label {
  font-size: 8.5px !important;
  letter-spacing: 0.07em !important;
}

.result-card .res-num {
  font-size: 16px !important;
  font-weight: 800 !important;
  margin: 2px 0 !important;
}

.result-card small {
  font-size: 9.5px !important;
  line-height: 1.3 !important;
}

/* --- 3. 2x2 Contract Truth Grid (Silicon Contract Truth Grid) --- */
.state-contract-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

.contract-truth-card {
  background: #010912 !important;
  border: 1px solid rgba(0, 240, 255, 0.15) !important;
  border-radius: 4px !important;
  padding: 8px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contract-truth-card:hover {
  border-color: rgba(0, 240, 255, 0.4) !important;
  transform: translateY(-1px);
}

.contract-card-code {
  font-family: var(--spec-mono) !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  color: #c4a574 !important;
  margin-bottom: 3px !important;
}

.contract-truth-card strong {
  font-size: 11.5px !important;
  color: #e2e8f0 !important;
  margin-bottom: 2px !important;
}

.contract-truth-card p {
  font-size: 11px !important;
  line-height: 1.4 !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  .state-contract-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- 4. High-Density Decision Tables (Compact EDA Matrix) --- */
.decision-table-modern th {
  padding: 6px 10px !important;
  font-size: 10.5px !important;
  letter-spacing: 0.08em !important;
}

.decision-table-modern td {
  padding: 6px 10px !important;
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

.decision-table-modern td.metric-col {
  font-size: 11px !important;
  font-weight: 700 !important;
}


/* ======================================================================
   【SDFS】簡報級原生 DOM 流程圖系統 (Slide-Deck Native Flowcharts)
   100% Crisp Native DOM Fonts · Zero Blurriness · Executive Presentation Tier
   ====================================================================== */

.deck-flow-container {
  margin: 22px 0 26px;
  background: linear-gradient(180deg, #020b14 0%, #031422 100%);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.deck-flow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: rgba(3, 20, 32, 0.95);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  flex-wrap: wrap;
  gap: 8px;
}

.deck-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deck-slide-badge {
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #c4a574;
  text-transform: uppercase;
}

.deck-flow-header h3,
.deck-flow-header h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  letter-spacing: 0.02em;
}

.deck-header-right {
  font-family: var(--spec-mono);
  font-size: 9.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 頂部簡報時序/信號總線軌 (Executive Timing Rail) */
.deck-timing-rail {
  margin: 12px 16px 0;
  padding: 8px 12px;
  background: #010810;
  border: 1px solid rgba(30, 58, 95, 0.6);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.deck-bus-label {
  font-family: var(--spec-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #c4a574;
  letter-spacing: 0.1em;
}

.deck-signals {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--spec-mono);
  font-size: 9px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}
.signal-chip.cyan  { color: #c4a574; background: rgba(0, 240, 255, 0.12); border: 1px solid rgba(0, 240, 255, 0.3); }
.signal-chip.amber { color: #f59e0b; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3); }
.signal-chip.green { color: #c4a574; background: rgba(196, 165, 116, 0.12); border: 1px solid rgba(196, 165, 116, 0.3); }
.signal-chip.purple{ color: #c4a574; background: rgba(196, 165, 116, 0.12); border: 1px solid rgba(196, 165, 116, 0.3); }

/* 水平階梯導軌 (Pipeline Rail) */
.deck-pipeline-rail {
  display: flex;
  align-items: stretch;
  padding: 16px;
  gap: 10px;
  position: relative;
  overflow-x: auto;
}

/* 階梯卡片 (Step Card) */
.deck-step-card {
  flex: 1;
  min-width: 200px;
  background: #03111d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.deck-step-card:hover {
  border-color: #c4a574;
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.12);
  transform: translateY(-2px);
}

.deck-step-card.border-cyan { border-top: 3px solid #c4a574; }
.deck-step-card.border-amber { border-top: 3px solid #f59e0b; }
.deck-step-card.border-green { border-top: 3px solid #c4a574; }
.deck-step-card.border-purple { border-top: 3px solid #c4a574; }

/* 階梯卡片頭部 */
.deck-step-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.deck-step-num {
  font-family: var(--spec-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #c4a574;
}
.deck-step-card.border-amber .deck-step-num { color: #f59e0b; }
.deck-step-card.border-green .deck-step-num { color: #c4a574; }
.deck-step-card.border-purple .deck-step-num { color: #c4a574; }

.deck-step-status {
  font-family: var(--spec-mono);
  font-size: 8.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  text-transform: uppercase;
}

.deck-step-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 8px;
  line-height: 1.35;
}

/* 純 HTML/CSS 幾何示意舞台 (Crisp Stage) */
.deck-visual-stage {
  background: #01060c;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 10px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 大字呼出指標 (Big Callout Metrics) */
.deck-metric-callout {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
  padding: 5px 8px;
  background: rgba(0, 240, 255, 0.05);
  border-left: 3px solid #c4a574;
  border-radius: 2px;
}
.deck-step-card.border-amber .deck-metric-callout { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.05); }
.deck-step-card.border-green .deck-metric-callout { border-left-color: #c4a574; background: rgba(196, 165, 116, 0.05); }
.deck-step-card.border-purple .deck-metric-callout { border-left-color: #c4a574; background: rgba(196, 165, 116, 0.05); }

.deck-metric-val {
  font-family: var(--spec-mono);
  font-size: 14px;
  font-weight: 800;
  color: #c4a574;
  letter-spacing: 0.02em;
}
.deck-step-card.border-amber .deck-metric-val { color: #fbbf24; }
.deck-step-card.border-green .deck-metric-val { color: #c4a574; }
.deck-step-card.border-purple .deck-metric-val { color: #c4a574; }

.deck-metric-lbl {
  font-size: 8.5px;
  color: #94a3b8;
  font-family: var(--spec-mono);
  text-transform: uppercase;
}

/* 簡報級說明清單 */
.deck-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.deck-bullet-list li strong {
  color: #cbd5e1;
}

/* 簡報級節點連接器 (Pipeline Connectors) */
.deck-rail-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  position: relative;
}
.deck-connector-line {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #1e3a5f, #c4a574);
}
.deck-connector-arrow {
  color: #c4a574;
  font-size: 11px;
  margin-top: -5px;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}
.deck-connector-tag {
  font-family: var(--spec-mono);
  font-size: 7.5px;
  font-weight: 700;
  color: #c4a574;
  background: #031420;
  padding: 1px 4px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 2px;
  margin-top: 4px;
  white-space: nowrap;
}

@media (max-width: 992px) {
  .deck-pipeline-rail {
    flex-direction: column;
  }
  .deck-rail-connector {
    height: 20px;
    width: 100%;
    transform: rotate(90deg);
    margin: 4px 0;
  }
}

/* ======================================================================
   【ABSTRACT FIGURE】晶圓良率救贖視覺圖 (Wafer Die Yield Rescue Infographic)
   用純視覺抽象呈現「泊松缺陷覆蓋」：從 42% 報廢死刑 ➔ 98.6% 全數救回！
   ====================================================================== */

.yield-rescue-figure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #020810;
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 10px;
  position: relative;
}

@media (max-width: 768px) {
  .yield-rescue-figure {
    flex-direction: column;
    gap: 12px;
  }
}

.yield-stage-panel {
  flex: 1;
  background: rgba(3, 16, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.yield-stage-panel.raw-stage { border-top: 3px solid #ef4444; }
.yield-stage-panel.repaired-stage { border-top: 3px solid #c4a574; }

.stage-tag-badge {
  font-family: var(--spec-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.stage-tag-badge.fail { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.stage-tag-badge.pass { background: rgba(196, 165, 116, 0.15); color: #d4b896; border: 1px solid rgba(196, 165, 116, 0.3); }

/* 晶圓抽象圓盤 */
.wafer-abstract-disk {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.8);
}
.fail-disk {
  background: radial-gradient(circle, #1a0808 0%, #080303 100%);
  border: 2px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}
.pass-disk {
  background: radial-gradient(circle, #06241a 0%, #020e0a 100%);
  border: 2px solid rgba(196, 165, 116, 0.6);
  box-shadow: 0 0 15px rgba(196, 165, 116, 0.25);
}

/* 晶片陣列格子 */
.wafer-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 18px);
  gap: 4px;
}

.chip-dot {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--spec-mono);
  font-size: 9px;
  font-weight: 900;
}
.chip-dot.pass { background: #064e3b; color: #a7f3d0; }
.chip-dot.fail { background: #ef4444; color: #ffffff; box-shadow: 0 0 6px #ef4444; }
.chip-dot.rescued { background: #c4a574; color: #ffffff; border: 1px solid #d4b896; box-shadow: 0 0 8px #c4a574; }

.yield-metric-callout {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.yield-number {
  font-family: var(--spec-mono);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}
.fail-color .yield-number { color: #f87171; text-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
.pass-color .yield-number { color: #c4a574; text-shadow: 0 0 12px rgba(196, 165, 116, 0.4); }

.yield-label {
  font-family: var(--spec-mono);
  font-size: 9.5px;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

/* 中間轉換軌道 */
.yield-transform-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.spare-budget-tag {
  display: flex;
  gap: 6px;
}
.spare-badge {
  font-family: var(--spec-mono);
  font-size: 9px;
  font-weight: 700;
  color: #c4a574;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.arrow-motion-track {
  display: flex;
  align-items: center;
  color: #c4a574;
  font-size: 16px;
  text-shadow: 0 0 8px #c4a574;
}
.arrow-shaft {
  width: 45px;
  height: 2px;
  background: linear-gradient(90deg, #c4a574, #c4a574);
}
@media (max-width: 768px) {
  .arrow-motion-track {
    transform: rotate(90deg);
  }
}

.transform-micro-label {
  font-family: var(--spec-mono);
  font-size: 8.5px;
  color: #67e8f9;
  letter-spacing: 0.08em;
  text-align: center;
}

.figure-math-reference {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--spec-mono);
  font-size: 9px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}


/* ==========================================================================
   PURE ABSTRACT VISUAL INFOGRAPHICS (KEYNOTE SLIDE-DECK GRADE)
   Zero Prose Sentences · 100% Vector HTML5/SVG · Presentation Metaphor
   ========================================================================== */

/* 抽象圖形舞台外框 */
.figure-container-abstract {
  background: radial-gradient(circle at top left, rgba(0, 240, 255, 0.05), transparent 70%),
              radial-gradient(circle at bottom right, rgba(196, 165, 116, 0.05), transparent 70%),
              rgba(10, 15, 29, 0.95) !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.1) !important;
  padding: 20px !important;
}

/* 抽象圖形主舞台：三列分佈 (Left / Center / Right) */
.abstract-figure-stage {
  display: grid;
  grid-template-columns: 1fr 140px 1fr;
  align-items: center;
  gap: 16px;
  background: rgba(4, 7, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0 12px;
}

@media (max-width: 900px) {
  .abstract-figure-stage {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* 舞台子區塊通用標題標籤 */
.plot-title-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plot-title-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #c4a574;
  border-radius: 50%;
  box-shadow: 0 0 6px #c4a574;
}

/* 向量 SVG 圖表畫布 */
.plot-graph-canvas {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px;
}

.abstract-vector-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* 中間抽象轉換連接器 (Transform Connector) */
.abstract-transform-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.trim-code-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #c4a574;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid #c4a574;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.transform-micro-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.3;
}

/* 右側高斯收斂條狀圖 (Topic 01) */
.abstract-gauge-panel {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
}

.gauge-spread-comparison {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.spread-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  align-items: center;
  gap: 8px;
}

.spread-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
}

.spread-bar-wrap {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  overflow: hidden;
}

.spread-bar.raw-bar {
  width: 90%;
  height: 100%;
  background: linear-gradient(90deg, #f43f5e, #fb7185);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

.spread-bar.locked-bar {
  width: 15%;
  height: 100%;
  background: linear-gradient(90deg, #c4a574, #c4a574);
  box-shadow: 0 0 8px rgba(196, 165, 116, 0.5);
}

.spread-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.spread-val.fail-val { color: #f43f5e; }
.spread-val.pass-val { color: #c4a574; }

.spread-row.action-row {
  grid-template-columns: 1fr;
  text-align: center;
}

.spread-chip-action {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #c4a574;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px dashed rgba(56, 189, 248, 0.4);
}

.convergence-rate-callout {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: rgba(196, 165, 116, 0.08);
  border: 1px solid rgba(196, 165, 116, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
}

.rate-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 900;
  color: #c4a574;
}

.rate-text {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
}

/* Topic 02: 晶圓大網格圖案 (Large Wafer Die Grid) */
.wafer-mini-grid-large {
  display: grid;
  grid-template-columns: repeat(4, 16px);
  grid-template-rows: repeat(4, 16px);
  gap: 4px;
}

.chip-die {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
}

.chip-die.pass {
  background: rgba(196, 165, 116, 0.25);
  border: 1px solid #c4a574;
  color: #c4a574;
}

.chip-die.fail {
  background: rgba(244, 63, 94, 0.35);
  border: 1px solid #f43f5e;
  color: #f43f5e;
  animation: pulse-fail 1.5s infinite;
}

.chip-die.rescued {
  background: rgba(0, 240, 255, 0.35);
  border: 1px solid #c4a574;
  color: #c4a574;
  box-shadow: 0 0 8px #c4a574;
}

/* Topic 03: De-Mura 螢幕平坦化對比 */
.demura-visual-pair {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
}

.demura-screen {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  width: 110px;
}

.screen-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  margin-bottom: 6px;
}

.fail-label { color: #f43f5e; }
.pass-label { color: #c4a574; }

.screen-matrix {
  display: grid;
  grid-template-columns: repeat(3, 14px);
  gap: 3px;
  justify-content: center;
  margin-bottom: 6px;
}

.m-pixel {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.m-pixel.p-hi { background: #fbbf24; }
.m-pixel.p-mid { background: #f59e0b; }
.m-pixel.p-lo { background: #b45309; }
.m-pixel.p-dark { background: #78350f; }
.m-pixel.p-clean { background: #c4a574; box-shadow: 0 0 4px #c4a574; }

.screen-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
}

.fail-sub { color: #f43f5e; }
.pass-sub { color: #c4a574; }
.demura-arrow { font-size: 16px; color: #c4a574; }

/* Topic 04: E-Ink 速度階躍與雙粒子微膠囊 */
.stokes-speedup-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speed-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.speed-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
}

.speed-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.speed-fill.fill-5v {
  width: 10%;
  height: 100%;
  background: #f43f5e;
}

.speed-fill.fill-50v {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #c4a574, #c4a574);
  box-shadow: 0 0 10px #c4a574;
}

.speed-delay {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
}

.fail-text { color: #f43f5e; }
.pass-text { color: #c4a574; }

.abstract-microcapsule-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.capsule-visual-sphere {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #c4a574;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.15), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
}

.capsule-electrode {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
}

.top-electrode {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-bottom: 1px solid #fff;
}

.bottom-electrode {
  background: rgba(0, 0, 0, 0.6);
  color: #94a3b8;
  border-top: 1px solid #64748b;
}

.capsule-interior {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.particle-cluster {
  display: flex;
  gap: 4px;
}

.p-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
}

.p-dot.w-dot {
  background: #0e2a38;
  color: #f3ebe0;
  box-shadow: 0 0 6px #fff;
}

.p-dot.b-dot {
  background: #000000;
  color: #94a3b8;
  border: 1px solid #475569;
}

.viscous-fluid-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: #c4a574;
}

.capsule-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #94a3b8;
  font-weight: 700;
}

.bistable-kpi-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.bistable-meter-box {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 8px;
}

.meter-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 900;
  color: #c4a574;
  display: block;
}

.meter-val small { font-size: 12px; }

.meter-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
}

.bistable-state-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #c4a574;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  padding: 4px 6px;
}

/* 底部真實真相指示條 (Truth Strip) */
.abstract-truth-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 12px;
}

@media (max-width: 768px) {
  .abstract-truth-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.truth-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pill-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
}

.pill-v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #c4a574;
}

/* ==========================================================================
   STATE CONTRACT TRUTH GRID & SLIDE CARD CHIPS (NO PROSE ESSAYS)
   ========================================================================== */
.contract-kpi {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #c4a574;
  margin: 4px 0 6px;
}

.contract-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.contract-spec-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 2px 6px;
}

.deck-chip-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.deck-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 4px 8px;
}

.chip-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

.chip-v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.chip-v.cyan { color: #c4a574; }
.chip-v.green { color: #c4a574; }
.chip-v.amber { color: #f59e0b; }
.chip-v.rose { color: #f43f5e; }
.chip-v.purple { color: #c4a574; }


/* Circuit Topology Annotation Note */
.figure-topology-note {
  margin-top: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(0, 240, 255, 0.25);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.figure-topology-note .note-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 800;
  color: #c4a574;
  background: rgba(0, 240, 255, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}


/* ATE FuseBox Glow & Resistance Badges */
.fuse-entry.burned-glow {
  border-color: rgba(245, 158, 11, 0.8) !important;
  background: rgba(245, 158, 11, 0.08) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
}

.fuse-state.state-burned {
  background: rgba(245, 158, 11, 0.25) !important;
  border: 1px solid #f59e0b !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
  font-weight: 800;
}

.fuse-res-tag {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid #c4a574;
  border-radius: 3px;
  color: #c4a574;
  font-size: 9.5px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  margin-left: 6px;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

/* E-Ink Waveform Timing Track */
.waveform-timing-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  margin: 10px 0 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.waveform-timing-track .timing-step {
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
}

.waveform-timing-track .step-shake {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid #c4a574;
  color: #c4a574;
}

.waveform-timing-track .step-clear {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid #f59e0b;
  color: #f59e0b;
}

.waveform-timing-track .step-drive {
  background: rgba(196, 165, 116, 0.15);
  border: 1px solid #c4a574;
  color: #c4a574;
  box-shadow: 0 0 8px rgba(196, 165, 116, 0.3);
}

.waveform-timing-track .timing-sep {
  color: #64748b;
  font-weight: 800;
}
