/* ******************************************************************************
LAST EDIT June 17, 2026  (added heat-gain specific after moving all inline from residential-heat-gain.htm)                                  
styles.css - Peter's HVAC Advisory

Site code built with Grok AI by xAI
Site content © 2026 Peter's HVAC Advisory – All Rights Reserved
*********************************************************************************** */

/* ==========================================================================
   0. CSS Custom Properties (Variables)
   ========================================================================== */
:root {
  --primary-blue: #4c7be9;
  --accent-gold: #e9b24c;
  --dark-blue: #1f2a44;
  --light-bg: #f8f9fa;
  --text: #222;
  --text-light: #555;
  --white: #ffffff;
  --success: #28a745;
  --danger: #dc3545;
}

/* ==========================================================================
   0.5 Top Bar
   ========================================================================== */
.top-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0.8rem 5%;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.login-btn {
    padding: 0.55rem 1.2rem;
    font-size: 0.95rem;
    min-width: auto;
}

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--light-bg);
  line-height: 1.65;
  color: var(--text);
  font-size: 1.05rem;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */
h1, h2, h3 {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-weight: 700;
}

h1 {
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0.85em 0;
  color: var(--text);
}

p.label, p.labelbk, footer p, small {
  font-size: 0.9rem;
  color: var(--text-light);
}

p.labelbk { 
  color: #000; 
}

.text-bold       { font-weight: bold; }
.text-green      { color: var(--success); }
.text-yellow     { color: var(--accent-gold); }
.text-red        { color: var(--danger); }
.text-orange     { color: #fd7e14; }
.text-critical   { color: var(--danger); font-weight: bold; }

/* ==========================================================================
   3. Layout Helpers
   ========================================================================== */
.center { 
  margin-left: auto; 
  margin-right: auto; 
}

.content-wide {
  font-size: 1.22rem;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 auto 2.8rem;
  text-align: left;
  padding: 0 1rem;
}

/* ==========================================================================
   4. Header
   ========================================================================== */
header {
  background: linear-gradient(135deg, var(--primary-blue), #3a66c4);
  color: white;
  padding: 1.1rem 1.25rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-right {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex: 1;
}

header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: white;
}

.tagline {
  font-size: 1rem;
  font-weight: 500;
  color: #e6f0ff;
  margin: 0;
  font-style: italic;
  letter-spacing: 0.3px;
}

/* Hamburger Menu — title row + full-width nav bar underneath */
.main-nav {
  display: contents;
}

.hamburger {
  order: 1;
  flex-shrink: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  line-height: 1;
}

.nav-menu {
  order: 3;
  flex-basis: 100%;
  display: none;
  position: static;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.12);
  flex-direction: column;
  box-shadow: none;
  z-index: 1100;
  border-radius: 0;
  margin-top: 0.35rem;
  padding: 0.35rem 0 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.nav-menu a {
  color: white !important;
  text-decoration: none;
  padding: 1.1rem 1.4rem;
  font-size: 1.12rem;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.nav-auth-slot {
  flex-basis: 100%;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  margin-top: 0.15rem;
  padding-top: 0.15rem;
}

.nav-auth-user-row,
.nav-auth-guest {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  gap: 0;
}

.nav-user-name {
  display: block;
  width: 100%;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.35;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-auth-slot .nav-logout-link,
.nav-auth-slot .nav-login-link,
.nav-auth-slot .nav-signup-link {
  display: block;
  width: 100%;
  font-size: 1.12rem;
  font-weight: 600;
  text-decoration: none;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-auth-slot .nav-logout-link {
  color: #f87171 !important;
  border-bottom: none;
}

.nav-auth-slot .nav-logout-link:hover {
  color: #ef4444 !important;
  background-color: #3a66c4;
}

.nav-auth-slot .nav-login-link,
.nav-auth-slot .nav-signup-link {
  color: white !important;
}

.nav-auth-slot .nav-signup-link {
  border-bottom: none;
}

.nav-auth-slot .nav-login-link:hover,
.nav-auth-slot .nav-signup-link:hover,
.nav-auth-slot .nav-logout-link:hover {
  background-color: #3a66c4;
}

.nav-menu a:last-child {
  border-bottom: none;
}

.nav-menu a:hover {
  background-color: #3a66c4;
}

.nav-menu.active {
  display: flex;
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
  .nav-menu {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0 0.65rem;
  }
  .nav-menu a {
    padding: 0.65rem 1.1rem;
    border-bottom: none;
    font-size: 1.02rem;
    border-radius: 6px;
    color: white !important;
  }

  .nav-auth-slot {
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin-top: 0.25rem;
    padding-top: 0.35rem;
  }

  .nav-auth-user-row,
  .nav-auth-guest {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    padding: 0.45rem 1rem 0.55rem;
    width: auto;
  }

  .nav-user-name,
  .nav-auth-slot .nav-logout-link,
  .nav-auth-slot .nav-login-link,
  .nav-auth-slot .nav-signup-link {
    display: inline;
    width: auto;
    padding: 0;
    border-bottom: none;
    font-size: 1.02rem;
  }
  .nav-menu a:hover {
    background-color: rgba(255,255,255,0.15);
  }
}

/* ==========================================================================
   5. Components
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  max-width: 920px;
  margin: 3rem auto;
  padding: 0 1.25rem;
  justify-content: center;
}

.service-card, .service-btn {
  background-color: white;
  border: 2px solid var(--primary-blue);
  border-radius: 12px;
  padding: 1.4rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
}

.service-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-btn {
  display: block;
  text-decoration: none;
  text-align: left;
  min-height: 130px;
  padding: 1.25rem;
}

.service-card:hover, .service-btn:hover {
  background-color: #f0f8ff;
  border-color: #2a5bd9;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transform: translateY(-6px);
}

/* Refrigerant Switcher — compact button dropdown (50% scale) */
.refrigerant-switcher {
  position: relative;
  text-align: center;
  margin: 0.6rem auto 0.9rem auto;
  padding: 0.45rem 0.625rem;
  background: white;
  border: 2px solid var(--primary-blue);
  border-radius: 7px;
  max-width: 220px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.refrigerant-switcher select.ref-switcher-native {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.ref-switcher-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  padding: 8px 9px;
  font-size: 0.6rem;
  font-weight: 600;
  min-height: 28px;
  border: 2px solid var(--primary-blue);
  border-radius: 5px;
  background: white;
  color: var(--text);
  cursor: pointer;
  box-sizing: border-box;
  line-height: 1.2;
}

.ref-switcher-btn:hover {
  background: #f0f4ff;
}

.ref-switcher-label {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ref-switcher-chevron {
  flex-shrink: 0;
  font-size: 0.55rem;
  color: var(--primary-blue);
}

.ref-switcher-menu {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  top: calc(100% - 0.15rem);
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: white;
  border: 2px solid var(--primary-blue);
  border-radius: 5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
}

.ref-switcher-item {
  padding: 0.35rem 0.5rem;
  font-size: 0.6rem;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  line-height: 1.25;
}

.ref-switcher-item:hover {
  background: #e0e7ff;
}

.ref-switcher-item.is-current {
  background: #f0f4ff;
  font-weight: 700;
  color: var(--primary-blue);
}

/* Output Boxes */
.output {
  background: white;
  border: 2px solid var(--primary-blue);
  border-left: 7px solid var(--accent-gold);
  border-radius: 10px;
  padding: 1.8rem;
  margin: 2rem auto;
  max-width: 720px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  font-size: 1.12rem;
  line-height: 1.7;
  min-height: 180px;
}

/* Buttons */
.big-cta-btn, .btn {
  background: linear-gradient(135deg, var(--primary-blue), #3a66c4) !important;
  color: white !important;
  border: none;
  border-radius: 7px;
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 42px;
  min-width: 170px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(76, 123, 233, 0.32);
  text-align: center;
}

.big-cta-btn:hover, .btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(76, 123, 233, 0.45);
  background: linear-gradient(135deg, #3a66c4, var(--primary-blue)) !important;
}

/* Diagnostic Buttons */
.diagnostic-buttons {
    text-align: center;
    margin: 2.8rem 0 2.2rem;
}

.button-row {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.button-row .big-cta-btn,
.button-row .btn {
    min-width: 155px;
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
footer {
  background: linear-gradient(to right, var(--dark-blue), var(--primary-blue));
  color: white;
  text-align: center;
  padding: 2rem 1.25rem 1.5rem;
  margin-top: 4rem;
}

footer a {
  color: #c0d4ff;
  text-decoration: none;
}

footer a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

.grok-credit {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #e0e9ff;
  line-height: 1.5;
}

.grok-credit a {
  color: var(--accent-gold);
  font-weight: 500;
}

.grok-credit a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   7. Media Queries + Diagnostic Tools
   ========================================================================== */

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  header h1 {
    font-size: 1.65rem;
  }
}

.unit-toggle-container {
    text-align: center;
    margin: 2rem auto 1.5rem;
}

.unit-toggle-push {
    display: inline-flex;
    background: #e0e7ff;
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.unit-btn {
    padding: 14px 38px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 115px;
}

.unit-btn.active {
    background: linear-gradient(135deg, var(--primary-blue), #3a66c4);
    color: white;
    box-shadow: 0 4px 12px rgba(76,123,233,0.35);
    font-weight: 700;
}

.unit-helper {
    font-size: 0.92rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* Refrigerant diagnostic input table */
.diagnostic-table-wrapper {
  background: white;
  border: 2px solid var(--primary-blue);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem auto;
  max-width: 720px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.diagnostic-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

.diagnostic-table tr {
  border-bottom: 1px solid #e2e8f0;
}

.diagnostic-table tr:last-child {
  border-bottom: none;
}

.diagnostic-table .label-cell {
  padding: 0.75rem 1rem 0.75rem 0;
  font-weight: 600;
  color: #334155;
  width: 55%;
  vertical-align: middle;
}

.diagnostic-table .label-cell label {
  cursor: pointer;
}

.diagnostic-table .input-cell {
  padding: 0.5rem 0;
  vertical-align: middle;
}

.diagnostic-table .input-cell input,
.diagnostic-table .input-cell select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: var(--text);
  box-sizing: border-box;
}

/* Run Diagnostic — generated result panels */
.diag-status-good {
  background: #d1fae5;
  border: 3px solid #10b981;
  color: #065f46;
  padding: 1.4rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.diag-panel-key {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: #f0f9ff;
  border: 2px solid #4c7be9;
  border-radius: 10px;
  color: var(--text);
}

.diag-panel-key strong {
  display: block;
  margin-bottom: 0.4rem;
  color: #1e40af;
}

.diag-panel-flow {
  margin: 2rem 0 1.8rem;
  padding: 1.6rem;
  background: #e6f0ff;
  border: 2px solid #4c7be9;
  border-radius: 10px;
  text-align: center;
  color: var(--text);
}

.diag-panel-flow strong {
  font-size: 1.18rem;
  display: block;
  margin-bottom: 8px;
  color: #1e40af;
}

.diag-panel-flow .diag-flow-value {
  font-size: 1.6rem;
  font-weight: bold;
  color: #1e40af;
}

.diag-panel-flow .diag-flow-sub {
  color: #555;
}

.diag-details-panel {
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: var(--text);
}

.diag-details-panel h4 {
  margin: 0 0 0.5rem;
  color: #334155;
  font-size: 0.95rem;
}

.diag-advanced-panel {
  margin-top: 2.2rem;
  padding: 1.6rem;
  background: #f8f9ff;
  border: 2px solid #4c7be9;
  border-radius: 12px;
  color: var(--text);
}

.diag-advanced-panel h3 {
  color: #4c7be9;
  margin-top: 0;
}

.diag-row-alt {
  background: #f0f0f4;
}

.diag-row-alt-blue {
  background: #f0f4ff;
}

.diag-ready-msg {
  text-align: center;
  padding: 2.5rem;
  color: #4c7be9;
}

.diag-muted {
  color: #666;
}

.diag-history-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  color: var(--text);
}

.diag-history-table th,
.diag-history-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.diag-details-panel .diagnostic-table td.diag-status-cell {
  white-space: nowrap;
}

.diag-review-panel {
  text-align: center;
  padding: 1rem;
  border: 2px solid #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 0.75rem;
}

.diag-review-panel span {
  font-size: 0.95rem;
  color: #475569;
}

.text-cool {
  color: var(--primary-blue);
}

/* Key Metrics — compact status banner only (50% of base banner) */
#key-metrics-output .diag-status-good {
  padding: 0.7rem;
  margin: 0.75rem 0;
  font-size: 0.55rem;
  border-radius: 6px;
  border-width: 1.5px;
}

#key-metrics-output .diag-status-good span {
  font-size: 0.475rem;
  font-weight: 500;
}

#key-metrics-output .diag-review-panel {
  padding: 0.5rem;
  margin-bottom: 0.375rem;
  border-radius: 5px;
  border-width: 1px;
}

#key-metrics-output .diag-review-panel span {
  font-size: 0.475rem;
}

.key-metrics-table-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
}

.key-metrics-table {
  width: 100%;
  border-collapse: collapse;
}

/* Refrigerant diagnostic modals & tooltips */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
}

.modal-content {
  background-color: #fff;
  margin: 8% auto;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 460px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.modal-close {
  float: right;
  font-size: 1.9rem;
  font-weight: bold;
  cursor: pointer;
  color: #555;
}

.modal-close:hover {
  color: #000;
}

.tooltip-abbr {
  color: #111827;
  text-decoration: none;
  cursor: help;
  font-weight: 600;
}

.tooltip-abbr:hover {
  color: #111827;
}

#tooltip-popup {
  display: none;
  position: fixed;
  background: #f8fafc;
  color: #111827;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  z-index: 1100;
  max-width: 280px;
  font-size: 0.97rem;
  line-height: 1.45;
  pointer-events: none;
}

/* Overlay numeric pad (shared — numeric-pad.js) */
/* Legacy body lock (scrollLock: 'fixed') — can offset iOS hit-testing; prefer overflow mode. */
body.phvac-numpad-open {
  overflow: hidden;
  touch-action: none;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

/* Default iOS-safe lock (scrollLock: 'overflow' / numeric-pad default) */
html.phvac-numpad-overflow,
html.phvac-numpad-overflow body {
  overflow: hidden;
  overscroll-behavior: none;
}

.phvac-numpad-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.35);
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0px))
           max(0.75rem, env(safe-area-inset-right, 0px))
           max(0.75rem, env(safe-area-inset-bottom, 0px))
           max(0.75rem, env(safe-area-inset-left, 0px));
  -webkit-tap-highlight-color: transparent;
}

.phvac-numpad-overlay.is-open {
  display: flex;
}

.phvac-numpad {
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border: 2px solid var(--primary-blue);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  touch-action: manipulation;
}

.phvac-numpad-title {
  background: #e0e7ff;
  color: #1e40af;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #c7d2fe;
}

.phvac-numpad-display {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  min-height: 2.5rem;
  letter-spacing: 0.04em;
}

.phvac-numpad-display.phvac-numpad-invalid {
  background: #fee2e2;
  color: #991b1b;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: normal;
}

.phvac-numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  touch-action: manipulation;
}

.phvac-numpad-key {
  padding: 0.85rem 0.5rem;
  min-height: 48px;
  font-size: 1.15rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease, transform 0.08s ease;
}

.phvac-numpad-key.is-pressed,
.phvac-numpad-key:active {
  background: #e0e7ff;
  transform: scale(0.96);
}

.phvac-numpad-key-muted {
  background: #e2e8f0;
}

.phvac-numpad-key-muted.is-pressed,
.phvac-numpad-key-muted:active {
  background: #cbd5e1;
}

.diag-modal-link {
  cursor: pointer;
  text-decoration: none;
}

.diag-modal-link:hover {
  color: var(--primary-blue);
}

.refrigerant-loading {
  text-align: center;
  margin: 0 0 0.75rem;
  padding: 8px 14px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #92400e;
}

/* R-410A stepper page layout */
.r410a-refrigerant-switcher {
  background: #f1f5f9;
  border-color: #64748b;
  margin-bottom: 0.25rem;
}

.r454b-refrigerant-switcher {
  background: #f1f5f9;
  border-color: #64748b;
  margin-bottom: 0.25rem;
}

.r454b-page.heat-gain-page {
  margin-top: 1.25rem;
}

.r454b-page .calc-card {
  background: #fff;
}

.r454b-page .gauge-input-toggle {
  margin: 0.2rem auto 0.35rem;
}

.r454b-page .gauge-input-toggle .unit-toggle-push {
  padding: 2px;
  border-width: 1px;
  border-radius: 4px;
  box-shadow: none;
}

.r454b-page .gauge-input-toggle .unit-btn {
  padding: 3px 6px;
  font-size: 0.5rem;
  min-width: 0;
}

.r454b-page .airflow-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  justify-content: flex-start;
  margin: 0.2rem 0 0.35rem;
}

.r454b-page .airflow-toggle-row .unit-toggle-container {
  margin: 0;
}

.r410a-page.heat-gain-page {
  margin-top: 1.25rem;
}

.r410a-page .calc-card {
  background: #fff;
}

.heat-gain-page .unit-toggle-container {
  margin: 0.5rem auto 0.75rem;
}

.r410a-page .gauge-input-toggle,
.ref-calc-page .gauge-input-toggle {
  margin: 0.2rem auto 0.35rem;
}

.r410a-page .gauge-input-toggle .unit-toggle-push,
.ref-calc-page .gauge-input-toggle .unit-toggle-push {
  padding: 2px;
  border-width: 1px;
  border-radius: 4px;
  box-shadow: none;
}

.r410a-page .gauge-input-toggle .unit-btn,
.ref-calc-page .gauge-input-toggle .unit-btn {
  padding: 3px 6px;
  font-size: 0.5rem;
  min-width: 0;
  border-radius: 3px;
  line-height: 1.2;
}

.r410a-page .gauge-input-toggle .unit-btn.active,
.ref-calc-page .gauge-input-toggle .unit-btn.active {
  box-shadow: none;
}

.r410a-page .gauge-input-toggle .unit-helper,
.ref-calc-page .gauge-input-toggle .unit-helper {
  font-size: 0.72rem;
  margin-top: 4px;
  line-height: 1.25;
}

.r410a-page .setup-unit-toggle {
  margin: 0.35rem auto 0.5rem;
}

.r410a-page .setup-unit-toggle .unit-toggle-push {
  padding: 3px;
  border-radius: 6px;
}

.r410a-page .setup-unit-toggle .unit-btn {
  padding: 7px 19px;
  font-size: 0.55rem;
  min-width: 58px;
  border-radius: 4px;
}

.r410a-page .duct-validation-panel,
.ref-calc-page .duct-validation-panel {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.r410a-page .duct-validation-panel.is-error,
.ref-calc-page .duct-validation-panel.is-error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #ef4444;
}

.r410a-page .duct-validation-panel.is-warning,
.ref-calc-page .duct-validation-panel.is-warning {
  color: #854d0e;
  background: #fef9c3;
  border: 1px solid #eab308;
}

.r410a-page input.duct-field-error,
.ref-calc-page input.duct-field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.r410a-page #sec-duct-input p.label.duct-label-next,
.r410a-page #sec-duct-input p.label.duct-label-next label,
.ref-calc-page #sec-airflow p.label.coil-label-next,
.ref-calc-page #sec-airflow p.label.coil-label-next label,
.ref-calc-page #sec-duct-input p.label.duct-label-next,
.ref-calc-page #sec-duct-input p.label.duct-label-next label {
  font-weight: 700;
  color: #fff;
}

/* Electrical merged tool (PWA) — block titles inside multi-tool steps */
.electrical-calc-page .elec-block-title {
  color: var(--primary-blue, #4c7be9);
  font-size: 1rem;
  margin: 0.35rem 0 0.5rem;
  font-weight: 600;
}

/* Electrical calculated results — same grid footprint as inputs, plain text (not boxes) */
.electrical-calc-page output.elec-out,
.electrical-calc-page input.elec-out {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.32rem 0.45rem;
  min-height: 2rem;
  line-height: 1.3;
  font-size: inherit;
  font-family: inherit;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: default;
  user-select: text;
}

html.dark .electrical-calc-page output.elec-out,
html.dark-auto.dark .electrical-calc-page output.elec-out {
  color: #e2e8f0;
  background: transparent;
  border: none;
}

/* First-visit electrical disclaimer modal */
.elec-disclaimer-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
}

.elec-disclaimer-modal[hidden] {
  display: none !important;
}

.elec-disclaimer-panel {
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px 18px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  color: #0f172a;
}

/* Dark mode: match former Code note amber/orange (field-guide disclaimer) */
html.dark .elec-disclaimer-panel,
html.dark-auto.dark .elec-disclaimer-panel {
  background: #422006;
  color: #fde68a;
  border: 1px solid #b45309;
}

.elec-disclaimer-panel h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: #4c7be9;
}

html.dark .elec-disclaimer-panel h2,
html.dark-auto.dark .elec-disclaimer-panel h2 {
  color: #fde68a;
}

.elec-disclaimer-panel p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.elec-disclaimer-panel .elec-disclaimer-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 16px;
  font-size: 0.88rem;
  line-height: 1.35;
  cursor: pointer;
}

.elec-disclaimer-panel .elec-disclaimer-check input {
  margin-top: 3px;
  flex-shrink: 0;
}

.elec-disclaimer-panel .elec-disclaimer-ok {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  /* Brown-amber (more brown than pure amber) */
  background: #7c2d12;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.elec-disclaimer-panel .elec-disclaimer-ok:hover {
  background: #5c2410;
}

/* Dark panel #422006 — slightly lighter brown so the button still reads as a control */
html.dark .elec-disclaimer-panel .elec-disclaimer-ok,
html.dark-auto.dark .elec-disclaimer-panel .elec-disclaimer-ok {
  background: #9a3412;
  color: #fff;
}

html.dark .elec-disclaimer-panel .elec-disclaimer-ok:hover,
html.dark-auto.dark .elec-disclaimer-panel .elec-disclaimer-ok:hover {
  background: #7c2d12;
  color: #fff;
}

/* Step 3 region toggle (NA / Europe) + RLA/FLA */
.electrical-calc-page .elec-region-toggle {
  margin: 0.25rem 0 0.55rem;
}

.electrical-calc-page .elec-region-toggle .unit-btn {
  font-size: 0.75rem;
  min-width: 4.25rem;
  padding: 0.28rem 0.55rem;
}

.ref-calc-page .ref-calc-action-bars {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  padding: 0 8px;
  box-sizing: border-box;
}

.ref-calc-page .ref-calc-input-actions,
.ref-calc-page .ref-calc-log-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  align-items: stretch;
}

.ref-calc-page .ref-calc-input-actions[hidden],
.ref-calc-page .ref-calc-log-actions[hidden] {
  display: none !important;
}

.ref-calc-page .ref-calc-input-actions .ref-calc-compact-btn,
.ref-calc-page .ref-calc-log-actions .ref-calc-compact-btn {
  display: block;
  width: 100%;
  min-width: 0 !important;
  max-width: none;
  padding: 10px 4px;
  font-size: 0.68rem;
  min-height: 42px;
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
  background: linear-gradient(135deg, var(--primary-blue), #3a66c4) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(76, 123, 233, 0.32);
}

.ref-calc-page .ref-calc-input-actions .ref-calc-compact-btn:hover:not(:disabled),
.ref-calc-page .ref-calc-log-actions .ref-calc-compact-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(76, 123, 233, 0.4);
  background: linear-gradient(135deg, #3a66c4, var(--primary-blue)) !important;
}

.ref-calc-page .ref-calc-input-actions .ref-calc-compact-btn:disabled,
.ref-calc-page .ref-calc-log-actions .ref-calc-compact-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ref-calc-info-link {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: center;
  align-items: stretch;
  margin: 0.5rem auto 4px;
  padding: 0 16px;
  max-width: 100%;
  box-sizing: border-box;
}

.ref-calc-info-link .app-settings-link-btn {
  display: block;
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  max-width: 50%;
  padding: 3px 4px;
  font-size: 0.55rem;
  font-weight: 600;
  border-width: 1px;
  border-radius: 2px;
  line-height: 1.2;
  text-align: center;
  box-sizing: border-box;
}

.heat-gain-page .airflow-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  justify-content: flex-start;
  margin: 0.2rem 0 0.35rem;
}

.heat-gain-page .airflow-toggle-row .unit-toggle-container {
  margin: 0;
}

.ref-calc-page .airflow-toggle-row {
  flex-wrap: nowrap;
  gap: 0.35rem 0.5rem;
}

.ref-calc-page .airflow-toggle-row.ref-calc-toggle-below,
.ref-calc-page .gauge-input-toggle.ref-calc-toggle-below {
  margin-top: 0.5rem;
  margin-bottom: 0.15rem;
}

.ref-calc-page .airflow-toggle-row .gauge-input-toggle {
  flex-shrink: 0;
}

.ref-calc-page .ref-calc-coil-divider {
  border: none;
  border-top: 2px solid var(--primary-blue, #4c7be9);
  margin: 1rem 0;
}

.ref-calc-page .ref-calc-coil-group-evap {
  margin-top: 0.5rem;
}

.ref-calc-page .ref-calc-coil-group-cond {
  margin-bottom: 0.25rem;
}

.ref-calc-page .ref-calc-duct-group-sensible {
  margin-top: 0.5rem;
}

.ref-calc-page .ref-calc-duct-group-pressure {
  margin-bottom: 0.25rem;
}

.ref-calc-page #cond-air-inputs {
  grid-template-columns: 1fr 1fr;
}

.ref-calc-page .log-action-btn {
  text-decoration: none;
  text-align: center;
}

.ref-calc-page .log-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}



.heat-gain-page .calc-section .warning-box {
  margin: 0;
}

.heat-gain-page .results-placeholder {
  color: #64748b;
  font-style: italic;
  text-align: center;
  padding: 1rem 0.5rem;
  line-height: 1.45;
}

/* Important notes & references */
.warning-box {
  background: #fffbeb;
  border-color: #d97706;
  border-left-color: #d97706;
}

.warning-box h3 {
  color: #92400e;
}

.warning-box li {
  color: #78350f;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.warning-box a {
  color: #1d4ed8;
}

/* Mobile Input Zoom Fix */
input, textarea, select {
  font-size: 16px !important;
}

@media (max-width: 480px) {
  input, textarea, select {
    font-size: 17px;
  }
}

/* =============================================================== */
/* ====================== 8. CHECKBOX GROUP ====================== */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0 22px 0;
    padding: 0;
    font-size: 0.96rem;
    line-height: 1.45;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: #0066cc;           /* Your HVAC blue */
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    font-weight: 400;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.checkbox-group a {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 500;
}

.checkbox-group a:hover {
    color: #0055aa;
    text-decoration: none;
}

/* Optional: Error state when checkbox is required but not checked */
.checkbox-group.error {
    color: #d32f2f;
}

.checkbox-group.error input[type="checkbox"] {
    accent-color: #d32f2f;
    border-color: #d32f2f;
}
/* Forgot Password Link */
.forgot-link {
    display: inline-block;
    color: #0066cc;
    text-decoration: underline;
    font-size: 0.95rem;
    margin: 8px 0 20px 0;
    cursor: pointer;
}

.forgot-link:hover {
    color: #0055aa;
    text-decoration: none;
}

/* ==========================================================================
   Content Boxes & Forms
   ========================================================================== */
.content-box,
.login-box,
.cta-section {
  background: white;
  border: 2px solid var(--primary-blue);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  max-width: 720px;
  margin: 0 auto;
}

.content-box h1,
.login-box h1 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.last-updated {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label,
.form-group .label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 2px solid #d0d7e8;
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-family: inherit;
  line-height: 1.5;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(76, 123, 233, 0.15);
}

.form-group small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.form-actions {
  margin-top: 1.75rem;
  text-align: center;
}

.message {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  min-height: 1.3em;
  text-align: center;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.back-link {
  margin-top: 2rem;
  text-align: center;
}

.back-link a {
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

.note {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Disclaimer page helpers (inline moved from sizing/disclaimer.htm) */
.disclaimer-section {
    max-width: 900px;
    padding: 40px 20px;
}

.disclaimer-warning {
    background: #fff3cd;
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.25rem 0;
    text-align: center;
}

.disclaimer-warning strong {
    color: #856404;
}

/* ==========================================================================
   Heat Gain Calculator Specific Styles
   (All inline styles moved here from sizing/residential-heat-gain.htm on 2026-06-17
    for centralization ahead of dark mode support. Uses CSS vars where possible.)
   ========================================================================== */

.heat-gain-page {
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: 1.25rem;
}

.heat-gain-page .calc-title {
    margin: 0.35rem 0 0.6rem;
    font-size: 1.3rem;
    text-align: center;
}

.heat-gain-page .calc-switcher {
    text-align: center;
    margin: 0.4rem 0 0.6rem;
    padding: 0.45rem 0.65rem;
    background: var(--white);
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
}

.heat-gain-page .calc-switcher select {
    padding: 0.4rem 0.55rem !important;
    width: 100%;
    max-width: 420px;
}

.heat-gain-page .calc-card {
    padding: 0.75rem 0.85rem;
    background: var(--white);
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
}

.heat-gain-page .stepper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.heat-gain-page .section-dropdown {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.4rem 0.55rem !important;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
}

.heat-gain-page .stepper-nav {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.heat-gain-page .stepper-nav button {
    padding: 0.38rem 0.7rem;
    font-size: 0.88rem;
    border: 2px solid var(--primary-blue);
    border-radius: 6px;
    background: var(--white);
    color: var(--primary-blue);
    cursor: pointer;
}

.heat-gain-page .stepper-nav button:disabled {
    background: #e8edf3;
    color: #94a3b8;
    border-color: #cbd5e1;
    cursor: not-allowed;
    opacity: 1;
}

.heat-gain-page .calc-section .input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.35rem;
}

.heat-gain-page .calc-section .input-row.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.heat-gain-page .calc-section .input-row > div > p.label,
.heat-gain-page .calc-section > p.label {
    margin: 0 0 0.12rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.heat-gain-page .calc-section > p.label {
    margin-bottom: 0.35rem;
}

.heat-gain-page .calc-section input:not([type="checkbox"]),
.heat-gain-page .calc-section select {
    width: 100%;
    padding: 0.32rem 0.45rem !important;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.heat-gain-page .facade-group {
    margin-bottom: 0.25rem;
}

.heat-gain-page .checkbox-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0.25rem 0 0.4rem;
    font-size: 0.88rem;
    gap: 0.5rem;
    width: 100%;
}

.heat-gain-page .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    padding: 0 !important;
    border: none;
    flex-shrink: 0;
}

.heat-gain-page .checkbox-group label {
    margin: 0;
    line-height: 1.3;
}

.heat-gain-page .button-row {
    margin-top: 0.6rem !important;
    gap: 0.45rem;
}

.heat-gain-page .button-row .big-cta-btn,
.heat-gain-page .button-row .btn {
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
}

@media (max-width: 540px) {
    .heat-gain-page .calc-section .input-row.cols-3 {
        grid-template-columns: 1fr 1fr;
    }
    .heat-gain-page .calc-section .input-row.cols-3 > div:last-child {
        grid-column: 1 / -1;
    }
}

/* Calculator icon button */
.heat-gain-calc-icon-btn {
    float: right;
    margin: -2px -2px 6px 8px;
    font-size: 0.95rem;
    padding: 3px 7px;
    line-height: 1;
    border: 2px solid var(--primary-blue);
    border-radius: 6px;
    background: var(--white);
    color: var(--primary-blue);
    cursor: pointer;
    min-width: 28px;
}

/* Small hint paragraphs under sections */
.heat-gain-hint {
    font-size: 0.78rem;
    color: #555;
    margin-top: 0.1rem;
}

/* Results layer */
.heat-gain-results-layer {
    display: none;
    margin-top: 0.5rem;
}

/* Generated results content */
.heat-gain-results-h3 {
    color: var(--primary-blue);
    text-align: center;
    margin-top: 0;
}

.heat-gain-results-meta {
    font-size: 0.82rem;
    color: #555;
    text-align: center;
    margin: 0.1rem 0 0.4rem;
}

.heat-gain-results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.6rem 0 0.4rem;
    font-size: 0.97rem;
}

.heat-gain-results-table th {
    text-align: left;
    padding: 6px 4px;
    border-bottom: 2px solid var(--primary-blue);
}

.heat-gain-results-table th.right,
.heat-gain-results-table td.right {
    text-align: right;
}

.heat-gain-results-table .total-row {
    background: #f0f8ff;
    font-weight: 700;
}

.heat-gain-recommended {
    font-size: 1.35rem;
    margin: 0.6rem 0 0.4rem;
    text-align: center;
    background: #e6f0ff;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    padding: 0.6rem 1rem;
}

.heat-gain-recommended strong {
    font-size: 1.65rem;
    color: var(--primary-blue);
}

.heat-gain-note {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.45;
    margin-top: 0.5rem;
}

.heat-gain-warning {
    font-size: 0.82rem;
    background: #fff3cd;
    border: 1px solid #f39c12;
    color: #856404;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin: 0.3rem 0;
}

.heat-gain-disclaimer {
    font-size: 0.78rem;
    color: #856404;
    background: #fff8e6;
    border: 1px solid #f39c12;
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    margin-top: 0.45rem;
    line-height: 1.4;
}

.heat-gain-disclaimer a {
    color: #856404;
}

.heat-gain-error-box {
    color: #dc3545;
    background: #fff0f0;
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

/* Basic calculator modal */
.heat-gain-calc-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.heat-gain-calc-panel {
    background: var(--white);
    border: 3px solid var(--primary-blue);
    border-radius: 10px;
    width: 100%;
    max-width: 260px;
    margin: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.heat-gain-calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 2px solid var(--primary-blue);
    background: #f0f6ff;
}

.heat-gain-calc-header-title {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

.heat-gain-calc-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 0 4px;
}

.heat-gain-calc-body {
    padding: 10px 12px 12px;
}

.heat-gain-calc-display {
    background: #f8f8f8;
    border: 2px solid #ccc;
    border-radius: 6px;
    padding: 8px 10px;
    font-family: monospace;
    font-size: 1.35rem;
    text-align: right;
    min-height: 1.6em;
    margin-bottom: 8px;
    word-break: break-all;
}

.heat-gain-calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.heat-gain-calc-note {
    font-size: 0.68rem;
    color: #666;
    text-align: center;
    margin-top: 6px;
}

/* Calculator buttons inside modal */
.heat-gain-calc-btn {
    padding: 0.55rem 0.4rem;
    font-size: 0.95rem;
    border: 1px solid var(--primary-blue);
    border-radius: 5px;
    background: var(--white);
    color: #333;
    cursor: pointer;
    min-height: 38px;
}

.heat-gain-calc-btn.op {
    background: #e8f0fe;
    color: var(--primary-blue);
    font-weight: 600;
}

.heat-gain-calc-btn:hover {
    background: #f0f6ff;
}

.heat-gain-calc-btn:active {
    transform: scale(0.96);
}

.heat-gain-calc-btn.eq {
    background: var(--primary-blue);
    color: white;
    font-weight: 700;
}

/* Header link helpers (used in heat-gain page and auth injection) */
.header-link-members {
    font-weight: 600;
    color: #27ae60;
}

.header-link-donate {
    font-weight: 600;
    color: #f39c12;
}

.version-line {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.65);
    margin: 2px 0 0 0;
}

.bug-link {
    color: #a5c0ff;
}

.header-right .dark-mode-toggle {
    margin-left: 10px;
    vertical-align: middle;
}

/* Auth status injected links */
.auth-separator {
    margin: 0 6px;
    color: #888;
}

.auth-email {
    font-size: 0.85rem;
    color: #ccc;
}

.auth-link {
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-link.members {
    color: #27ae60;
    margin-left: 8px;
}

.auth-link.logout {
    color: #e74c3c;
    margin-left: 8px;
    text-decoration: none;
}

.auth-link.signin {
    color: #27ae60;
}

.auth-link.signup {
    color: #4c7be9;
    margin-left: 6px;
}

.heat-gain-pct-col {
    width: 42px;
}

/* index.htm home — light mode */
html:not(.dark) a.big-cta-btn.home-signup-btn {
  background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue)) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 5px 18px rgba(76, 123, 233, 0.4) !important;
}

html:not(.dark) a.big-cta-btn.home-signup-btn:hover {
  background: linear-gradient(135deg, #1a2840, #3a66c4) !important;
  box-shadow: 0 10px 25px rgba(76, 123, 233, 0.5) !important;
}

html:not(.dark) .home-chinook-nav {
  color: #f59e0b !important;
}

html:not(.dark) .home-chinook-quick {
  background: #4c7be9 !important;
}

html:not(.dark) .home-chinook-quick-short {
  display: none !important;
}

html:not(.dark) .home-chinook-quick-long {
  display: inline !important;
}

html:not(.dark) .home-login-link {
  color: var(--primary-blue) !important;
}

html:not(.dark) .home-tools-heading {
  text-align: center;
  color: #000 !important;
}

/* HVAC Lens product blurb (index hero) */
.home-lens-blurb {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: left;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid #d0d8f0;
  background: #f8fafc;
}

.home-lens-blurb-title {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  line-height: 1.25;
  color: #1e40af;
  text-align: center;
}

.home-lens-blurb-lead {
  margin: 0 0 0.7rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #334155;
}

.home-lens-blurb-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1e293b;
}

.home-lens-blurb-list li {
  margin: 0.28rem 0;
}

.home-lens-blurb-list li::marker {
  color: #4c7be9;
}

.heat-gain-calc-btn.span-2 {
    grid-column: 1 / 3;
}

/* ==========================================================================
   NRE explanation pages (members/*-NRE.htm, members/r134a-nre.htm)
   ========================================================================== */
.nre-back-wrap {
    max-width: 900px;
    margin: 1.5rem auto 0 auto;
    padding: 0 1rem;
}

.nre-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    background: #f8f9fa;
}

.nre-content {
    max-width: 900px;
}

.nre-title {
    text-align: center;
}

.nre-panel.output {
    max-width: 900px;
    margin: 2rem auto;
}

.nre-formula {
    font-family: monospace;
    background: #f8f9fa;
    padding: 1rem;
    border-left: 4px solid var(--primary-blue);
}

.nre-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.nre-table th,
.nre-table td {
    padding: 0.75rem;
    text-align: left;
}

.nre-table thead tr {
    background: #f0f4ff;
}

.nre-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.nre-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.nre-tip {
    margin-top: 2rem;
    padding: 1rem;
    background: #e6f0ff;
    border-radius: 8px;
}

.nre-note {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #555;
}

/* ==========================================================================
   Diagnostic log export (R-410A + my-logs.htm)
   ========================================================================== */
.log-actions {
    margin: 1.5rem 0 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    background: #f8fafc;
}

.log-actions-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    color: #1e3a5f;
}

.log-actions-hint,
.log-page-intro {
    margin: 0 0 0.85rem;
    color: #475569;
    font-size: 0.95rem;
}

.log-title-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #334155;
}

.log-title-input {
    width: 100%;
    max-width: 520px;
    padding: 0.65rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.log-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.log-actions-error {
    color: #b91c1c;
    font-size: 0.92rem;
    margin: 0 0 0.5rem;
}

.log-actions-success {
    color: #047857;
    font-size: 0.92rem;
    margin: 0 0 0.5rem;
}

.btn-primary {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}

.btn-primary:hover {
    background: #16304f;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.88rem;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.my-logs-table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}

.my-logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.my-logs-table th,
.my-logs-table td {
    padding: 0.75rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.my-logs-table thead th {
    background: #eef2ff;
    color: #1e3a5f;
}

.my-logs-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.my-logs-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;   /* small stack on the right of the Actions cell (conventional) */
    gap: 0.2rem;
    white-space: nowrap;
}

.my-logs-actions .btn,
.my-logs-actions .btn-sm {
    font-size: 60%;           /* vertically stacked + reduced to 60% size as specified */
    padding: 0.15rem 0.45rem;
    line-height: 1.1;
    margin: 0;                /* use gap on container instead of per-button margin */
}

.log-page-status,
.log-page-error {
    margin: 0.5rem 0;
}

.log-page-error {
    color: #b91c1c;
}

.log-page-empty {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}