/* ==========================================================================
   VOLTTABLE — INDUSTRIAL TELEMETRY & HIGH-VOLTAGE WORKSHOP DESIGN SYSTEM
   Zero AI-Cliché Colors • Fluke/Bosch/Rivian Hardware Instrumentation Aesthetic
   ========================================================================== */

:root {
  /* Industrial Workshop Light Mode (Default: Warm Blueprint Paper + Carbon) */
  --bg-page: #F2F0EA;
  --bg-surface: #FFFFFF;
  --bg-panel: #E7E4DC;
  --bg-telemetry: #141615;      /* Recessed OLED Instrument Cluster */
  --bg-telemetry-card: #1C1F1D;

  /* Typography */
  --text-primary: #141615;
  --text-secondary: #434744;
  --text-muted: #686E69;
  --text-on-telemetry: #F4F3EE;
  --text-telemetry-muted: #9BA39D;

  /* Hardware Accents — Strictly No Purple / Indigo / Cyan Neon */
  --accent-volt: #FF5500;       /* High-Voltage Safety Orange (EV HV Cable Standard) */
  --accent-volt-hover: #E04800;
  --accent-volt-soft: rgba(255, 85, 0, 0.12);

  --accent-amber: #E5A000;      /* Multimeter Rotary Dial Amber */
  --accent-amber-soft: rgba(229, 160, 0, 0.14);

  --accent-charge: #4D9E34;     /* Industrial LED Charge Indicator Green */
  --accent-charge-bright: #78E048; /* OLED Display Readout Phosphor Green */
  --accent-charge-soft: rgba(77, 158, 52, 0.13);

  --accent-copper: #B85D19;     /* Busbar Copper Accent */
  --accent-danger: #D92B2B;     /* Emergency Cutoff / Fault Code Red */
  --accent-danger-soft: rgba(217, 43, 43, 0.12);

  /* Mechanical Borders & Grid */
  --border-strong: #141615;
  --border-subtle: #CFCBC0;
  --border-telemetry: #2D322F;
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --shadow-hardware: 0 2px 0 rgba(20, 22, 21, 0.08);

  /* Font Stacks */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --bg-page: #111312;
  --bg-surface: #191C1A;
  --bg-panel: #222624;
  --bg-telemetry: #0B0D0C;
  --bg-telemetry-card: #141715;

  --text-primary: #F2F0EA;
  --text-secondary: #B8BDB9;
  --text-muted: #828A84;

  --accent-volt: #FF6214;
  --accent-volt-hover: #FF7833;
  --accent-volt-soft: rgba(255, 98, 20, 0.16);
  --accent-charge: #62C442;
  --border-strong: #383E3A;
  --border-subtle: #2A2F2C;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans), sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 24px 24px;
}

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

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   TOP TELEMETRY BAR & STICKY WORKSHOP HEADER
   ========================================================================== */

.top-spec-strip {
  background: var(--bg-telemetry);
  color: var(--text-telemetry-muted);
  font-family: var(--font-mono), monospace;
  font-size: 0.75rem;
  border-bottom: 2px solid var(--accent-volt);
  padding: 0.4rem 0;
}

.top-spec-strip .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.spec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-charge-bright);
  box-shadow: 0 0 6px var(--accent-charge-bright);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-strong);
  box-shadow: var(--shadow-hardware);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 0.65rem;
  padding: 0.5rem 0;
}

.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.menu-toggle-btn {
  display: none;
  background: var(--bg-panel);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  min-width: 42px;
}

.menu-toggle-btn .menu-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle-btn[aria-expanded="true"] .menu-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle-btn[aria-expanded="true"] .menu-bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle-btn[aria-expanded="true"] .menu-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-drawer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 1;
  margin-left: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent-volt);
  color: #FFFFFF;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono), monospace;
  font-weight: 800;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono), monospace;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--bg-panel);
  border-color: var(--border-strong);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.ctrl-btn,
.lang-select {
  min-height: 34px;
  padding: 0.3rem 0.55rem;
  font-family: var(--font-mono), monospace;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.ctrl-btn:hover,
.lang-select:hover {
  border-color: var(--accent-volt);
}

.ctrl-btn[data-unit-active="imperial"] {
  background: var(--accent-volt-soft);
  color: var(--accent-volt);
  border-color: var(--accent-volt);
}

/* ==========================================================================
   HERO INSTRUMENTATION & INSTANT VOLTAGE CHECKER
   ========================================================================== */

.hero-section {
  padding: 2.25rem 0 2rem;
  border-bottom: 2px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  align-items: stretch;
}

.kicker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.65rem;
  background: var(--accent-volt-soft);
  color: var(--accent-volt);
  border: 1px solid var(--accent-volt);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono), monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

/* Omnibox Instant Search */
.omnibox-wrap {
  position: relative;
  margin-bottom: 1.1rem;
}

.omnibox-input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.96rem;
  font-family: var(--font-mono), monospace;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0 var(--border-strong);
}

.omnibox-input:focus {
  outline: none;
  border-color: var(--accent-volt);
}

.omnibox-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-volt);
  pointer-events: none;
}

.omnibox-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  z-index: 90;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.omnibox-results.open {
  display: block;
}

.omni-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.omni-item:hover {
  background: var(--accent-volt-soft);
}

.omni-type {
  font-family: var(--font-mono), monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.quick-tag-label {
  font-family: var(--font-mono), monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
}

.quick-tag {
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}

.quick-tag:hover {
  border-color: var(--accent-volt);
  color: var(--accent-volt);
}

/* Telemetry Panel (OLED Hardware Box) */
.telemetry-panel {
  background: var(--bg-telemetry);
  color: var(--text-on-telemetry);
  border: 2px solid var(--border-strong);
  border-top: 4px solid var(--accent-volt);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: 4px 4px 0 rgba(20, 22, 21, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-telemetry);
  padding-bottom: 0.65rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--accent-amber);
}

.pack-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.pack-pill {
  min-height: 40px;
  font-family: var(--font-mono), monospace;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-telemetry-card);
  color: var(--text-on-telemetry);
  border: 1px solid var(--border-telemetry);
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.pack-pill.active,
.pack-pill:hover {
  background: var(--accent-volt);
  color: #FFFFFF;
  border-color: var(--accent-volt);
}

.volt-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.volt-number-input {
  width: 130px;
  min-height: 48px;
  background: #080908;
  color: var(--accent-charge-bright);
  border: 1.5px solid var(--accent-amber);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono), monospace;
  font-size: 1.45rem;
  font-weight: 800;
  text-align: center;
  padding: 0.25rem 0.5rem;
}

.volt-slider {
  flex: 1;
  accent-color: var(--accent-volt);
  height: 8px;
  cursor: pointer;
}

.oled-readout {
  background: #080908;
  border: 1px solid var(--border-telemetry);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.oled-main-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.oled-big-value {
  font-family: var(--font-mono), monospace;
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--accent-charge-bright);
  line-height: 1;
}

.oled-cell-meta {
  font-family: var(--font-mono), monospace;
  font-size: 0.82rem;
  color: var(--text-telemetry-muted);
}

.battery-bar-outer {
  height: 12px;
  background: #1B1E1C;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid #323834;
}

.battery-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-volt) 0%, var(--accent-amber) 40%, var(--accent-charge-bright) 100%);
  width: 78%;
  transition: width 0.2s ease;
}

.oled-status-line {
  font-family: var(--font-mono), monospace;
  font-size: 0.78rem;
  color: var(--accent-amber);
}

/* ==========================================================================
   SECTIONS, CARDS, TABLES & QUICK ANSWER (GEO / AI OVERVIEWS)
   ========================================================================== */

.section-block {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 24px;
  background: var(--accent-volt);
}

.section-sub {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

/* Quick Answer GEO Box */
.quick-answer-box {
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-left: 6px solid var(--accent-volt);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.35rem;
  margin: 1.25rem 0 1.75rem;
  box-shadow: var(--shadow-hardware);
}

.quick-answer-label {
  font-family: var(--font-mono), monospace;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-volt);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

/* Bento Grid & Workshop Cards */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.15rem;
}

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

.workshop-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 3px 3px 0 rgba(20, 22, 21, 0.08);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.workshop-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-volt);
}

.card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  gap: 0.5rem;
}

.mono-tag {
  font-family: var(--font-mono), monospace;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
}

.mono-tag.volt {
  background: var(--accent-volt-soft);
  color: var(--accent-volt);
  border-color: var(--accent-volt);
}

.mono-tag.danger {
  background: var(--accent-danger-soft);
  color: var(--accent-danger);
  border-color: var(--accent-danger);
}

.mono-tag.amber {
  background: var(--accent-amber-soft);
  color: #9E6C00;
  border-color: var(--accent-amber);
}

.card-title {
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.89rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-meta-strip {
  font-family: var(--font-mono), monospace;
  font-size: 0.78rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--text-secondary);
}

.btn-hardware {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-mono), monospace;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--accent-volt);
  color: #FFFFFF;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--border-strong);
}

.btn-hardware:hover {
  background: var(--accent-volt-hover);
}

.btn-secondary {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-subtle);
}

/* ==========================================================================
   2-COLUMN CALCULATOR & TELEMETRY WORKBENCH LAYOUT
   ========================================================================== */

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.workbench-layout > div {
  min-width: 0;
}

.controls-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
}

.preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.preset-btn {
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.preset-btn:hover,
.preset-btn.active {
  background: var(--accent-volt);
  color: #FFFFFF;
  border-color: var(--accent-volt);
}

.control-group {
  margin-bottom: 1.15rem;
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.control-readout {
  font-family: var(--font-mono), monospace;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent-volt);
  background: var(--accent-volt-soft);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
}

.sticky-telemetry {
  position: sticky;
  top: 84px;
}

.telemetry-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.telemetry-kpi {
  background: var(--bg-telemetry-card);
  border: 1px solid var(--border-telemetry);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-xs);
}

.kpi-label {
  font-family: var(--font-mono), monospace;
  font-size: 0.7rem;
  color: var(--text-telemetry-muted);
  display: block;
}

.kpi-val {
  font-family: var(--font-mono), monospace;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-on-telemetry);
}

/* Smart Contextual Hardware Affiliate Box */
.affiliate-hardware-box {
  margin-top: 1rem;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-left: 6px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  padding: 1.05rem;
  box-shadow: var(--shadow-hardware);
}

.aff-badge {
  font-family: var(--font-mono), monospace;
  font-size: 0.7rem;
  font-weight: 800;
  color: #9E6C00;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.aff-title {
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.aff-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.aff-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.aff-price {
  font-family: var(--font-mono), monospace;
  font-weight: 800;
  font-size: 0.95rem;
}

/* ==========================================================================
   DATA TABLES & VOLTAGE ZONES
   ========================================================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  margin: 1rem 0 1.5rem;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--bg-panel);
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--accent-volt);
  border-radius: 3px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.spec-table th {
  background: var(--bg-telemetry);
  color: var(--text-on-telemetry);
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 2px solid var(--accent-volt);
}

.spec-table td {
  padding: 0.68rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono), monospace;
}

.spec-table th,
.spec-table td {
  white-space: nowrap;
}

.spec-table td.cell-wrap,
.spec-table th.cell-wrap {
  white-space: normal;
}

.spec-table-sticky-col th:last-child,
.spec-table-sticky-col td:last-child {
  position: sticky;
  right: 0;
  background: var(--bg-surface);
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.15);
  text-align: center;
  z-index: 2;
}

.spec-table-sticky-col th:last-child {
  background: var(--bg-telemetry);
}

.spec-table-sticky-col tr:hover td:last-child {
  background: var(--bg-panel);
}

.zone-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  font-size: 0.74rem;
  font-weight: 800;
}

.zone-full, .zone-longevity {
  background: var(--accent-charge-soft);
  color: var(--accent-charge);
}

.zone-storage {
  background: var(--accent-amber-soft);
  color: #9A6B00;
}

.zone-warning, .zone-danger, .zone-cutoff {
  background: var(--accent-danger-soft);
  color: var(--accent-danger);
}

/* Interactive Diagnostic Steps on Error Code Pages */
.diag-step-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  margin-bottom: 0.9rem;
}

.diag-step-card.completed {
  border-color: var(--accent-charge);
  background: var(--accent-charge-soft);
}

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

.diag-check-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.02rem;
  cursor: pointer;
}

.diag-check-label input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent-charge);
  cursor: pointer;
}

.page-body {
  padding: 2rem 1.25rem;
}

.breadcrumbs {
  font-family: var(--font-mono), monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
}

.breadcrumbs a:hover {
  color: var(--accent-volt);
  text-decoration: underline;
}

.site-footer {
  background: var(--bg-telemetry);
  color: var(--text-telemetry-muted);
  border-top: 3px solid var(--accent-volt);
  padding: 2.5rem 0;
  margin-top: 3rem;
  font-size: 0.86rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  color: var(--text-on-telemetry);
  font-family: var(--font-mono), monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

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

@media (max-width: 920px) {
  .hero-grid,
  .workbench-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .sticky-telemetry {
    position: static;
  }
}

@media (max-width: 860px) {
  .menu-toggle-btn {
    display: inline-flex;
  }
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 0;
  }
  .header-main-row {
    width: 100%;
  }
  .nav-drawer {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem 0 0.5rem;
    border-top: 1px solid var(--border-subtle);
  }
  .nav-drawer.open {
    display: flex;
  }
  .main-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }
  .nav-link {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.85rem;
    font-size: 0.92rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
  }
  .header-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--border-subtle);
  }
  .header-controls #unit-toggle-btn {
    grid-column: span 2;
  }
  .ctrl-btn,
  .lang-select {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.78rem;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .top-spec-strip {
    font-size: 0.68rem;
    padding: 0.3rem 0;
  }
  .top-spec-strip .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .top-spec-strip .container span:last-child {
    display: none;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-subtitle {
    font-size: 0.88rem;
  }
  .kicker-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
  }
  .page-body {
    padding: 1.25rem 1rem;
  }
  .breadcrumbs {
    margin: 0 0 0.85rem 0;
    font-size: 0.72rem;
  }
}

@media print {
  .site-header, .top-spec-strip, .site-footer, .affiliate-hardware-box, .btn-hardware {
    display: none !important;
  }
  body {
    background: #FFFFFF;
  }
}
