/* ==========================================================================
   VOLTCHECK 24V (볼트체크) - INDUSTRIAL PRECISION LAB DESIGN SYSTEM
   Authentic, Tactile, High-Precision Engineering Palette
   ========================================================================== */

:root {
  /* Canvas & Surfaces */
  --bg-canvas: #f4f6f8;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f8fafc;
  --bg-input: #f8fafc;
  --bg-inset: #f1f5f9;

  /* Typography Colors */
  --text-main: #0f172a;       /* Deep Technical Ink */
  --text-secondary: #334155;  /* Slate Charcoal */
  --text-muted: #64748b;      /* Precision Caption */
  --text-dim: #94a3b8;

  /* Brand Accents */
  --brand-orange: #ea580c;    /* Industrial Safety Orange */
  --brand-orange-hover: #c2410c;
  --brand-orange-subtle: #fff7ed;
  --brand-orange-border: #fed7aa;

  --navy-dark: #0f172a;
  --navy-surface: #1e293b;

  /* Status Colors */
  --safe-green: #059669;
  --safe-bg: #ecfdf5;
  --safe-border: #a7f3d0;

  --warn-amber: #d97706;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;

  --fail-crimson: #dc2626;
  --fail-bg: #fef2f2;
  --fail-border: #fecaca;

  /* Borders & Shadows */
  --border-main: #d0d7de;
  --border-light: #e2e8f0;
  --border-focus: #ea580c;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 6px 16px -4px rgba(15, 23, 42, 0.04);
  --shadow-meter: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(15, 23, 42, 0.15);

  --font-sans: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

body.theme-precision {
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-warn { color: var(--warn-amber); }
.text-safe { color: var(--safe-green); }
.text-highlight { color: var(--brand-orange); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ==========================================================================
   Header & Segmented Tabs
   ========================================================================== */
.top-nav {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.nav-top-bar {
  border-bottom: 1px solid var(--border-light);
  padding: 0.45rem 0;
  background: #ffffff;
}

.nav-menu-bar {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-main);
  padding: 0.35rem 0;
}

.nav-container {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
}

.nav-container-menu {
  justify-content: flex-start;
  padding: 0 1rem;
}

.nav-brand-group {
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-symbol {
  width: 36px;
  height: 36px;
  background: var(--navy-dark);
  border-radius: var(--radius-md);
  border: 2px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.symbol-v {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.15rem;
  color: #ffffff;
  line-height: 1;
}

.symbol-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-orange);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-main {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: nowrap;
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-en {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--brand-orange);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Segmented Navigation in Row 2 (Full Width, Zero Clipping) */
.nav-tabs-segmented {
  display: flex;
  align-items: center;
  background: transparent;
  padding: 0;
  border: none;
  gap: 4px;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.nav-tabs-segmented::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.tab-btn {
  background: #ffffff;
  border: 1px solid var(--border-main);
  color: var(--text-secondary);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.38rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
  transition: background-color 0.05s, color 0.05s, border-color 0.05s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.tab-btn span {
  white-space: nowrap;
  display: inline-block;
}

.tab-btn i {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.tab-btn:hover {
  border-color: var(--brand-orange);
  color: var(--navy-dark);
  background: #ffffff;
}

.tab-btn.active {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.25);
}

/* Nav Actions */
.nav-utils {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-util {
  background: #ffffff;
  border: 1px solid var(--border-main);
  color: var(--navy-dark);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.775rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}

.btn-util span, .btn-print span {
  white-space: nowrap;
  display: inline-block;
}

.btn-util:hover {
  border-color: var(--navy-dark);
  color: var(--navy-dark);
}

.btn-print {
  background: var(--navy-dark);
  border: 1px solid #0f172a;
  color: #ffffff;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.775rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}

.btn-print:hover {
  background: #1e293b;
}

/* Responsive Navigation Bar Rules */
@media (max-width: 1240px) {
  .brand-tagline {
    display: none;
  }
  .nav-container {
    padding: 0.55rem 0.85rem;
    gap: 0.5rem;
  }
  .tab-btn {
    padding: 0.4rem 0.55rem;
    font-size: 0.775rem;
  }
}

@media (max-width: 992px) {
  .nav-container {
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
  }
  .nav-brand-group {
    order: 1;
  }
  .nav-utils {
    order: 2;
  }
  .nav-tabs-segmented {
    order: 3;
    width: 100%;
    margin-top: 0.4rem;
    padding: 4px;
    background: #f1f5f9;
  }
}

/* ==========================================================================
   Clean Sponsor Bar (AdSense Ready)
   ========================================================================== */
.sponsor-strip {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 0.45rem 1.25rem;
}

.sponsor-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.775rem;
}

.sponsor-tag {
  background: var(--brand-orange-subtle);
  color: var(--brand-orange);
  border: 1px solid var(--brand-orange-border);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.sponsor-text {
  color: var(--text-secondary);
  flex: 1;
}

.sponsor-link {
  color: var(--brand-orange);
  font-weight: 700;
  text-decoration: none;
}

.sponsor-link:hover {
  text-decoration: underline;
}

.sponsor-link-btn {
  background: transparent;
  border: none;
  color: var(--brand-orange);
  font-weight: 700;
  font-size: 0.775rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sponsor-link-btn:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.page-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3.5rem 1.25rem;
  width: 100%;
  flex: 1;
}

.tab-panel {
  display: none;
}

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

/* Section Title & Pill Presets */
.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.main-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: -0.02em;
}

.main-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.preset-pill-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-title {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-muted);
}

.preset-pill-items {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.pill-btn {
  background: #ffffff;
  border: 1px solid var(--border-main);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}

.pill-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.pill-btn.active {
  background: var(--brand-orange-subtle);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  font-weight: 700;
}

/* ==========================================================================
   2-Column Workbench Grid
   ========================================================================== */
.meter-workbench-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.25rem;
}

@media (max-width: 980px) {
  .meter-workbench-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Framing */
.workbench-card, .meter-readout-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-caption {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.caption-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
  background: var(--bg-inset);
  color: var(--navy-dark);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.card-caption h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.btn-adv-toggle {
  background: transparent;
  border: none;
  color: var(--brand-orange);
  font-size: 0.775rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-adv-toggle:hover {
  text-decoration: underline;
}

.btn-adv-toggle i {
  width: 14px;
  height: 14px;
}

/* Workbench Body Form */
.workbench-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.field-header label {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.val-input-group {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0 0.5rem;
}

.input-val {
  width: 75px;
  border: none;
  background: transparent;
  padding: 0.35rem 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
  outline: none;
  color: var(--navy-dark);
}

.val-unit {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Precision Slider */
.slider-wrapper {
  margin: 0.4rem 0;
}

.precision-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.precision-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--brand-orange);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.675rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.field-caption {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Unit Pills & Selects */
.unit-toggle-pills {
  display: flex;
  background: #e2e8f0;
  padding: 2px;
  border-radius: var(--radius-xs);
}

.unit-pill {
  border: none;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-muted);
}

.unit-pill.active {
  background: #ffffff;
  color: var(--navy-dark);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.select-precision {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-dark);
  outline: none;
}

.select-precision:focus {
  border-color: var(--brand-orange);
}

.field-specs-bar {
  margin-top: 0.4rem;
  font-size: 0.725rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Quick Step Chips */
.quick-step-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.step-chip {
  background: #ffffff;
  border: 1px solid var(--border-main);
  color: var(--text-secondary);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s;
}

.step-chip:hover {
  border-color: var(--brand-orange);
  color: var(--navy-dark);
}

.step-chip.active {
  background: var(--brand-orange-subtle);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  font-weight: 700;
}

/* Advanced Collapsible Panel */
.advanced-settings-panel {
  background: #f8fafc;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.adv-heading {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 0.65rem;
  letter-spacing: 0.02em;
}

.adv-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.adv-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.adv-col.full-span {
  grid-column: 1 / -1;
}

.adv-col label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* ==========================================================================
   Right Panel: Digital Meter & Circuit Readout
   ========================================================================== */
.meter-readout-panel {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Quality Control Stamp Badge */
.verdict-stamp {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.stamp-pass {
  background: var(--safe-bg);
  color: var(--safe-green);
  border: 1.5px solid var(--safe-green);
}

.stamp-warn {
  background: var(--warn-bg);
  color: var(--warn-amber);
  border: 1.5px solid var(--warn-amber);
}

.stamp-fail {
  background: var(--fail-bg);
  color: var(--fail-crimson);
  border: 1.5px solid var(--fail-crimson);
}

/* Digital Hardware Multimeter Card */
.digital-gauge-card {
  background: #0f172a;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-meter);
  border: 2px solid #1e293b;
}

.gauge-screen {
  display: flex;
  flex-direction: column;
}

.gauge-top-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.675rem;
  font-family: var(--font-mono);
  color: #64748b;
  letter-spacing: 0.05em;
}

.gauge-main-digits {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.4rem 0;
}

.digit-value {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.03em;
}

.digit-unit {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-orange);
}

.gauge-bottom-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.775rem;
  border-top: 1px solid #334155;
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  color: #94a3b8;
}

.g-stat strong {
  margin-left: 4px;
}

/* Voltage Level Gradient Gauge */
.voltage-level-card {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.level-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.5rem;
}

.level-track-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.level-gradient-track {
  height: 12px;
  border-radius: 6px;
  background: #e2e8f0;
  position: relative;
  overflow: visible;
}

.level-fill-bar {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 85%);
  transition: width 0.25s ease-out;
}

.level-pointer {
  position: absolute;
  top: -8px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.25s ease-out;
  pointer-events: none;
}

.pointer-badge {
  background: var(--navy-dark);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid #334155;
  white-space: nowrap;
}

.level-min-line {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #dc2626;
  border-right: 1px dashed #ffffff;
}

.min-line-label {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 800;
  color: #dc2626;
  white-space: nowrap;
}

.level-scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-dim);
}

/* Circuit Strip Diagram */
.circuit-strip {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.strip-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.725rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  font-weight: 600;
}

.strip-flow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.strip-node {
  background: var(--bg-inset);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  text-align: center;
  min-width: 90px;
}

.node-title {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
}

.node-v {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy-dark);
}

.strip-line {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drop-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--warn-amber);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  padding: 1px 6px;
  border-radius: 10px;
  margin-bottom: 4px;
}

.flow-track {
  width: 100%;
  height: 3px;
  background: #cbd5e1;
  border-radius: 2px;
}

/* Specs Mini Grid */
.specs-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.spec-cell {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
}

.s-label {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-weight: 600;
}

.s-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 1px 0;
}

.s-sub {
  font-size: 0.675rem;
  color: var(--text-muted);
}

/* Practical Engineering Note Card */
.engineer-note-box {
  background: #f8fafc;
  border: 1px solid var(--border-main);
  border-left: 4px solid var(--safe-green);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.note-icon {
  width: 18px;
  height: 18px;
  color: var(--safe-green);
  flex-shrink: 0;
  margin-top: 2px;
}

.note-content {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Action Toolbars */
.meter-actions {
  display: flex;
  gap: 0.65rem;
}

.btn-action-outline {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-main);
  color: var(--navy-dark);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
}

.btn-action-outline:hover {
  background: var(--bg-inset);
}

.btn-action-primary {
  flex: 1.3;
  background: var(--brand-orange);
  border: 1px solid var(--brand-orange-hover);
  color: #ffffff;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
}

.btn-action-primary:hover {
  background: var(--brand-orange-hover);
}

/* ==========================================================================
   Table & Technical Guide Styles
   ========================================================================== */
.table-tool-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0 0.65rem;
  min-width: 260px;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  padding: 0.45rem 0;
  font-size: 0.825rem;
  width: 100%;
}

.data-table-frame {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  margin-top: 1rem;
}

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

.precision-table th {
  background: #f8fafc;
  color: var(--navy-dark);
  padding: 0.65rem 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-main);
  white-space: nowrap;
}

.precision-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-mono);
  color: var(--navy-dark);
}

.precision-table tr:hover td {
  background: var(--bg-surface-subtle);
}

.standard-guide-card {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.standard-guide-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.derating-pills-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.d-pill {
  background: var(--bg-inset);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 0.45rem;
  text-align: center;
}

.d-pill span {
  display: block;
  font-size: 0.725rem;
  color: var(--text-muted);
}

.d-pill strong {
  display: block;
  font-size: 0.85rem;
  color: var(--brand-orange);
  font-family: var(--font-mono);
}

.guide-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tech Cards */
.tech-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.tech-article-item {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.tech-badge {
  display: inline-block;
  font-size: 0.675rem;
  font-weight: 700;
  color: var(--brand-orange);
  background: var(--brand-orange-subtle);
  border: 1px solid var(--brand-orange-border);
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 0.45rem;
}

.tech-article-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.45rem;
}

.tech-article-item p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.formula-box {
  background: var(--navy-dark);
  color: #fde047;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  margin-top: 0.65rem;
  overflow-x: auto;
}

.faq-container {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.faq-container h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.85rem;
}

.faq-row {
  border-bottom: 1px solid var(--border-light);
  padding: 0.65rem 0;
}

.faq-row:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.2rem;
}

.faq-answer {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Bottom Showcase Grid */
.bottom-showcase-bar {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.showcase-header {
  margin-bottom: 0.75rem;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.showcase-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.sc-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--brand-orange);
}

.showcase-card h5 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 2px 0;
}

.showcase-card p {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modals & Footer
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.modal-card.modal-lg {
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 0.85rem 1.15rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.15rem;
  overflow-y: auto;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-field label {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.input-precision {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  outline: none;
}

.input-precision:focus {
  border-color: var(--brand-orange);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.btn-primary-action {
  background: var(--brand-orange);
  border: 1px solid var(--brand-orange-hover);
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary-action:hover {
  background: var(--brand-orange-hover);
}

.catalog-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.catalog-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: all 0.15s;
}

.catalog-item:hover {
  border-color: var(--brand-orange);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.catalog-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-orange { background: #fff7ed; color: #ea580c; }
.icon-green { background: #ecfdf5; color: #059669; }

.catalog-info {
  flex: 1;
}

.catalog-info h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.2rem;
}

.catalog-info p {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.btn-catalog-dl {
  background: #ffffff;
  border: 1px solid var(--border-main);
  color: var(--navy-dark);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s;
}

.btn-catalog-dl:hover {
  background: var(--navy-dark);
  color: #ffffff;
  border-color: var(--navy-dark);
}

.btn-catalog-dl i {
  width: 14px;
  height: 14px;
}

/* Unit Converter Styles */
.converter-tabs-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.converter-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.converter-box h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.5rem;
}

.conv-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.conv-row .input-precision {
  width: 90px;
}

.conv-unit {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.conv-eq {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
}

.conv-res {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  color: var(--navy-dark);
}

/* Standards Matrix */
.standard-matrix-container {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.standard-matrix-container h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.policy-text {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.policy-text h4 {
  color: var(--navy-dark);
  margin: 1rem 0 0.35rem 0;
}

/* Footer */
.app-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-main);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--navy-dark);
}

.footer-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  max-width: 420px;
  margin-top: 0.25rem;
}

.footer-standards {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.footer-standards span {
  font-size: 0.675rem;
  background: var(--bg-inset);
  border: 1px solid var(--border-main);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 600;
}

.f-nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.f-nav-links a {
  color: var(--text-secondary);
  font-size: 0.775rem;
  text-decoration: none;
  font-weight: 600;
}

.f-nav-links a:hover {
  color: var(--brand-orange);
}

.copyright-text {
  font-size: 0.725rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ==========================================================================
   Dark Mode High-Contrast Engineering Theme
   ========================================================================== */
body.theme-dark {
  --bg-canvas: #090d16;
  --bg-surface: #111827;
  --bg-surface-subtle: #1e293b;
  --bg-inset: #0b1120;
  --border-main: #334155;
  --border-light: #1e293b;
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --navy-dark: #f8fafc;
  --navy-primary: #38bdf8;
  --brand-orange: #fb923c;
  background-color: #090d16;
  color: #f8fafc;
}

body.theme-dark .top-nav {
  background: #111827;
  border-color: #1f2937;
}

body.theme-dark .nav-top-bar {
  background: #111827;
  border-color: #1f2937;
}

body.theme-dark .nav-menu-bar {
  background: #0b1120;
  border-color: #1f2937;
}

body.theme-dark .nav-tabs-segmented {
  background: transparent;
  border: none;
}

body.theme-dark .tab-btn {
  background: #1f2937;
  border-color: #374151;
  color: #cbd5e1;
}

body.theme-dark .tab-btn:hover {
  background: #374151;
  color: #ffffff;
  border-color: #fb923c;
}

body.theme-dark .tab-btn.active {
  background: #38bdf8;
  color: #090d16;
  border-color: #38bdf8;
  font-weight: 800;
}

body.theme-dark .btn-util {
  background: #1f2937;
  border-color: #374151;
  color: #e2e8f0;
}

body.theme-dark .workbench-card,
body.theme-dark .meter-readout-panel,
body.theme-dark .voltage-level-card,
body.theme-dark .standard-matrix-container,
body.theme-dark .tech-article-item,
body.theme-dark .modal-card,
body.theme-dark .converter-box,
body.theme-dark .circuit-strip,
body.theme-dark .data-table-frame,
body.theme-dark .app-footer,
body.theme-dark .catalog-item {
  background: #111827;
  border-color: #1f2937;
  color: #f8fafc;
}

body.theme-dark .input-precision,
body.theme-dark .input-val,
body.theme-dark .select-precision {
  background: #0b1120;
  border-color: #374151;
  color: #ffffff;
}

body.theme-dark .conv-res {
  background: #0b1120;
  border-color: #374151;
  color: #f8fafc;
}

body.theme-dark .precision-table th {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

body.theme-dark .precision-table td {
  border-color: #1e293b;
  color: #e2e8f0;
}

body.theme-dark .sponsor-strip {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.theme-dark .showcase-card {
  background: #111827;
  border-color: #334155;
  color: #f8fafc;
}

/* Saved History Modal Items */
.saved-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.saved-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.saved-item:hover {
  border-color: var(--brand-orange);
}

.saved-item-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy-dark);
}

.saved-item-meta {
  font-size: 0.725rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.saved-item-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-item-load {
  background: var(--brand-orange);
  color: #ffffff;
  border: none;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-item-del {
  background: transparent;
  color: var(--fail-crimson);
  border: 1px solid var(--border-main);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  cursor: pointer;
}

/* ==========================================================================
   AI 6-Point Safety Audit Panel
   ========================================================================== */
.ai-audit-panel {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}

.audit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.audit-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.audit-title-group h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 0;
}

.audit-badge {
  background: var(--brand-orange);
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.audit-badge i {
  width: 12px;
  height: 12px;
}

.audit-score-box {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.score-num {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--safe-green);
}

.score-total {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.grade-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
  color: #ffffff;
}

.grade-a { background: var(--safe-green); }
.grade-b { background: var(--accent-blue); }
.grade-c { background: var(--warn-amber); }
.grade-f { background: var(--fail-crimson); }

.audit-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.65rem;
}

.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.775rem;
  line-height: 1.4;
}

.audit-item .a-icon i {
  width: 16px;
  height: 16px;
  color: var(--safe-green);
  flex-shrink: 0;
  margin-top: 2px;
}

.audit-item.warn .a-icon i { color: var(--warn-amber); }
.audit-item.fail .a-icon i { color: var(--fail-crimson); }

.audit-item .a-text strong {
  color: var(--navy-dark);
  display: block;
  margin-bottom: 2px;
}

/* ==========================================================================
   Troubleshooting Decision Tree & Commissioning Checklist
   ========================================================================== */
.trouble-symptom-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.trouble-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.trouble-tab:hover {
  border-color: var(--brand-orange);
  color: var(--navy-dark);
}

.trouble-tab.active {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #ffffff;
}

.trouble-detail-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.trouble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trouble-header h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 0;
}

.badge-cause {
  background: rgba(239, 68, 68, 0.1);
  color: var(--fail-crimson);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.725rem;
  font-weight: 700;
}

.trouble-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.t-step-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.t-step-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--navy-primary);
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
}

.t-step-box p {
  font-size: 0.775rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.t-remedy-box {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.04);
}

.t-remedy-box .t-step-num {
  color: var(--safe-green);
}

/* Commissioning Checklist */
.checklist-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checklist-score-badge {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-main);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
}

.btn-check-reset {
  background: transparent;
  border: 1px solid var(--border-main);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  cursor: pointer;
}

.audit-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.check-group-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.check-group-box h5 {
  font-size: 0.825rem;
  font-weight: 800;
  color: var(--navy-dark);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.4rem;
  margin: 0 0 0.2rem 0;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
  cursor: pointer;
}

.check-item input[type="checkbox"] {
  accent-color: var(--safe-green);
  cursor: pointer;
  margin-top: 2px;
}

/* ==========================================================================
   Print A4 Specific
   ========================================================================== */
.print-only-report {
  display: none;
}

@media print {
  .top-nav, .sponsor-strip, .page-container, .modal-backdrop, .app-footer {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .print-only-report {
    display: block !important;
    padding: 20mm 15mm;
    max-width: 210mm;
    margin: 0 auto;
  }

  .report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 10px;
    margin-bottom: 15px;
  }

  .report-title-box h2 {
    font-size: 15pt;
    font-weight: 800;
  }

  .report-subtitle {
    font-size: 8pt;
    color: #64748b;
    font-family: var(--font-mono);
  }

  .report-meta {
    font-size: 9pt;
    text-align: right;
  }

  .report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 9pt;
  }

  .report-table th, .report-table td {
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
    text-align: left;
  }

  .report-table th {
    background: #f1f5f9;
  }

  .report-opinion {
    border: 1px solid #cbd5e1;
    padding: 10px;
    background: #f8fafc;
    font-size: 9pt;
    margin-bottom: 20px;
  }

  .report-signatures {
    display: flex;
    justify-content: space-between;
    font-size: 9pt;
    margin-top: 35px;
  }
}

/* ========================================================================== */
/* FA & OT Engineering Glossary Grid & Animated Circuit Flow Styles           */
/* ========================================================================== */
.glossary-search-box {
  min-width: 280px;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.glossary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.glossary-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
}

.glossary-card .g-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.45rem;
}

.glossary-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.glossary-card p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Animated Circuit Flow Track */
.flow-track {
  position: relative;
  overflow: hidden;
}

.flow-track::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.8), transparent);
  will-change: transform;
  animation: electronPulse 1.8s infinite linear;
}

@keyframes electronPulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ========================================================================== */
/* Interactive Canvas Chart & Visualizer Styles                               */
/* ========================================================================== */
.interactive-chart-box {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chart-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chart-title i {
  width: 15px;
  height: 15px;
  color: var(--accent-blue);
}

.chart-legend {
  font-size: 0.7rem;
  display: flex;
  gap: 0.75rem;
}

.leg-item.leg-v { color: #3b82f6; }
.leg-item.leg-min { color: #f59e0b; }
.leg-item.leg-danger { color: #ef4444; }
.leg-item.leg-safe { color: #10b981; }

.interactive-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #0f172a;
  border-radius: 6px;
  border: 1px solid #1e293b;
}

body:not(.theme-dark) .interactive-canvas {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}


