/* ==========================================================================
   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;
}

.engineering-disclaimer-strip {
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  padding: 0.45rem 1rem;
}

.engineering-disclaimer-inner {
  max-width: 1520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #7c2d12;
  font-size: 0.78rem;
  line-height: 1.45;
}

.engineering-disclaimer-inner strong {
  flex-shrink: 0;
  color: #9a3412;
  font-weight: 900;
}

.global-discovery-strip {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.global-discovery-inner {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  color: #334155;
  font-size: 0.82rem;
}

.global-discovery-inner strong {
  flex: 0 0 auto;
  color: #0f172a;
}

.global-discovery-inner a {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #075985;
  background: #f8fafc;
  text-decoration: none;
  font-weight: 800;
}

@media (max-width: 768px) {
  .engineering-disclaimer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.74rem;
  }
}

.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;
}



/* ==========================================================================
   NEXT-GEN FEATURES 6-TIER INDUSTRIAL STYLING
   ========================================================================== */

/* 1. Floating Project Basket */
.floating-project-basket {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 990;
}

.floating-project-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--navy-dark);
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-floating);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-project-btn:hover {
  transform: translateY(-3px) scale(1.02);
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  border-color: var(--brand-orange);
}

.fp-badge {
  background: var(--brand-orange);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-weight: 800;
}

/* Button Add to Project */
.btn-add-to-project {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(234, 88, 12, 0.08);
  color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-to-project:hover {
  background: var(--brand-orange);
  color: #ffffff;
  transform: translateY(-1px);
}

/* 2. Field Measurement Card */
.field-measurement-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

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

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

.fm-title strong {
  font-size: 1rem;
  color: var(--navy-dark);
  display: block;
}

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

.fm-badge-stat {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  background: #f0fdf4;
  color: #166534;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid #bbf7d0;
  font-weight: 600;
}

.fm-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.fm-result-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  background: var(--bg-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.fm-dev-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

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

/* 3. Real BOM Parts Matching */
.bom-parts-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.bom-header strong {
  font-size: 1rem;
  color: var(--navy-dark);
}

.bom-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

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

.bom-part-card {
  background: var(--bg-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.bom-part-card:hover {
  border-color: var(--brand-orange);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.bom-part-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bom-maker {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-transform: uppercase;
}

.bom-part-no {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy-dark);
  font-family: var(--font-mono);
}

.bom-part-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.bom-part-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

.bom-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy-dark);
  font-family: var(--font-mono);
}

/* 4. SLD Single Line Diagram Canvas */
.sld-canvas-viewport {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.sld-svg-frame {
  min-width: 600px;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sld-svg-frame svg {
  width: 100%;
  height: 100%;
}

.sld-export-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* 5. Project Workspace Modal */
.project-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-main);
}

.project-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 450px;
  overflow-y: auto;
}

.project-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.project-item-meta h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 0.35rem 0;
}

.project-item-params {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.project-item-res {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-orange);
  font-family: var(--font-mono);
}

.empty-project-notice {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-project-notice i {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
  margin-bottom: 0.75rem;
  color: var(--text-dim);
}

/* ==========================================================================
   MONETIZATION PIPELINE 4-TIER INDUSTRIAL STYLING
   ========================================================================== */

/* 1. Top Nav Digital Pack PRO Button */
.btn-digital-pack {
  background: rgba(234, 88, 12, 0.12) !important;
  color: var(--brand-orange) !important;
  border: 1px solid rgba(234, 88, 12, 0.4) !important;
  font-weight: 700 !important;
}

.btn-digital-pack:hover {
  background: var(--brand-orange) !important;
  color: #ffffff !important;
  border-color: var(--brand-orange) !important;
}

.badge-new-glow {
  background: #ea580c;
  color: #ffffff;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.btn-digital-pack:hover .badge-new-glow {
  background: #ffffff;
  color: #ea580c;
}

/* 2. Recommended Gear Strip in Field Measurement */
.recommended-gear-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--bg-main);
  border: 1px dashed var(--border-main);
  border-radius: var(--radius-sm);
}

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

.gear-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gear-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  color: var(--navy-dark);
  text-decoration: none;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.gear-chip:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: #ffffff;
}

/* 3. Recommended Tools Card in AWG Table */
.recommended-gear-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.rg-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--navy-dark);
}

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

.gear-card-item {
  background: var(--bg-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.g-maker {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-transform: uppercase;
}

.g-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0.25rem 0;
}

.g-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
}

/* 4. Enhanced BOM Quote Lead Modal Box */
.quote-summary-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.qs-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qs-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  font-size: 0.82rem;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.qs-note {
  font-size: 0.75rem;
  color: #15803d;
  display: block;
}

/* 5. Digital Product Asset Bundle Modal */
.digital-bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.bundle-item-card {
  background: var(--bg-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
}

.b-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(234, 88, 12, 0.1);
  color: var(--brand-orange);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  margin-bottom: 0.4rem;
}

.bundle-item-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 0.35rem 0;
}

.bundle-item-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.pricing-cta-card {
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pricing-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.price-orig {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-family: var(--font-mono);
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.price-num {
  font-size: 2rem;
  font-weight: 800;
  color: #f8fafc;
  font-family: var(--font-mono);
}

.price-unit {
  font-size: 1rem;
  font-weight: 600;
  color: #fb923c;
}

.price-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.pricing-right {
  flex: 1;
  min-width: 260px;
  max-width: 340px;
}

/* ==========================================================================
   DUAL-TIER PRICING CARDS STYLING (9,900 KRW & 29,000 KRW)
   ========================================================================== */

.pricing-tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.pricing-tier-card {
  background: var(--bg-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-tier-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.tier-popular {
  border: 2px solid var(--brand-orange);
  background: #ffffff;
}

.tier-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--brand-orange);
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

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

.tier-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.t-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy-dark);
  font-family: var(--font-mono);
}

.t-unit {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tier-features li {
  line-height: 1.4;
}


/* ==========================================================================
   GLOBAL GDPR COOKIE BANNER & LEGAL MODAL STYLES
   ========================================================================== */

.cookie-consent-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2.5rem);
  max-width: 860px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  animation: slideUpFade 0.3s ease-out forwards;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #f8fafc;
  font-size: 0.85rem;
  line-height: 1.45;
}

.cookie-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cookie-text strong {
  color: #ffffff;
}

.cookie-text a {
  color: #fb923c;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: var(--brand-orange);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cookie-accept:hover {
  background: var(--brand-orange-hover);
  transform: translateY(-1px);
}

.btn-cookie-learn {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cookie-learn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Global Payment Selector Grid */
.global-pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.global-pay-chip {
  background: #ffffff;
  border: 1.5px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem;
  text-align: center;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-dark);
  transition: all 0.15s ease;
}

.global-pay-chip:hover, .global-pay-chip.active {
  border-color: var(--brand-orange);
  background: var(--brand-orange-subtle);
  color: var(--brand-orange);
}

/* Legal Modal Tabs */
.legal-tab-nav {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1rem;
}

.legal-tab-btn {
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.legal-tab-btn.active {
  color: var(--brand-orange);
  border-bottom-color: var(--brand-orange);
}

.legal-content-pane {
  display: none;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.legal-content-pane.active {
  display: block;
}

.legal-content-pane h5 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 1.25rem 0 0.4rem 0;
}

.legal-content-pane h5:first-child {
  margin-top: 0;
}


/* ==========================================================================
   BOM AFFILIATE & SUBMITTAL-GRADE A4 CUSTOMIZER STYLES
   ========================================================================== */

.bom-part-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-bom-buy {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.btn-bom-buy:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.report-customizer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.approval-stamp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid #0f172a;
  text-align: center;
  margin-top: 1rem;
}

.approval-stamp-cell {
  border-right: 1px solid #0f172a;
}
.approval-stamp-cell:last-child {
  border-right: none;
}

.approval-stamp-header {
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem;
  border-bottom: 1px solid #0f172a;
}

.approval-stamp-body {
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #64748b;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .top-nav, .sub-header-bar, .bottom-showcase-bar, .app-footer, .meter-actions, .field-measurement-card, .bom-parts-card, .floating-project-basket, .cookie-consent-banner, .modal-backdrop {
    display: none !important;
  }
  .print-only-report {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .report-header {
    border-bottom: 2px solid #000000;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }
}


/* Legal & Affiliate Transparency Disclosure */
.affiliate-disclosure-banner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #f59e0b;
  border-radius: var(--radius-xs);
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.affiliate-disclosure-banner i {
  color: #d97706;
  flex-shrink: 0;
}

.checkout-statutory-notice {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-xs);
  padding: 0.6rem 0.85rem;
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.45;
  margin-top: 0.75rem;
}


/* ==========================================================================
   MOBILE-DEDICATED APP BAR, BOTTOM SHEET & TOUCH STYLES
   ========================================================================== */

/* Mobile Bottom Sticky Action Bar (Shown only <= 768px) */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Add safe area bottom padding to main app container so content is never covered */
  body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 15px)) !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 9000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  }

  .mb-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #94a3b8;
    padding: 0.35rem 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    gap: 0.15rem;
    transition: all 0.15s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mb-nav-item i {
    width: 20px;
    height: 20px;
    transition: transform 0.15s ease;
  }

  .mb-nav-item:active i {
    transform: scale(0.9);
  }

  .mb-nav-item.active {
    color: #f97316;
  }

  .mb-nav-item.mb-highlight {
    color: #ffffff;
  }
  .mb-nav-item.mb-highlight .mb-icon-circle {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -14px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    border: 2px solid #0f172a;
  }
  .mb-nav-item.mb-highlight .mb-icon-circle i {
    color: #ffffff;
    width: 20px;
    height: 20px;
  }

  /* Optimize Touch Targets */
  .pill-btn, .btn-primary-action, .btn-secondary-action, .input-val, .select-precision {
    min-height: 42px;
  }

  /* Floating basket positioning above mobile bar */
  .floating-project-basket {
    bottom: calc(75px + env(safe-area-inset-bottom, 0px)) !important;
    right: 1rem !important;
  }

  .cookie-consent-banner {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100% - 1.5rem) !important;
  }
}

/* Mobile Slide-Up 21-Tool Bottom Sheet Drawer */
.mobile-tools-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: flex-end;
  animation: fadeIn 0.2s ease-out;
}

.mobile-drawer-sheet {
  background: #ffffff;
  width: 100%;
  max-height: 85vh;
  border-radius: 20px 20px 0 0;
  padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) 1rem;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: slideUpDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpDrawer {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.drawer-handle-bar {
  width: 36px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: -0.5rem auto 0.75rem auto;
}

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

.drawer-title-group span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drawer-grid-container {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 65vh;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  padding-right: 2px;
}

.drawer-tool-item {
  background: var(--bg-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.drawer-tool-item:active, .drawer-tool-item.active {
  background: var(--brand-orange-subtle);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.drawer-tool-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand-orange);
  border: 1px solid var(--border-main);
}

.drawer-tool-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.25;
}


/* ==========================================================================
   COMPREHENSIVE MOBILE UX & TYPOGRAPHY VISIBILITY OVERHAUL (320px ~ 768px)
   ========================================================================== */

/* 1. Global Text Break & Polish */
body, h1, h2, h3, h4, h5, p, span, div, label, li {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 2. Responsive Headings & Descriptions */
.main-title {
  font-size: clamp(1.1rem, 4.5vw, 1.45rem) !important;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.main-desc {
  font-size: clamp(0.78rem, 3.2vw, 0.88rem) !important;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* 3. Mobile Viewport Rules (<= 768px) */
@media (max-width: 768px) {
  /* Layout Padding */
  .app-main {
    padding: 0.75rem 0.6rem !important;
  }

  .nav-container {
    padding: 0 0.65rem !important;
    gap: 0.4rem !important;
  }

  .brand-tagline {
    display: none !important;
  }

  .brand-name {
    font-size: 1.05rem !important;
  }

  .brand-en {
    font-size: 0.68rem !important;
  }

  .brand-symbol {
    width: 32px !important;
    height: 32px !important;
  }
  .symbol-v {
    font-size: 1rem !important;
  }

  /* Hide overflowing desktop utility buttons on mobile (accessible via bottom nav) */
  .nav-top-bar #openQuoteModalBtn,
  .nav-top-bar #openCatalogModalBtn,
  .nav-top-bar #openHistoryModalBtn,
  .nav-top-bar #shareUrlBtn,
  .nav-top-bar #printReportBtn,
  .nav-top-bar #complianceNoticeBtn {
    display: none !important;
  }

  .nav-actions {
    gap: 0.35rem !important;
  }

  .btn-nav-action {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.55rem !important;
  }

  .btn-nav-primary {
    font-size: 0.75rem !important;
    padding: 0.38rem 0.65rem !important;
  }

  /* Segmented 21-Tab Scroll Bar */
  .nav-menu-bar {
    padding: 0.25rem 0 !important;
  }

  .tab-btn {
    font-size: 0.72rem !important;
    padding: 0.32rem 0.5rem !important;
    gap: 0.2rem !important;
  }

  /* Sub Header Standards Bar */
  .sub-header-bar {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.72rem !important;
  }
  .sub-header-bar .sh-title {
    display: none !important;
  }
  .sub-header-bar .standards-badges span {
    font-size: 0.68rem !important;
    padding: 0.1rem 0.35rem !important;
  }

  /* Form & Workbench Grids */
  .meter-workbench-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .workbench-card, .meter-readout-panel {
    border-radius: var(--radius-md) !important;
  }

  .card-caption {
    padding: 0.6rem 0.75rem !important;
  }

  .card-caption h3 {
    font-size: 0.88rem !important;
  }

  .workbench-body {
    padding: 0.85rem 0.75rem !important;
    gap: 0.75rem !important;
  }

  .adv-inputs-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .params-2col-grid, .calc-matrix-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  /* Form Controls & Inputs (16px to prevent iOS Safari auto-zoom) */
  .input-val, .input-precision {
    font-size: 16px !important;
    height: 42px !important;
    padding: 0.45rem 0.65rem !important;
  }

  .select-precision {
    font-size: 15px !important;
    height: 42px !important;
    padding: 0.45rem 0.65rem !important;
    width: 100% !important;
  }

  .val-input-group {
    width: 100% !important;
  }
  .val-unit {
    padding: 0 0.6rem !important;
    font-size: 0.82rem !important;
  }

  /* Quick Preset Pills */
  .preset-pill-group {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.35rem !important;
  }
  .preset-pill-items {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }
  .pill-btn {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.55rem !important;
    flex: 1 1 calc(50% - 0.35rem) !important;
    text-align: center !important;
    justify-content: center !important;
    min-height: 38px !important;
  }

  /* Hero Meter Readout Panel */
  .terminal-voltage-hero {
    padding: 0.85rem 0.75rem !important;
  }

  .terminal-voltage-big {
    font-size: clamp(2rem, 7.5vw, 2.5rem) !important;
  }

  .res-num-hero {
    font-size: clamp(1.75rem, 6.5vw, 2.2rem) !important;
  }

  .summary-grid-hero {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
  }

  .summary-item-hero {
    padding: 0.5rem 0.4rem !important;
  }
  .summary-label {
    font-size: 0.7rem !important;
  }
  .summary-val {
    font-size: 0.88rem !important;
  }

  /* AI 6-Point Safety Audit Card */
  .audit-card-body {
    padding: 0.75rem !important;
  }
  .audit-score-hero {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.4rem !important;
  }
  .audit-checklist-grid {
    grid-template-columns: 1fr !important;
    gap: 0.35rem !important;
  }
  .audit-check-item {
    padding: 0.45rem 0.6rem !important;
    font-size: 0.76rem !important;
  }

  /* Field Measurement & BOM Cards */
  .fm-inputs-grid, .fm-result-banner {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .bom-parts-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }
  .bom-part-card {
    padding: 0.75rem !important;
  }
  .bom-part-bottom {
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
  }

  .gear-chips {
    flex-direction: column !important;
    gap: 0.35rem !important;
  }
  .gear-chip {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.45rem !important;
  }

  /* Canvas & SVG Viewports */
  .sld-canvas-viewport {
    padding: 0.5rem !important;
  }
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Tables Mobile Responsiveness */
  .table-scroll-wrapper, .cable-table-wrap, .data-table-container {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: var(--radius-sm) !important;
  }
  table.data-table {
    min-width: 540px !important;
    font-size: 0.78rem !important;
  }
  table.data-table th, table.data-table td {
    padding: 0.4rem 0.5rem !important;
  }

  /* Modals Mobile Sizing */
  .modal-backdrop {
    padding: 0.5rem !important;
    align-items: flex-end !important;
  }
  .modal-card, .modal-card.modal-lg {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    padding: 1.15rem 0.85rem !important;
    border-radius: 16px 16px 0 0 !important;
  }
  .modal-header {
    padding-bottom: 0.65rem !important;
    margin-bottom: 0.75rem !important;
  }
  .modal-header h4 {
    font-size: 1rem !important;
  }

  .pricing-tiers-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  .pricing-tier-card {
    padding: 1.15rem 0.85rem !important;
  }

  .global-pay-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.35rem !important;
  }

  .report-customizer-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .legal-tab-nav {
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding-bottom: 0.35rem !important;
  }
  .legal-tab-btn {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.65rem !important;
  }

  .legal-content-pane {
    max-height: 52vh !important;
    font-size: 0.8rem !important;
    line-height: 1.5 !important;
  }

  /* Showcase Bar at Bottom */
  .showcase-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  /* Footer */
  .footer-container {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
  }
  .footer-standards {
    justify-content: center !important;
  }
  .f-nav-links {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
}


/* ==========================================================================
   ZERO-CLIPPING HORIZONTAL NAVIGATION TRACK & SCROLL CONTROLS
   ========================================================================== */

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

.nav-segmented-track {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.nav-tabs-segmented {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  padding: 0.25rem 0.5rem;
  width: 100%;
}

.nav-tabs-segmented::-webkit-scrollbar {
  height: 4px;
}

.nav-tabs-segmented::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.nav-tabs-segmented::-webkit-scrollbar-track {
  background: transparent;
}

/* Nav Scroll Buttons (Left & Right Arrows) */
.nav-scroll-btn {
  background: #ffffff;
  border: 1px solid var(--border-main);
  color: var(--navy-dark);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  z-index: 10;
  transition: all 0.15s ease;
  margin: 0 2px;
}

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

.nav-scroll-btn i {
  width: 16px;
  height: 16px;
}

/* Category Quick Filter Strip */
.category-filter-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.2rem 0.75rem 0.35rem 0.75rem;
  max-width: 1520px;
  margin: 0 auto;
  scrollbar-width: none;
}
.category-filter-strip::-webkit-scrollbar {
  display: none;
}

.cat-filter-chip {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-filter-chip:hover {
  background: #e2e8f0;
  color: var(--navy-dark);
}

.cat-filter-chip.active {
  background: var(--navy-dark);
  color: #ffffff;
  border-color: var(--navy-dark);
}

/* Tab Button Enhanced */
.tab-btn {
  flex-shrink: 0 !important;
  scroll-margin: 30px;
}

/* Enhanced Sponsor Strip (Zero Vertical/Horizontal Clipping) */
.sponsor-strip {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 0.45rem 1rem;
  width: 100%;
}

.sponsor-inner {
  max-width: 1520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.775rem;
  line-height: 1.4;
}

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


/* ==========================================================================
   TOTAL ENGINEERING SUITE: CAD SYMBOLS, GLOBAL GRID & TROUBLESHOOTING
   ========================================================================== */

.cad-symbols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.cad-symbol-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.cad-symbol-card:hover {
  border-color: var(--brand-orange);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.cad-sym-preview {
  height: 64px;
  background: #0f172a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
}

.cad-sym-preview svg {
  max-height: 100%;
  max-width: 100%;
  stroke: #38bdf8;
  fill: none;
  stroke-width: 2;
}

.cad-sym-info h5 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 0.2rem;
}

.cad-sym-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--brand-orange);
  font-weight: 700;
}

.cad-sym-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.global-grid-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
}

.global-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.global-grid-table th {
  background: #0f172a;
  color: #f8fafc;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 700;
  border: 1px solid #334155;
  white-space: nowrap;
}

.global-grid-table td {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  background: #ffffff;
}

.global-grid-table tr:nth-child(even) td {
  background: var(--bg-surface-subtle);
}

.color-swatch-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* 4-Language Selector */
.lang-dropdown-container {
  position: relative;
  display: inline-block;
}

.lang-select-btn {
  background: #ffffff;
  border: 1px solid var(--border-main);
  color: var(--navy-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  z-index: 1000;
  min-width: 140px;
}

.lang-menu-dropdown.show {
  display: flex;
}

.lang-option-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy-dark);
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-option-item:hover {
  background: var(--brand-orange-subtle);
  color: var(--brand-orange);
}


/* Ctee Express Pay Button */
.btn-ctee-pay {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  transition: all 0.15s ease;
  text-decoration: none;
  width: 100%;
}

.btn-ctee-pay:hover {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
  transform: translateY(-1px);
}

.ctee-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.4rem;
}


/* ==========================================================================
   GLOBAL INSTANT TOOL SEARCH BAR & ENHANCED PALETTE
   ========================================================================== */

.quick-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 480px;
  width: 100%;
  margin: 0.2rem 0;
}

.quick-search-input {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.4rem 2rem 0.4rem 2.2rem;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--navy-dark);
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.quick-search-input:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.quick-search-icon {
  position: absolute;
  left: 0.65rem;
  color: #94a3b8;
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.quick-search-kbd {
  position: absolute;
  right: 0.65rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #64748b;
  padding: 1px 4px;
  pointer-events: none;
}


/* ==========================================================================
   CENTERED MASTER LAYOUT (CLEAN FULL-WIDTH BOTTOM FOOTER)
   ========================================================================== */

.page-container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3.5rem 1.25rem;
  width: 100%;
  flex: 1;
}

/* Sticky Ad & Spec Sidebars */
.ad-sidebar {
  position: relative;
  display: block;
}

.ad-sticky-box {
  position: sticky;
  top: 105px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ad-box-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.adsense-slot-placeholder {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.ad-preview-banner {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-light);
}

.ad-chip {
  background: var(--brand-orange-subtle);
  color: var(--brand-orange);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.ad-preview-banner h6 {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.ad-preview-banner p {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.ad-btn-action {
  display: block;
  text-align: center;
  background: var(--navy-dark);
  color: #ffffff !important;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.4rem 0.6rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.15s ease;
}

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

/* Quick Standards Cheat Sheet Card */
.quick-cheat-card {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.quick-cheat-card h6 {
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.cheat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cheat-list li {
  border-bottom: 1px solid #1e293b;
  padding-bottom: 0.25rem;
  color: #cbd5e1;
}

.cheat-list li strong {
  color: #fb923c;
}

/* Responsive Grid Adaptation */
@media (max-width: 1540px) {
  .master-layout-grid {
    grid-template-columns: minmax(780px, 1100px) 250px;
  }
  .ad-sidebar.left-sidebar {
    display: none;
  }
}

@media (max-width: 1180px) {
  .master-layout-grid {
    display: block;
    max-width: 100%;
    padding: 0.75rem 0.75rem 3.5rem 0.75rem;
  }
  .ad-sidebar {
    display: none;
  }
}


/* ==========================================================================
   DYNAMIC VISUAL GAUGES, ENGINEERING RULE BOXES & 1-CLICK COPY
   ========================================================================== */

/* Visual Multi-Zone Gauge Bar */
.visual-gauge-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  margin: 0.75rem 0;
}

.visual-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.4rem;
}

.visual-gauge-track {
  position: relative;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
}

.gauge-zone {
  height: 100%;
}
.gauge-zone.zone-safe { background: #22c55e; }
.gauge-zone.zone-warn { background: #f59e0b; }
.gauge-zone.zone-danger { background: #ef4444; }

.visual-gauge-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #0f172a;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
  transition: left 0.3s ease;
}

.visual-gauge-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Practical Engineering Rule & Field Tip Box */
.engineering-rule-box {
  background: #f8fafc;
  border-left: 3.5px solid var(--brand-orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--navy-dark);
  margin-top: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.engineering-rule-box i {
  color: var(--brand-orange);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.engineering-rule-box strong {
  color: var(--brand-orange);
}

/* 1-Click Copy Result Button */
.btn-copy-summary {
  background: transparent;
  border: 1px dashed var(--border-main);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  margin-top: 0.5rem;
}

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


/* ==========================================================================
   INSTANT SEARCH DROPDOWN STYLES
   ========================================================================== */
.quick-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 10px;
  max-height: 380px;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.15);
  padding: 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover, .search-result-item.selected {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
}

.search-res-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-res-desc {
  font-size: 0.73rem;
  color: #94a3b8;
  margin-top: 2px;
}

.search-res-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
  white-space: nowrap;
}

/* ==========================================================================
   GLOBAL SEO CALCULATOR LANDING PAGES
   ========================================================================== */
body.seo-page {
  min-height: 100vh;
  background: #f8fafc;
  color: #0f172a;
}

.seo-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.seo-eyebrow {
  margin: 0 0 10px;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.seo-shell h1 {
  max-width: 760px;
  margin: 0;
  font-size: 4.5rem;
  line-height: 0.95;
  letter-spacing: 0;
  color: #082f49;
}

.seo-lead {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: 1.12rem;
  line-height: 1.7;
  color: #334155;
}

.seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 42px;
}

.seo-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  background: #0f172a;
  color: #ffffff;
}

.secondary-action {
  border: 1px solid #cbd5e1;
  color: #0f172a;
  background: #ffffff;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.seo-grid article,
.seo-faq {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.seo-grid h2,
.seo-faq h2,
.seo-faq h3 {
  margin: 0 0 10px;
  color: #0f172a;
  letter-spacing: 0;
}

.seo-grid h2,
.seo-faq h2 {
  font-size: 1.02rem;
}

.seo-faq h3 {
  margin-top: 18px;
  font-size: 0.98rem;
}

.seo-grid p,
.seo-faq p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

.seo-faq {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .seo-shell {
    width: min(100% - 24px, 1040px);
    padding: 38px 0;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .seo-shell h1 {
    font-size: 2.4rem;
    line-height: 1;
  }

  .seo-actions a {
    width: 100%;
  }
}
