/* ==========================================================================
   Thermo-Hydro-Mechanical (THM) Porous Media Design System
   Modern Dark Aesthetic, Glassmorphism, Luminous Accents & Crisp Scientific UI
   ========================================================================== */

:root {
  /* Color Palette - Physics Tokens */
  --color-thermal: #f97316;
  --color-thermal-glow: rgba(249, 115, 22, 0.35);
  --color-thermal-bg: rgba(249, 115, 22, 0.12);

  --color-hydraulic: #00e5ff;
  --color-hydraulic-glow: rgba(0, 229, 255, 0.35);
  --color-hydraulic-bg: rgba(0, 229, 255, 0.12);

  --color-mechanical: #c084fc;
  --color-mechanical-glow: rgba(192, 132, 252, 0.35);
  --color-mechanical-bg: rgba(192, 132, 252, 0.12);

  --color-accent-green: #10b981;
  --color-accent-red: #ef4444;
  --color-accent-amber: #f59e0b;

  /* Surfaces & Backgrounds */
  --bg-app: #070a12;
  --bg-surface-1: #0d1322;
  --bg-surface-2: #131b2e;
  --bg-surface-3: #1a253d;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.22);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions & Shadows */
  --transition-fast: 0.18s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glass: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px var(--border-subtle);
  --shadow-glow-cyan: 0 0 20px rgba(0, 229, 255, 0.25);
  --shadow-glow-orange: 0 0 20px rgba(249, 115, 22, 0.25);
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-app);
  color: #e2e8f0;
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(0, 229, 255, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(192, 132, 252, 0.04) 0%, transparent 50%);
}

/* Typography Headings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

a {
  color: var(--color-hydraulic);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

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

/* Navigation Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-thermal), var(--color-hydraulic) 50%, var(--color-mechanical));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.brand-title-group h1 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.nav-tab {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.nav-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #ffffff;
  background: var(--bg-surface-2);
  border-color: var(--border-active);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sound-toggle-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sound-toggle-btn:hover {
  background: var(--bg-surface-3);
  border-color: var(--border-active);
}

.sound-toggle-btn.audio-active {
  border-color: var(--color-hydraulic);
  color: var(--color-hydraulic);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Hero Section */
.hero-section {
  padding: 4rem 2rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.hero-badge-strip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-hydraulic);
  box-shadow: 0 0 8px var(--color-hydraulic);
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .gradient-text {
  background: linear-gradient(90deg, var(--color-thermal) 0%, var(--color-hydraulic) 50%, var(--color-mechanical) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 820px;
  margin: 0 auto 2.5rem;
}

/* Glass Panels */
.glass-panel {
  background: rgba(13, 19, 34, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-glass);
}

/* Container & Sections */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.app-section {
  margin-bottom: 5rem;
  scroll-margin-top: 5rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-hydraulic);
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: #94a3b8;
  font-size: 1rem;
  max-width: 780px;
}

/* ==========================================
   MODULE 1: THM Triangle & Coupling Matrix
   ========================================== */
.thm-triangle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

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

.thm-triangle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thm-triangle-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

.thm-node {
  cursor: pointer;
  transition: transform 0.25s ease;
}

.thm-node:hover {
  transform: scale(1.06);
}

.coupling-path {
  transition: stroke-width 0.25s ease, filter 0.25s ease;
  cursor: pointer;
}

.coupling-path.active-flow {
  stroke-dasharray: 8, 4;
  animation: dashFlow 1.2s linear infinite;
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -24;
  }
}

.coupling-label-btn {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.coupling-label-btn:hover {
  transform: scale(1.1);
}

.coupling-label-btn .label-bg {
  fill: #1e293b;
  stroke: #475569;
  stroke-width: 1.2;
  transition: all 0.2s;
}

.coupling-label-btn .label-txt {
  fill: #cbd5e1;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.coupling-label-btn.selected .label-bg {
  fill: #0284c7;
  stroke: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.coupling-label-btn.selected .label-txt {
  fill: #ffffff;
}

.coupling-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.pill-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn:hover {
  color: #ffffff;
  border-color: var(--border-active);
}

.pill-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(249, 115, 22, 0.2));
  border-color: var(--color-hydraulic);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

/* Detail Card */
.coupling-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.coupling-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.coupling-badge {
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.badge-th, .badge-tm {
  background: var(--color-thermal-bg);
  color: var(--color-thermal);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-ht, .badge-hm {
  background: var(--color-hydraulic-bg);
  color: var(--color-hydraulic);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.badge-mt, .badge-mh {
  background: var(--color-mechanical-bg);
  color: var(--color-mechanical);
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.coupling-title {
  font-size: 1.35rem;
}

.math-callout {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--color-hydraulic);
  border-radius: 10px;
  padding: 1.1rem;
}

.math-label {
  display: block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.math-term-box {
  margin-bottom: 0.75rem;
}

.coupling-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.coupling-subpanel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
}

.coupling-subpanel h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.coupling-subpanel p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.coupling-engineering-callout {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  padding: 1rem;
}

.coupling-engineering-callout h4 {
  font-size: 0.95rem;
  color: #f59e0b;
  margin-bottom: 0.4rem;
}

.coupling-engineering-callout p {
  font-size: 0.85rem;
  color: #e2e8f0;
}

/* ==========================================
   MODULE 2: Formula Inspector
   ========================================== */
.math-equations-board {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.equations-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.equation-row {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.eq-badge {
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  align-self: flex-start;
}

.badge-m {
  background: var(--color-mechanical-bg);
  color: var(--color-mechanical);
}

.badge-h {
  background: var(--color-hydraulic-bg);
  color: var(--color-hydraulic);
}

.badge-t {
  background: var(--color-thermal-bg);
  color: var(--color-thermal);
}

.eq-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 1.15rem;
}

.secondary-eq {
  font-size: 1rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.katex-item.math-clickable {
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

.katex-item.math-clickable:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--color-hydraulic);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.katex-item.math-clickable.active-term {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--color-hydraulic);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.math-op {
  color: #64748b;
  font-weight: 700;
}

/* Term Inspector Card */
.term-inspector-card {
  background: linear-gradient(135deg, rgba(13, 22, 40, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--color-hydraulic);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px -6px rgba(0, 229, 255, 0.15);
}

.term-header-line {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.term-symbol-badge {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 1.35rem;
}

.term-title-block h4 {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.term-coupling-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-hydraulic);
  background: var(--color-hydraulic-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.term-meta-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 1.2rem;
}

@media (max-width: 768px) {
  .term-meta-grid {
    grid-template-columns: 1fr;
  }
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.meta-val {
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* ==========================================
   SIMULATOR LAYOUTS & DOCKS
   ========================================== */
.simulator-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

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

.sim-control-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.panel-title {
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.sim-canvas-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.canvas-wrapper {
  background: #05080e;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* Form Controls & Sliders */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.slider-val {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--color-hydraulic);
  font-weight: 600;
}

.custom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  outline: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-hydraulic);
  cursor: pointer;
  box-shadow: 0 0 8px var(--color-hydraulic);
  transition: transform var(--transition-fast);
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.custom-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: #f1f5f9;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--color-hydraulic);
}

.btn-row {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  flex: 1;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.action-btn:hover {
  background: var(--bg-surface-3);
  border-color: var(--border-active);
}

.action-btn.primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #ffffff;
}

.action-btn.primary:hover {
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
}

/* Metrics Summary Bar */
.metrics-bar {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.m-item {
  color: #94a3b8;
}

.m-item strong {
  color: #f8fafc;
}

.color-green { color: var(--color-accent-green) !important; }
.color-amber { color: var(--color-accent-amber) !important; }
.color-cyan { color: var(--color-hydraulic) !important; }
.color-violet { color: var(--color-mechanical) !important; }

/* 2D Interactive Tools Strip */
.toolbar-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.tool-btn, .view-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-btn:hover, .view-btn:hover {
  color: #ffffff;
  border-color: var(--border-active);
}

.tool-btn.active, .view-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.chk-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  cursor: pointer;
}

/* Induced Seismicity Alert */
.seismic-alert-box {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: #94a3b8;
  transition: background 0.3s;
}

.flash-alert {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
}

.tag-rupture {
  background: #ef4444;
  color: #ffffff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ==========================================
   MODULE 4: Engineering Case Studies Grid
   ========================================== */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.case-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.case-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 12px 25px -8px rgba(0, 0, 0, 0.5);
}

.case-icon-box {
  font-size: 2rem;
}

.case-card h4 {
  font-size: 1.15rem;
}

.case-card p {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.5;
}

.case-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.case-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #cbd5e1;
}

/* ==========================================
   MODULE 5: Dimensionless Sandbox
   ========================================== */
.sandbox-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2rem;
}

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

.sandbox-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rock-desc-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.3rem;
  line-height: 1.4;
}

.rock-properties-table {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.prop-row {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
}

.prop-val {
  color: #f1f5f9;
}

.sandbox-results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.insight-box {
  border-radius: 10px;
  padding: 1.1rem;
  border: 1px solid;
}

.insight-pressurization {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

.insight-drained {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.insight-header h4 {
  font-size: 1rem;
}

.insight-pressurization h4 { color: #f87171; }
.insight-drained h4 { color: var(--color-hydraulic); }

.insight-box p {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.metric-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.metric-card {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.metric-title {
  font-size: 0.75rem;
  color: #64748b;
  font-family: var(--font-mono);
}

.metric-number {
  font-size: 1.45rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f8fafc;
}

.metric-sub {
  font-size: 0.75rem;
  color: #94a3b8;
}

.time-ratio-bar-section {
  background: #090e18;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.dual-time-track {
  height: 12px;
  background: #1e293b;
  border-radius: 6px;
  display: flex;
  overflow: hidden;
}

.time-bar-segment.bar-thermal {
  background: linear-gradient(90deg, #ff7849, #ea580c);
  transition: width 0.3s;
}

.time-bar-segment.bar-hydraulic {
  background: linear-gradient(90deg, #38bdf8, #0284c7);
  transition: width 0.3s;
}

.bar-footer {
  margin-top: 0.4rem;
  text-align: right;
  color: #64748b;
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.animate-fade-in {
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 10, 18, 0.95);
  padding: 2.5rem 2rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

.app-footer p {
  margin-bottom: 0.5rem;
}
