/* ==========================================================================
   SIEVE.BIO — BRIGHT ANTI-DESIGN SYSTEM (TYPESAFE AI × KILN × TRAE)
   Typography:
     - Display & Geometric UI: Futura & Futura 初版 (Paul Renner 1927 Proto-Futura / ss01)
     - Reference Sans & Terminal: Die Grotesk C + LisaTerminal Paper 2X3Y + JetBrains Mono / IBM Plex Mono
   ========================================================================== */

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

/* Local & Self-Hosted Futura + Futura 初版 (Paul Renner 1927 Proto-Futura) */
@font-face {
  font-family: 'FuturaLocal';
  src: local('Futura'), local('Futura-Medium'), url('/assets/fonts/Futura.ttc') format('truetype');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaLocal';
  src: local('Futura-Bold'), local('Futura-CondensedExtraBold'), url('/assets/fonts/Futura.ttc') format('truetype');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaProto1927';
  src: local('Futura Renner'), local('Architype Renner'), url('/assets/fonts/FuturaProto-Medium.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaProto1927';
  src: local('Futura Renner'), local('Architype Renner'), url('/assets/fonts/FuturaProto-Bold.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaProto1927';
  src: local('Futura Renner'), local('Architype Renner'), url('/assets/fonts/FuturaProto-ExtraBold.woff2') format('woff2');
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

/* Reference Website Fonts (TypeSafe AI) */
@font-face {
  font-family: 'Die Grotesk C';
  src: url('/assets/fonts/DieGroteskC-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Die Grotesk C';
  src: url('/assets/fonts/DieGroteskC-Medium.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LisaTerminal Paper 2X3Y';
  src: url('/assets/fonts/LisaTerminalPaper-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-frame: #DEDEDE;
  --bg-paper: #FEFEFE;
  --bg-panel: #F4F4F2;
  --bg-subtle: #EBEBE8;
  --ink: #1E1E1E;
  --ink-muted: #525252;
  --ink-dim: #787878;
  --pink: #F386A1;
  --pink-soft: rgba(243, 134, 161, 0.16);
  --pink-deep: #C84669;
  --teal: #09AEA1;
  --teal-soft: rgba(9, 174, 161, 0.14);
  --teal-deep: #05786E;
  --green: #03AA5C;
  --green-soft: rgba(3, 170, 92, 0.14);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.14);

  /* Primary Typography: Futura + Futura 初版 (1927 Proto-Futura) + TypeSafe Reference Fonts */
  --font-display: 'FuturaProto1927', 'FuturaLocal', 'Futura', 'Die Grotesk C', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --font-sans: 'FuturaLocal', 'Futura', 'FuturaProto1927', 'Die Grotesk C', 'PingFang SC', 'Noto Sans SC', -apple-system, sans-serif;
  --font-terminal: 'LisaTerminal Paper 2X3Y', 'JetBrains Mono', 'IBM Plex Mono', monospace;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --border-hairline: 1px solid #1E1E1E;
  --border-strong: 1.5px solid #1E1E1E;
  --shadow-hard: 4px 4px 0px #1E1E1E;
  --shadow-hard-sm: 2px 2px 0px #1E1E1E;
  --shadow-pink: 4px 4px 0px #F386A1;
  --shadow-teal: 4px 4px 0px #09AEA1;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  background-color: var(--bg-frame);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01" 1, "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-frame);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.52;
}

h1, h2, h3, .hero-title, .h2-arch, .h3-arch, .brand-title, .kpi-val, .footer-watermark {
  font-family: var(--font-display);
  font-feature-settings: "ss01" 1, "salt" 1, "kern" 1;
}

/* Bilingual visibility helpers */
html[data-lang="zh"] .lang-en { display: none !important; }
html[data-lang="en"] .lang-zh { display: none !important; }

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  max-width: 100%;
  display: block;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

.terminal-type {
  font-family: var(--font-terminal);
}

/* ==========================================================================
   FULL-BLEED ARCHITECTURAL SHELL (100% SCREEN UTILIZATION)
   ========================================================================== */

.site-shell {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  border-left: var(--border-hairline);
  border-right: var(--border-hairline);
  background: var(--bg-paper);
}

/* Top Telemetry Ticker Strip */
.telemetry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--bg-paper);
  font-family: var(--font-terminal);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 0.38rem 1.25rem;
  border-bottom: var(--border-hairline);
  overflow-x: auto;
  white-space: nowrap;
  gap: 1.5rem;
}

.telemetry-left, .telemetry-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dot-live {
  width: 7px;
  height: 7px;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 6px var(--green);
}

.dot-pink {
  width: 7px;
  height: 7px;
  background: var(--pink);
  display: inline-block;
}

.dot-teal {
  width: 7px;
  height: 7px;
  background: var(--teal);
  display: inline-block;
}

/* Sticky Anti-Design Navigation Header */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  background: rgba(254, 254, 254, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: var(--border-strong);
}

.brand-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.35rem;
  border-right: var(--border-hairline);
  background: var(--bg-paper);
  transition: background 0.15s ease;
}

.brand-cell:hover {
  background: var(--bg-panel);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: var(--border-strong);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--pink);
}

.brand-mark img {
  width: 20px;
  height: 20px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.38rem;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.08rem 0.35rem;
  border: 1px solid var(--ink);
  background: var(--bg-frame);
  color: var(--ink);
}

.nav-branches {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  align-items: stretch;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-right: var(--border-hairline);
  font-family: var(--font-display);
  font-size: 0.82rem;
  position: relative;
  transition: background 0.12s ease, color 0.12s ease;
  background: transparent;
}

.nav-tab:hover {
  background: var(--bg-frame);
}

.nav-tab.active {
  background: var(--ink);
  color: var(--bg-paper);
}

.nav-tab.active .tab-idx {
  color: var(--pink);
}

.nav-tab.active .tab-desc {
  color: #CFCFCF;
}

.tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tab-idx {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-dim);
  font-weight: 500;
}

.tab-desc {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin-top: 0.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  background: var(--bg-panel);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: var(--border-strong);
  background: var(--bg-paper);
  box-shadow: var(--shadow-hard-sm);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.lang-opt {
  padding: 0.35rem 0.65rem;
  transition: all 0.12s ease;
}

.lang-opt.active {
  background: var(--ink);
  color: var(--bg-paper);
}

/* ==========================================================================
   GRID LAYOUT & ANTI-DESIGN CELLS
   ========================================================================== */

.grid-row {
  display: grid;
  width: 100%;
  border-bottom: var(--border-hairline);
}

.cols-12 {
  grid-template-columns: repeat(12, 1fr);
}

.col-12 { grid-column: span 12; }
.col-9  { grid-column: span 9; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

.cell {
  position: relative;
  padding: clamp(2rem, 3.2vw, 3.1rem);
  border-right: var(--border-hairline);
  background: var(--bg-paper);
  min-width: 0;
  max-width: 100%;
}

.cell:last-child {
  border-right: none;
}

.cell-frame { background: var(--bg-frame); }
.cell-panel { background: var(--bg-panel); }
.cell-subtle { background: var(--bg-subtle); }
.cell-ink { background: var(--ink); color: var(--bg-paper); }

.cell-halftone {
  background-color: var(--bg-frame);
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 10px 10px;
}

.cell-dither {
  background-color: var(--bg-paper);
  background-image:
    linear-gradient(to right, rgba(30,30,30,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30,30,30,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Exposed Coordinate Header inside Cells */
.cell-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-terminal);
  font-size: 0.72rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(30, 30, 30, 0.25);
}

.cell-ink .cell-meta {
  color: #A0A0A0;
  border-bottom-color: rgba(254, 254, 254, 0.2);
}

.coord-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--ink);
}

.cell-ink .coord-tag {
  color: var(--bg-paper);
}

.coord-tag::before {
  content: "■";
  color: var(--pink-deep);
  font-size: 0.65rem;
}

.coord-tag.teal::before { color: var(--teal); }
.coord-tag.green::before { color: var(--green); }

/* Section Strip Banner (TypeSafe "[01] SECTION" bar) */
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.85rem clamp(1.15rem, 2.8vw, 2.25rem);
  background: var(--bg-frame);
  border-bottom: var(--border-strong);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-bar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.idx-pill {
  font-family: var(--font-mono);
  background: var(--ink);
  color: var(--bg-paper);
  padding: 0.18rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.idx-pill.pink {
  background: var(--pink);
  color: var(--ink);
  border: 1px solid var(--ink);
}

.idx-pill.teal {
  background: var(--teal);
  color: var(--bg-paper);
  border: 1px solid var(--ink);
}

/* ==========================================================================
   SIDE-BY-SIDE PRODUCT INTRO + RENDERED UI PREVIEW SHOWCASE
   ========================================================================== */

.product-split-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  width: 100%;
  border-bottom: var(--border-strong);
  background: var(--bg-paper);
}

.product-intro-col {
  grid-column: span 5;
  padding: clamp(2rem, 3.4vw, 3.25rem);
  border-right: var(--border-hairline);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--bg-paper);
  min-width: 0;
  max-width: 100%;
}

.product-ui-col {
  grid-column: span 7;
  padding: clamp(1.6rem, 3vw, 2.75rem);
  background: var(--bg-panel);
  background-image:
    linear-gradient(to right, rgba(30,30,30,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30,30,30,0.045) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
}

.ui-preview-frame {
  border: var(--border-strong);
  background: var(--bg-paper);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ui-preview-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ui-preview-tabs {
  display: inline-flex;
  gap: 0.35rem;
}

.ui-tab-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #CFCFCF;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ui-tab-pill:hover {
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.ui-tab-pill.active {
  background: var(--pink);
  color: var(--ink);
  border-color: var(--pink);
}

.ui-tab-pill.teal.active {
  background: var(--teal);
  color: var(--bg-paper);
  border-color: var(--teal);
}

.ui-preview-viewport {
  position: relative;
  background: #F7F7F8;
  overflow: hidden;
}

.ui-preview-viewport img.ui-shot {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.ui-preview-footer {
  padding: 0.55rem 0.9rem;
  border-top: var(--border-hairline);
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   HERO WITH TRAE × TYPESAFE INTERACTIVE DYNAMIC BACKGROUND
   ========================================================================== */

.hero-stage {
  position: relative;
  overflow: hidden;
  background: var(--bg-paper);
  border-bottom: var(--border-strong);
}

.hero-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

.hero-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  min-height: 540px;
}

.hero-main {
  grid-column: span 8;
  padding: clamp(2.25rem, 3.8vw, 3.6rem);
  border-right: var(--border-hairline);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
  background: linear-gradient(135deg, rgba(254,254,254,0.94) 0%, rgba(254,254,254,0.78) 65%, rgba(254,254,254,0.5) 100%);
  backdrop-filter: blur(2px);
  min-width: 0;
  max-width: 100%;
}

.hero-aside {
  grid-column: span 4;
  padding: clamp(1.75rem, 2.8vw, 2.6rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  background: rgba(244, 244, 242, 0.86);
  backdrop-filter: blur(3px);
  min-width: 0;
  max-width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.7rem;
  border: var(--border-strong);
  background: var(--bg-paper);
  box-shadow: var(--shadow-hard-sm);
  width: fit-content;
  margin-bottom: 1.35rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.2vw, 4.15rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero-title .hl-ink {
  background: var(--ink);
  color: var(--bg-paper);
  padding: 0 0.28rem;
  display: inline-block;
}

.hero-title .hl-pink {
  background: var(--pink);
  color: var(--ink);
  padding: 0 0.28rem;
  border: 1.5px solid var(--ink);
  display: inline-block;
}

.hero-title .hl-teal {
  background: var(--teal);
  color: var(--bg-paper);
  padding: 0 0.28rem;
  border: 1.5px solid var(--ink);
  display: inline-block;
}

.hero-lead {
  font-size: 1.04rem;
  line-height: 1.64;
  color: var(--ink-muted);
  max-width: 76ch;
  margin-bottom: 1.75rem;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 700;
}

/* 3D Sculpture Showcase Frame */
.sculpture-card {
  border: var(--border-strong);
  background: var(--bg-paper);
  box-shadow: var(--shadow-hard);
  position: relative;
  overflow: hidden;
}

.sculpture-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.42rem 0.75rem;
}

.sculpture-stage {
  position: relative;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(243, 134, 161, 0.14), rgba(9, 174, 161, 0.08) 55%, transparent 75%),
    linear-gradient(to right, rgba(30,30,30,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30,30,30,0.05) 1px, transparent 1px);
  background-size: 100% 100%, 20px 20px, 20px 20px;
  min-height: 290px;
}

.sculpture-stage img {
  width: 280px;
  height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(30, 30, 30, 0.12));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sculpture-card:hover .sculpture-stage img {
  transform: scale(1.04) translateY(-3px);
}

.sculpture-caption {
  padding: 0.65rem 0.85rem;
  border-top: var(--border-hairline);
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   KILN-STYLE TECHNICAL TOOL WINDOWS & INTERACTIVE CONSOLES
   ========================================================================== */

.tool-window {
  border: var(--border-strong);
  background: var(--bg-paper);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.window-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.win-dot {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255,255,255,0.4);
  display: inline-block;
}

.win-dot.pink { background: var(--pink); border-color: var(--pink); }
.win-dot.teal { background: var(--teal); border-color: var(--teal); }
.win-dot.green { background: var(--green); border-color: var(--green); }

.window-body {
  padding: 1.25rem;
  flex: 1;
}

/* Buttons & Action Links (Anti-Design Brutalist + Futura Geometric) */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.62rem 1.1rem;
  border: var(--border-strong);
  background: var(--bg-paper);
  color: var(--ink);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.12s ease;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard);
  background: var(--bg-frame);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg-paper);
}

.btn-primary:hover {
  background: #333333;
  color: var(--bg-paper);
}

.btn-pink {
  background: var(--pink);
  color: var(--ink);
}

.btn-pink:hover {
  background: #f69bb2;
}

.btn-teal {
  background: var(--teal);
  color: var(--bg-paper);
}

.btn-teal:hover {
  background: #0bc2b3;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--ink);
  background: var(--bg-panel);
  color: var(--ink);
  text-transform: uppercase;
}

.badge-pink {
  background: var(--pink-soft);
  color: var(--pink-deep);
  border-color: var(--pink-deep);
}

.badge-teal {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: var(--teal-deep);
}

.badge-green {
  background: var(--green-soft);
  color: #027A40;
  border-color: #027A40;
}

.badge-amber {
  background: var(--amber-soft);
  color: #9A5203;
  border-color: #9A5203;
}

.badge-ink {
  background: var(--ink);
  color: var(--bg-paper);
}

/* Metric KPI Tiles */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  border-top: var(--border-hairline);
  border-left: var(--border-hairline);
}

.kpi-cell {
  padding: 1rem 1.15rem;
  border-right: var(--border-hairline);
  border-bottom: var(--border-hairline);
  background: var(--bg-paper);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
}

.kpi-val {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}

.kpi-val.pink { color: var(--pink-deep); }
.kpi-val.teal { color: var(--teal-deep); }
.kpi-val.green { color: var(--green); }

.kpi-sub {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}

/* ==========================================================================
   SCIENTIFIC TABLES & BENCHMARK MATRICES
   ========================================================================== */

.table-wrap,
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--border-strong);
  background: var(--bg-paper);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.data-table th {
  background: var(--ink);
  color: var(--bg-paper);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.9rem;
  border-right: 1px solid #3A3A3A;
  white-space: nowrap;
}

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

.data-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: var(--border-hairline);
  border-right: var(--border-hairline);
  vertical-align: top;
}

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

.data-table tr:nth-child(even) td {
  background: var(--bg-panel);
}

.data-table tr.row-highlight td {
  background: rgba(9, 174, 161, 0.11);
  font-weight: 600;
}

.data-table tr.row-pink td {
  background: rgba(243, 134, 161, 0.13);
}

/* Formula Display Box */
.formula-box {
  border: var(--border-strong);
  background: var(--bg-panel);
  padding: 1.15rem 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
  box-shadow: var(--shadow-hard-sm);
  margin: 0.85rem 0;
  overflow-x: auto;
}

.formula-box .eq-main {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 0.55rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(30,30,30,0.25);
}

/* Interactive Tabs / Mode Switcher */
.tab-strip {
  display: flex;
  flex-wrap: wrap;
  border-bottom: var(--border-strong);
  background: var(--bg-frame);
}

.tab-btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  border: none;
  border-right: var(--border-hairline);
  background: var(--bg-frame);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.12s ease;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tab-btn:hover {
  background: var(--bg-paper);
  color: var(--ink);
}

.tab-btn.active {
  background: var(--ink);
  color: var(--bg-paper);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Progress / Telemetry Bars */
.meter-track {
  width: 100%;
  height: 10px;
  border: 1px solid var(--ink);
  background: var(--bg-subtle);
  position: relative;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--teal);
  transition: width 0.25s ease;
}

.meter-fill.pink { background: var(--pink); }
.meter-fill.green { background: var(--green); }
.meter-fill.ink { background: var(--ink); }

/* Range Sliders */
input[type="range"].sieve-slider,
input[type="range"].sim-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--bg-frame);
  border: 1px solid var(--ink);
  outline: none;
  margin: 0.55rem 0;
}

input[type="range"].sieve-slider::-webkit-slider-thumb,
input[type="range"].sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--ink);
  border: 2px solid var(--pink);
  cursor: pointer;
}

.sim-control-box {
  padding: 0.9rem 1.05rem;
  border: var(--border-hairline);
  background: var(--bg-paper);
}

/* Responsive Subgrids & Collapsible Drawers for Lower Visual Density */
.subgrid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.subgrid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.subgrid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

details.tech-drawer {
  border: var(--border-strong);
  background: var(--bg-paper);
  box-shadow: var(--shadow-hard-sm);
  margin-top: 1rem;
}

details.tech-drawer > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 1.1rem;
  background: var(--bg-panel);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}

details.tech-drawer > summary::-webkit-details-marker {
  display: none;
}

details.tech-drawer > summary::after {
  content: "[+ EXPAND / 展开]";
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal-deep);
  flex-shrink: 0;
}

details.tech-drawer[open] > summary {
  border-bottom: var(--border-hairline);
  background: var(--ink);
  color: var(--bg-paper);
}

details.tech-drawer[open] > summary::after {
  content: "[− COLLAPSE / 收起]";
  color: var(--pink);
}

details.tech-drawer .drawer-body {
  padding: 1.15rem;
}

/* Typography utilities */
.h2-arch {
  font-size: clamp(1.55rem, 2.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 0.75rem;
}

.h3-arch {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.prose-sm {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.62;
}

.list-square {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.list-square li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.89rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.list-square li strong {
  color: var(--ink);
}

.list-square li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.65rem;
  color: var(--teal-deep);
}

.list-square.pink li::before {
  color: var(--pink-deep);
}

/* Publication Figure Frame */
.fig-card {
  border: var(--border-strong);
  background: var(--bg-paper);
  box-shadow: var(--shadow-hard-sm);
  display: flex;
  flex-direction: column;
}

.fig-header {
  padding: 0.5rem 0.85rem;
  background: var(--bg-frame);
  border-bottom: var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}

.fig-img-wrap {
  padding: 0.85rem;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fig-img-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.fig-footer {
  padding: 0.65rem 0.85rem;
  border-top: var(--border-hairline);
  background: var(--bg-panel);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   ARCHITECTURAL FOOTER WITH TRAE DYNAMIC CANVAS
   ========================================================================== */

.site-footer {
  position: relative;
  border-top: var(--border-strong);
  background: var(--bg-frame);
  overflow: hidden;
}

.footer-canvas-band,
.footer-canvas-wrap {
  position: relative;
  height: 180px;
  border-bottom: var(--border-hairline);
  background: var(--bg-paper);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-canvas-band canvas,
.footer-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.footer-watermark {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  background: rgba(254, 254, 254, 0.88);
  padding: 0.15rem 1rem;
  border: var(--border-strong);
  box-shadow: var(--shadow-hard-sm);
  pointer-events: none;
  display: inline-block;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  background: var(--bg-panel);
}

.footer-col {
  padding: 1.65rem 1.85rem;
  border-right: var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  min-width: 0;
}

.footer-col:last-child {
  border-right: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-top: var(--border-hairline);
  background: var(--ink);
  color: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE ADAPTATION)
   ========================================================================== */

@media (max-width: 1100px) {
  .top-nav {
    grid-template-columns: 1fr auto;
  }
  .nav-branches {
    grid-column: span 2;
    grid-row: 2;
    border-top: var(--border-hairline);
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .hero-main, .hero-aside, .product-intro-col, .product-ui-col {
    grid-column: span 12;
    border-right: none;
  }
  .hero-main, .product-intro-col {
    border-bottom: var(--border-hairline);
  }
  .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3 {
    grid-column: span 12;
  }
  .cell, .footer-col {
    border-right: none;
    border-bottom: var(--border-hairline);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  /* Compact Telemetry Bar on Mobile */
  .telemetry-bar {
    padding: 0.32rem 0.9rem;
    font-size: 0.68rem;
    gap: 0.75rem;
  }
  .telemetry-right,
  .telemetry-left .telemetry-item:nth-child(n+2) {
    display: none;
  }

  /* Sleek Single-Row Horizontal Scrollable Navigation on Mobile */
  .brand-cell {
    padding: 0.55rem 0.95rem;
  }
  .nav-controls {
    padding: 0.45rem 0.9rem;
  }
  .nav-branches {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .nav-branches::-webkit-scrollbar {
    display: none;
  }
  .nav-tab {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 0.5rem 0.85rem;
  }
  .nav-tab .tab-desc {
    display: none;
  }
  .nav-tab .tab-top {
    gap: 0.4rem;
  }

  /* Hero & Section Bars on Mobile */
  .hero-grid {
    min-height: auto;
  }
  .hero-main {
    padding: 1.5rem 1.1rem;
    gap: 1.25rem;
  }
  .hero-aside {
    padding: 1.25rem 1.1rem;
  }
  .hero-eyebrow {
    font-size: 0.68rem;
    padding: 0.25rem 0.55rem;
    margin-bottom: 0.9rem;
    white-space: normal;
  }
  .hero-title {
    font-size: clamp(1.75rem, 6.8vw, 2.35rem);
    line-height: 1.12;
    margin-bottom: 0.9rem;
  }
  .hero-lead {
    font-size: 0.95rem;
    line-height: 1.62;
    margin-bottom: 1.15rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-cell {
    padding: 0.8rem 0.85rem;
  }
  .kpi-val {
    font-size: 1.38rem;
  }

  .section-bar {
    padding: 0.65rem 1.1rem;
    font-size: 0.74rem;
  }
  .section-bar > span:last-child {
    display: none;
  }

  /* Product Intro + UI Preview on Mobile */
  .product-intro-col {
    padding: 1.45rem 1.1rem;
    gap: 1.15rem;
  }
  .product-ui-col {
    padding: 1.1rem 0.85rem;
  }
  .ui-preview-titlebar {
    padding: 0.5rem 0.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
  .ui-preview-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
  }
  .ui-tab-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Cells, Subgrids & Tables on Mobile */
  .cell {
    padding: 1.35rem 1.1rem;
  }
  .subgrid-2,
  .subgrid-3 {
    grid-template-columns: 1fr;
  }
  .subgrid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sculpture-stage {
    min-height: 210px;
  }
  .sculpture-stage img {
    width: 200px;
    height: 200px;
  }
  .footer-col {
    padding: 1.25rem 1.1rem;
  }
  .footer-bottom {
    padding: 0.65rem 1.1rem;
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .btn-row .btn {
    width: 100%;
    justify-content: center;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-label span:nth-child(2) {
    display: none;
  }
}
