/* ==========================================================================
   增材制造知识分享 · 层迹舱
   Light Industrial Exhibition Hall Stylesheet
   Bone-white gallery surface (#F6F5F1), graphite ink (#14181F), single cobalt
   accent (#0F52BA). Clean editorial spacing, zero background grid clutter.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg-hall: #F6F5F1;
  --bg-plinth: #ECEAE3;
  --bg-surface: #FFFFFF;
  --bg-code: #161A22;
  --text-code: #F1F5F9;

  --ink-primary: #14181F;
  --ink-secondary: #434B59;
  --ink-muted: #68707E;

  --rule-hairline: #DCD9D0;
  --rule-strong: #14181F;

  --accent: #0F52BA;
  --accent-hover: #0A3D8F;
  --accent-ink: #FFFFFF;
  --accent-tint: rgba(15, 82, 186, 0.08);

  --radius-sm: 4px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --z-header: 20;
  --z-skip: 40;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-hall);
  color: var(--ink-primary);
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg-hall);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: var(--z-skip);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease-out-expo);
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--ink-primary);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: 60px;
  background-color: rgba(246, 245, 241, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-hairline);
}

.header-inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--ink-primary);
  color: var(--bg-hall);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.brand-titles {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-cn {
  font-size: 17px;
  font-weight: 800;
}

.brand-service {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding-left: 10px;
  border-left: 1px solid var(--rule-hairline);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo);
}

.nav-link:hover {
  color: var(--ink-primary);
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   Section 1: Light Exhibition Hero + 3D Specimen Turntable & 2D Diagram
   ========================================================================== */

.hero-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 44px;
  border-bottom: 1px solid var(--rule-hairline);
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 40px;
  align-items: start;
}

.hero-copy {
  padding-top: 12px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
}

.hero-lead {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 36ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--rule-hairline);
}

.btn-secondary:hover {
  border-color: var(--ink-primary);
}

.btn-primary:active,
.btn-secondary:active {
  transform: translateY(1px);
}

/* Exhibition Plinth */
.specimen-plinth {
  background: var(--bg-surface);
  border: 1px solid var(--rule-hairline);
  border-top: 2px solid var(--ink-primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px 18px;
  min-width: 0;
}

.plinth-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.view-switch-group,
.camera-group,
.preset-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slicer-preset,
.ved-preset,
.stage-btn,
.cam-btn {
  background: var(--bg-hall);
  color: var(--ink-secondary);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s var(--ease-out-expo), color 0.15s var(--ease-out-expo), border-color 0.15s var(--ease-out-expo);
}

.slicer-preset:hover,
.ved-preset:hover,
.stage-btn:hover,
.cam-btn:hover {
  color: var(--ink-primary);
  border-color: var(--ink-secondary);
}

.slicer-preset.is-active,
.ved-preset.is-active,
.stage-btn.is-active {
  background: var(--ink-primary);
  color: var(--bg-surface);
  border-color: var(--ink-primary);
}

.cam-btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Viewport Container */
.specimen-viewport {
  position: relative;
  width: 100%;
  height: 310px;
  background: var(--bg-hall);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}

.webgl-stage {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: grab;
  touch-action: none;
}

.webgl-stage:active {
  cursor: grabbing;
}

.webgl-stage[hidden],
.fallback-2d-stage[hidden],
.camera-group[hidden] {
  display: none !important;
}

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

.fallback-2d-stage {
  width: 100%;
  height: 100%;
  position: relative;
}

#slicer-canvas-2d {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

/* Legend Strip */
.specimen-legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg-hall);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.legend-swatch-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch-box {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.swatch-normal {
  background: #E5E4DF;
  border: 1px solid #94A3B8;
}

.swatch-active {
  background: #0F52BA;
}

.swatch-below-ref {
  background: #D97706;
}

/* Controls & Presets below Viewport */
.slicer-controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-hall);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.slicer-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.slicer-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-secondary);
}

.slicer-field label strong {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

.slicer-field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.slicer-field select {
  width: 100%;
  height: 28px;
  padding: 0 6px;
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.plinth-presets-below {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.presets-caption {
  font-size: 12px;
  color: var(--ink-muted);
}

/* Readout Strip */
.slicer-readout-strip {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 0.72fr 1.18fr;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-hairline);
  padding: 10px 0;
  gap: 12px;
  margin-bottom: 8px;
}

.readout-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-right: 10px;
  border-right: 1px solid var(--rule-hairline);
}

.readout-item:last-child {
  border-right: none;
  padding-right: 0;
}

.readout-label {
  font-size: 11px;
  color: var(--ink-muted);
}

.readout-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: normal;
  overflow-wrap: anywhere;
}

.readout-val.is-accent {
  color: var(--accent);
}

.slicer-diagnosis {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Shared Section Layout
   ========================================================================== */

.dossiers-section,
.ved-section,
.atlas-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 24px;
  border-bottom: 1px solid var(--rule-hairline);
}

.section-intro {
  margin-bottom: 32px;
  max-width: 70ch;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.25;
  font-weight: 800;
}

.section-sub {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 15px;
}

/* ==========================================================================
   Section 2: Three Complete Technical Dossiers
   ========================================================================== */

.dossier-workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  align-items: start;
}

.dossier-index {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.index-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink-primary);
}

.index-caption {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.view-mode-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo);
}

.view-mode-btn:hover,
.view-mode-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.dossier-tab-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dossier-tab {
  text-align: left;
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo);
}

.dossier-tab:hover {
  border-color: var(--ink-secondary);
}

.dossier-tab.is-active {
  border-color: var(--ink-primary);
  background: var(--bg-plinth);
  box-shadow: inset 0 2px 0 0 var(--accent);
}

.tab-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.tab-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.tab-meta {
  font-size: 12px;
  color: var(--ink-muted);
}

.tab-meta code {
  font-family: var(--font-mono);
  color: var(--ink-secondary);
}

.dossier-stage {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.dossier-article {
  background: var(--bg-surface);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  padding: 32px 36px;
  min-width: 0;
}

.dossier-article[hidden] {
  display: none;
}

.article-header {
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rule-hairline);
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

.article-id {
  background: var(--ink-primary);
  color: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 700;
}

.article-topic {
  color: var(--ink-muted);
}

.article-title {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 1.9vw, 1.68rem);
  line-height: 1.32;
  font-weight: 800;
}

.article-deck {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.article-body h4 {
  margin: 26px 0 10px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink-primary);
}

.article-body h4:first-child {
  margin-top: 0;
}

.article-body p {
  margin: 0 0 14px;
  color: var(--ink-primary);
}

.article-body a,
.overhead-desc a,
.bento-desc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover,
.overhead-desc a:hover,
.bento-desc a:hover {
  color: var(--accent-hover);
}

.editorial-list {
  margin: 0 0 16px;
  padding-left: 20px;
}

.editorial-list li {
  margin-bottom: 8px;
}

.article-body code,
.section-sub code,
.overhead-desc code,
.empty-state code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-plinth);
  padding: 2px 5px;
  border-radius: 3px;
}

.code-frame {
  margin: 14px 0 18px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--rule-hairline);
  background: var(--bg-code);
  color: var(--text-code);
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #CBD5E1;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 3px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease-out-expo), border-color 0.15s var(--ease-out-expo);
}

.copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.code-frame pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
}

.code-frame pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.spec-table-wrap {
  overflow-x: auto;
  margin: 14px 0 18px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.spec-table th {
  font-size: 12.5px;
  color: var(--ink-secondary);
  padding: 10px 12px;
  border-bottom: 2px solid var(--ink-primary);
  white-space: nowrap;
}

.spec-table td {
  padding: 11px 12px;
  vertical-align: top;
}

.spec-table tbody tr:nth-child(even) {
  background: var(--bg-hall);
}

/* ==========================================================================
   Section 3: Dual-Process Energy & Flow Workbench
   ========================================================================== */

.workbench-grid {
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: 28px;
  align-items: start;
}

.tool-panel {
  background: var(--bg-surface);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  padding: 24px 26px;
  min-width: 0;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--rule-hairline);
}

.panel-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
}

.calc-form input,
.calc-form select,
.search-box input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-hall);
  color: var(--ink-primary);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 14px;
}

.calc-form input:hover,
.calc-form select:hover,
.search-box input:hover {
  border-color: var(--ink-secondary);
}

.form-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.result-cell {
  padding: 12px 14px;
  background: var(--bg-hall);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-cell.is-highlighted {
  border-color: var(--ink-primary);
  background: var(--bg-surface);
}

.result-label {
  font-size: 12px;
  color: var(--ink-secondary);
}

.result-val {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink-primary);
}

.result-cell.is-highlighted .result-val {
  color: var(--accent);
}

.result-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.overhead-card {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-hall);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
}

.overhead-title {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 800;
}

.overhead-desc {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.overhead-desc:last-child {
  margin-bottom: 0;
}

.formula-strip {
  padding: 7px 10px;
  margin-bottom: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}

/* ==========================================================================
   Section 4: Asymmetric 5-Cell Bento Calibration Atlas
   ========================================================================== */

.atlas-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.search-box {
  min-width: 260px;
  flex: 0 1 340px;
}

.search-box input {
  width: 100%;
  font-family: var(--font-sans);
}

.bento-atlas {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.bento-cell {
  background: var(--bg-surface);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.bento-cell[hidden] {
  display: none;
}

.bento-cell.span-7 {
  grid-column: span 7;
  background: var(--bg-plinth);
  border-color: var(--ink-primary);
}

.bento-cell.span-5 {
  grid-column: span 5;
}

.bento-cell.span-4 {
  grid-column: span 4;
}

.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bento-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
}

.bento-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.bento-cell pre {
  margin: auto 0 0;
  padding: 11px 13px;
  background: var(--bg-code);
  color: var(--text-code);
  border: 1px solid var(--rule-hairline);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.bento-cell .copy-btn {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--rule-hairline);
}

.bento-cell .copy-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.empty-state {
  padding: 24px;
  text-align: center;
  background: var(--bg-plinth);
  border: 1px dashed var(--rule-hairline);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
}

/* ==========================================================================
   Footer & Centered ICP Filing Bar
   ========================================================================== */

.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 44px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}

.footer-brand {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Centered Filing Bar: Directly present in static HTML */
.filing-bar {
  padding-top: 16px;
  border-top: 1px solid var(--rule-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-secondary);
}

.filing-service-name {
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-weight: 600;
}

.filing-link {
  color: var(--ink-primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s var(--ease-out-expo);
}

.filing-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.filing-sep {
  color: var(--rule-hairline);
}

/* ==========================================================================
   Explicit Mobile Collapse (< 768px) - Full 3D Model Fits First Screen at 390px
   ========================================================================== */

@media (max-width: 1080px) {
  .hero-grid,
  .dossier-workspace,
  .workbench-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .dossier-index {
    position: static;
  }

  .slicer-controls {
    grid-template-columns: repeat(3, 1fr);
  }

  .bento-cell.span-7,
  .bento-cell.span-5,
  .bento-cell.span-4 {
    grid-column: span 6;
  }
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 64px;
  }

  .site-header {
    height: auto;
    min-height: 48px;
    padding: 6px 0;
  }

  .header-inner {
    padding: 0 14px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .brand-cn {
    font-size: 15.5px;
  }

  .brand-service {
    font-size: 12px;
    padding-left: 8px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px solid var(--rule-hairline);
  }

  .nav-link {
    font-size: 12.5px;
    padding: 2px 0;
  }

  .hero-section {
    padding: 14px 14px 28px;
  }

  .hero-grid {
    gap: 14px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  .hero-lead {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .hero-cta-row {
    display: none;
  }

  .specimen-plinth {
    padding: 12px;
  }

  .plinth-top-bar {
    margin-bottom: 8px;
    gap: 6px;
  }

  .stage-btn,
  .cam-btn,
  .slicer-preset {
    padding: 4px 8px;
    font-size: 11.5px;
  }

  .specimen-viewport {
    height: 236px;
    margin-bottom: 8px;
  }

  .specimen-legend-bar {
    padding: 5px 8px;
    font-size: 11px;
    gap: 6px;
  }

  .slicer-controls {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }

  .slicer-readout-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .readout-item {
    border-right: none;
    padding-right: 0;
  }

  .dossiers-section,
  .ved-section,
  .atlas-section {
    padding: 32px 14px;
  }

  .dossier-article,
  .tool-panel {
    padding: 18px 14px;
  }

  .field-row,
  .bento-atlas {
    grid-template-columns: 1fr;
  }

  .bento-cell.span-7,
  .bento-cell.span-5,
  .bento-cell.span-4 {
    grid-column: 1 / -1;
  }

  .search-box {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
